枭姬改为新写法

This commit is contained in:
Spmario233 2024-03-14 13:10:24 +08:00
parent 0034ddb5f0
commit 0fdd3750ed
2 changed files with 9 additions and 14 deletions

View File

@ -1760,23 +1760,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
},
frequent:true,
filter(event,player){
getIndex(event, player){
const evt=event.getl(player);
return evt&&evt.player==player&&evt.es&&evt.es.length>0;
if (evt && evt.player === player && evt.es) return evt.es.length;
return false;
},
async content(event,trigger,player){
event.count=trigger.getl(player).es.length;
while(event.count-->0){
player.draw(2);
if(!event.count||!player.hasSkill(event.name)) break;
if(!get.is.blocked(event.name,player)){
const chooseBoolEvent=player.chooseBool(get.prompt2('xiaoji')).set('frequentSkill','xiaoji');
chooseBoolEvent.ai=lib.filter.all;
const {result:{bool}}=await chooseBoolEvent;
if(bool) player.logSkill('xiaoji');
else break;
}
}
},
ai:{
noe:true,

View File

@ -12797,6 +12797,11 @@ return event.junling=='junling5'?1:0;});
inherit:'xiaoji',
audio:'xiaoji',
preHidden:true,
getIndex(event, player){
const evt=event.getl(player);
if (evt && evt.player === player && evt.es) return 1;
return false;
},
content:function(){
player.draw(player==_status.currentPhase?1:3);
}