优化【哀尘】ai

This commit is contained in:
157 2023-10-06 18:45:38 +08:00 committed by GitHub
parent c56bc731bd
commit 82a98ec061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -3863,6 +3863,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
dcaichen:{
audio:2,
init:function(player){
game.addGlobalSkill('dcaichen_hit');
},
onremove:function(player){
game.removeGlobalSkill('dcaichen_hit');
},
trigger:{
player:['loseAfter','phaseDiscardBefore'],
global:'loseAsyncAfter',
@ -3886,6 +3892,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.directHit.add(player);
game.log(player,'不可响应',trigger.card);
}
},
subSkill:{
hit:{
trigger:{player:'dieAfter'},
filter:function(event,player){
return !game.hasPlayer(current=>current.hasSkill('dcaichen'));
},
silent:true,
forceDie:true,
content:function(){
game.removeGlobalSkill('dcaichen_hit');
},
ai:{
directHit_ai:true,
skillTagFilter:function(player,tag,arg){
return arg&&arg.card&&arg.target&&arg.target.hasSkill('dcaichen')&&ui.cardPile.childNodes.length<40&&get.suit(arg.card)==='spade';
}
}
}
}
},
//杨彪