Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Modules/BuildDisplayStats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ local displayStats = {
{ stat = "ColdMaximumHitTaken", label = "Cold Max Hit", fmt = ".0f", color = colorCodes.COLD, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end },
{ stat = "LightningMaximumHitTaken", label = "Lightning Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end },
{ stat = "ChaosMaximumHitTaken", label = "Chaos Max Hit", fmt = ".0f", color = colorCodes.CHAOS, compPercent = true },
{ stat = "EffectiveMaximumHitTaken", label = "Effective Max Hit", fmt = ".0f", compPercent = true },
{ },
{ stat = "MainHand", childStat = "Accuracy", label = "MH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true },
{ stat = "OffHand", childStat = "Accuracy", label = "OH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true },
Expand Down
15 changes: 5 additions & 10 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3246,18 +3246,13 @@ function calcs.buildDefenceEstimations(env, actor)
end
end

-- second minimum used for power calcs, as there are issues using average or minimum
local minimum = m_huge
local SecondMinimum = m_huge
-- harmonic mean used for power calcs (equivalent to the maximum hit when the hit is equally split between all damage types)
-- ideally there should be weights to account for the fact that damage types usually have different scales (phys hits are smaller than ele hits)
local reciprocalSum = 0
for _, damageType in ipairs(dmgTypeList) do
if output[damageType.."MaximumHitTaken"] < minimum then
SecondMinimum = minimum
minimum = output[damageType.."MaximumHitTaken"]
elseif output[damageType.."MaximumHitTaken"] < SecondMinimum then
SecondMinimum = output[damageType.."MaximumHitTaken"]
end
reciprocalSum = reciprocalSum + 1 / output[damageType .. "MaximumHitTaken"]
end
output.SecondMinimalMaximumHitTaken = SecondMinimum
output.EffectiveMaximumHitTaken = 5 / reciprocalSum
end

-- effective health pool vs dots
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ data.powerStatList = {
{ stat="SpellAvoidChance", label="Spell avoid chance" },
{ stat="ProjectileAvoidChance", label="Projectile avoid chance" },
{ stat="TotalEHP", label="Effective Hit Pool" },
{ stat="SecondMinimalMaximumHitTaken", label="Eff. Maximum Hit Taken" },
{ stat="EffectiveMaximumHitTaken", label="Eff. Maximum Hit Taken" },
{ stat="PhysicalTakenHit", label="Taken Phys dmg", transform=function(value) return -value end },
{ stat="LightningTakenHit", label="Taken Lightning dmg", transform=function(value) return -value end },
{ stat="ColdTakenHit", label="Taken Cold dmg", transform=function(value) return -value end },
Expand Down