Module:Apt: Difference between revisions
From Ashenzari's Archive
More actions
imported>CommanderC No edit summary |
imported>CommanderC No edit summary |
||
| Line 44: | Line 44: | ||
]=] | ]=] | ||
for _, sp in ipairs(species) do | for _, sp in ipairs(species) do | ||
result = result .. "|" .. data[sp][skill] | result = result .. "|" .. data[sp][skill] .. "\n" | ||
end | end | ||
result = result .. "|}" | result = result .. "|}" | ||
Revision as of 17:58, 16 August 2013
local p = {}
function p.aptitude(frame)
local data = mw.loadData('Module:Table of aptitudes')
return data[frame.args[1]][frame.args[2]]
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', 'Felid',
'Sludge Elf', '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
return p
| Hu | Ce | Dg | Ds | Dr | DD | DE | HE | SE | Fe | Gh | Ha | Ko | Mf | Mi | Mu | Na | Op | Og | HO | Sp | Te | Tr | Vp |