优化【太平要术】ai

This commit is contained in:
157 2023-12-27 15:53:07 +08:00
parent f6a70ee223
commit b69f5fa7e6
1 changed files with 12 additions and 0 deletions

View File

@ -1344,6 +1344,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){
})){
return [0,0,0,0];
}
},
target:(card,player,target)=>{
if(target._g_taipingyaoshu_temp) return;
if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){
target._g_taipingyaoshu_temp=true;
let lose=get.effect(target,{name:'losehp'},target,target),
draw=get.effect(target,{name:'wuzhong'},target,target);
if(lose<0&&target.hp<=1&&!target.hasCard(i=>{
return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable');
})) draw=0;
return [1,(lose+draw)/get.attitude(target,target)];
}
}
}
}