Differenze tra le versioni di "Modulo:UselessForms/data"

Adding gigamax and Galar regional dex *** sovrascritto il testo esistente ***
(More gen 8 info, MTCompatto and Movelist updates *** sovrascritto il testo esistente ***)
(Adding gigamax and Galar regional dex *** sovrascritto il testo esistente ***)
local tab = require('Modulo:Wikilib/tables') -- luacheck: no unused
 
-- Crea iCreates link alle formeto alternative forms in list pointing to target instead of
-- "Differenze di forma"
local makeTargetedLink = function(linkstr, index, target, list)
linkstr = linkstr:gsub('Differenze di forma', target)
for name_, poke in pairs(tlist) do
t[poke][index] = table.map(t[poke].names, function(formName)
return formName == ''
and ''
or string.interp(linkstr, {
anchor = t[poke].anchor or string.fu(poke),
formName = formName
})
end)
end
end
 
-- Creates links to alternative forms
local makeLinks = function(black)
local link = black
and '<div class="small-text black-text">[[Differenze di forma#${anchor}|<span style="color:#000">${formName}</span>]]</div>'
or '<div class="small-text">[[Differenze di forma#${anchor}|${formName}]]</div>'
local index = black and 'blacklinks' or 'links'
 
local stdLinks = table.filter(t, function(_, key)
for name, poke in pairs(t) do
return not table.search({'gigamax'}, key)
and not table.search(t.gigamax, key)
end)
 
for name, poke in pairs(stdLinks) do
poke[index] = table.map(poke.names, function(formName)
return formName == ''
end)
end
 
-- Link of forms with a dedicated page instead of "Differenze di forma"
makeTargetedLink(link, index, 'Gigamax', t.gigamax)
end
 
t.sinistea = {}
t.alcremie = {}
 
-- Table with Pokémon with a Gigamax
 
t.gigamax = {'charizard', 'butterfree', 'meowth', 'machamp', 'gengar',
'kingler', 'lapras', 'eevee', 'snorlax', 'garbodor', 'melmetal',
'corviknight', 'orbeetle', 'drednaw', 'coalossal', 'flapple', 'appletun',
'sandaconda', 'toxtricity', 'centiskorch', 'hatterene', 'grimmsnarl',
'copperajah', 'duraludon'}
 
