4,951
edits
Falterfire (talk | contribs) (Added getStandardSpellsTable) |
Falterfire (talk | contribs) (I think I fixed the problems with spells) |
||
Line 7: | Line 7: | ||
local Icons = require('Module:Icons') | local Icons = require('Module:Icons') | ||
local Items = require('Module:Items') | local Items = require('Module:Items') | ||
local Constants = require('Module:Constants') | |||
function processSpell(section, index) | function processSpell(section, index) | ||
Line 129: | Line 130: | ||
end | end | ||
return p._getSpellRunes(spell) | return p._getSpellRunes(spell) | ||
end | |||
function p._getSpellDescription(spell) | |||
local result = '' | |||
if spell.description ~= nil then | |||
result = spell.description | |||
elseif spell.modifiers ~= nil then | |||
result = Constants.getModifiersText(spell.modifiers, false) | |||
elseif spell.type == 'Spells' then | |||
result = 'Combat spell with a max hit of '..(spell.maxHit * 10) | |||
end | |||
return result | |||
end | end | ||
Line 134: | Line 148: | ||
if stat == 'bigIcon' then | if stat == 'bigIcon' then | ||
return p._getSpellIcon(spell, 250) | return p._getSpellIcon(spell, 250) | ||
elseif stat == 'description' then | |||
return p._getSpellDescription(spell) | |||
elseif stat == 'icon' then | elseif stat == 'icon' then | ||
return p._getSpellIcon(spell) | return p._getSpellIcon(spell) | ||
Line 164: | Line 180: | ||
local result = '' | local result = '' | ||
--8/20/21: Changed to using the new getSpellDescription function | |||
result = result.."\r\n|-\r\n|'''Description:'''<br/>"..p._getSpellStat(spell, 'description') | |||
return result | return result | ||
Line 276: | Line 289: | ||
rowTxt = rowTxt..p.getSpellTypeLink(spell.type) | rowTxt = rowTxt..p.getSpellTypeLink(spell.type) | ||
end | end | ||
--8/20/21: Changed to just getting the spell's description outright | |||
rowTxt = rowTxt..'||'..p._getSpellStat(spell, 'description') | |||
rowTxt = rowTxt..'||style="text-align:center"|' | rowTxt = rowTxt..'||style="text-align:center"|' | ||
rowTxt = rowTxt..p._getSpellRunes(spell) | rowTxt = rowTxt..p._getSpellRunes(spell) |