fix(战斗): 修正英雄复活与战斗结束时的生命值恢复逻辑

移除英雄复活时直接设置固定生命值的硬编码,改为在战斗结束阶段统一恢复所有英雄(包括墓地英雄)70%最大生命值。这确保了生命值恢复机制的一致性和可维护性,并避免了状态同步问题。
This commit is contained in:
panw
2026-04-22 20:56:44 +08:00
parent bc226ffd9b
commit 5f6f6f0bfb
3 changed files with 24 additions and 2 deletions

View File

@@ -395,7 +395,6 @@ export class HeroViewComp extends CCComp {
this.deadCD = 0;
this.as.do_buff();
this.status_change("idle");
this.model.hp =this.model.hp_max*50/100;
this.top_node.active=true
this.setTopBarOpacity(false);
this.lastBarUpdateTime=0