Module:Sandbox/One Bar: Difference between revisions

One Bar (talk | contribs)
No edit summary
One Bar (talk | contribs)
No edit summary
Line 33: Line 33:
hero_row:tag('td'):wikitext(hero_icon):done()
hero_row:tag('td'):wikitext(hero_icon):done()
stats_text = ""
stats_text = ""
if (spirit_scaling ~= nil and next(spirit_scaling) ~= nil) then
if (spirit_scaling ~= nil) then
for k, v in pairs(spirit_scaling) do
for k, v in pairs(spirit_scaling) do
stats_text = stats_text .. k ..": ".. hero[k] .. "+" .. v .. "\n"
stats_text = stats_text .. k ..": ".. hero[k] .. "+" .. v .. "\n"
Line 48: Line 48:
-- probably too much nil check but I want the table to print for now
-- probably too much nil check but I want the table to print for now
if (ability["Info1"] ~= nil and ability["Info1"]["Main"] ~= nil  
if (ability["Info1"] ~= nil and ability["Info1"]["Main"] ~= nil  
and ability["Info1"]["Main"]["Props"] ~= nil
and ability["Info1"]["Main"]["Props"] ~= nil) then
and next(ability["Info1"]["Main"]["Props"]) ~= nil) then
for _, prop in ipairs(ability["Info1"]["Main"]["Props"]) do
for _, prop in ipairs(ability["Info1"]["Main"]["Props"]) do
if (prop["Scale"] ~= nil and next(prop["Scale"]) ~= nil) then
if (prop["Scale"] ~= nil and next(prop["Scale"]) ~= nil) then