标准版包技能stdshushen技能使用async content

This commit is contained in:
shijian 2023-12-09 10:40:10 +08:00
parent 909d62982e
commit 235100e50c
1 changed files with 8 additions and 15 deletions

View File

@ -99,23 +99,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'shushen', audio:'shushen',
trigger:{player:'recoverEnd'}, trigger:{player:'recoverEnd'},
direct:true, direct:true,
content:function(){ async content(event,trigger,player){
'step 0'
event.num=trigger.num||1; event.num=trigger.num||1;
'step 1' while(player.hasSkill('stdshushen')){
player.chooseTarget(get.prompt2('stdshushen'),lib.filter.notMe).set('ai',function(target){ const {result:{targets}}=await player.promises.chooseTarget(get.prompt2('stdshushen'),lib.filter.notMe)
return get.attitude(_status.event.player,target); .set('ai',target=>get.attitude(_status.event.player,target));
}); const target=targets[0];
'step 2'
if(result.bool){
var target=result.targets[0];
player.logSkill('stdshushen',target); player.logSkill('stdshushen',target);
target.draw(target.countCards('h')?1:2); await target.promises.draw(target.countCards('h')?1:2);
if(event.num>1&&player.hasSkill('stdshushen')){ if(--event.num<1) break;
event.num--; };
event.goto(1);
}
}
}, },
ai:{threaten:0.8,expose:0.1}, ai:{threaten:0.8,expose:0.1},
}, },