From 340cb0e8d84ccca48243adfee4068ee2ead0a0e8 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 28 Feb 2017 13:40:28 +0800 Subject: [PATCH] 2 --- card/guozhan.js | 1 + card/swd.js | 3 +-- card/yunchou.js | 3 ++- character/shenhua.js | 7 +++---- character/sp.js | 7 +++---- character/standard.js | 15 +++++++-------- character/yijiang.js | 3 +++ game/game.js | 11 +++++++---- 8 files changed, 27 insertions(+), 23 deletions(-) diff --git a/card/guozhan.js b/card/guozhan.js index 7542726f0..ec96310dc 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -771,6 +771,7 @@ card.guozhan={ nothunder:true, effect:{ target:function(card,player,target,current){ + if(player.hasSkillTag('unequip',false,card)) return; if(get.tag(card,'natureDamage')) return 'zerotarget'; if(card.name=='tiesuo'){ return [0,0]; diff --git a/card/swd.js b/card/swd.js index 53aa445ff..50b8ca283 100644 --- a/card/swd.js +++ b/card/swd.js @@ -4462,9 +4462,8 @@ card.swd={ trigger:{player:'damageBegin'}, forced:true, filter:function(event,player){ - if(event.source&&event.source.num('s','unequip')) return false; + if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return false; if(Math.random()>1/3) return false; - if(event.parent.player.num('s','unequip')) return false; return true; }, content:function(){ diff --git a/card/yunchou.js b/card/yunchou.js index 321851c24..5a60997c2 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -992,7 +992,7 @@ card.yunchou={ suolianjia:{ trigger:{player:'damageBefore'}, filter:function(event){ - if(event.source&&event.source.num('s','unequip')) return; + if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return; if(event.nature) return true; }, forced:true, @@ -1005,6 +1005,7 @@ card.yunchou={ nothunder:true, effect:{ target:function(card,player,target,current){ + if(player.hasSkillTag('unequip',false,card)) return; if(get.tag(card,'natureDamage')) return 'zerotarget'; if(card.name=='tiesuo'){ return [0,0]; diff --git a/character/shenhua.js b/character/shenhua.js index fac594dab..13659c689 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -2642,8 +2642,7 @@ character.shenhua={ audio:2, inherit:'bagua_skill', filter:function(event,player){ - if(!event.filterCard({name:'shan'})) return false; - if(event.getParent().player.num('s','unequip')) return false; + if(!lib.skill.bagua_skill.filter(event,player)) return false; if(player.get('e','2')) return false; return true; }, @@ -2651,10 +2650,10 @@ character.shenhua={ effect:{ target:function(card,player,target){ if(player==target&&get.subtype(card)=='equip2'){ - if(ai.get.equipValue(card)<=8) return 0; + if(ai.get.equipValue(card)<=7.5) return 0; } if(target.get('e','2')) return; - if(player.hasSkill('unequip')) return; + if(player.hasSkillTag('unequip',false,card)) return; if(get.tag(card,'respondShan')) return [0.5,0]; } } diff --git a/character/sp.js b/character/sp.js index 4f9c2748a..12cc023a5 100644 --- a/character/sp.js +++ b/character/sp.js @@ -3009,8 +3009,7 @@ character.sp={ linglong:{ inherit:'bagua_skill', filter:function(event,player){ - if(!event.filterCard({name:'shan'})) return false; - if(event.parent.player.num('s','unequip')) return false; + if(!lib.skill.bagua_skill.filter(event,player)) return false; if(player.get('e','2')) return false; return true; }, @@ -3018,10 +3017,10 @@ character.sp={ effect:{ target:function(card,player,target){ if(player==target&&get.subtype(card)=='equip2'){ - if(ai.get.equipValue(card)<=8) return 0; + if(ai.get.equipValue(card)<=7.5) return 0; } if(target.get('e','2')) return; - if(player.hasSkill('unequip')) return; + if(player.hasSkillTag('unequip',false,card)) return; if(get.tag(card,'respondShan')) return [0.5,0]; } } diff --git a/character/standard.js b/character/standard.js index 80f715959..257d24a2a 100644 --- a/character/standard.js +++ b/character/standard.js @@ -763,14 +763,13 @@ character.standard={ if(card.name=='sha') return Infinity; } }, - trigger:{player:'useCard'}, - forced:true, - priority:10, - filter:function(event,player){ - return get.zhu(player,'shouyue')&&event.card.name=='sha'; - }, - content:function(){ - player.addTempSkill('unequip','useCardAfter'); + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!get.zhu(player,'shouyue')) return false; + if(arg&&arg.name=='sha') return true; + return false; + } } }, guanxing:{ diff --git a/character/yijiang.js b/character/yijiang.js index d3967b631..491aa8fa0 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -5885,6 +5885,9 @@ character.yijiang={ ai:{ effect:{ target:function(card,player,target){ + if(player==target&&get.subtype(card)=='equip2'){ + if(ai.get.equipValue(card)<=8) return 0; + } if(target.get('e','2')) return; if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; } diff --git a/game/game.js b/game/game.js index ca2ac8d74..5178bebdb 100644 --- a/game/game.js +++ b/game/game.js @@ -35639,7 +35639,7 @@ id:function(){ return (Math.floor(1000000+9000000*Math.random())).toString()+(10+lib.status.globalId++); }, - zhu:function(player,skill){ + zhu:function(player,skill,unseen){ if(typeof player=='string'){ skill=player; player=null; @@ -35662,10 +35662,13 @@ } else if(mode=='guozhan'){ for(var i=0;i