优化十周年张济【屯军】ai

This commit is contained in:
157 2023-09-23 15:44:10 +08:00 committed by GitHub
parent 701a345d0e
commit f23024433f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 3 deletions

View File

@ -8958,10 +8958,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
ai:{
order:1,
result:{
target:0,
order:function(){
var player=_status.event.player,num=0;
for(var i=1;i<6;i++){
num+=player.countEquipableSlot(i);
}
if(num<=2) return 6;
if(player.hp<=2||!game.hasPlayer((current)=>{
if(player==current||get.attitude(player,current)<0||current.hp<=1) return false;
return current.hp>2||current.countCards('hs')>2;
})) return 1;
return 0;
},
result:{
target:function(player,target){
var num=0;
for(var i=1;i<6;i++){
num+=target.countEquipableSlot(i);
}
return num;
}
}
},
mark:true,
intro:{