Module:Sandbox/LVL: Difference between revisionsGive feedback
No edit summary |
Tooltip fix |
||
| Line 728: | Line 728: | ||
table.insert(tooltip_lines, string.format("Base: %s", util_module.round_to_sig_fig(base_value, 3))) | table.insert(tooltip_lines, string.format("Base: %s", util_module.round_to_sig_fig(base_value, 3))) | ||
end | end | ||
if level_scale and level_scale > 0 then | |||
table.insert(tooltip_lines, string.format("Level: +%s per | if attr_key == 'TechPower' then | ||
-- TechPower is unique: it represents Spirit Power itself. | |||
-- We only show its base and how much it grows per boon. | |||
local tp_boon_scale = (level_scale > 0) and level_scale or innate_spirit_scale | |||
if tp_boon_scale and tp_boon_scale > 0 then | |||
table.insert(tooltip_lines, string.format("Level: +%s per boon", tp_boon_scale)) | |||
end | |||
else | |||
-- Standard stat tooltip logic | |||
if level_scale and level_scale > 0 then | |||
table.insert(tooltip_lines, string.format("Level: +%s per boon", level_scale)) | |||
end | |||
if spirit_scale and spirit_scale > 0 then | |||
table.insert(tooltip_lines, string.format("Spirit: +%s per point", spirit_scale)) | |||
if innate_spirit_scale and innate_spirit_scale > 0 then | |||
table.insert(tooltip_lines, string.format("Innate Spirit: +%s per boon", innate_spirit_scale)) | |||
end | |||
end | |||
end | end | ||