Editing Module:Enemy List

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 43: Line 42:
:wikitext('This list is updated dynamically. '..purge())
:wikitext('This list is updated dynamically. '..purge())
:done()
:done()
:tr()
:tag('tr')
:tag('th')
:th{ 'Enemy', attr = { colspan = '2' } }:done()
:attr{ colspan = '2' }
:th('Unlock<br>Level'):done()
:th('Combat<br>Level'):done()
:wikitext('Enemy')
:th('HP'):done()
:done()
:th('Attack Style'):done()
:tag('th'):wikitext('Unlock<br>Level'):done()
:th('Immune To'):done()
:tag('th'):wikitext('Combat<br>Level'):done()
:th('Vulnerable'):done()
:tag('th'):wikitext('HP'):done()
:th('Found At'):done()
:tag('th'):wikitext('Attack Style'):done()
:th('XP'):done()
:tag('th'):wikitext('Immune To'):done()
:th('Album XP'):done()
:tag('th'):wikitext('Vulnerable'):done()
:tag('th'):wikitext('Found At'):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[1])
local edit = editbutton("'''?''' (edit)", monster['Name'])
local row = out:tr()
local row = out:tag('tr')
:td{ monster.Image, addClass = 'plinkt-image no-border' }:done()
:tag('td'):wikitext(monster.Image):done()
:td{ ('[[%s|%s]]'):format(monster[1], monster['Name']), addClass = 'plinkt-link no-border'}:done()
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done()
:td(monster['Unlock level'] or edit):done()
:tag('td'):wikitext(monster['Unlock level'] or edit):done()
:td(monster['Profession Level A'] or edit):done()
:tag('td'):wikitext(monster['Profession Level A'] or edit):done()
:td((monster.Health and formatNum(monster.Health)) or edit):done()
:tag('td'):wikitext((monster.Health and formatNum(monster.Health)) or edit):done()
:td(format_attack_style(monster['Attack style'])):done()
:tag('td'):wikitext(format_attack_style(monster['Attack style'])):done()
:td(format_attack_style(monster['Immune to'])):done()
:tag('td'):wikitext(format_attack_style(monster['Immune to'])):done()
:td(format_attack_style(monster['Vulnerable to'])):done()
:tag('td'):wikitext(format_attack_style(monster['Vulnerable to'])):done()


local location_text = {}
local location_text = {}
Line 73: Line 75:
end
end
row
row
:td(table.concat(location_text, ', ')):done()
:tag('td'):wikitext(table.concat(location_text, ', ')):done()
:td((monster.Experience and formatNum(monster.Experience)) or edit):done()
:tag('td'):wikitext((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()
:tag('td'):wikitext((monster['Album XP'] and formatNum(monster['Album XP']) or editbutton("'''?''' (edit)", 'Module:Experience/data'))):done()
end
end


Line 87: Line 89:
:wikitext('This list is updated dynamically. '..purge())
:wikitext('This list is updated dynamically. '..purge())
:done()
:done()
:tr()
:tag('tr')
:tag('th')
:th{ 'Enemy', attr = { colspan = '2' } }:done()
:attr{ colspan = '2' }
:th('Level'):done()
:wikitext('Enemy')
:th('Weapon<br>Strength'):done()
:done()
:th('[[File:Knowledge icon.png|16px|link=Knowledge]] KP'):done()
:th('Location'):done()
:tag('th'):wikitext('Level'):done()
:th('XP'):done()
:tag('th'):wikitext('Weapon<br>Strength'):done()
:th('Album XP'):done()
: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()


Line 100: Line 105:
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()
:tag('td'):wikitext(monster.Image):done()
:td{ ('[[%s|%s]]'):format(monster[1], monster['Name']), addClass = 'plinkt-link no-border'}:done()
:tag('td'):wikitext(('[[%s]]'):format(monster['Name'])):done()
:td(monster['Unlock level'] or edit):done()
:tag('td'):wikitext(monster['Unlock level'] or edit):done()
:td((monster['Unlock level'] and monster['Unlock level'] + 20) or edit):done()
:tag('td'):wikitext((monster['Unlock level'] and monster['Unlock level'] + 20) or edit):done()
:td(monster.Knowledge or edit):done()
:tag('td'):wikitext(monster.Knowledge or edit):done()


local location_text = {}
local location_text = {}
Line 112: Line 117:
end
end
row
row
:td(table.concat(location_text, ', ')):done()
:tag('td'):wikitext(table.concat(location_text, ', ')):done()
:td((monster.Experience and formatNum(monster.Experience)) or edit):done()
:tag('td'):wikitext((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()
:tag('td'):wikitext((monster['Album XP'] and formatNum(monster['Album XP']) or editbutton("'''?''' (edit)", 'Module:Experience/data'))):done()
end
end


Line 139: Line 144:
'?Version anchor',
'?Version anchor',
'?Version default',
'?Version default',
'?#-',
'sort=Profession Level A',
'sort=Profession Level A',
'order=asc',
'order=asc',
Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see Brighter Shores:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

This page is a member of a hidden category: