修复【共患】全局ai失效的bug

This commit is contained in:
157 2023-10-25 14:04:15 +08:00 committed by GitHub
parent 9cfa4c92ba
commit 89e476a88f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -3331,16 +3331,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(_status.luanchou_judging) return; if(_status.luanchou_judging) return;
_status.luanchou_judging=true;
if(get.tag(card,'damage')&&target.hasMark('luanchou')){ if(get.tag(card,'damage')&&target.hasMark('luanchou')){
var other=game.findPlayer(function(current){ var other=game.findPlayer(function(current){
return current!=target&&current.hasMark('luanchou')&&current.hp>target.hp&&(!current.storage.counttrigger||!current.storage.counttrigger.gonghuan); return current!=target&&current.hasMark('luanchou')&&current.hp>target.hp&&(!current.storage.counttrigger||!current.storage.counttrigger.gonghuan);
}); });
if(!other){ if(!other) return;
delete _status.luanchou_judging; _status.luanchou_judging=true;
return; var eff=[0,0,0,get.damageEffect(other,player,player,get.nature(card))/get.attitude(player,player)];
};
var eff=[0,0,0,get.damageEffect(other,player,target,get.nature(card))];
delete _status.luanchou_judging; delete _status.luanchou_judging;
return eff; return eff;
} }