Module:Sandbox/LVL: Difference between revisions

Jump to navigation Jump to search
LVL (talk | contribs)
Test out scaling icons
LVL (talk | contribs)
Fix scaling not appearing?
Line 324: Line 324:
--{{#invoke:HeroData|write_hero_comparison_table|POWER_INCREASES|SPIRIT_POWER|MAX_POWER|MAX_SPIRIT}}
--{{#invoke:HeroData|write_hero_comparison_table|POWER_INCREASES|SPIRIT_POWER|MAX_POWER|MAX_SPIRIT}}
p.write_hero_comparison_table = function(frame)
p.write_hero_comparison_table = function(frame)
-- process inputs
-- process inputs (convert to numbers)
local power_increases = frame.args[1]
local power_increases = tonumber(frame.args[1]) or 0
if (power_increases == nil) then power_increases = 0 end
local spirit_power = tonumber(frame.args[2]) or 0
local spirit_power = frame.args[2]
local max_power = tonumber(frame.args[3]) or 25
if (spirit_power == nil) then spirit_power = 0 end
local max_spirit = tonumber(frame.args[4]) or 500
local max_power = frame.args[3] or 25
local max_spirit = frame.args[4] or 500
-- Show scaling icons if power/increases/spirit power are 0/not specified
-- Show scaling icons if power/increases/spirit power are 0/not specified