Module:Sandbox/User:Alsang: Difference between revisions
no edit summary
(remove completed lists) Tag: Manual revert |
No edit summary |
||
Line 4:
local variants = {'Basic','Moderate','Fine','Strong','Superior','Perfect'}
local weaponsStone = {
'Hammerfist',
'Throwing Stones',
'Stone Mace',
'Stone Discs',
'Bolas',
'Throwing Clubs',
'Sling'}
local weaponsMetal = {
weapons = weapons1▼
'Rapier ',
'Throwing Twinblades',
'Metal Kite Shield',
'Flanged Mace',
'Throwing Rings',
'Shortsword',
'Metal Javelins',
'Metal Heater Shield',
'Longsword',
'Throwing Knives',
'Broadsword',
'Metal Buckler',
'Throwing Axes',
'Battleaxe',
'Metal Bow'}
local weaponsBone = {
'Truncheon',
'Blowpipe',
'Wooden Round Shield',
'Cudgel',
'Javelins',
'Club',
'Light Crossbow',
'Wooden Square Shield',
'Quarterstaff',
'Recurve Bow',
'Spear',
'Wooden Hexagon Shield',
'Longbow',
'Poleaxe',
'Heavy Crossbow'}
if args=='stone' then
weapons = weaponsStone
elseif args=='metal' then
weapons = weaponsMetal
elseif args=='bone' then
else
return nil
local allWeapons = {}
for i,item in ipairs(variants) do
Line 29 ⟶ 70:
end
for i,item in ipairs(allWeapons) do
local query = mw.smw.ask(item.pagename .. '|?Name #- = data|mainlabel=-')▼
if type(query)=='table' then▼
end▼
local query = mw.smw.ask(item.pagename .. '|?Uses facility #- = data|mainlabel=-')
Line 37 ⟶ 82:
end
local query = mw.smw.ask(item.
if type(query)=='table' then
item.
end
local query = mw.smw.ask(item.
if type(query)=='table' then
item.
▲ end
▲ if type(query)=='table' then
▲ item.KP = query[1].data
▲ end
▲ local query = mw.smw.ask(item.pagename .. '|?Name #- = data|mainlabel=-')
end
Line 72 ⟶ 102:
:tag('th')
:wikitext('Item name')
:done()
:tag('th')
Line 80 ⟶ 107:
:done()
:tag('th')
:wikitext('
:done()
:tag('th')
:wikitext('
:done()
:tag('th')
:wikitext('
:done()
:done()
Line 99 ⟶ 123:
:done()
:tag('td')
:wikitext(item.
:done()
:tag('td')
Line 108 ⟶ 129:
:done()
:tag('td')
:wikitext(item.
:done()
:tag('td')
:wikitext(item.
:done()
:tag('td')
:wikitext(item.
:done()
Line 127 ⟶ 145:
--for debugging
--return '<pre>'..mw.text.jsonEncode(
end
|