feat(护盾): 将护盾机制从数值吸收改为次数免疫

- 护盾技能配置的 `ap` 字段现在表示免疫次数而非攻击力百分比
- 修改护盾计算逻辑,每次受到攻击消耗1点护盾值
- 更新日志和注释以反映新的护盾行为
This commit is contained in:
panw
2026-03-27 15:22:16 +08:00
parent 829866fe60
commit cd0004e37c
4 changed files with 20 additions and 31 deletions

View File

@@ -212,7 +212,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
model.add_hp(addHp);
target.health(addHp);
} else if (kind === SkillKind.Shield && sAp !== 0) {
const addShield = Math.floor(sAp*_cAttrsComp.ap/100);
const addShield = Math.max(0, Math.floor(sAp));
model.add_shield(addShield);
}
if (!config.buffs || config.buffs.length === 0) continue;