Module:HeroDataArrays: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) bullet gravity scale |
Gammaton32 (talk | contribs) merged light and heavy melee table |
||
| Line 472: | Line 472: | ||
} | } | ||
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.heroMeleeTable = function(frame) | |||
-- Pull data | |||
local heroMeleeData = heroDataArray({"Name", "LightMeleeDamage", "LevelScaling>LightMeleeDamage", "HeavyMeleeDamage", "LevelScaling>HeavyMeleeDamage", "SpiritScaling>HeavyMeleeDamage"}) | |||
local rows = {} | |||
for name, data in pairs(heroMeleeData) do | |||
table.insert(rows, { | |||
name = name, | |||
lightMeleeDamage = data["LightMeleeDamage"] or 0, | |||
lightScalingDamage = "+" .. data["LevelScaling>LightMeleeDamage"] or 0, | |||
lightMaxScalingDamage = tonumber(roundValue(data["LightMeleeDamage"] + data["LevelScaling>LightMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | |||
heavyMeleeDamage = data["HeavyMeleeDamage"] or 0, | |||
heavyScalingDamage = "+" .. data["LevelScaling>HeavyMeleeDamage"] or 0, | |||
heavyMaxScalingDamage = tonumber(roundValue(data["HeavyMeleeDamage"] + data["LevelScaling>HeavyMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | |||
heavySpiritScalingDamage = "+" .. (data["SpiritScaling>HeavyMeleeDamage"] or 0), | |||
}) | |||
end | |||
sortHeroes(rows) | |||
local tableDefs = { | |||
{ | |||
title = "Base Light & Heavy Melee Stats", | |||
columns = { | |||
{ label = "Starting Light", field = "lightMeleeDamage" }, | |||
{ label = "Added per Boon (L)", field = "lightScalingDamage" }, | |||
{ label = "At Max Boon (L)", field = "lightMaxScalingDamage" }, | |||
{ label = "Starting Heavy", field = "heavyMeleeDamage" }, | |||
{ label = "Added per Boon (H)", field = "heavyScalingDamage" }, | |||
{ label = "At Max Boon (H)", field = "heavyMaxScalingDamage" }, | |||
{ label = "Spirit Scaling (H)", field = "heavySpiritScalingDamage" }, | |||
} | |||
} | |||
} | |||
local output = {} | local output = {} | ||
for _, def in ipairs(tableDefs) do | for _, def in ipairs(tableDefs) do | ||