Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
_getSpellRow: Prevent attack interval display when attack only has a single hit
(Added spell damage to spell infobox for normal & archaic spells)
(_getSpellRow: Prevent attack interval display when attack only has a single hit)
Line 568: Line 568:
local spAtt = Attacks.getAttackByID(spAttID)
local spAtt = Attacks.getAttackByID(spAttID)
local interval = spAtt.attackInterval
local interval = spAtt.attackInterval
if interval ~= nil then
local hits = spAtt.attackCount ~= nil and spAtt.attackCount or 1
local hits = spAtt.attackCount ~= nil and spAtt.attackCount or 1
if interval ~= nil and hits > 1 then
             table.insert(rowPart, '<br/>(' .. Shared.round(interval / 1000, 2, 2) .. 's delay between attacks.')
             table.insert(rowPart, '<br/>(' .. Shared.round(interval / 1000, 2, 2) .. 's delay between attacks.')
if hits > 2 then
if hits > 2 then