张燕AI调整

This commit is contained in:
copcap 2023-10-10 19:18:14 +08:00
parent b380daeeb7
commit 5f48aca87a
No known key found for this signature in database
GPG Key ID: 9AE7B8AF097EC926
1 changed files with 6 additions and 6 deletions

View File

@ -824,17 +824,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var i=0;i<ai_targets.length;i++){
if(players.contains(ai_targets[i])){
var target=ai_targets[i];
var list=[0,1,2].filter(i=>!player.getStorage('ollangdao').includes(i));
var list=[0,1,2].removeArray(player.getStorage('ollangdao'));
var index=list[0];
if(get.attitude(target,player)<0){
if(!game.hasPlayer(current=>{
return player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
})) list.removeArray([0,2]);
if(player.getStorage('ollangdao').includes(2)) list.remove(0);
}
else{
if(!game.hasPlayer(current=>{
return player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
})) list.remove(1);
if(!list.includes(1)) list.remove(0);
}
@ -848,17 +848,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
setTimeout(function(){
event.interval=setInterval(function(){
var target=ai_targets.shift();
var list=[0,1,2].filter(i=>!player.getStorage('ollangdao').includes(i));
var list=[0,1,2].removeArray(player.getStorage('ollangdao'));
var index=list[0];
if(get.attitude(target,player)<0){
if(!game.hasPlayer(current=>{
return player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
})) list.removeArray([0,2]);
if(player.getStorage('ollangdao').includes(2)) list.remove(0);
}
else{
if(!game.hasPlayer(current=>{
return player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
})) list.remove(1);
if(!list.includes(1)) list.remove(0);
}