79 548
contributi
(Quick fix *** sovrascritto il testo esistente ***) |
(Internal updates *** sovrascritto il testo esistente ***) |
||
-- stylua: ignore end
--[[
local function parseName(name, abbr)▼
Given the frame.args, find out which Pokémon the caller wants, and return a
value to index data module to get that Pokémon.
return formlib.nameToDataindex(mw.text.decode(name), abbr)▼
Inspects the first argument, which should be either the name or the ndex (the
latter possibly with an abbr), and the 'form' named argument, which can specify
the abbr when the first parameter is the name.
--]]
local p = wlib.trimAll(args)
end
b.getNdex = function(frame)
local pokes = mw.loadData('Modulo:Poké/data')
return txt.ff(pokes[parseName(frame.args
end
b.get_ndex = b.getNdex
b.getName = function(frame)
local pokes = mw.loadData('Modulo:Poké/data')
return pokes[parseName(frame.args
end
b.get_name = b.getName
local abils = mw.loadData('Modulo:PokéAbil/data')
return multigen.getGenValue(
abils[parseName(frame.args
tonumber(gen)
)
return txt.fu(
multigen.getGenValue(
pokes[parseName(p
tonumber(p.gen)
)
local stat = txt.trim(frame.args[2])
return multigen.getGenValue(
stats[parseName(frame.args
tonumber(frame.args.gen)
)
b.ifTwoTypes = function(frame)
local pokes = mw.loadData('Modulo:Poké/data')
local poke = pokes[parseName(frame.args
local isDualType = poke.type1 == poke.type2
return isDualType and txt.trim(frame.args[2]) or txt.trim(frame.args[3])
-- Links also to UselessForms
formlib.loadUseless(true)
return formlib.
end
b.getlink = b.getLink
|