16 389
contributi
m (Ups, <= isn't <) |
(Much better) |
||
local m = {}
local txt = require('Modulo:Wikilib/strings')
local multigen = require('Modulo:Wikilib/multigen')
local gens = require('Modulo:Wikilib/gens')
local ms = require('Modulo:MiniSprite')
local sup = mw.loadData('Modulo:Sup/data')
local pokes = mw.loadData('Modulo:Poké/data')
local abils = mw.loadData('Modulo:PokéAbil/data')
-- accessoria (non esportata) per i link alle aree
end
if text:find("%*") then
text = text:gsub("%*(.-)%*",function(a) return "<span class=\"explain tooltips\" title=\""..a.."\">*</span>" end)
end
return text
m.haentry = function(frame)
local ndex = string.trim(frame.args.num)
ndex = tonumber(ndex) or ndex
local poke = pokes[ndex]
local abil = abils[ndex]
local final = {
'|-\n|',
poke.ndex,
"\n|",
ms.staticLua(ndex),
"\n|",
"[[",
poke.name,
"]]\n|[[",
multigen.getGenValue(abil.abilityd),
"]]"
}▼
if frame.args.gen5ha then
table.insert(final, table.concat{'<span class="explain tooltips" title="', frame.args.gen5ha, ' nella quinta generazione">*</span>'})
-- QUINTA GENERAZIONE
if gens.getGen.ndex(poke.ndex) <= 5 then
local disp5 = {}
-- SESTA GENERAZIONE
if gens.getGen.ndex(
local disp6 = {}
-- Orde
if frame.args.horde then
local horde = {"[[Gruppi di Pokémon]]: ",splitareas(frame.args.horde,6)}
table.insert(disp6,table.concat(horde))
end
-- Safari
if frame.args.safari then
local safari = {"[[Safari Amici]] ("}
table.insert(disp6,table.concat(safari))
end
-- altri metodi
if frame.args.gen6other then
table.insert(disp6,specialtext(frame.args.gen6other))
end
-- caso base: necessita trasferitore (non "non disponibile": se non è nè in quinta nè in sesta non deve apparire nella lista)
if table.getn(disp6)==0 then
disp6="[[Pokétrasferitore]]"
end
if gens.getGen.ndex(
-- SETTIMA GENERAZIONE
-- I don't really know if there may be some standard method, so I'll add
-- just this
local disp7 = {}
-- other methods
if frame.args.gen7other then
table.insert(disp7, specialtext(frame.args.gen7other))
end
-- base case: Banca Pokémon (it's not "Not available" because it wouldn't
-- have appeared in the list if it hadn't been available neither in sixth
-- nor fifth gen)
if table.getn(disp7)==0 then
disp7="[[Banca Pokémon]]"
|