feat(hero&buff): 新增反伤类buff与技能,支持带修饰的反伤计算

1. 新增两个反伤相关的buff配置:固定反伤7027和比例反伤7028
2. 新增两个支援技能:荆棘护盾和荆棘比例增益
3. 为HeroAttrsComp新增获取最终反伤属性的方法,支持限时修饰词计算
4. 重构英雄反伤伤害计算逻辑,使用新的属性获取方法
This commit is contained in:
panFD
2026-09-05 18:14:13 +08:00
parent 370b455352
commit 699f7fc6b8
4 changed files with 39 additions and 1 deletions

View File

@@ -196,7 +196,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
// 反伤值 = 实际受到伤害 * thorns_rate / 100 + thorns_dmg(固定值+比例混合)
// DoT 不触发反伤(持续伤害类效果通常不触发荆棘)
if (!isDot && damage > 0) {
const thornsDmg = Math.floor(damage * TAttrsComp.thorns_rate / 100) + TAttrsComp.thorns_dmg;
const thornsDmg = Math.floor(damage * TAttrsComp.getFinalThornsRate() / 100) + TAttrsComp.getFinalThornsDmg();
if (thornsDmg > 0) {
this.applyThornsDamage(casterEid, thornsDmg);
}