Module:Enemy List: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Californ1a (talk | contribs) m (add purge link) |
(search will now include versions of monsters that have versions, and only display the default version, using the name of the overall monster and not the specific version) |
||
Line 60: | Line 60: | ||
local row = out:tag('tr') |
local row = out:tag('tr') |
||
:tag('td'):wikitext(monster.Image):done() |
:tag('td'):wikitext(monster.Image):done() |
||
:tag('td'):wikitext(monster[ |
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done() |
||
:tag('td'):wikitext(monster['Unlock level']):done() |
:tag('td'):wikitext(monster['Unlock level']):done() |
||
:tag('td'):wikitext(monster['Profession Level A']):done() |
:tag('td'):wikitext(monster['Profession Level A']):done() |
||
Line 100: | Line 100: | ||
local row = out:tag('tr') |
local row = out:tag('tr') |
||
:tag('td'):wikitext(monster.Image):done() |
:tag('td'):wikitext(monster.Image):done() |
||
:tag('td'):wikitext(monster[ |
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done() |
||
:tag('td'):wikitext(monster['Unlock level']):done() |
:tag('td'):wikitext(monster['Unlock level']):done() |
||
:tag('td'):wikitext(monster['Unlock level'] and monster['Unlock level'] + 20):done() |
:tag('td'):wikitext(monster['Unlock level'] and monster['Unlock level'] + 20):done() |
||
Line 121: | Line 121: | ||
function p._main(profession, passive) |
function p._main(profession, passive) |
||
local data = mw.smw.ask{ |
local data = mw.smw.ask{ |
||
'[[ |
'[[Infobox::Monster]]', |
||
('[[Profession A::%s]]'):format(profession), |
('[[Profession A::%s]]'):format(profession), |
||
('[[Passive::%s]]'):format(passive and 'true' or 'false'), |
('[[Passive::%s]]'):format(passive and 'true' or 'false'), |
||
Line 134: | Line 134: | ||
'?Experience', |
'?Experience', |
||
'?Quest', |
'?Quest', |
||
'?Name', |
|||
'?Knowledge', |
'?Knowledge', |
||
'?Variant of#-', |
'?Variant of#-', |
||
'?Version anchor', |
|||
'?Version default', |
|||
'sort=Profession Level A', |
'sort=Profession Level A', |
||
'order=asc', |
'order=asc', |
||
Line 142: | Line 145: | ||
data = Array.filter(data, function(monster) |
data = Array.filter(data, function(monster) |
||
return monster.Quest == nil and monster[1] ~= '[[:Training Dummy|Training Dummy]]' |
return monster.Quest == nil and monster[1] ~= '[[:Training Dummy|Training Dummy]]' and ( monster['Version default'] or not(monster['Version anchor'] or false) ) |
||
end) |
end) |
||