Module:Enemy List: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Californ1a (talk | contribs) m (edit buttons) |
(Use plinkt styling with no-border; Use Module:Mw.html extension methods; Always link to the page in case it's different from Name) |
||
Line 1: | Line 1: | ||
require('strict') |
require('strict') |
||
require('Module:Mw.html extension') |
|||
local yesno = require('Module:Yesno') |
local yesno = require('Module:Yesno') |
||
local album_xp_data = mw.loadData('Module:Experience/data').album |
local album_xp_data = mw.loadData('Module:Experience/data').album |
||
Line 42: | Line 43: | ||
:wikitext('This list is updated dynamically. '..purge()) |
:wikitext('This list is updated dynamically. '..purge()) |
||
:done() |
:done() |
||
: |
:tr() |
||
⚫ | |||
:tag('th') |
|||
:th('Unlock<br>Level'):done() |
|||
⚫ | |||
:th('Combat<br>Level'):done() |
|||
:done() |
:th('HP'):done() |
||
: |
:th('Attack Style'):done() |
||
: |
:th('Immune To'):done() |
||
: |
:th('Vulnerable'):done() |
||
: |
:th('Found At'):done() |
||
: |
:th('XP'):done() |
||
: |
:th('Album XP'):done() |
||
⚫ | |||
:tag('th'):wikitext('XP'):done() |
|||
:tag('th'):wikitext('Album XP'):done() |
|||
:done() |
:done() |
||
for _, monster in ipairs(data) do |
for _, monster in ipairs(data) do |
||
local edit = editbutton("'''?''' (edit)", monster[ |
local edit = editbutton("'''?''' (edit)", monster[1]) |
||
local row = out: |
local row = out:tr() |
||
: |
:td{ monster.Image, addClass = 'plinkt-image no-border' }:done() |
||
: |
:td{ ('[[%s|%s]]'):format(monster[1], monster['Name']), addClass = 'plinkt-link no-border'}:done() |
||
: |
:td(monster['Unlock level'] or edit):done() |
||
: |
:td(monster['Profession Level A'] or edit):done() |
||
: |
:td((monster.Health and formatNum(monster.Health)) or edit):done() |
||
: |
:td(format_attack_style(monster['Attack style'])):done() |
||
: |
:td(format_attack_style(monster['Immune to'])):done() |
||
: |
:td(format_attack_style(monster['Vulnerable to'])):done() |
||
local location_text = {} |
local location_text = {} |
||
Line 75: | Line 73: | ||
end |
end |
||
row |
row |
||
: |
:td(table.concat(location_text, ', ')):done() |
||
: |
:td((monster.Experience and formatNum(monster.Experience)) or edit):done() |
||
: |
:td((monster['Album XP'] and formatNum(monster['Album XP']) or editbutton("'''?''' (edit)", 'Module:Experience/data'))):done() |
||
end |
end |
||
Line 89: | Line 87: | ||
:wikitext('This list is updated dynamically. '..purge()) |
:wikitext('This list is updated dynamically. '..purge()) |
||
:done() |
:done() |
||
: |
:tr() |
||
⚫ | |||
:tag('th') |
|||
⚫ | |||
⚫ | |||
:th('Weapon<br>Strength'):done() |
|||
:wikitext('Enemy') |
|||
:th('[[File:Knowledge icon.png|16px|link=Knowledge]] KP'):done() |
|||
:done() |
|||
: |
:th('Location'):done() |
||
: |
:th('XP'):done() |
||
: |
:th('Album XP'):done() |
||
:tag('th'):wikitext('Location'):done() |
|||
:tag('th'):wikitext('XP'):done() |
|||
:tag('th'):wikitext('Album XP'):done() |
|||
:done() |
:done() |
||
Line 105: | Line 100: | ||
local edit = editbutton("'''?''' (edit)", monster['Name']) |
local edit = editbutton("'''?''' (edit)", monster['Name']) |
||
local row = out:tag('tr') |
local row = out:tag('tr') |
||
: |
:td{ monster.Image, addClass = 'plinkt-image no-border' }:done() |
||
: |
:td{ ('[[%s|%s]]'):format(monster[1], monster['Name']), addClass = 'plinkt-link no-border'}:done() |
||
: |
:td(monster['Unlock level'] or edit):done() |
||
: |
:td((monster['Unlock level'] and monster['Unlock level'] + 20) or edit):done() |
||
: |
:td(monster.Knowledge or edit):done() |
||
local location_text = {} |
local location_text = {} |
||
Line 117: | Line 112: | ||
end |
end |
||
row |
row |
||
: |
:td(table.concat(location_text, ', ')):done() |
||
: |
:td((monster.Experience and formatNum(monster.Experience)) or edit):done() |
||
: |
:td((monster['Album XP'] and formatNum(monster['Album XP']) or editbutton("'''?''' (edit)", 'Module:Experience/data'))):done() |
||
end |
end |
||
Line 144: | Line 139: | ||
'?Version anchor', |
'?Version anchor', |
||
'?Version default', |
'?Version default', |
||
'?#-', |
|||
'sort=Profession Level A', |
'sort=Profession Level A', |
||
'order=asc', |
'order=asc', |