diff --git a/card/yunchou.js b/card/yunchou.js index 32eb611e8..c6d420bee 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -230,7 +230,7 @@ card.yunchou={ if(target==player&&target.num('h')<=1) return 0; return 0.5; } - if(target.skills.contains('toulianghuanzhu2')) return 0; + if(target.hasSkill('toulianghuanzhu2')) return 0; return -0.5; } }, @@ -648,7 +648,7 @@ card.yunchou={ return 0; }, target:function(player,target){ - if(target.skills.contains('dujian2')||target.num('h')==0) return 0; + if(target.hasSkill('dujian2')||target.num('h')==0) return 0; if(player.num('h')<=1) return 0; return -1.5; } diff --git a/character/boss.js b/character/boss.js index 64f69d8b2..de0ad2675 100644 --- a/character/boss.js +++ b/character/boss.js @@ -155,7 +155,7 @@ character.boss={ targets[1].$gain2(cards); targets[0].damage(targets[1]); } - if(!player.skills.contains('yinmo')){ + if(!player.hasSkill('yinmo')){ event.finish(); } "step 2" @@ -208,7 +208,7 @@ character.boss={ usable:1, filterCard:{color:'black'}, filterTarget:function(card,player,target){ - return !target.skills.contains('mazui2'); + return !target.hasSkill('mazui2'); }, check:function(card){ return 6-ai.get.value(card); @@ -709,7 +709,7 @@ character.boss={ globalTo:function(from,to,distance){ if(to.isFriendOf(from)) return; for(var i=0;i0; } } @@ -992,11 +992,11 @@ character.boss={ popup:false, content:function(){ for(var i=0;i0&&event.player.skills.contains('boss_shanbeng')&&event.player.isDead(); + return player.num('e')>0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead(); }, content:function(){ player.discard(player.get('e')); @@ -1975,11 +1975,11 @@ character.boss={ } var be=target.num('e',{color:'black'}); if(target.num('h','shan')&&be){ - if(!target.skills.contains('guidao')) return 0; + if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.num('he')/2:0]; } if(target.num('h','shan')&&target.num('h')>2){ - if(!target.skills.contains('guidao')) return 0; + if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.num('h')/4:0]; } if(target.num('h')>3||(be&&target.num('h')>=2)){ @@ -1991,7 +1991,7 @@ character.boss={ if(target.num('h')==1&&!be){ return [1.2,0]; } - if(!target.skills.contains('guidao')) return [1,0.05]; + if(!target.hasSkill('guidao')) return [1,0.05]; return [1,Math.min(0.5,(target.num('h')+be)/4)]; } } diff --git a/character/extra.js b/character/extra.js index b4eac0a57..2ae699667 100755 --- a/character/extra.js +++ b/character/extra.js @@ -100,7 +100,7 @@ character.extra={ trigger:{source:'dieAfter'}, forced:true, filter:function(event,player){ - return !player.skills.contains('lianpo2'); + return !player.hasSkill('lianpo2'); }, content:function(){ player.addSkill('lianpo2'); @@ -193,7 +193,7 @@ character.extra={ audio:2, enable:'phaseUse', filter:function(event,player){ - return player.storage.baonu>=2&&!player.skills.contains('wushuang'); + return player.storage.baonu>=2&&!player.hasSkill('wushuang'); }, content:function(){ player.storage.baonu-=2; @@ -244,10 +244,10 @@ character.extra={ maixie:true, effect:{ target:function(card,player,target){ - if(player.skills.contains('jueqing')) return [1,-2]; + if(player.hasSkill('jueqing')) return [1,-2]; if(get.tag(card,'damage')){ if(target.hp==target.maxHp){ - if(!target.skills.contains('jilue')){ + if(!target.hasSkill('jilue')){ return [0,1]; } return [0.7,1]; @@ -259,7 +259,7 @@ character.extra={ if(_status.currentPhase!=player) return; if(get.type(card)=='basic'||get.type(card,'trick')=='trick') return; if(player.hp<=2) return; - if(!player.skills.contains('jilue')||player.storage.renjie==0){ + if(!player.hasSkill('jilue')||player.storage.renjie==0){ return [0,0,0,0]; } } @@ -497,7 +497,7 @@ character.extra={ effect:{ target:function(card,player,target,current){ if(target.hp<=1&&get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return [1,-5]; + if(player.hasSkill('jueqing')) return [1,-5]; var hasfriend=false; for(var i=0;i=0){ @@ -569,7 +569,7 @@ character.extra={ effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return [1,-2]; + if(player.hasSkill('jueqing')) return [1,-2]; if(target.hp==1) return; if(target.isTurnedOver()) return [0,3]; var num=0; @@ -696,7 +696,7 @@ character.extra={ player.chooseTarget('选择角色获得大雾标记', [1,Math.min(game.players.length,player.storage.qixing.length)]).ai=function(target){ if(target.isMin()) return 0; - if(target.skills.contains('biantian2')) return 0; + if(target.hasSkill('biantian2')) return 0; var att=ai.get.attitude(player,target); if(att>=4){ if(target.hp==1&&target.maxHp>2) return att; @@ -763,11 +763,11 @@ character.extra={ silent:true, content:function(){ for(var i=0;i5) return [1,-1]; @@ -2382,7 +2382,7 @@ character.hearth={ forced:true, globalFixed:true, filter:function(event,player){ - return event.player.skills.contains('bingshi')&&event.player.isDead(); + return event.player.hasSkill('bingshi')&&event.player.isDead(); }, content:function(){ trigger.player.line(player,'thunder'); @@ -2624,7 +2624,7 @@ character.hearth={ shengyan:{ trigger:{global:'recoverEnd'}, filter:function(event,player){ - return !player.skills.contains('shengyan2')&&event.player.hp0; }, filterTarget:function(card,player,target){ - return player!=target&&!target.skills.contains('mdzhoufu2'); + return player!=target&&!target.hasSkill('mdzhoufu2'); }, prepare:function(cards,player){ player.$throw(cards); @@ -3339,7 +3339,7 @@ character.hearth={ filter:function(event,player){ if(event.player==player) return false; if(_status.currentPhase!=event.player) return false; - if(event.player.skills.contains('mengun2')) return false; + if(event.player.hasSkill('mengun2')) return false; if(get.itemtype(event.card)!='card') return false; if(!player.num('h',{suit:get.suit(event.card)})) return false; return get.type(event.card)=='basic'; @@ -3448,7 +3448,7 @@ character.hearth={ trigger:{player:'discardAfter'}, direct:true, filter:function(event,player){ - if(player.skills.contains('tzhenji2')){ + if(player.hasSkill('tzhenji2')){ return false; } if(event.cards){ @@ -3581,7 +3581,7 @@ character.hearth={ ai:{ effect:function(card,player){ if(get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return [1,1]; + if(player.hasSkill('jueqing')) return [1,1]; return 1.2; } }, @@ -3727,7 +3727,7 @@ character.hearth={ else if(result.buttons.length==2){ var skill1=result.buttons[0].name; var skill2=result.buttons[1].name; - if(player.skills.contains(skill1)){ + if(player.hasSkill(skill1)){ player.removeSkill(skill1); player.addSkill(skill2); } @@ -3744,7 +3744,7 @@ character.hearth={ }, effect:function(card,player){ if(get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return; + if(player.hasSkill('jueqing')) return; return 1.2; } }, @@ -4341,7 +4341,7 @@ character.hearth={ value:10, result:{ target:function(player,target){ - if(target.skills.contains('hsmengjing_mengye')) return 0.5; + if(target.hasSkill('hsmengjing_mengye')) return 0.5; return -target.num('he'); } } diff --git a/character/shenhua.js b/character/shenhua.js index cb14faf03..3362767df 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -143,7 +143,7 @@ character.shenhua={ if(_status.event.name=='xiangle') return; var bs=player.get('h',{type:'basic'}); if(bs.length<2) return 0; - if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')) return; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; if(bs.length<=3&&player.num('h','sha')<=1){ for(var i=0;i1){ - if(player.skills.contains('jueqing')) return [1,-2]; + if(player.hasSkill('jueqing')) return [1,-2]; var max=0; for(var i=0;i0){ @@ -2601,7 +2601,7 @@ character.shenhua={ content:function(){ "step 0"; player.chooseTarget('是否发动【'+get.skillTranslation('releiji',player)+'】?').ai=function(target){ - if(target.skills.contains('hongyan')) return 0; + if(target.hasSkill('hongyan')) return 0; return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); }; "step 1" @@ -2639,11 +2639,11 @@ character.shenhua={ } var be=target.num('e',{color:'black'}); if(target.num('h','shan')&&be){ - if(!target.skills.contains('guidao')) return 0; + if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.num('he')/2:0]; } if(target.num('h','shan')&&target.num('h')>2){ - if(!target.skills.contains('guidao')) return 0; + if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.num('h')/4:0]; } if(target.num('h')>3||(be&&target.num('h')>=2)){ @@ -2655,7 +2655,7 @@ character.shenhua={ if(target.num('h')==1&&!be){ return [1.2,0]; } - if(!target.skills.contains('guidao')) return [1,0.05]; + if(!target.hasSkill('guidao')) return [1,0.05]; return [1,Math.min(0.5,(target.num('h')+be)/4)]; } } @@ -2850,7 +2850,7 @@ character.shenhua={ ai:{ effect:{ target:function(card,player,target){ - if(player.skills.contains('jueqing')) return; + if(player.hasSkill('jueqing')) return; if(get.tag(card,'damage')&&target.num('h')>1) return 0.7; } }, @@ -2951,7 +2951,7 @@ character.shenhua={ content:function(){ "step 0"; player.chooseTarget('是否发动【雷击】?').ai=function(target){ - if(target.skills.contains('hongyan')) return 0; + if(target.hasSkill('hongyan')) return 0; return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); }; "step 1" diff --git a/character/standard.js b/character/standard.js index c4f1df457..34603ce06 100755 --- a/character/standard.js +++ b/character/standard.js @@ -106,7 +106,7 @@ character.standard={ maixie:true, effect:{ target:function(card,player){ - if(player.skills.contains('jueqing')) return [1,-1]; + if(player.hasSkill('jueqing')) return [1,-1]; if(get.tag(card,'damage')) return [1,0.5]; } } @@ -133,7 +133,7 @@ character.standard={ effect:{ target:function(card,player,target){ if(player.num('he')>1&&get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return [1,-1.5]; + if(player.hasSkill('jueqing')) return [1,-1.5]; if(ai.get.attitude(target,player)<0) return [1,1]; } } @@ -230,7 +230,7 @@ character.standard={ ai:{ result:{ target:function(card,player,target){ - if(player.skills.contains('jueqing')) return [1,-1]; + if(player.hasSkill('jueqing')) return [1,-1]; if(get.tag(card,'damage')&&ai.get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; } } @@ -256,7 +256,7 @@ character.standard={ },function(target){ if(!_status.event.aicheck) return 0; var att=ai.get.attitude(_status.event.player,target); - if(target.skills.contains('tuntian')) return att/10; + if(target.hasSkill('tuntian')) return att/10; return 1-att; }).set('aicheck',check); "step 1" @@ -377,7 +377,7 @@ character.standard={ effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ - if(player.skills.contains('jueqing')) return [1,-2]; + if(player.hasSkill('jueqing')) return [1,-2]; if(!target.hasFriend()) return; if(target.hp>=4) return [1,get.tag(card,'damage')*2]; if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; @@ -620,7 +620,7 @@ character.standard={ filter:function(event,player){ if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false; if(!player.hasZhuSkill('jijiang')) return false; - if(player.skills.contains('jijiang3')) return false; + if(player.hasSkill('jijiang3')) return false; for(var i=0;i