优化典孙权【制衡】和【酒】ai

This commit is contained in:
PZ157 2023-12-10 19:07:30 +08:00
parent af73425f94
commit b5433f71a9
2 changed files with 15 additions and 3 deletions

View File

@ -155,10 +155,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
effs[i].eff=temp; effs[i].eff=temp;
return false; return false;
}); });
if(effs[i].target&&(target.hasSkillTag('directHit_ai',true,{ if(!effs[i].target) continue;
if(target.hasSkillTag('directHit_ai',true,{
target:effs[i].target, target:effs[i].target,
card:i card:i
},true) || target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use'))){ },true) || usable===1&&(target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use'))){
delete target._jiu_temp; delete target._jiu_temp;
return 1; return 1;
} }

View File

@ -372,10 +372,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
ai:{ ai:{
order:1, order:function(item,player){
if(player.hasCard((i)=>{
return get.value(i)>Math.max(6,9-player.hp);
},'he')) return 1;
return 10;
},
result:{ result:{
player:1 player:1
}, },
nokeep:true,
skillTagFilter:function(player,tag,arg){
if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&player.countSkill('dczhiheng')<1+player.getStorage('dczhiheng_hit').length&&player.hasCard((card)=>{
return get.name(card)!=='tao';
},'h');
},
threaten:1.55 threaten:1.55
}, },
}, },