From 235100e50ce367fca35b5c4386d2c260c45850f2 Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Sat, 9 Dec 2023 10:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E7=89=88=E5=8C=85=E6=8A=80?= =?UTF-8?q?=E8=83=BDstdshushen=E6=8A=80=E8=83=BD=E4=BD=BF=E7=94=A8async=20?= =?UTF-8?q?content?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/standard.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/character/standard.js b/character/standard.js index 6308d4dff..ac9d86b80 100755 --- a/character/standard.js +++ b/character/standard.js @@ -99,23 +99,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'shushen', trigger:{player:'recoverEnd'}, direct:true, - content:function(){ - 'step 0' + async content(event,trigger,player){ event.num=trigger.num||1; - 'step 1' - player.chooseTarget(get.prompt2('stdshushen'),lib.filter.notMe).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 2' - if(result.bool){ - var target=result.targets[0]; + while(player.hasSkill('stdshushen')){ + const {result:{targets}}=await player.promises.chooseTarget(get.prompt2('stdshushen'),lib.filter.notMe) + .set('ai',target=>get.attitude(_status.event.player,target)); + const target=targets[0]; player.logSkill('stdshushen',target); - target.draw(target.countCards('h')?1:2); - if(event.num>1&&player.hasSkill('stdshushen')){ - event.num--; - event.goto(1); - } - } + await target.promises.draw(target.countCards('h')?1:2); + if(--event.num<1) break; + }; }, ai:{threaten:0.8,expose:0.1}, },