From b824f71e63da4f94d135ae2e3bbf4ba1adc0eae2 Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Sat, 27 Jul 2024 15:34:47 +0800 Subject: [PATCH] fix --- extension.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/extension.js b/extension.js index 0b652de..3ada765 100644 --- a/extension.js +++ b/extension.js @@ -9590,26 +9590,25 @@ if(get.type(card)=='basic' && get.type(card)=='trick') flag= true; filter(){return true}, async content(_e,_t,player){ player.removeMark('zioy_tanxi', Math.floor(player.countMark('zioy_tanxi')/2)) - game.players.forEach(p=>{ + for(let p of game.players){ p.discard(p.getCards('hej')) p.changeHujia(-p.hujia) const hp = get.infoHp(lib.character[p.name][2]); - if(p.hp > hp){ - p.loseHp(p.hp - hp) - } - if(p.hp < hp){ - p.recover(hp - p.hp) - } const maxHp = get.infoMaxHp(lib.character[p.name][2]); if(p.maxHp > maxHp){ - p.loseMaxHp(p.maxHp - maxHp) + await p.loseMaxHp(p.maxHp - maxHp) } if(p.maxHp < maxHp){ - p.gainMaxHp(maxHp - p.maxHp) + await p.gainMaxHp(maxHp - p.maxHp) + } + if(p.hp > hp){ + await p.loseHp(p.hp - hp) + } + if(p.hp < hp){ + await p.recover(hp - p.hp) } - // p.recover(p.maxHp - p.hp) p.draw(4) - }) + } }, ai: { order: 2,