Differenze tra le versioni di "Modulo:Evobox"

Non dovrebbe crashare. Update per gli ultimi glitch
m (Fixed method "other")
(Non dovrebbe crashare. Update per gli ultimi glitch)
- notes: (optional) any additional note to be printed above the image
- type1, type2: the two types of the Pokémon. Both mandatory
- disptype1, disptype2 (optionals): colors for the background of the two
type boxes. Defaults to type1/type2
- spr: the full link to the sprite of the Pokémon
- phase: (optional) the evolutionary phase ("Prima evoluzione", etc...).
name = args.name,
shownName = args.shownName or args.name,
type1rect = links.colorType(args.type1, c[args.type1].dark),
type2rect = c[args.type2disptype1 ~=or args.type1].dark),
type2rect = args.disptype2
and links.colorType(args.type2, c[args.type2].dark)
orand ''links.colorType(args.type2, c[args.disptype2].dark)
or (args.type2 ~= args.type1
and links.colorType(args.type2, c[args.type2].dark)
or '')
})
end
In the special case in which the name is "none" it returns an empty string (to
handle branches of different height).
 
If there's a parameter ["forme" .. suff] uses it in place of the phase name.
 
--]]
local fakephase = p.family == "normale" and { evos = {} } or {}
return eb.boxPokemon{
notes = p["formloc" .. suff],
type1 = p["type1-" .. suff],
disptype1 = p["disptype1-" .. suff],
type2 = p["type2-" .. suff] or p["type1-" .. suff],
disptype2 = p["disptype2-" .. suff],
spr = "[[File:" .. p["sprite" .. suff] .. ".png|150px]]",
phase = eb.phaseName(tonumber(suff:match(p["^(%d*)%a?forme")), fakephase),.. suff]
or eb.phaseName(tonumber(suff:match("^(%d*)%a?")), fakephase),
name = p["name" .. suff],
shownName = p["displayname" .. suff],
- spriteN: the ndex of the N-th Pokémon (or form) to display
- type1-N, type2-N: types of the N-th form
- formNdisptype1/2-N: notescolor aboutfor the N-thbox Pokémon,of putthe abovetype. Forces the spritesecond type to
be displayed even if it's equal to the first one
- locN: notes about the N-th Pokémon, put above the sprite
- formeN: name of the form, put in place of the phase below the sprite
- evotypeN (livello|felicità|posizione|pietra|mossa|strum. tenuto|scambio
|other|double): the evolutionary method from N-th to (N+1)-th
the same information of un-a-ed parameter, but for the second N-th
form (if any)
 
TODO: support for GlitchEvobox/forms, many rows (same assumption as in Evobox).
 
--]]