Editing Module:Enemy List
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
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 6: | Line 5: | ||
local lang = mw.language.getContentLanguage() |
local lang = mw.language.getContentLanguage() |
||
local purge = require('Module:Purge')._purge |
local purge = require('Module:Purge')._purge |
||
local editbutton = require('Module:Edit button') |
|||
local function formatNum(n) |
local function formatNum(n) |
||
Line 43: | Line 41: | ||
:wikitext('This list is updated dynamically. '..purge()) |
:wikitext('This list is updated dynamically. '..purge()) |
||
:done() |
:done() |
||
: |
:tag('tr') |
||
:tag('th') |
|||
: |
:attr{ colspan = '2' } |
||
:th('Unlock<br>Level'):done() |
|||
: |
:wikitext('Enemy') |
||
:done() |
|||
:th(' |
:tag('th'):wikitext('Unlock<br>Level'):done() |
||
:th(' |
:tag('th'):wikitext('Combat<br>Level'):done() |
||
:th(' |
:tag('th'):wikitext('HP'):done() |
||
:th(' |
:tag('th'):wikitext('Attack Style'):done() |
||
:th(' |
:tag('th'):wikitext('Immune To'):done() |
||
:th(' |
:tag('th'):wikitext('Vulnerable'):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 |
local row = out:tag('tr') |
||
:tag('td'):wikitext(monster.Image):done() |
|||
local row = out:tr() |
|||
:td |
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done() |
||
: |
:tag('td'):wikitext(monster['Unlock level']):done() |
||
:td(monster[' |
:tag('td'):wikitext(monster['Profession Level A']):done() |
||
:tag('td'):wikitext(formatNum(monster.Health)):done() |
|||
:td(monster['Profession Level A'] or edit):done() |
|||
:td((monster |
:tag('td'):wikitext(format_attack_style(monster['Attack style'])):done() |
||
:td(format_attack_style(monster[' |
:tag('td'):wikitext(format_attack_style(monster['Immune to'])):done() |
||
:td(format_attack_style(monster[' |
:tag('td'):wikitext(format_attack_style(monster['Vulnerable to'])):done() |
||
:td(format_attack_style(monster['Vulnerable to'])):done() |
|||
local location_text = {} |
local location_text = {} |
||
Line 73: | Line 73: | ||
end |
end |
||
row |
row |
||
:td(table.concat(location_text, ', ')):done() |
:tag('td'):wikitext(table.concat(location_text, ', ')):done() |
||
:td( |
:tag('td'):wikitext(formatNum(monster.Experience)):done() |
||
: |
:tag('td'):wikitext(formatNum(monster['Album XP'])):done() |
||
end |
end |
||
Line 87: | Line 87: | ||
:wikitext('This list is updated dynamically. '..purge()) |
:wikitext('This list is updated dynamically. '..purge()) |
||
:done() |
:done() |
||
: |
:tag('tr') |
||
:tag('th') |
|||
: |
:attr{ colspan = '2' } |
||
⚫ | |||
:wikitext('Enemy') |
|||
:th('Weapon<br>Strength'):done() |
|||
:done() |
|||
:th('[[File:Knowledge icon.png|16px|link=Knowledge]] KP'):done() |
|||
:th(' |
:tag('th'):wikitext('Level'):done() |
||
:th(' |
:tag('th'):wikitext('Weapon<br>Strength'):done() |
||
:th(' |
:tag('th'):wikitext('[[File:Knowledge icon.png|16px|link=Knowledge]] KP'):done() |
||
:tag('th'):wikitext('Location'):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['Name']) |
|||
local row = out:tag('tr') |
local row = out:tag('tr') |
||
:td |
:tag('td'):wikitext(monster.Image):done() |
||
:td |
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done() |
||
:td(monster['Unlock level'] |
:tag('td'):wikitext(monster['Unlock level']):done() |
||
: |
:tag('td'):wikitext(monster['Unlock level'] and monster['Unlock level'] + 20):done() |
||
:td(monster.Knowledge |
:tag('td'):wikitext(monster.Knowledge):done() |
||
local location_text = {} |
local location_text = {} |
||
Line 112: | Line 114: | ||
end |
end |
||
row |
row |
||
:td(table.concat(location_text, ', ')):done() |
:tag('td'):wikitext(table.concat(location_text, ', ')):done() |
||
:td( |
:tag('td'):wikitext(formatNum(monster.Experience)):done() |
||
: |
:tag('td'):wikitext(formatNum(monster['Album XP'])):done() |
||
end |
end |
||
Line 139: | Line 141: | ||
'?Version anchor', |
'?Version anchor', |
||
'?Version default', |
'?Version default', |
||
'?#-', |
|||
'sort=Profession Level A', |
'sort=Profession Level A', |
||
'order=asc', |
'order=asc', |