2,875
edits
No edit summary |
No edit summary |
||
Line 632: | Line 632: | ||
:addClass('wikitable, sortable, stickyHeader') | :addClass('wikitable, sortable, stickyHeader') | ||
local header = html | local header = html:tag('tr') | ||
header | header:tag('th'):wikitext('Spell') | ||
:attr('colspan', 2) | :attr('colspan', 2) | ||
if includeTypeColumn then | if includeTypeColumn then | ||
header | header:tag('th'):wikitext('Spellbook') | ||
end | end | ||
header | header:tag('th'):wikitext('Requirements') | ||
header | header:tag('th'):wikitext('[[DLC]]') | ||
if includeDamage then | if includeDamage then | ||
header | header:tag('th'):wikitext('Spell Dmg') | ||
end | end | ||
header | header:tag('th'):wikitext('Description') | ||
--table.insert(resultPart, 'style="width:275px"| Description') | --table.insert(resultPart, 'style="width:275px"| Description') | ||
if includeExperience then | if includeExperience then | ||
header | header:tag('th'):wikitext('XP') | ||
end | end | ||
header | header:tag('th'):wikitext('Runes') | ||
:css('min-width', '90px') | :css('min-width', '90px') | ||
if includeItems then | if includeItems then | ||
header | header:tag('th'):wikitext('Item Cost') | ||
end | end | ||
Line 662: | Line 662: | ||
for i, spell in ipairs(spellListSorted) do | for i, spell in ipairs(spellListSorted) do | ||
local spellBook = p.getSpellBookFromSpell(spell) | local spellBook = p.getSpellBookFromSpell(spell) | ||
local row = html | local row = html:tag('tr') | ||
row | row:tag('td'):wikitext(Icons.Icon({spell.name, type=spellBook.imgType, notext=true})) | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
:attr('data-sort-value', spell.name) | :attr('data-sort-value', spell.name) | ||
row | row:tag('td'):wikitext(Icons.Icon({spell.name, type=spellBook.imgType, noicon=true})) | ||
if includeTypeColumn then | if includeTypeColumn then | ||
row | row:tag('td'):wikitext(p.getSpellTypeLink(spellBook.id)) | ||
:attr('data-sort-value', spellBook.id) | :attr('data-sort-value', spellBook.id) | ||
end | end | ||
row | row:tag('td'):wikitext(Icons.getDLCColumnIcon(spell.id)) | ||
:attr('data-sort-value', Icons.getExpansionID(spell.id)) | :attr('data-sort-value', Icons.getExpansionID(spell.id)) | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
row | row:tag('td'):wikitext(p._getSpellRequirements(spell)) | ||
:attr('data-sort-value', spell.level) | :attr('data-sort-value', spell.level) | ||
Line 682: | Line 682: | ||
local dmg = p._getSpellStat(spell, 'spellDamage') | local dmg = p._getSpellStat(spell, 'spellDamage') | ||
if dmg > 0 then | if dmg > 0 then | ||
row | row:tag('td'):wikitext(dmg) | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
else | else | ||
row | row:tag('td'):wikitext('N/A') | ||
:addClass('table-na') | :addClass('table-na') | ||
end | end | ||
Line 691: | Line 691: | ||
--8/20/21: Changed to just getting the spell's description outright | --8/20/21: Changed to just getting the spell's description outright | ||
row | row:tag('td'):wikitext(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 | ||
Line 706: | Line 706: | ||
end | end | ||
table.insert(intervalTable, ')') | table.insert(intervalTable, ')') | ||
row | row:tag('td'):wikitext(table.concat(intervalTable)) | ||
end | end | ||
end | end | ||
Line 712: | Line 712: | ||
local xp = spell.baseExperience | local xp = spell.baseExperience | ||
if xp == nil or xp == 0 then | if xp == nil or xp == 0 then | ||
row | row:tag('td'):wikitext('N/A') | ||
:addClass('table-na') | :addClass('table-na') | ||
else | else | ||
row | row:tag('td'):wikitext(xp) | ||
:addClass('text-align', 'right') | :addClass('text-align', 'right') | ||
end | end | ||
end | end | ||
row | row:tag('td'):wikitext(p._getSpellRunes(spell)) | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
if includeItems then | if includeItems then | ||
row | row:tag('td'):wikitext(p._getSpellItems(spell)) | ||
:css('text-align', 'center') | :css('text-align', 'center') | ||
end | end |
edits