Module:Sandbox/LVL: Difference between revisions

LVL (talk | contribs)
No edit summary
LVL (talk | contribs)
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 PI", level_scale))
if attr_key == 'TechPower' then
end
    -- TechPower is unique: it represents Spirit Power itself.
if spirit_scale and spirit_scale > 0 then
    -- We only show its base and how much it grows per boon.
    table.insert(tooltip_lines, string.format("Spirit: +%s per point", spirit_scale))
    local tp_boon_scale = (level_scale > 0) and level_scale or innate_spirit_scale
end
    if tp_boon_scale and tp_boon_scale > 0 then
if innate_spirit_scale and innate_spirit_scale > 0 then
        table.insert(tooltip_lines, string.format("Level: +%s per boon", tp_boon_scale))
    table.insert(tooltip_lines, string.format("Innate Spirit: +%s per PI", innate_spirit_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