79 548
contributi
m (Bugfix) |
(Adding parameters to Movelist-entry to handle special cases *** sovrascritto il testo esistente ***) |
||
if merge then
alt = f.allFormsData()
else
alt = mw.loadData('Modulo:UselessForms/data')
If name is a Pokémon name (not an ndex) it should be lowercase but the first
letter, that can be both upper or lower case.
Doesn't work when name ends with 'base'.
--]]
f.nameToDataindex = function(name)
local trueName, extform = f.getnameabbr(string.fl(string.trim(name)))
-- The local variable is needed because global alt can be changed with
-- loadUseless
local trueAlt = mw.loadData('Modulo:AltForms/data')
-- If the Pokémon isn't in altForms/data, should return the plain name
--
-- The last check is for Pokémon with both forms
if extform == 'base' or not alt[tonumber(trueName) or trueName] then▼
if extform == 'base'
or not trueAlt[tonumber(trueName) or trueName].names[extform] then
return trueName
end
|