From c76097220d45757b117c2612934d989c56843a2f Mon Sep 17 00:00:00 2001 From: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com> Date: Fri, 24 Oct 2025 14:44:40 +1100 Subject: [PATCH] Fix Breakdown of Crit Damage when using Dance with Death (#9012) Co-authored-by: LocalIdentity --- src/Modules/CalcOffence.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 12ea10c4..820d9fc8 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -3102,6 +3102,9 @@ function calcs.offence(env, actor, activeSkill) rolls = 0 end output.DamageRolls = rolls + if pass == 1 then + output.CritDamageRolls = rolls + end rolls = m_abs(rolls) + 2 damageTypeHitAvgNotLucky = (damageTypeHitMin / rolls + damageTypeHitMax / rolls) damageTypeHitAvgLucky = (damageTypeHitMin / rolls + (rolls - 1) * damageTypeHitMax / rolls) @@ -3408,15 +3411,17 @@ function calcs.offence(env, actor, activeSkill) if output.CritEffect ~= 1 then breakdown.AverageHit = { } local damageRolls = output.DamageRolls or 0 + local critRolls = output.CritDamageRolls or 0 local rolls = m_abs(damageRolls) + 2 + local rollsCrit = m_abs(critRolls) + 2 if damageRolls > 0 then t_insert(breakdown.AverageHit, s_format("(1/%d) x %d + (%d/%d) x %d = %.1f ^8(average from non-crits)", rolls, totalHitMin, rolls - 1, rolls, totalHitMax, totalHitAvg)) end if damageRolls < 0 then t_insert(breakdown.AverageHit, s_format("(%d/%d) x %d + (1/%d) x %d = %.1f ^8(average from non-crits)", rolls - 1, rolls, totalHitMin, rolls, totalHitMax, totalHitAvg)) end - if damageRolls > 0 or skillModList:Flag(skillCfg, "CritLucky") then - t_insert(breakdown.AverageHit, s_format("(1/%d) x %d + (%d/%d) x %d = %.1f ^8(average from crits)", rolls, totalCritMin, rolls - 1, rolls, totalCritMax, totalCritAvg)) + if damageRolls > 0 or critRolls > 0 or skillModList:Flag(skillCfg, "CritLucky") then + t_insert(breakdown.AverageHit, s_format("(1/%d) x %d + (%d/%d) x %d = %.1f ^8(average from crits)", rollsCrit, totalCritMin, rollsCrit - 1, rollsCrit, totalCritMax, totalCritAvg)) t_insert(breakdown.AverageHit, "") end if damageRolls < 0 and not skillModList:Flag(skillCfg, "CritLucky") then