From 39d148567cf53d82a1170d4adaa4cf1bdf37dde3 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 9 Aug 2016 00:04:13 +0800 Subject: [PATCH] pal --- card/swd.js | 8 +-- character/hearth.js | 4 +- character/rank.js | 3 + character/shenhua.js | 8 +-- character/xianjian.js | 148 ++++++++++++++++++++++++++++++++++++++++-- character/yijiang.js | 5 +- game/game.js | 49 ++++++++++---- game/update.js | 4 ++ mode/guozhan.js | 40 +++++++++++- mode/identity.js | 2 +- 10 files changed, 234 insertions(+), 37 deletions(-) diff --git a/card/swd.js b/card/swd.js index 8660e9181..5cd0431f6 100755 --- a/card/swd.js +++ b/card/swd.js @@ -2221,9 +2221,7 @@ card.swd={ filter:function(event){ return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); }, - logTarget:function(event){ - return event.player; - }, + logTarget:'player', content:function(){ trigger.player.draw(2); trigger.player.turnOver(); @@ -2240,9 +2238,7 @@ card.swd={ filter:function(event){ return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive(); }, - logTarget:function(event){ - return event.source; - }, + logTarget:'source', content:function(){ player.line(trigger.source,'green'); trigger.source.draw(2); diff --git a/character/hearth.js b/character/hearth.js index ccce0962e..f9f25e947 100755 --- a/character/hearth.js +++ b/character/hearth.js @@ -2590,9 +2590,7 @@ character.hearth={ } return ai.get.attitude(player,event.player)<=0; }, - logTarget:function(event){ - return event.player; - }, + logTarget:'player', content:function(){ trigger.player.draw(2); trigger.player.turnOver(); diff --git a/character/rank.js b/character/rank.js index 040a64ccd..0cc3cda07 100644 --- a/character/rank.js +++ b/character/rank.js @@ -58,6 +58,9 @@ window.characterRank={ 'ow_luxiao', ], a:[ + 'pal_longkui', + 'pal_nangonghuang', + 'pal_xingxuan', 'hs_walian', 'hs_fandral', 'hs_totemic', diff --git a/character/shenhua.js b/character/shenhua.js index 982d307a8..eae01c409 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -3097,10 +3097,10 @@ character.shenhua={ fangquan:'放权', ruoyu:'若愚', qiaobian:'巧变', - qiaobian1:'巧变-判定', - qiaobian2:'巧变-摸牌', - qiaobian3:'巧变-出牌', - qiaobian4:'巧变-弃牌', + qiaobian1:'巧变·判定', + qiaobian2:'巧变·摸牌', + qiaobian3:'巧变·出牌', + qiaobian4:'巧变·弃牌', tuntian:'屯田', tuntian_bg:'田', zaoxian:'凿险', diff --git a/character/xianjian.js b/character/xianjian.js index aa676047b..0eed84929 100755 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -5,9 +5,9 @@ character.xianjian={ pal_zhaoliner:['female','wei',3,['huimeng','tianshe']], pal_linyueru:['female','wei',3,['guiyuan','qijian']], - pal_wangxiaohu:['male','qun',4,[]], - pal_sumei:['female','shu',3,[]], - pal_shenqishuang:['female','wei',3,[]], + // pal_wangxiaohu:['male','qun',4,[]], + // pal_sumei:['female','shu',3,[]], + // pal_shenqishuang:['female','wei',3,[]], pal_jingtian:['male','wu',3,['sajin','jubao']], @@ -17,10 +17,10 @@ character.xianjian={ pal_changqing:['male','wei',4,['luanjian','tianfu']], pal_nangonghuang:['male','wei',3,['zhaoyao','sheling','zhangmu']], - pal_wenhui:['female','shu',4,[]], + // pal_wenhui:['female','shu',4,[]], pal_wangpengxu:['female','shu',3,['duxinshu','feixu']], pal_xingxuan:['male','wei',3,['feizhua','leiyu','lingxue']], - pal_leiyuange:['male','wei',3,[]], + // pal_leiyuange:['male','wei',3,[]], pal_yuntianhe:['male','wu',4,['longxi','zhuyue','guanri']], pal_hanlingsha:['female','shu',3,['tannang','tuoqiao']], @@ -30,6 +30,142 @@ character.xianjian={ }, skill:{ + sheling:{ + trigger:{global:['useCardAfter','respondAfter','discardAfter']}, + filter:function(event,player){ + if(player!=_status.currentPhase||player==event.player) return false; + if(event.cards){ + for(var i=0;i0&&player.num('h')>0; + }, + check:function(event,player){ + if(ai.get.attitude(player,event.player)>=0) return false; + var hs=player.get('h'); + if(hs.length=10&&val<=6) return true; + if(hs[i].number>=8&&val<=3) return true; + } + return false; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.chooseToCompare(trigger.player); + 'step 1' + if(result.bool){ + player.draw(2); + } + else{ + event.finish(); + } + 'step 2' + player.chooseCard('将两张牌置于牌堆顶(先选择的在上)',2,true); + 'step 3' + if(result.bool){ + player.lose(result.cards,ui.special); + event.cards=result.cards; + } + else{ + event.finish(); + } + 'step 4' + game.delay(); + var nodes=[]; + for(var i=0;i=0;i--){ + ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + } + }, + ai:{ + expose:0.2 + } + }, + zhangmu:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + return player.num('h','shan')>0; + }, + direct:true, + check:function(event,player){ + if(ai.get.damageEffect(player,event.player,player)>=0) return false; + return true; + }, + content:function(){ + "step 0" + var goon=(ai.get.damageEffect(player,trigger.player,player)<=0); + player.chooseCard('是否发动【障目】?',{name:'shan'}).ai=function(){ + return goon?1:0; + } + "step 1" + if(result.bool){ + player.showCards(result.cards); + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'}} + player.addSkill('zhangmu_ai'); + } + }, + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')&&effect<0){ + if(target.hasSkill('zhangmu_ai')) return 0; + if(target.num('h')>=2) return 0.5; + } + } + } + } + }, + zhangmu_ai:{ + trigger:{player:'loseAfter'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return player.num('h','shan')==0; + }, + content:function(){ + player.removeSkill('zhangmu_ai'); + } + }, leiyu:{ trigger:{player:'phaseEnd'}, check:function(event,player){ @@ -1753,7 +1889,7 @@ character.xianjian={ zhaoyao:'招摇', zhaoyao_info:'其他角色的摸牌阶段开始时,你可以与其拼点,若你赢,你摸两张牌,然后将两张牌置于牌堆顶', sheling:'摄灵', - sheling_info:'其他角色于你的回合内失去牌时,你可以获得之(每回合最多发动三次)', + sheling_info:'其他角色于你的回合内因使用、打出或弃置而失去牌时,你可以获得之(每回合最多发动三次)', fenxing:'分形', fenxing_info:'锁定技,回合开始阶段,你有50%概率变身为另一形态', guijiang:'鬼降', diff --git a/character/yijiang.js b/character/yijiang.js index b43f06c36..c3dcc3e48 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -5237,7 +5237,7 @@ character.yijiang={ cards.push(trigger.cards[i]); } } - player.chooseCardButton(cards,[1,cards.length],'是否发动【纵玄】?').set('ai',function(){ + player.chooseCardButton(cards,[1,cards.length],'纵玄:将弃置的牌按任意顺序置于牌堆顶(先选择的在上)').set('ai',function(){ return -1; }); "step 1" @@ -5650,6 +5650,7 @@ character.yijiang={ } return false; }, + frequent:'check', check:function(event,player){ for(var i=0;i