Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
Tweaking links for magic types again
(Added pieces necessary for building Template:SpellBox)
(Tweaking links for magic types again)
(2 intermediate revisions by the same user not shown)
Line 111: Line 111:
     result = result..Icons.Icon({rune.name, type='item', notext=true, qty=req.qty})
     result = result..Icons.Icon({rune.name, type='item', notext=true, qty=req.qty})
   end
   end
   if spell.runesRequiredAlt ~= nil then
   if spell.runesRequiredAlt ~= nil and not Shared.tablesEqual(spell.runesRequired, spell.runesRequiredAlt) then
     result = result.."<br/>'''OR'''<br/>"
     result = result.."<br/>'''OR'''<br/>"
     for i, req in pairs(spell.runesRequiredAlt) do
     for i, req in pairs(spell.runesRequiredAlt) do
Line 165: Line 165:
   local result = ''
   local result = ''
   if spell.type == 'Spells' then
   if spell.type == 'Spells' then
     result = result..'|-\r\n|Max Hit: '..(spell.maxHit * 10)
     result = result.."|-\r\n|'''Max Hit:''' "..(spell.maxHit * 10)
   end
   end
   if spell.description ~= nil then
   if spell.description ~= nil then
     result = result..'\r\n|-\r\n|Description:<br/>'..spell.description
     result = result.."\r\n|-\r\n|'''Description:'''<br/>"..spell.description
   end
   end


Line 238: Line 238:
function p.getSpellTypeLink(type)
function p.getSpellTypeLink(type)
   if type == 'Spells' then
   if type == 'Spells' then
     return Icons.Icon({'Magic#Standard Magic', 'Standard', img='Standard', type='spellType'})
     return Icons.Icon({'Magic', 'Standard', img='Standard', type='spellType'})
   elseif type == 'Curses' then
   elseif type == 'Curses' then
     return Icons.Icon({'Magic#Curses', 'Curse', img='Curse', type='spellType'})
     return Icons.Icon({'Curses', 'Curse', img='Curse', type='spellType'})
   elseif type == 'Auroras' then
   elseif type == 'Auroras' then
     return Icons.Icon({'Magic#Auroras', 'Aurora', img='Aurora', type='spellType'})
     return Icons.Icon({'Auroras', 'Aurora', img='Aurora', type='spellType'})
   elseif type == 'Ancient' then
   elseif type == 'Ancient' then
     return Icons.Icon({'Magic#Ancient Magicks', 'Ancient', img='Ancient', type='spellType'})
     return Icons.Icon({'Ancient Magicks', 'Ancient', img='Ancient', type='spellType'})
   elseif type == 'AltMagic' then
   elseif type == 'AltMagic' then
     return Icons.Icon({'Alt. Magic', type='skill'})
     return Icons.Icon({'Alt. Magic', type='skill'})