李异【缠双】优化

This commit is contained in:
mengxinzxz 2024-01-21 14:53:35 +08:00
parent 1188499ed8
commit 576fe1cd58
1 changed files with 6 additions and 4 deletions

View File

@ -764,6 +764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(card.name!='sha') return false; if(card.name!='sha') return false;
return lib.filter.filterCard.apply(this,arguments); return lib.filter.filterCard.apply(this,arguments);
}, },
forced:true,
ai1:function(card){ ai1:function(card){
return _status.event.player.getUseValue(card); return _status.event.player.getUseValue(card);
}, },
@ -819,23 +820,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return evtx&&evtx.cards2.length==2; return evtx&&evtx.cards2.length==2;
} }
}).length) num++; }).length) num++;
if(num){ if(num&&player.countCards('he',card=>player.canRecast(card))){
let result=yield player.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true); let result=yield player.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true);
if(result.bool) player.recast(result.cards); if(result.bool) yield player.recast(result.cards);
} }
if(num>1){ if(num>1&&player.countCards('he',card=>card.name=='sha'&&player.hasUseTarget(card))){
yield player.chooseToUse({ yield player.chooseToUse({
prompt:'请使用一张【杀】', prompt:'请使用一张【杀】',
filterCard:function(card,player){ filterCard:function(card,player){
if(card.name!='sha') return false; if(card.name!='sha') return false;
return lib.filter.filterCard.apply(this,arguments); return lib.filter.filterCard.apply(this,arguments);
}, },
forced:true,
ai1:function(card){ ai1:function(card){
return _status.event.player.getUseValue(card); return _status.event.player.getUseValue(card);
}, },
}); });
} }
if(num>2) yield player.chooseToDiscard('he',2,true); if(num>2&&player.countCards('he',card=>lib.filter.cardDiscardable(card,player))) yield player.chooseToDiscard('he',2,true);
}, },
}, },
}, },