From a65b14798854817067f08ec1007384fe525d07f5 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 13 Jun 2017 23:17:05 +0800 Subject: [PATCH] le --- card/gwent.js | 4 +++- card/sp.js | 1 + card/swd.js | 3 +++ game/game.js | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/card/gwent.js b/card/gwent.js index 7ecbcd2e1..89c67c1a5 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -678,7 +678,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ subtype:'spell_silver', vanish:true, enable:true, - filterTarget:true, + filterTarget:function(card,player,target){ + return target!=player; + }, content:function(){ 'step 0' if(!player.countCards('h')){ diff --git a/card/sp.js b/card/sp.js index 310395a46..d14727d62 100644 --- a/card/sp.js +++ b/card/sp.js @@ -253,6 +253,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } } }, + clearLose:true, equipDelay:false, loseDelay:false, skills:['muniu_skill','muniu_skill2','muniu_skill6','muniu_skill7'], diff --git a/card/swd.js b/card/swd.js index 912bba3eb..693961efc 100644 --- a/card/swd.js +++ b/card/swd.js @@ -652,6 +652,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ onLose:function(){ player.unmarkSkill('lianyaohu_skill'); }, + clearLose:true, ai:{ equipValue:6 }, @@ -1949,6 +1950,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, equipDelay:false, loseDelay:false, + clearLose:true, onLose:function(){ player.storage.nigong=0; player.unmarkSkill('nigong'); @@ -1964,6 +1966,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ skills:['xujin'], equipDelay:false, loseDelay:false, + clearLose:true, onLose:function(){ player.storage.xujin=0; }, diff --git a/game/game.js b/game/game.js index e209eb6f7..e66ee0468 100644 --- a/game/game.js +++ b/game/game.js @@ -16151,6 +16151,12 @@ this.removeSkillTrigger(info.skills[j]); } } + if(info.clearLose&&typeof info.onLose=='function'){ + var next=game.createEvent('lose_'+card.name); + next.setContent(info.onLose); + next.player=this; + next.card=card; + } } else{ var es=this.getCards('e');