Skip to content

Commit 74f679b

Browse files
vaisestLocalIdentity
andauthored
Fix Smith of Kitava Flowing Metal node not working (#2016)
* Fix Flowing Metal by also summing elemental DR * Longer lines * clean up formatting --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent dd4f884 commit 74f679b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Modules/CalcDefence.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,13 @@ 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
2334+
if not modDB:Flag(nil, "ArmourDoesNotApplyTo"..damageType.."DamageTaken") then
2335+
percentOfArmourApplies = modDB:Sum("BASE", nil, "ArmourAppliesTo"..damageType.."DamageTaken")
2336+
end
2337+
if isElemental[damageType] and not modDB:Flag(nil, "ArmourDoesNotApplyToElementalDamageTaken") then
2338+
percentOfArmourApplies = percentOfArmourApplies + modDB:Sum("BASE", nil, "ArmourAppliesToElementalDamageTaken")
2339+
end
23342340
local effectiveAppliedArmour = (output.Armour * percentOfArmourApplies / 100) * (1 + output.ArmourDefense)
23352341
local effectiveArmourFromArmour = effectiveAppliedArmour;
23362342
local effectiveArmourFromOther = { }

0 commit comments

Comments
 (0)