refactor(hero): 优化护盾系统日志与显示逻辑
1. 新增多处护盾相关调试日志,方便追踪护盾数值变化 2. 重构HeroAttrsComp的add_shield方法,统一日志输出格式 3. 重写HeroTopBarComp的护盾显示逻辑,改为直接显示数值而非按上限比例 4. 为HeroViewComp新增护盾特效管理,实现护盾状态自动显隐 5. 清理hk1.prefab中冗余的预制体覆盖配置
This commit is contained in:
@@ -539,7 +539,9 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
} else if (kind === SkillKind.Shield && sAp !== 0) {
|
||||
// 护盾值 = ap% × 施法者最终最大生命(getFinalHpMax 含驻场光环与计时 buff 加成)
|
||||
const addShield = Math.max(0, Math.floor(_cAttrsComp.getFinalHpMax() * sAp / 100));
|
||||
mLogger.log(this.debugMode, 'SCastSystem', `applyActualFriendlyEffect Shield: caster=${_cAttrsComp.hero_name}, target=${model.hero_name}, casterHpMax=${_cAttrsComp.getFinalHpMax()}, sAp=${sAp}, addShield=${addShield}, targetOldShield=${model.shield}`);
|
||||
model.add_shield(addShield);
|
||||
mLogger.log(this.debugMode, 'SCastSystem', `applyActualFriendlyEffect Shield: after add_shield, targetNewShield=${model.shield}, dirty_shield=${model.dirty_shield}`);
|
||||
}
|
||||
|
||||
if (config.buff_type !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user