feat: 新增穿透伤害加成机制与相关配置

1. 新增全局穿透伤害衰减系数配置与英雄属性字段
2. 实现穿透伤害加成的计算逻辑与增益buff
3. 补全技能与英雄配置的相关变更
4. 新增穿透伤害相关的光环与技能配置
This commit is contained in:
panFD
2026-08-11 21:44:50 +08:00
parent f251e57c3c
commit c65c8a36ab
11 changed files with 100 additions and 1482 deletions

View File

@@ -86,6 +86,7 @@ export class HeroAttrsComp extends ecs.Comp {
knockback_res: number = 0; // 击退抗性
crit_damage: number = 0; // 额外暴击伤害
puncture_chance: number = 0; // 穿透概率
puncture_dmg_bonus: number = 0; // 穿透后伤害增量(百分点,乘算加成)
wfuny: number = 0; // 风怒
revived_count: number = 0; // 已复活次数
@@ -326,6 +327,12 @@ export class HeroAttrsComp extends ecs.Comp {
return this.puncture_chance + HeroAttrsComp.getFieldPercentValue(FieldSkillType.HeroPuncture);
}
/** 英雄实时穿透伤害加成 = 基础加成 + 驻场加成。 */
public getRuntimePunctureDmgBonus(): number {
if (this.fac !== FacSet.HERO) return this.puncture_dmg_bonus;
return this.puncture_dmg_bonus + HeroAttrsComp.getFieldPercentValue(FieldSkillType.HeroPunctureDmg);
}
/** 英雄实时暴击伤害 = 基础额外暴伤 + 驻场暴伤。 */
public getRuntimeCritDamageBonus(): number {
if (this.fac !== FacSet.HERO) return this.crit_damage;
@@ -467,6 +474,13 @@ export class HeroAttrsComp extends ecs.Comp {
return base + mods.flatSum + mods.pctSum;
}
/** 最终穿透伤害加成 = 驻场实时加成 + 限时修饰(加法模型) */
public getFinalPunctureDmgBonus(): number {
const base = this.getRuntimePunctureDmgBonus();
const mods = this.aggregateTimedMods(Attrs.puncture_dmg_bonus);
return base + mods.flatSum + mods.pctSum;
}
/** 最终风怒概率 = 驻场实时风怒 + 限时修饰(加法模型) */
public getFinalWindFury(): number {
const base = this.getRuntimeWindFury();
@@ -591,6 +605,7 @@ export class HeroAttrsComp extends ecs.Comp {
this.revived_count = 0;
this.invincible_time = 0;
this.puncture_chance = 0;
this.puncture_dmg_bonus = 0;
this.wfuny = 0;
this.boom = false;