Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
getSpecAttackMaxHit: Initialize variable to avoid errors
(Updated getSpecAttackMaxHit to properly account for multi-hit attacks)
(getSpecAttackMaxHit: Initialize variable to avoid errors)
Line 346: Line 346:
local bestHit = 0
local bestHit = 0
for i, dmg in pairs(specAttack.damage) do
for i, dmg in pairs(specAttack.damage) do
local thisHit = 0
if dmg.damageType == 'Normal' then
if dmg.damageType == 'Normal' then
--Account for special attacks that include a normal attack hit
--Account for special attacks that include a normal attack hit