Merge pull request #890 from PZ157/PR-Branch

bugfix,AI优化
This commit is contained in:
Spmario233 2024-02-02 00:26:59 +08:00 committed by GitHub
commit 0fd1eabddd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -5041,7 +5041,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(effect>0) return '选项二';
}
}else{
loses.forEach(i=>effect-=get.effect(i,{name:'losehp'},player,player));
loses.forEach(i=>effect+=get.effect(i,{name:'losehp'},player,player));
recovers.forEach(i=>effect+=get.recoverEffect(i,player,player));
if(effect>0) return '选项二';
return '选项一';

View File

@ -4554,8 +4554,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.directHit.addArray(game.players);
var info=get.info(trigger.card);
if(info.allowMultiple==false) event.finish();
else if(trigger.targets&&!info.multitarget){
if(!game.hasPlayer(function(current){
else if(trigger.targets){
if(!info.multitarget&&!game.hasPlayer(function(current){
return !trigger.targets.includes(current)&&lib.filter.targetEnabled2(trigger.card,player,current);
})) event.finish();
}