From 701382e8686503c94718a9f83e3706b91d68f838 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 4 Feb 2026 15:46:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E7=9A=84MP=E5=9B=9E=E5=A4=8D=E9=80=BB=E8=BE=91=E5=92=8C?= =?UTF-8?q?=E8=B4=9F=E5=90=91HP=E5=9B=9E=E5=A4=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理HeroAttrSystem中未使用的MP回复相关代码,并移除负向HP回复(扣血)的不必要处理,因为扣血已有独立逻辑处理。 --- assets/script/game/hero/HeroAttrsSystem.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/assets/script/game/hero/HeroAttrsSystem.ts b/assets/script/game/hero/HeroAttrsSystem.ts index 2cd4597e..7f567bfc 100644 --- a/assets/script/game/hero/HeroAttrsSystem.ts +++ b/assets/script/game/hero/HeroAttrsSystem.ts @@ -87,11 +87,6 @@ export class HeroAttrSystem extends ecs.ComblockSystem // 2. HP/MP 自然回复(业务规则) // 加上回血/回蓝属性的影响 const hpRegen = model.Attrs[Attrs.HP_REGEN] || 0; - const mpRegen = model.Attrs[Attrs.MP_REGEN] || 0; - - // model.hp += HRegen.HP + hpRegen; - // model.add_hp(HRegen.HP + hpRegen, true); - // 回血逻辑 + 视图表现 const totalHpRegen = HRegen.HP + hpRegen; if (totalHpRegen > 0) { @@ -101,10 +96,6 @@ export class HeroAttrSystem extends ecs.ComblockSystem if (view) { view.health(totalHpRegen); } - } else if (totalHpRegen < 0) { - // 如果是扣血(虽然叫 regen),走正常的扣血逻辑? - // 暂时按原样处理,只处理正向回血的特效 - model.add_hp(totalHpRegen, false); } }