Skip to content

Commit feead24

Browse files
authored
Add support for generic damage convert to (#53)
Closes #358 Signed-off-by: Tomas Slusny <[email protected]>
1 parent 7b2da20 commit feead24

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Modules/CalcOffence.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,9 +1819,12 @@ function calcs.offence(env, actor, activeSkill)
18191819
for _, toType in ipairs(dmgTypeList) do
18201820
local conv
18211821
if skill then
1822-
conv = m_max(skillModList:Sum("BASE", skillCfg, "Skill"..fromType.."DamageConvertTo"..toType), 0)
1822+
conv = m_max(skillModList:Sum("BASE", skillCfg,
1823+
"SkillDamageConvertTo"..toType,
1824+
"Skill"..fromType.."DamageConvertTo"..toType), 0)
18231825
else
18241826
conv = m_max(skillModList:Sum("BASE", skillCfg,
1827+
"DamageConvertTo"..toType,
18251828
fromType.."DamageConvertTo"..toType,
18261829
isElemental[fromType] and "ElementalDamageConvertTo"..toType or nil,
18271830
fromType ~= "Chaos" and "NonChaosDamageConvertTo"..toType or nil), 0)
@@ -3033,7 +3036,7 @@ function calcs.offence(env, actor, activeSkill)
30333036
local gainedMin, gainedMax = calcGainedDamage(activeSkill, output, cfg, damageType)
30343037
local baseMin = output[damageTypeMin.."Base"]
30353038
local baseMax = output[damageTypeMax.."Base"]
3036-
local summedMin = baseMin * convMult + convertedMin + gainedMin
3039+
local summedMin = baseMin * convMult + convertedMin + gainedMin
30373040
local summedMax = baseMax * convMult + convertedMax + gainedMax
30383041
output[damageType.."SummedMinBase"] = m_floor(summedMin)
30393042
output[damageType.."SummedMaxBase"] = m_floor(summedMax)

0 commit comments

Comments
 (0)