Skip to content

Commit 2653c78

Browse files
author
LocalIdentity
committed
Fix Breakdown of Crit Damage when using Dance with Death
When using the Dance with Death keystone to have Critical Damage be lucky, it was not correctly showing the correct formula for Crit Damage Crit Damage is handled in pass 1 so output.DamageRolls was being overwritten to 0 after pass 2 was done for non-crit damage calcs So now we have a new variable just for Crit Damage rolls that cannot be overwritten and we use that for the breakdown
1 parent f59dd65 commit 2653c78

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎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)