Module:HeroDataArrays: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) added hero sorting function |
Gammaton32 (talk | contribs) gravity scale |
||
| Line 854: | Line 854: | ||
{ label = "Spirit Per Boon", field = "spiritScaling" }, | { label = "Spirit Per Boon", field = "spiritScaling" }, | ||
{ label = "At Max Boon", field = "maxSpiritScaling" }, | { label = "At Max Boon", field = "maxSpiritScaling" }, | ||
} | |||
} | |||
} | |||
local output = {} | |||
for _, def in ipairs(tableDefs) do | |||
local t = buildTable(frame, rows, def, def.options) | |||
if t ~= "" then | |||
table.insert(output, t) | |||
end | |||
end | |||
return table.concat(output, "\n\n") | |||
end | |||
p.heroGravityTable = function(frame) | |||
local heroGravityData = heroDataArray({"Name", "GravityChange"}) | |||
local rows = {} | |||
for name, data in pairs(heroGravityData) do | |||
table.insert(rows, { | |||
name = name, | |||
gravityScale = "+".. data["GravityChange"] or 0, | |||
}) | |||
end | |||
sortHeroes(rows) | |||
local tableDefs = { | |||
{ | |||
title = "Base Gravity Scale Stats", | |||
columns = { | |||
{ label = "Gravity Scale (%)", field = "gravityScale" }, | |||
} | } | ||
} | } | ||