From 840fe18257051ae028ea83d49006b05c4424bcaa Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sun, 19 Jan 2025 01:30:31 +0100 Subject: [PATCH] Add support for generic damage convert to Closes https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/issues/358 Signed-off-by: Tomas Slusny --- src/Modules/CalcOffence.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 777e1daa..5d8a2988 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -1819,9 +1819,12 @@ function calcs.offence(env, actor, activeSkill) for _, toType in ipairs(dmgTypeList) do local conv if skill then - conv = m_max(skillModList:Sum("BASE", skillCfg, "Skill"..fromType.."DamageConvertTo"..toType), 0) + conv = m_max(skillModList:Sum("BASE", skillCfg, + "SkillDamageConvertTo"..toType, + "Skill"..fromType.."DamageConvertTo"..toType), 0) else conv = m_max(skillModList:Sum("BASE", skillCfg, + "DamageConvertTo"..toType, fromType.."DamageConvertTo"..toType, isElemental[fromType] and "ElementalDamageConvertTo"..toType or nil, fromType ~= "Chaos" and "NonChaosDamageConvertTo"..toType or nil), 0) @@ -3033,7 +3036,7 @@ function calcs.offence(env, actor, activeSkill) local gainedMin, gainedMax = calcGainedDamage(activeSkill, output, cfg, damageType) local baseMin = output[damageTypeMin.."Base"] local baseMax = output[damageTypeMax.."Base"] - local summedMin = baseMin * convMult + convertedMin + gainedMin + local summedMin = baseMin * convMult + convertedMin + gainedMin local summedMax = baseMax * convMult + convertedMax + gainedMax output[damageType.."SummedMinBase"] = m_floor(summedMin) output[damageType.."SummedMaxBase"] = m_floor(summedMax)