diff --git a/card/gwent.js b/card/gwent.js index c69655746..0476830f6 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -270,7 +270,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ useful:[6,1], result:{ player:function(player){ - return game.countPlayer(function(current){ + return 1+game.countPlayer(function(current){ if(current!=player&¤t.isMaxHandcard()){ return -get.sgn(get.attitude(player,current)); } diff --git a/character/yijiang.js b/character/yijiang.js index 689dfc275..bc75ff2ab 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -6940,8 +6940,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ init:function(player){ player.storage.xiansi=[]; }, - unique:true, - forceunique:true, content:function(){ "step 0" player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){ @@ -7006,23 +7004,56 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, + direct:true, + delay:0, content:function(){ - "step 0" - event.target=game.findPlayer(function(current){ - return current.storage.xiansi; - }); + "step 0" + var targets=game.filterPlayer(function(current){ + if(current.storage.xiansi){ + return current.storage.xiansi.length>1&&player.canUse('sha',current,true,true); + } + return false; + }); + if(targets.length==1){ + event.target=targets[0]; + event.goto(2); + } + else if(targets.length>0){ + player.chooseTarget(true,'选择陷嗣的目标',function(card,player,target){ + return _status.event.list.contains(target); + }).set('list',targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool&&result.targets.length){ + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" if(event.target){ - player.chooseCardButton(2,event.target.storage.xiansi).set('ai',function(){ - return 1; - }); + if(event.target.storage.xiansi.length==2){ + event.directresult=event.target.storage.xiansi.slice(0); + } + else{ + player.chooseCardButton('移去两张“逆”',2,event.target.storage.xiansi,true); + } } else{ event.finish(); } - "step 1" - if(result.bool){ - for(var i=0;i