diff --git a/card/swd.js b/card/swd.js index 9d1313a1f..1d17e29fa 100644 --- a/card/swd.js +++ b/card/swd.js @@ -7,23 +7,24 @@ card.swd={ filterTarget:function(card,player,target){ return target==player; }, + modTarget:true, content:function(){ 'step 0' var choice; - if(player.num('h','shan')==0||player.num('h','sha')==0||player.hp<=1){ + if(target.num('h','shan')==0||target.num('h','sha')==0||target.hp<=1){ choice='basic'; } else{ - var e2=player.get('e','2'); - var e3=player.get('e','3'); - if((e2&&e3)||((e2||e3)&&player.needsToDiscard()<=1)||Math.random()<0.5){ + var e2=target.get('e','2'); + var e3=target.get('e','3'); + if((e2&&e3)||((e2||e3)&&target.needsToDiscard()<=1)||Math.random()<0.5){ choice='trick'; } else{ choice='equip'; } } - player.chooseControl('basic','trick','equip',function(){ + target.chooseControl('basic','trick','equip',function(){ return choice; }).set('prompt','选择一种卡牌类型'); 'step 1' @@ -33,12 +34,12 @@ card.swd={ list[i]=[get.translation(result.control),'',list[i]]; } var dialog=ui.create.dialog('选择一张加入你的手牌',[list,'vcard'],'hidden'); - player.chooseButton(dialog,true).ai=function(button){ + target.chooseButton(dialog,true).ai=function(button){ return ai.get.value({name:button.link[2]}); }; 'step 2' if(result.buttons){ - player.gain(game.createCard(result.buttons[0].link[2]),'draw'); + target.gain(game.createCard(result.buttons[0].link[2]),'draw'); } }, selectTarget:-1, diff --git a/game/game.js b/game/game.js index e9c2368c4..d7693ae17 100644 --- a/game/game.js +++ b/game/game.js @@ -6353,7 +6353,7 @@ } } else{ - get.card().aiexclude(); + get.card(true).aiexclude(); game.uncheck(); } event.redo(); @@ -7153,7 +7153,7 @@ _status.event.aiexclude.length=0; } else{ - get.card().aiexclude(); + get.card(true).aiexclude(); game.uncheck(); event.redo(); game.resume(); @@ -32704,7 +32704,7 @@ if(typeof select=='function') return get.select(select()); return [1,1] }, - card:function(){ + card:function(original){ if(_status.event.skill){ var card=get.info(_status.event.skill).viewAs; if(card) return card; @@ -32713,6 +32713,7 @@ return _status.event._get_card; } var card=ui.selected.cards[0]; + if(original) return card; if(card){ var info=get.info(card); if(info.autoViewAs){ diff --git a/game/update.js b/game/update.js index 3f0ca30f9..00e1b762e 100644 --- a/game/update.js +++ b/game/update.js @@ -5,7 +5,7 @@ window.noname_update={ 'bug修复', ], files:[ - // 'game/game.js', + 'game/game.js', // 'game/package.js', // 'game/asset.js', // 'card/hearth.js',