Module:HeroData: Difference between revisions

Sur (talk | contribs)
m fixed resists scaling additively instead of multiplicatively
Sur (talk | contribs)
m display error msg if attribute order is incorrect
Line 332: Line 332:
-- Determine cell values
-- Determine cell values
for _, stat_name in ipairs(attribute_orders[category]["attribute_order"]) do
for _, stat_name in ipairs(attribute_orders[category]["attribute_order"]) do
stat_data = stats[stat_name]
local stat_data = stats[stat_name]
if stat_data == nil then return "Stat " .. stat_name .. " from StatInfoboxOrder has no data in AttributeData" end
-- gets the stat's value if it has that stat, default to 0 if not
-- gets the stat's value if it has that stat, default to 0 if not