优化刘永【封乡】ai

This commit is contained in:
157 2023-09-30 21:47:59 +08:00 committed by GitHub
parent 45ad033c53
commit b5e9eff36d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -8235,6 +8235,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return max2;
},
audio:2,
init:function(player){
game.addGlobalSkill('fengxiang_use');
},
onremove:function(player){
game.removeGlobalSkill('fengxiang_use');
},
trigger:{player:'damageEnd'},
forced:true,
filter:function(event,player){
@ -8265,6 +8271,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.draw();
},
},
use:{
mod:{
aiOrder:function(player,card,num){
if(num>0&&get.itemtype(card)==='card'&&card.hasGaintag('fengxiang_tag')&&game.hasPlayer(current=>{
return current.hasSkill('fengxiang')&&get.attitude(player,current)>0;
})) return num+10;
}
},
trigger:{player:'dieAfter'},
filter:function(event,player){
for(let i of game.players){
if(i.hasSkill('fengxiang')) return false;
}
return true;
},
silent:true,
content:function(){
game.removeGlobalSkill('fengxiang_use');
}
}
},
},
//阚泽