Skip to content

Commit 8c02837

Browse files
committed
Fix Flowing Metal by also summing elemental DR
1 parent 9c2bf03 commit 8c02837

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Modules/CalcDefence.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,15 @@ function calcs.buildDefenceEstimations(env, actor)
23302330
--armour/PDR calculations
23312331
local armourReduct = 0
23322332
local impaleArmourReduct = 0
2333-
local percentOfArmourApplies = (not modDB:Flag(nil, "ArmourDoesNotApplyTo"..damageType.."DamageTaken") and modDB:Sum("BASE", nil, "ArmourAppliesTo"..damageType.."DamageTaken") or 0)
2333+
local percentOfArmourApplies = 0.0
2334+
if not modDB:Flag(nil, "ArmourDoesNotApplyTo" .. damageType .. "DamageTaken") then
2335+
percentOfArmourApplies = (modDB:Sum("BASE", nil, "ArmourAppliesTo" .. damageType .. "DamageTaken") or 0)
2336+
end
2337+
if not modDB:Flag(nil, "ArmourDoesNotApplyToElementalDamageTaken")
2338+
and (damageType == "Fire" or damageType == "Cold" or damageType == "Lightning") then
2339+
percentOfArmourApplies = percentOfArmourApplies
2340+
+ (modDB:Sum("BASE", nil, "ArmourAppliesToElementalDamageTaken") or 0)
2341+
end
23342342
local effectiveAppliedArmour = (output.Armour * percentOfArmourApplies / 100) * (1 + output.ArmourDefense)
23352343
local effectiveArmourFromArmour = effectiveAppliedArmour;
23362344
local effectiveArmourFromOther = { }

0 commit comments

Comments
 (0)