优化【雄乱】ai

This commit is contained in:
157 2023-10-26 19:51:34 +08:00 committed by GitHub
parent a9052b84c8
commit fb1e20d29b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 5 deletions

View File

@ -1382,13 +1382,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
order:13,
result:{
target:function(player,target){
target:(player,target)=>{
if(target.getEquip('bagua')||target.getEquip('rewrite_bagua')) return 0;
var hs=player.countCards('h',function(card){
return ['sha','juedou'].contains(card.name)&&get.effect(target,card,player,player)!=0;
let hs=player.countCards('h',card=>{
if(!get.tag(card,'damage')||get.effect(target,card,player,player)<=0) return 0;
if(get.name(card,player)==='sha'){
if(target.getEquip('bagua')) return 0.5;
if(target.getEquip('rewrite_bagua')) return 0.25;
}
return 1;
}),ts=target.hp+target.hujia+game.countPlayer(current=>{
if(get.attitude(current,target)>0) return current.countCards('hs')/8;
return 0;
});
var ts=target.hp;
if(hs>=ts&&ts>1) return -1;
if(hs>=ts) return -hs;
return 0;
},
},