From ae5a33e2e8c90699263cdd063ae5bf91cefac962 Mon Sep 17 00:00:00 2001 From: zhangxk Date: Fri, 15 Sep 2023 10:13:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E7=A8=B7=E4=B8=8B=E5=AD=A6?= =?UTF-8?q?=E5=AE=AB):=20=E4=BF=AE=E5=A4=8D=E5=9C=A3=E7=89=A9=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E8=A1=80=E9=87=8F=E5=9C=A8=E6=88=98=E6=96=97=E4=B8=AD?= =?UTF-8?q?=E6=AD=BB=E4=BA=A1=E4=B8=8D=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/servers/battle/handler/rougeHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game-server/app/servers/battle/handler/rougeHandler.ts b/game-server/app/servers/battle/handler/rougeHandler.ts index 607eeffa9..01c5f238b 100644 --- a/game-server/app/servers/battle/handler/rougeHandler.ts +++ b/game-server/app/servers/battle/handler/rougeHandler.ts @@ -468,7 +468,7 @@ export class RougeHandler { if (chara.maxHp < hp) hp = chara.maxHp; if (recoveryHp && hp == 0) hp = chara.maxHp; - if (hpRatio > 0) hp = Math.min(Math.floor(hp + (chara.maxHp * hpRatio / 100)), chara.maxHp); + if (hpRatio > 0 && hp != 0) hp = Math.min(Math.floor(hp + (chara.maxHp * hpRatio / 100)), chara.maxHp); if ((recoveryNum--) > 0 && hp == 0) { hp = chara.maxHp; }