17 214
contributi
(Creata pagina con "--[[ This module displays wikicode for anything related to a set of values for al six statistics. So far, it can display stats for a single Pokémon, the average for a single...") |
m (Added alignment) |
||
totalLink = [=[<div class="flex flex-nowrap flex-row flex-main-start flex-items-center">${tot}<span class="text-small text-center" style="margin-left: 2ex;">[[:Categoria:Pokémon con statistiche base totali di ${tot}|<span style="color: initial;">Altri Pokémon con questo totale</span>]]</span></div>]=],
boxStats = [=[{| class="roundy
! colspan="2" ${rs}style="padding: 0.3ex 0.8ex;" | Statistiche base${values}
${stats}
--]]
local boxStats = function(stats, types, align, computeBounds, totalLink)
local tot = string.printNumber(table.fold(stats, 0, function(a, b)
return a + b end))
--]]
local interpVal = {
align = align == 'left' and '' or ' pull-' .. align,
width = ' width-xl-30 width-md-50 width-sm-60 width-xs-100',
bg = css.horizGradLua(types),
--]]
PokeStatBox.__tostring = function(this)
local box = boxStats(this.stats, this.types,
'center', true, true)
if #this.labels < 1 then
if noForms then
return boxStats(stats[poke], pokes[poke],
'center', true, true)
else
return list.makeFormsLabelledBoxes{
end, list.pokeNames))
return boxStats(statsAvg(typedPokes), {type = type},
'left', false, false)
end
s.TypeAvg, s.typeavg = s.typeAvg, s.typeavg
with the same base sta total.
Defaults to no.
- align: alignment of the box stat. One of
'left', 'center', ir 'right'.
Defaults to 'center'
Examples:
|type = acciaio
|link = yes
|align = left
}}
p.bounds = (p.bounds or 'no'):lower() == 'yes'
p.link = (p.link or 'no'):lower() == 'yes'
p.align = (p.align or 'center')
--[[
}
return boxStats(stats, p, p.align, p.bounds, p.link)
end
s.StatsBox, s.statsbox = s.statsBox, s.statsBox
|
contributi