Skip to content

Commit 8a397e0

Browse files
LocalIdentityLocalIdentity
andauthored
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>
1 parent 7abc4ce commit 8a397e0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Classes/CalcBreakdownControl.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ function CalcBreakdownClass:AddBreakdownSection(sectionData)
201201
{ label = "Converted Damage", key = "convSrc" },
202202
{ label = "Total", key = "total" },
203203
{ label = "Conversion", key = "convDst" },
204+
{ label = "Gain", key = "gainDst" },
204205
}
205206
}
206207
t_insert(self.sectionList, section)

src/Modules/CalcOffence.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ local function calcDamage(activeSkill, output, cfg, breakdown, damageType, typeF
105105
source = damageType,
106106
convSrc = (addMin ~= 0 or addMax ~= 0) and (addMin .. " to " .. addMax),
107107
total = addMin .. " to " .. addMax,
108-
convDst = convDst and s_format("%d%% to %s", conversionTable[damageType][convDst] * 100, convDst),
108+
convDst = convDst and s_format("%d%% to %s", conversionTable[damageType].conversion[convDst] * 100, convDst),
109+
gainDst = convDst and s_format("%d%% gained as %s", conversionTable[damageType].gain[convDst] * 100, convDst),
109110
})
110111
end
111112
return addMin, addMax
@@ -128,7 +129,8 @@ local function calcDamage(activeSkill, output, cfg, breakdown, damageType, typeF
128129
more = (more ~= 1 and "x "..more),
129130
convSrc = (addMin ~= 0 or addMax ~= 0) and (addMin .. " to " .. addMax),
130131
total = (round(baseMin * inc * more) + addMin) .. " to " .. (round(baseMax * inc * more) + addMax),
131-
convDst = convDst and conversionTable[damageType][convDst] > 0 and s_format("%d%% to %s", conversionTable[damageType][convDst] * 100, convDst),
132+
convDst = convDst and conversionTable[damageType].conversion[convDst] > 0 and s_format("%d%% to %s", conversionTable[damageType].conversion[convDst] * 100, convDst),
133+
gainDst = convDst and conversionTable[damageType].gain[convDst] > 0 and s_format("%d%% gained as %s", conversionTable[damageType].gain[convDst] * 100, convDst),
132134
})
133135
end
134136

0 commit comments

Comments
 (0)