Differenze tra le versioni di "Modulo:Evobox"

Fixing bug with 4 digits ndex in Formbox *** sovrascritto il testo esistente ***
(Small fixes *** sovrascritto il testo esistente ***)
(Fixing bug with 4 digits ndex in Formbox *** sovrascritto il testo esistente ***)
 
types. Requires some info and get others from data modules.
 
Parameters are named:
The parameters are the Pokémon ndex, the evolutionary phase (text, not a
- ndex: the Pokémon ndex or name
number), the notes and the name to be displayed in place of the Pokémon name
- abbr: the abbr of the form
(optional, defaults to the Pokémon's name).
The parameters are the Pokémon- ndex,phase: the evolutionary phase (text, not a number)
- notes: addition notes
number), the notes and - displayname (optional): the name to be displayed in place of the Pokémon name
(optional, name (defaults to the Pokémon's name).
 
--]]
eb.boxPokemonAuto = function(ndex, phase, notes, shownNameargs)
if not args.ndex then
return ""
end
local pokendex, abbr = multigenform.getGengetndexabbr(args.ndex, args.abbr)
local poke = multigen.getGen(pokes[form.nameToDataindex(ndex, abbr)])
local sprndex = (type(ndex) == "string" and ndex or pokes[tonumbertxt.ff(ndex)])
.. form.toemptyabbr(abbr)
or pokes[tonumber(string.match(ndex, "(%d%d%d)%u%l*"))]
)
ndex = type(ndex) == "string" and ndex or txt.fourFigures(ndex)
 
return eb.boxPokemon({
notes = args.notes,
type1 = poke.type1 or "sconosciuto",
type2 = poke.type2 or "sconosciuto",
spr = spr.sprLua(ndexsprndex, "current", "male", "150px"),
phase = args.phase,
name = poke.name,
shownName = shownNameargs.displayname,
})
end
local key = "box" .. tostring(k)
arrows[key] = eb.SingleArrow(v)
boxes[key] = eb.boxPokemonAuto({
ndex = v.ndex or v.name,
phase = eb.phaseName(phase, evodata[v.name]),
notes = v.notes,
})
end
 
return txt.interp(eb.strings.GRID_ROW, {
arrow = eb.SingleArrow(v, "fixed"),
box = eb.boxPokemonAuto({
ndex = v.ndex or v.name,
phase = eb.phaseName(2, evodata[v.name]),
notes = v.notes,
}),
})
end, ipairs)
}),
txt.interp(eb.strings.ROW_ONE, {
box1 = eb.boxPokemonAuto({
ndex = data.evos[1].ndex or data.evos[1].name,
phase = eb.phaseName(2, data),
notes = data.evos[1].notes,
}),
}),
})
eb.TripleArrow(data),
txt.interp(eb.strings.ROW_TWO, {
box1 = eb.boxPokemonAuto({
ndex = data.evos[1].ndex or data.evos[1].name,
phase = eb.phaseName(2, data),
notes = data.evos[1].notes,
}),
box2 = eb.boxPokemonAuto({
ndex = data.evos[2].ndex or data.evos[2].name,
phase = eb.phaseName(2, data),
notes = data.evos[2].notes,
}),
}),
})
}),
txt.interp(eb.strings.ROW_ONE, {
box1 = eb.boxPokemonAuto({
ndex = data.evos[1].ndex or data.evos[1].name,
phase = eb.phaseName(2, data),
notes = data.evos[1].notes,
}),
}),
})
evoboxcontent,
txt.interp(eb.strings.ROW_ONE, {
box1 = eb.boxPokemonAuto({
ndex = data.ndex or data.name,
phase = eb.phaseName(1, data),
notes = data.notes,
}),
})
)
shownname = shownname
or altdata.names[abbr] == "" and txt.fu(pokes[name].name)
return eb.boxPokemonAuto(ndex, "", notes, shownname){
ndex = name,
abbr = abbr,
phase = "",
notes = notes,
displayname = shownname,
})
end
 
- 1: the page name, as returned by {{PAGENAME}}. This parameter is used
only to determine the colors of the background gradient.
- form: the abbr of the form (since it can't be included in the name)
- spriteN: the ndex of the N-th form
- nameN: the name of the N-th form (printed instead of the default got
p[1] = nil
p.family = p.family or "nessuna"
local pagepoke = pokes[form.nameToDataindex(pagename, p.form)]
or {
name = "Sconosciuto",
79 548

contributi