From d7a52b8c80fed18fd3b56804d0df13a5e475dad0 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 5 Apr 2016 13:18:30 +0800 Subject: [PATCH] 1.8.2.9 --- card/refresh.js | 74 ++++++++++++----------- card/standard.js | 6 ++ character/shenhua.js | 1 - character/sp.js | 2 +- game/game.js | 122 +++++++++++++++++++++++++++++++------- game/update.js | 3 +- layout/default/layout.css | 3 + 7 files changed, 152 insertions(+), 59 deletions(-) diff --git a/card/refresh.js b/card/refresh.js index aa2422f7c..3b5cf330c 100755 --- a/card/refresh.js +++ b/card/refresh.js @@ -128,16 +128,21 @@ card.refresh={ direct:true, content:function(){ "step 0" - var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards); - player.chooseButton(dialog).filterButton=function(button){ - return trigger.filterCard(button.link); - }; + player.chooseButton(['木牛流马',player.get('e','5').cards]).set('filterButton',function(button){ + var evt=_status.event.getParent()._trigger; + if(evt&&evt.filterCard){ + return evt.filterCard(button.link,_status.event.player); + } + return true; + }); "step 1" if(result.bool){ trigger.untrigger(); trigger.responded=true; - trigger.result={bool:true,card:result.buttons[0].link}; - player.get('e','5').cards.remove(result.buttons[0].link); + trigger.result={bool:true,card:result.links[0]}; + var muniu=player.get('e','5'); + muniu.cards.remove(result.links[0]); + lib.skill.muniu_skill.sync(muniu); } }, ai:{ @@ -148,7 +153,6 @@ card.refresh={ }, muniu_skill4:{ enable:'chooseToUse', - direct:true, filter:function(event,player){ var muniu=player.get('e','5'); if(!muniu.cards) return false; @@ -158,12 +162,18 @@ card.refresh={ } return false; }, - delay:0, - content:function(){ - "step 0" - var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards); - var trigger=event.parent.parent; - player.chooseButton(dialog,function(button){ + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('木牛流马',player.get('e','5').cards,'hidden'); + }, + filter:function(button,player){ + var evt=_status.event.getParent(); + if(evt&&evt.filterCard){ + return evt.filterCard(button.link,player,_status.event.getParent()); + } + return true; + }, + check:function(button){ var player=_status.event.player; if(get.select(get.info(button.link).selectTarget)[1]==-1){ if(get.type(button.link)=='delay') return -1; @@ -182,28 +192,29 @@ card.refresh={ return -1; } return 1; - }).filterButton=function(button){ - return trigger.filterCard(button.link,player,trigger); - }; - player.addTempSkill('muniu_skill8',['useCardAfter','phaseAfter']); - "step 1" - if(result.bool){ - lib.skill.muniu_skill5.viewAs=result.buttons[0].link; - event.parent.parent.backup('muniu_skill5'); - event.parent.parent.step=0; - if(event.isMine()){ - event.parent.parent.openskilldialog='选择'+get.translation(result.buttons[0].link)+'的目标'; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + viewAs:links[0], + onuse:function(result,player){ + var muniu=player.get('e','5'); + if(muniu&&muniu.cards){ + muniu.cards.remove(result.card); + lib.skill.muniu_skill.sync(muniu); + } + } } - } - else{ - event.parent.parent.step=0; + }, + prompt:function(links,player){ + return '选择'+get.translation(links)+'的目标'; } }, ai:{ order:4, result:{ player:function(player){ - if(player.skills.contains('muniu_skill8')) return 0; if(_status.dying) return ai.get.attitude(player,_status.dying); return 1; } @@ -212,12 +223,7 @@ card.refresh={ value:-1 } }, - muniu_skill5:{ - filterCard:function(){return false}, - selectCard:-1 - }, muniu_skill6:{}, - muniu_skill8:{}, muniu_skill7:{ filter:function(){return false}, hiddenCard:function(player,name){ @@ -273,8 +279,8 @@ card.refresh={ muniu_skill2:'流马', muniu_skill3:'流马', muniu_skill4:'流马', - muniu_skill5:'流马', muniu_skill6:'流马', + muniu_skill4_backup:'流马', muniu_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。', muniu_skill_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。', }, diff --git a/card/standard.js b/card/standard.js index edc510786..93768a5f9 100755 --- a/card/standard.js +++ b/card/standard.js @@ -1383,6 +1383,12 @@ card.standard={ event.state=true; event.card=trigger.card; event._global_waiting=true; + event.filterCard=function(card,player){ + if(card.name!='wuxie') return false; + var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s')); + if(mod!='unchanged') return mod; + return true; + }; event.send=function(player,state,isJudge,card,source,target,targets,id){ state=state?1:-1; var str=''; diff --git a/character/shenhua.js b/character/shenhua.js index 551a3c568..bd4aa06fd 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -2749,7 +2749,6 @@ character.shenhua={ player.storage.buqu.push(event.card); game.addVideo('storage',player,['buqu',get.cardsInfo(player.storage.buqu),'cards']); player.showCards(player.storage.buqu,'不屈') - game.log(player,'的不屈牌为',player.storage.buqu); player.markSkill('buqu'); "step 1" for(var i=0;i=info.usable) enable=false; } if(enable){ @@ -23110,6 +23182,9 @@ }, funcInfoOL:function(func){ if(typeof func=='function'){ + if(func._filter_args){ + return '_noname_func:'+JSON.stringify(get.stringifiedResult(func._filter_args,3)); + } return '_noname_func:'+func.toString(); } return ''; @@ -23122,6 +23197,9 @@ catch(e){ return function(){}; } + if(Array.isArray(func)){ + func=get.filter.apply(this,get.parsedResult(func)); + } return func; }, stringifiedResult:function(item,level){ @@ -23683,7 +23761,7 @@ filter:function(filter,i){ if(typeof filter=='function') return filter; if(i==undefined) i=0; - return function(){ + var result=function(){ if(filter==arguments[i]) return true; for(var j in filter){ if(filter.hasOwnProperty(j)){ @@ -23742,6 +23820,8 @@ } return true; } + result._filter_args=[filter,i]; + return result; }, cardCount:function(card,player){ var num; diff --git a/game/update.js b/game/update.js index dc5666ea8..9ab0c60e7 100644 --- a/game/update.js +++ b/game/update.js @@ -2,7 +2,6 @@ window.noname_update={ version:'1.8.2.9', changeLog:[ '联机死亡后可退出', - '修复双击换肤', - '修复不能出酒的bug' + 'bug修复:换肤、濒死出酒、无懈、自定义模式、木马' ] } diff --git a/layout/default/layout.css b/layout/default/layout.css index 401547e23..79b9a1137 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -62,6 +62,9 @@ table{table-layout: fixed;} position: relative; transition: all 0.5s; } +#splash>div:hover{ + transform: scale(1.02); +} #splash>div.hidden{ transform: translateY(-200px); }