Module:Apt: Difference between revisions
From Ashenzari's Archive
More actions
imported>CommanderC No edit summary |
imported>CommanderC No edit summary |
||
| Line 67: | Line 67: | ||
'Spriggan', 'Tengu', 'Troll', 'Vampire'} | 'Spriggan', 'Tengu', 'Troll', 'Vampire'} | ||
local skills = {'Armour', 'Dodging', 'Stealth', 'Stabbing', | local skills = {'Armour', 'Dodging', 'Stealth', 'Stabbing', | ||
'Shields', 'Traps', 'Invocations', 'Evocations', ' | 'Shields', 'Traps', 'Invocations', 'Evocations', 'Hit Points', 'Magic Points', 'Experience'} | ||
local result = [=[ | local result = [=[ | ||
{| class="wikitable sortable" style="font-size:75%" border=1 | {| class="wikitable sortable" style="font-size:75%" border=1 | ||
Revision as of 21:46, 18 September 2013
local p = {}
function p.aptitude(frame)
local data = mw.loadData('Module:Table of aptitudes')
local sp = frame.args[1]
local sk = frame.args[2]
if not sp or not sk then
return ""
end
if sp == "Draconian" then
sp = "Base Draconian"
end
return data[sp][sk]
end
function p.skill_table(frame)
local data = mw.loadData('Module:Table of aptitudes')
local skill = frame.args[1]
local species = {'Human', 'Centaur', 'Demigod', 'Demonspawn',
'Base Draconian', 'Deep Dwarf', 'Deep Elf', 'High Elf',
'Sludge Elf', 'Felid', 'Ghoul', 'Halfling', 'Kobold', 'Merfolk',
'Minotaur', 'Mummy', 'Naga', 'Octopode', 'Ogre', 'Hill Orc',
'Spriggan', 'Tengu', 'Troll', 'Vampire'}
local result = [=[
]=]
for _, sp in ipairs(species) do
result = result .. "| " .. data[sp][skill] .. "\n"
end
result = result .. "|}"
return result
end
function p.aptitude_chart_general(frame)
local data = mw.loadData('Module:Table of aptitudes')
local skill = frame.args[1]
local species = {'Human', 'Centaur', 'Demigod', 'Demonspawn',
'Base Draconian', 'Deep Dwarf', 'Deep Elf', 'High Elf',
'Sludge Elf', 'Felid', 'Ghoul', 'Halfling', 'Kobold', 'Merfolk',
'Minotaur', 'Mummy', 'Naga', 'Octopode', 'Ogre', 'Hill Orc',
'Spriggan', 'Tengu', 'Troll', 'Vampire'}
local skills = {'Armour', 'Dodging', 'Stealth', 'Stabbing',
'Shields', 'Traps', 'Invocations', 'Evocations', 'Hit Points', 'Magic Points', 'Experience'}
local result = [=[
| Hu | Ce | Dg | Ds | Dr | DD | DE | HE | SE | Fe | Gh | Ha | Ko | Mf | Mi | Mu | Na | Op | Og | HO | Sp | Te | Tr | Vp |
| Species | Arm | Ddg | Sth | Stb | Shd | Trp | Inv | Evo | HP | MP | Exp |
|---|