Module:LevelTables: Difference between revisionsGive feedback
Updated Shiv and yamato's base alt fire damage. |
Null check missing hero properties |
||
| Line 68: | Line 68: | ||
local base = math.floor((hero[property] or 0) * 100) / 100 | local base = math.floor((hero[property] or 0) * 100) / 100 | ||
local level = math.floor(hero["LevelScaling"][property] * 100) / 100 | local level = math.floor(hero["LevelScaling"][property] * 100) / 100 | ||
local shots = hero["BulletsPerShot"] | local shots = (hero["BulletsPerShot"] or 1) | ||
local burst = hero["BulletsPerBurst"] | local burst = (hero["BulletsPerBurst"] or 1) | ||
local bullet_mult = shots * burst | local bullet_mult = shots * burst | ||
local hero_icon = frame:expandTemplate{ title = "HeroIcon", args = {hero["Name"]}} | local hero_icon = frame:expandTemplate{ title = "HeroIcon", args = {hero["Name"]}} | ||
| Line 127: | Line 127: | ||
local burst_heroes = {} | local burst_heroes = {} | ||
for _, hero in pairs(heroes_data) do | for _, hero in pairs(heroes_data) do | ||
if (hero["BulletsPerShot"] > 1 and not hero["IsDisabled"]) then | if ((hero["BulletsPerShot"] or 1) > 1 and not hero["IsDisabled"]) then | ||
table.insert(spreadshot_heroes, hero) | table.insert(spreadshot_heroes, hero) | ||
elseif (hero["BulletsPerBurst"] > 1 and not hero["IsDisabled"]) then | elseif ((hero["BulletsPerBurst"] or 1) > 1 and not hero["IsDisabled"]) then | ||
table.insert(burst_heroes, hero) | table.insert(burst_heroes, hero) | ||
end | end | ||