--[[
Si = 'Berretto Sinnoh', U = 'Berretto Unima',
K = 'Berretto Kalos', A = 'Berretto Alola',
Co = 'Berretto Compagni', Gi = 'Gigamax', base = ''}
t.pichu.names = {S = 'Pichu Spunzorek', base = ''}
t.unown.names = {base = 'A', B = 'B', C = 'C', D = 'D', E = 'E', F = 'F',
t.alcremie.names = {base = "Lattevaniglia", R = "Latterosa", Ma = "Lattematcha",
Me = "Lattementa", L = "Lattelimone", S = "Lattesale", Rm = "Rosamix",
Cm = "Caramelmix", Tm = "Triplomix", Gi = "Gigamax"}
for _, v in pairs(t.gigamax) do
t[v] = {}
t[v].names = {Gi = "Gigamax", base = ""}
end
 
-- Anchor per i link alle forme alternative,
 
t.pikachu.ext = {originale = 'O', hoenn = 'H', sinnoh = 'Si',
unima = 'U', kalos = 'K', alola = 'A', compagni = 'Co', gigamax = 'Gi'}
t.pichu.ext = {spunzorek = 'S'}
t.unown.ext = {base = 'A', B = 'B', C = 'C', D = 'D', E = 'E', F = 'F',
t.sinistea.ext = {}
t.alcremie.ext = {}
for _, v in pairs(t.gigamax) do
t[v].ext = {gigamax = "Gi"}
end
 
--[[
t.sinistea.gamesOrder = {'base', 'A'}
t.alcremie.gamesOrder = {'base', 'R', 'Ma', 'Me', 'L', 'S', 'Rm', 'Cm', 'Tm'}
for _, v in pairs(t.gigamax) do
t[v].gamesOrder = {"base", "Gi"}
end
 
--[[
--]]
 
t.charizard.since = {base = 'rb', Gi = 'spsc'}
t.butterfree.since = {base = 'rb', Gi = 'spsc'}
t.pikachu.since = {O = 'sl', H = 'sl', Si = 'sl', U = 'sl',
K = 'sl', A = 'sl', Co = 'usul', Gi = 'spsc', base = 'rb'}
t.meowth.since = {base = 'rb', Gi = 'spsc'}
t.machamp.since = {base = 'rb', Gi = 'spsc'}
t.gengar.since = {base = 'rb', Gi = 'spsc'}
t.kingler.since = {base = 'rb', Gi = 'spsc'}
t.lapras.since = {base = 'rb', Gi = 'spsc'}
t.eevee.since = {base = 'rb', Gi = 'spsc'}
t.snorlax.since = {base = 'rb', Gi = 'spsc'}
t.pichu.since = {S = 'hgss', base = 'oa'}
t.unown.since = {base = 'oa', B = 'oa', C = 'oa', D = 'oa', E = 'oa', F = 'oa',
t.shellos.since = {E = 'dp', base = 'dp'}
t.unfezant.since = {F = 'nb', base = 'nb'}
t.garbodor.since = {base = 'nb', Gi = 'spsc'}
t.deerling.since = {E = 'nb', A = 'nb', I = 'nb', base = 'nb'}
t.frillish.since = t.unfezant.since
Az = 'sl', I = 'sl', Vi = 'sl'}
t.mimikyu.since = {base = 'sl', S = 'sl'}
t.melmetal.since = {base = 'lgpe', Gi = 'spsc'}
t.corviknight.since = {base = 'spsc', Gi = 'spsc'}
t.orbeetle.since = {base = 'spsc', Gi = 'spsc'}
t.drednaw.since = {base = 'spsc', Gi = 'spsc'}
t.coalossal.since = {base = 'spsc', Gi = 'spsc'}
t.flapple.since = {base = 'spsc', Gi = 'spsc'}
t.appletun.since = {base = 'spsc', Gi = 'spsc'}
t.sandaconda.since = {base = 'spsc', Gi = 'spsc'}
t.cramorant.since = {T = 'spsc', I = 'spsc', base = 'spsc'}
t.toxtricity.since = {base = 'spsc', Gi = 'spsc'}
t.centiskorch.since = {base = 'spsc', Gi = 'spsc'}
t.sinistea.since = {base = 'spsc', A = 'spsc'}
t.hatterene.since = {base = 'spsc', Gi = 'spsc'}
t.grimmsnarl.since = {base = 'spsc', Gi = 'spsc'}
t.alcremie.since = {base = 'spsc', R = 'spsc', Ma = 'spsc', Me = 'spsc',
L = 'spsc', S = 'spsc', Rm = 'spsc', Cm = 'spsc', Tm = 'spsc', Gi = 'spsc'}
t.copperajah.since = {base = 'spsc', Gi = 'spsc'}
t.duraludon.since = {base = 'spsc', Gi = 'spsc'}
 
--[[
 
t.pichu['until'] = {S = 'hgss'}
 
-- Other Gigamax forms
table.insert(t.gigamax, 'pikachu')
table.insert(t.gigamax, 'alcremie')
 
-- Alias, messi qui per evitare inutili iterazioni dei cicli precedenti
t['flabébé'], t.florges = t.floette, t.floette
t.polteageist = t.sinistea
t[6] = t.charizard
t[12] = t.butterfree
t[25] = t.pikachu
t[52] = t.meowth
t[68] = t.machamp
t[94] = t.gengar
t[99] = t.kingler
t[131] = t.lapras
t[133] = t.eevee
t[143] = t.snorlax
t[172] = t.pichu
t[201] = t.unown
t[423] = t.gastrodon
t[521] = t.unfezant
t[569] = t.garbodor
t[585] = t.deerling
t[586] = t.sawsbuck
t[774] = t.minior
t[778] = t.mimikyu
t[809] = t.melmetal
t[823] = t.corviknight
t[826] = t.orbeetle
t[834] = t.drednaw
t[839] = t.coalossal
t[841] = t.flapple
t[842] = t.appletun
t[844] = t.sandaconda
t[845] = t.cramorant
t[849] = t.toxtricity
t[851] = t.centiskorch
t[854] = t.sinistea
t[855] = t.polteageist
t[858] = t.hatterene
t[861] = t.grimmsnarl
t[869] = t.alcremie
t[879] = t.copperajah
t[884] = t.duraludon
 
return t
79 548

contributi