Module:Magic: Difference between revisions

Fix special attack spell descriptions & implement getSpellBookTable
(getSpellsProducingItem: Remove erroneous break)
(Fix special attack spell descriptions & implement getSpellBookTable)
Line 244: Line 244:
         end
         end
         return table.concat(resultPart, '<br/>')
         return table.concat(resultPart, '<br/>')
     elseif spell.specialAttackID ~= nil then
     elseif spell.specialAttack ~= nil then
     local spAtt = Attacks.getAttackByID(spell.specialAttackID)
     local spAtt = Attacks.getAttackByID(spell.specialAttack)
     if spAtt ~= nil then
     if spAtt ~= nil then
     return spAtt.description
     return spAtt.description
Line 562: Line 562:
         return table.concat(resultPart)
         return table.concat(resultPart)
     end
     end
end
function p.getSpellBookTable(frame)
local spellBook = frame.args ~= nil and frame.args[1] or frame[1]
spellBook = p.getSpellBookID(spellBook)
return p._getSpellBookTable(spellBook)
end
end