From f37112cfb145af7c63a2c7730ecb91730c21ff30 Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 27 Mar 2017 18:15:30 +0800 Subject: [PATCH] j --- card/sp.js | 2 +- card/standard.js | 8 ++++---- card/yunchou.js | 16 ++++++++-------- character/hearth.js | 4 ++-- character/jiange.js | 2 +- character/ow.js | 4 ++-- character/refresh.js | 4 ++-- character/shenhua.js | 2 +- character/sp.js | 4 ++-- character/standard.js | 4 ++-- character/yijiang.js | 2 +- mode/guozhan.js | 4 ++-- mode/versus.js | 2 +- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/card/sp.js b/card/sp.js index e3a469e45..c10745204 100644 --- a/card/sp.js +++ b/card/sp.js @@ -180,7 +180,7 @@ card.sp={ }, result:{ target:function(player,target){ - if(target.num('j','lebu')) return 0; + if(target.hasJudge('lebu')) return 0; return Math.max(1,2-target.countCards('h')/10); } } diff --git a/card/standard.js b/card/standard.js index 13ad4b324..0af142852 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1165,14 +1165,14 @@ card.standard={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','shandian')){ + if(target.hasJudge('shandian')){ target=target.next; } else{ break; } } - if(target.num('j','shandian')||target==player){ + if(target.hasJudge('shandian')||target==player){ ui.discardPile.appendChild(card); } else{ @@ -1193,14 +1193,14 @@ card.standard={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','shandian')){ + if(target.hasJudge('shandian')){ target=target.next; } else{ break; } } - if(target.num('j','shandian')||target==player){ + if(target.hasJudge('shandian')||target==player){ ui.discardPile.appendChild(card); } else{ diff --git a/card/yunchou.js b/card/yunchou.js index af2cb4207..6177386d2 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -736,14 +736,14 @@ card.yunchou={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','huoshan')){ + if(target.hasJudge('huoshan')){ target=target.next; } else{ break; } } - if(target.num('j','huoshan')||target==player){ + if(target.hasJudge('huoshan')||target==player){ ui.discardPile.appendChild(card); } else{ @@ -764,14 +764,14 @@ card.yunchou={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','huoshan')){ + if(target.hasJudge('huoshan')){ target=target.next; } else{ break; } } - if(target.num('j','huoshan')||target==player){ + if(target.hasJudge('huoshan')||target==player){ ui.discardPile.appendChild(card); } else{ @@ -844,14 +844,14 @@ card.yunchou={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','hongshui')){ + if(target.hasJudge('hongshui')){ target=target.next; } else{ break; } } - if(target.num('j','hongshui')||target==player){ + if(target.hasJudge('hongshui')||target==player){ ui.discardPile.appendChild(card); } else{ @@ -872,14 +872,14 @@ card.yunchou={ if(!card.expired){ var target=player.next; for(var iwhile=0;iwhile<10;iwhile++){ - if(target.num('j','hongshui')){ + if(target.hasJudge('hongshui')){ target=target.next; } else{ break; } } - if(target.num('j','hongshui')||target==player){ + if(target.hasJudge('hongshui')||target==player){ ui.discardPile.appendChild(card); } else{ diff --git a/character/hearth.js b/character/hearth.js index ef1783107..cd4f02929 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -5784,7 +5784,7 @@ character.hearth={ enable:true, derivation:'hs_ysera', filterTarget:function(card,player,target){ - return !target.num('j','lebu')||target.countCards('e')>0; + return !target.hasJudge('lebu')||target.countCards('e')>0; }, content:function(){ 'step 0' @@ -5793,7 +5793,7 @@ character.hearth={ target.gain(es,'gain2'); } 'step 1' - if(!target.num('j','lebu')){ + if(!target.hasJudge('lebu')){ target.addJudge(game.createCard('lebu')); } }, diff --git a/character/jiange.js b/character/jiange.js index 3f900a4d4..5c8aef247 100644 --- a/character/jiange.js +++ b/character/jiange.js @@ -431,7 +431,7 @@ character.jiange={ } var next=player.chooseTarget(true,dialog); next.ai=function(target){ - if(player.num('j','lebu')){ + if(player.hasJudge('lebu')){ if(target==player) return 0.1; } var att=ai.get.attitude(player,target); diff --git a/character/ow.js b/character/ow.js index 8c39c427f..402d81a5d 100644 --- a/character/ow.js +++ b/character/ow.js @@ -1011,7 +1011,7 @@ character.ow={ result:{ target:function(player,target){ if(ai.get.attitude(player,target)<3) return 0; - if(target.num('j','lebu')) return 0; + if(target.hasJudge('lebu')) return 0; if(target.hasSkill('aqianghua2')) return 0.1; return 1; } @@ -2310,7 +2310,7 @@ character.ow={ player.storage.zhanlong=false; }, check:function(event,player){ - if(player.num('j','lebu')) return false; + if(player.hasJudge('lebu')) return false; return true; }, filter:function(event,player){ diff --git a/character/refresh.js b/character/refresh.js index b3667f918..c7a860625 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -53,7 +53,7 @@ character.refresh={ for(var i=0;i=3&& ai.get.attitude(players[i],player)>=3){ return 11-ai.get.value(card); @@ -170,7 +170,7 @@ character.refresh={ if(target.hasSkillTag('nodu')) return 0; return -10; } - if(target.num('j','lebu')) return 0; + if(target.hasJudge('lebu')) return 0; var nh=target.countCards('h'); var np=player.countCards('h'); if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ diff --git a/character/shenhua.js b/character/shenhua.js index a3375f80d..0f7725b34 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -686,7 +686,7 @@ character.shenhua={ return target!=player; }).set('ai',function(target){ if(!_status.event.fang) return -1; - if(target.num('j','lebu')) return -1; + if(target.hasJudge('lebu')) return -1; return ai.get.attitude(player,target)-4; }).set('fang',fang); "step 1" diff --git a/character/sp.js b/character/sp.js index ff8dce4ca..7714b9c73 100644 --- a/character/sp.js +++ b/character/sp.js @@ -3915,7 +3915,7 @@ character.sp={ if(target.hp==1&&att>2){ att+=2; } - if(player.num('j','lebu')){ + if(player.hasJudge('lebu')){ if(target.hp==target.maxHp) return att-2; return att-1; } @@ -5044,7 +5044,7 @@ character.sp={ }, check:function(event,player){ if(player.countCards('h')>player.hp) return true; - if(player.num('j','lebu')) return true; + if(player.hasJudge('lebu')) return true; var ng=[]; var players=game.filterPlayer(); for(var i=0;i=3&& ai.get.attitude(players[i],player)>=3){ return 11-ai.get.value(card); @@ -544,7 +544,7 @@ character.standard={ if(target.hasSkillTag('nodu')) return 0; return -10; } - if(target.num('j','lebu')) return 0; + if(target.hasJudge('lebu')) return 0; var nh=target.countCards('h'); var np=player.countCards('h'); if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ diff --git a/character/yijiang.js b/character/yijiang.js index 91da980de..7eb331ebb 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -7127,7 +7127,7 @@ character.yijiang={ var nh2=player.countCards('h'); return nh1<=2&&nh2>nh1+1; } - if(att>0&&event.player.num('j','lebu')&&event.player.countCards('h')>event.player.hp+1) return true; + if(att>0&&event.player.hasJudge('lebu')&&event.player.countCards('h')>event.player.hp+1) return true; return false; }, logTarget:'player', diff --git a/mode/guozhan.js b/mode/guozhan.js index ad02c9314..dc72b89e2 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1433,7 +1433,7 @@ mode.guozhan={ for(var i=0;i=3&& ai.get.attitude(players[i],player)>=3){ return 11-ai.get.value(card); @@ -1470,7 +1470,7 @@ mode.guozhan={ if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ return -10; } - if(target.num('j','lebu')) return 0; + if(target.hasJudge('lebu')) return 0; var nh=target.countCards('h'); var np=player.countCards('h'); if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ diff --git a/mode/versus.js b/mode/versus.js index bc6d40e9a..aa750a1ae 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -3646,7 +3646,7 @@ mode.versus={ }); next.ai=function(target){ var att=ai.get.attitude(player,target); - if(att>0&&target.num('j','lebu')){ + if(att>0&&target.hasJudge('lebu')){ return 0.1; } if(player.countCards('h')>player.hp){