From 21185a0754eb976fcf1211ca3fd96f58dc9f0718 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Thu, 25 Jan 2024 22:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=84=E7=90=86=E5=8C=BA?= =?UTF-8?q?=E7=9A=84=E7=89=8C=E8=BF=9B=E5=85=A5=E5=BC=83=E7=89=8C=E5=A0=86?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/jsrg.js | 6 ++---- character/tw.js | 11 ++--------- noname/library/element/content.js | 8 ++++++-- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/character/jsrg.js b/character/jsrg.js index 2ba385f8f..5f526df91 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -1806,10 +1806,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.getHistory('lose').length; }, frequent:true, - content(){ - 'step 0' - player.judge(); - 'step 1' + async content(event,trigger,player){ + const {result} = await player.judge(); let num = 0; game.getGlobalHistory('cardMove',evt=>{ if(evt.name!='cardsDiscard'){ diff --git a/character/tw.js b/character/tw.js index 8e0cab2a5..617b494b2 100644 --- a/character/tw.js +++ b/character/tw.js @@ -4773,15 +4773,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 3' if(result.bool) target.addExpose(0.1); else{ - var next=game.createEvent('twdingzhen_addSkill'); - event.next.remove(next); - trigger.after.push(next); - next.target=target; - next.player=player; - next.setContent(function(){ - target.addSkill('twdingzhen_target'); - target.markAuto('twdingzhen_target',[player]); - }) + target.addSkill('twdingzhen_target'); + target.markAuto('twdingzhen_target',[player]); } 'step 4' if(event.num