Module:GameSkills: Difference between revisions
From SpiritVale Wiki
More actions
No edit summary |
No edit summary |
||
| Line 1,349: | Line 1,349: | ||
end | end | ||
-- Source + Scaling are displayed in Module 3 now, so we do NOT repeat them as body rows. | |||
-- Keep the detailed legacy damage breakdown rows only (Main/Flat/Reflect/Healing). | |||
if type(rec.Source) ~= "table" then | |||
local dmg = rec.Damage or {} | |||
if next(dmg) ~= nil then | |||
local main = dmg["Main Damage"] | |||
local mainNonHeal, healOnly = {}, {} | |||
if type(main) == "table" then | |||
for _, d in ipairs(main) do | |||
if type(d) == "table" and d.Type == "Healing" then | |||
table.insert(healOnly, d) | |||
else | |||
table.insert(mainNonHeal, d) | |||
end | end | ||
end | end | ||
end | |||
local flatList = dmg["Flat Damage"] | |||
local reflList = dmg["Reflect Damage"] | |||
addRow(root, "Main Damage", formatDamageList(mainNonHeal, maxLevel, level, (#mainNonHeal > 1)), "sv-row-source", "Damage.Main Damage") | |||
addRow(root, "Flat Damage", formatDamageList(flatList, maxLevel, level, false), "sv-row-source", "Damage.Flat Damage") | |||
addRow(root, "Reflect Damage", formatDamageList(reflList, maxLevel, level, false), "sv-row-source", "Damage.Reflect Damage") | |||
addRow(root, "Healing", formatDamageList(healOnly, maxLevel, level, false), "sv-row-source", "Damage.Healing") | |||
end | |||
end | |||
local modsText = formatModifiers(rec.Modifiers) | local modsText = formatModifiers(rec.Modifiers) | ||