Skip to content

Commit c760972

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Breakdown of Crit Damage when using Dance with Death (#9012)
Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent e7f3368 commit c760972

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Modules/CalcOffence.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,9 @@ function calcs.offence(env, actor, activeSkill)
31023102
rolls = 0
31033103
end
31043104
output.DamageRolls = rolls
3105+
if pass == 1 then
3106+
output.CritDamageRolls = rolls
3107+
end
31053108
rolls = m_abs(rolls) + 2
31063109
damageTypeHitAvgNotLucky = (damageTypeHitMin / rolls + damageTypeHitMax / rolls)
31073110
damageTypeHitAvgLucky = (damageTypeHitMin / rolls + (rolls - 1) * damageTypeHitMax / rolls)
@@ -3408,15 +3411,17 @@ function calcs.offence(env, actor, activeSkill)
34083411
if output.CritEffect ~= 1 then
34093412
breakdown.AverageHit = { }
34103413
local damageRolls = output.DamageRolls or 0
3414+
local critRolls = output.CritDamageRolls or 0
34113415
local rolls = m_abs(damageRolls) + 2
3416+
local rollsCrit = m_abs(critRolls) + 2
34123417
if damageRolls > 0 then
34133418
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))
34143419
end
34153420
if damageRolls < 0 then
34163421
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))
34173422
end
3418-
if damageRolls > 0 or skillModList:Flag(skillCfg, "CritLucky") then
3419-
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))
3423+
if damageRolls > 0 or critRolls > 0 or skillModList:Flag(skillCfg, "CritLucky") then
3424+
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))
34203425
t_insert(breakdown.AverageHit, "")
34213426
end
34223427
if damageRolls < 0 and not skillModList:Flag(skillCfg, "CritLucky") then

0 commit comments

Comments
 (0)