Skip to content

Commit dd09dc8

Browse files
committed
Add Ward to DOT calcs
1 parent 912f458 commit dd09dc8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/Modules/CalcDefence.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,6 +2968,16 @@ function calcs.buildDefenceEstimations(env, actor)
29682968
output[damageType.."TotalHitPool"] = output[damageType.."TotalHitPool"] + output.EnergyShieldRecoveryCap / chaosESMultiplier
29692969
end
29702970
end
2971+
local ward = output.Ward or 0
2972+
if ward > 0 then
2973+
local wardBypass = (modDB:Sum("BASE", nil, "WardBypass") or 0) / 100
2974+
if wardBypass > 0 then
2975+
local poolProtected = ward / (1 - wardBypass) * wardBypass
2976+
output[damageType.."TotalPool"] = m_max(output[damageType.."TotalPool"] - poolProtected, 0) + m_min(output[damageType.."TotalPool"], poolProtected) / wardBypass
2977+
else
2978+
output[damageType.."TotalPool"] = output[damageType.."TotalPool"] + ward
2979+
end
2980+
end
29712981
if breakdown then
29722982
breakdown[damageType.."TotalPool"] = {
29732983
s_format("Life: %d", output.LifeRecoverable)
@@ -2981,6 +2991,9 @@ function calcs.buildDefenceEstimations(env, actor)
29812991
elseif esBypass < 1 then
29822992
t_insert(breakdown[damageType.."TotalPool"], s_format("Non-bypassed Energy Shield: %d", output[damageType.."TotalPool"] - output[damageType.."ManaEffectiveLife"]))
29832993
end
2994+
if ward > 0 then
2995+
t_insert(breakdown[damageType.."TotalPool"], s_format("Runic Ward: %d", ward))
2996+
end
29842997
t_insert(breakdown[damageType.."TotalPool"], s_format("Total Pool: %d", output[damageType.."TotalPool"]))
29852998
end
29862999
end

0 commit comments

Comments
 (0)