feat(hero&skill): 新增反伤相关光环技能与属性计算
1. 扩展英雄反伤属性计算逻辑,加入驻场光环加成 2. 新增两个永久反伤强化技能6413、6414 3. 新增FieldSkillType反伤相关枚举与光环配置
This commit is contained in:
@@ -542,16 +542,18 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
return Math.max(0, this.defense + mods.flatSum + mods.pctSum);
|
||||
}
|
||||
|
||||
/** 最终反伤固定值 = 基础 + 限时修饰(加法模型) */
|
||||
/** 最终反伤固定值 = 基础 + 限时修饰 + 驻场光环(加法模型) */
|
||||
public getFinalThornsDmg(): number {
|
||||
const mods = this.aggregateTimedMods(Attrs.thorns_dmg);
|
||||
return Math.max(0, this.thorns_dmg + mods.flatSum + mods.pctSum);
|
||||
const field = this.fac === FacSet.HERO ? HeroAttrsComp.getFieldPercentValue(FieldSkillType.HeroThornsDmg) : 0;
|
||||
return Math.max(0, this.thorns_dmg + mods.flatSum + mods.pctSum + field);
|
||||
}
|
||||
|
||||
/** 最终反伤比例 = 基础 + 限时修饰(加法模型,百分点) */
|
||||
/** 最终反伤比例 = 基础 + 限时修饰 + 驻场光环(加法模型,百分点) */
|
||||
public getFinalThornsRate(): number {
|
||||
const mods = this.aggregateTimedMods(Attrs.thorns_rate);
|
||||
return Math.max(0, this.thorns_rate + mods.flatSum + mods.pctSum);
|
||||
const field = this.fac === FacSet.HERO ? HeroAttrsComp.getFieldPercentValue(FieldSkillType.HeroThornsRate) : 0;
|
||||
return Math.max(0, this.thorns_rate + mods.flatSum + mods.pctSum + field);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user