Module:Magic: Difference between revisions

Fix various special attack related parts
(Change spellbook -> spellBook to match game data)
(Fix various special attack related parts)
Line 242: Line 242:
         end
         end
         return table.concat(resultPart, '<br/>')
         return table.concat(resultPart, '<br/>')
    elseif spell.specialAttackID ~= nil then
    local spAtt = Attacks.getAttackByID(spell.specialAttackID)
    if spAtt ~= nil then
    return spAtt.description
    end
     elseif spell.spellBook == 'standard' then
     elseif spell.spellBook == 'standard' then
         return 'Combat spell with a max hit of ' .. Shared.formatnum(spell.maxHit * 10)
         return 'Combat spell with a max hit of ' .. Shared.formatnum(spell.maxHit * 10)
Line 518: Line 523:
table.insert(rowPart, '|| ' .. p._getSpellStat(spell, 'description'))
table.insert(rowPart, '|| ' .. p._getSpellStat(spell, 'description'))
--1/4/22: haha just kidding. Now we're also getting delay between attacks for spells with special attacks
--1/4/22: haha just kidding. Now we're also getting delay between attacks for spells with special attacks
if spell.specialAttack ~= nil then
if spell.specialAttackID ~= nil then
local spAtt = Attacks.getAttackByID(spell.specialAttack)
local spAtt = Attacks.getAttackByID(spell.specialAttackID)
local interval = spAtt.attackInterval
local interval = spAtt.attackInterval
if interval ~= nil then
if interval ~= nil then