Fix Damage Gain breakdown including skill conversion (#9170)

The breakdown for skill conversion and damage gained were grouped together to make 1 value instead of being separate table columns

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
LocalIdentity
2025-11-05 10:42:32 +11:00
committed by GitHub
parent 7abc4ce571
commit 8a397e067d
2 changed files with 5 additions and 2 deletions

View File

@@ -201,6 +201,7 @@ function CalcBreakdownClass:AddBreakdownSection(sectionData)
{ label = "Converted Damage", key = "convSrc" },
{ label = "Total", key = "total" },
{ label = "Conversion", key = "convDst" },
{ label = "Gain", key = "gainDst" },
}
}
t_insert(self.sectionList, section)

View File

@@ -105,7 +105,8 @@ local function calcDamage(activeSkill, output, cfg, breakdown, damageType, typeF
source = damageType,
convSrc = (addMin ~= 0 or addMax ~= 0) and (addMin .. " to " .. addMax),
total = addMin .. " to " .. addMax,
convDst = convDst and s_format("%d%% to %s", conversionTable[damageType][convDst] * 100, convDst),
convDst = convDst and s_format("%d%% to %s", conversionTable[damageType].conversion[convDst] * 100, convDst),
gainDst = convDst and s_format("%d%% gained as %s", conversionTable[damageType].gain[convDst] * 100, convDst),
})
end
return addMin, addMax
@@ -128,7 +129,8 @@ local function calcDamage(activeSkill, output, cfg, breakdown, damageType, typeF
more = (more ~= 1 and "x "..more),
convSrc = (addMin ~= 0 or addMax ~= 0) and (addMin .. " to " .. addMax),
total = (round(baseMin * inc * more) + addMin) .. " to " .. (round(baseMax * inc * more) + addMax),
convDst = convDst and conversionTable[damageType][convDst] > 0 and s_format("%d%% to %s", conversionTable[damageType][convDst] * 100, convDst),
convDst = convDst and conversionTable[damageType].conversion[convDst] > 0 and s_format("%d%% to %s", conversionTable[damageType].conversion[convDst] * 100, convDst),
gainDst = convDst and conversionTable[damageType].gain[convDst] > 0 and s_format("%d%% gained as %s", conversionTable[damageType].gain[convDst] * 100, convDst),
})
end