优化【龙吟】ai

This commit is contained in:
PZ157 2023-11-27 17:20:51 +08:00
parent 14039f29b6
commit 8b76c6218f
2 changed files with 60 additions and 0 deletions

View File

@ -5820,6 +5820,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
relongyin:{
audio:2,
shaRelated:true,
init:(player)=>{
game.addGlobalSkill('relongyin_order');
},
onremove:(player)=>{
game.removeGlobalSkill('relongyin_order');
},
trigger:{global:'useCard'},
direct:true,
filter:function(event,player){
@ -5892,6 +5898,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
expose:0.2
},
subSkill:{
order:{
mod:{
aiOrder:(player,card,num)=>{
if(num&&card.name==='sha'&&get.color(card)==='red'){
let gp=game.findPlayer(current=>{
return current.hasSkill('relongyin')&&current.hasCard(i=>true,'h');
});
if(gp) return num+0.15*Math.sign(get.attitude(player,gp));
}
}
},
trigger:{player:'dieAfter'},
filter:(event,player)=>{
return !game.hasPlayer(current=>current.hasSkill('relongyin'));
},
silent:true,
forceDie:true,
charlotte:true,
content:()=>{
game.removeGlobalSkill('relongyin_order');
}
}
}
},
jiezhong:{

View File

@ -7554,6 +7554,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
longyin:{
audio:2,
shaRelated:true,
init:(player)=>{
game.addGlobalSkill('longyin_order');
},
onremove:(player)=>{
game.removeGlobalSkill('longyin_order');
},
trigger:{global:'useCard'},
direct:true,
filter:function(event,player){
@ -7626,6 +7632,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
expose:0.2
},
subSkill:{
order:{
mod:{
aiOrder:(player,card,num)=>{
if(num&&card.name==='sha'&&get.color(card)==='red'){
let gp=game.findPlayer(current=>{
return current.hasSkill('longyin')&&current.hasCard(i=>true,'h');
});
if(gp) return num+0.15*Math.sign(get.attitude(player,gp));
}
}
},
trigger:{player:'dieAfter'},
filter:(event,player)=>{
return !game.hasPlayer(current=>current.hasSkill('longyin'));
},
silent:true,
forceDie:true,
charlotte:true,
content:()=>{
game.removeGlobalSkill('longyin_order');
}
}
}
},
jigong:{