16 403
contributi
(Aggiunte interfacce per ottenere i tipi da nome o ndex) |
(Bugfix with alternate forms) |
||
-- Data modules aren't loaded here because they probably won't be used
local txt = require('Modulo:Wikilib/strings') -- luacheck: no unused
local form = require('Modulo:Wikilib/forms')
local data
local abils
local loadData = function(tab, moduleName, useRequire)
end
--[[▼
-- Returns ndex given the name
--]]▼
local getAbil = function(name, abilityNumber)▼
abils = loadData(abils, 'PokéAbil/data')▼
return abils[tonumber(name) or name]['ability' .. abilityNumber]▼
end▼
b.getNdex = function(frame)
end
b.get_ndex = b.getNdex
-- Returns the name given ndex
b.getName = function(frame)
end
b.get_name = b.getName
▲--[[
Returns a Pokémon's ability (specified by the second parameter) given its name
or ndex.
The name can contain a form abbreviation, and if it's a Pokémon name (not an
ndex) it should be lowercase but the first letter, that can be both upper or
lower case.
▲--]]
▲local getAbil = function(name, abilityNumber)
▲end
-- Returns a Pokémon's first ability given its name or ndex
b.getAbil1 = function(frame)
end
b.get_abil_1 = b.getAbil1
-- Returns a Pokémon's second ability given its name or ndex
b.getAbil2 = function(frame)
end
b.get_abil_2 = b.getAbil2
-- Returns a Pokémon's hidden ability given its name or ndex
b.getAbild = function(frame)
end
b.get_abil_d, b.get_abil_h, b.get_abil_n = b.getAbild, b.getAbild, b.getAbild
--[[
Returns a Pokémon's type (specified by the second parameter) given its name or
ndex.
The name can contain a form abbreviation, and if it's a Pokémon name (not an
ndex) it should be lowercase but the first letter, that can be both upper or
lower case.
--]]
local getType = function(name, typeNumber)
▲ local pkmnType = data[tonumber(name) or name]['type' .. typeNumber]
end
b.getType1 = function(frame)
end
b.getType2 = function(frame)
end
b.getLink = function(frame)
end
|