Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
Undo revision 75928 by Ricewind (talk)
No edit summary
(Undo revision 75928 by Ricewind (talk))
Tag: Undo
Line 134: Line 134:


function p._getSpellIcon(spell, size)
function p._getSpellIcon(spell, size)
if size == nil then size = 50 end
local imgType = p._getSpellIconType(spell)
local imgType = p._getSpellIconType(spell)
return Icons.Icon({spell.name, type=imgType, notext=true})
return Icons.Icon({spell.name, type=imgType, notext=true, size=size})
end
end


Line 603: Line 604:
end
end
table.insert(resultPart, 'Requirements')
table.insert(resultPart, 'Requirements')
table.insert(resultPart, '[[DLC]]')
if includeDamage then
if includeDamage then
table.insert(resultPart, 'Spell Dmg')
table.insert(resultPart, 'Spell Dmg')
Line 621: Line 621:
local spellBook = p.getSpellBookFromSpell(spell)
local spellBook = p.getSpellBookFromSpell(spell)
local rowPart = {'\n|-\n|data-sort-value="' .. spell.name .. '"| '}
local rowPart = {'\n|-\n|data-sort-value="' .. spell.name .. '"| '}
table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true}))
table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true, size=50}))
table.insert(rowPart, '|| [['  .. spell.name .. ']]')
table.insert(rowPart, '|| ' .. Icons.getExpansionIcon(spell.id) .. Icons.Icon({spell.name, type=spellBook.imgType, noicon=true}))
table.insert(rowPart, '|| style="text-align: center;" | data-sort-value="' .. Icons.getExpansionID(spell.id) .. '" | ' .. Icons.getDLCColumnIcon(spell.id))
if includeTypeColumn then
if includeTypeColumn then
table.insert(rowPart, '||data-sort-value="' .. spellBook.id .. '"| ' .. p.getSpellTypeLink(spellBook.id))
table.insert(rowPart, '||data-sort-value="' .. spellBook.id .. '"| ' .. p.getSpellTypeLink(spellBook.id))
2,875

edits