Differenze tra le versioni di "Modulo:Stats"

518 byte aggiunti ,  00:08, 6 set 2018
m
Handled correct showing of bound values for Shedinja's hp
m
m (Handled correct showing of bound values for Shedinja's hp)
 
if computeBounds then
local interpVal
local calcStat = formulas.stats[gen][stat == 'hp' and 'hp' or 'anyOther']
local maxIV, maxEV = statsUtil.ivEvMax(gen)
 
-- Shedinja's HP are not worth to be handled in any other way
--[[
if value == 1 then
Natures are ignored for generations before third
becauseinterpVal the= function has one less argument{
rleft = roundy.boundsLeft,
--]]
bounds bg = string.interp(stringsc[stat].statBoundslight,
{ min50 = 1,
max50 = 1,
rright = roundy.boundsRight,
min100 = 1,
max100 = 1
}
 
-- Any normal stat calculation
else
local calcStat = formulas.stats[gen][stat == 'hp' and 'hp' or 'anyOther']
local maxIV, maxEV = statsUtil.ivEvMax(gen)
 
--[[
Natures are ignored for generations before third and for HP
because the function has one less argument
--]]
interpVal = {
rleft = roundy.boundsLeft,
bg = c[stat].light,
min100 = calcStat(0, value, 0, 100, 0.9),
max100 = calcStat(maxIV, value, maxEV, 100, 1.1)
})
end
 
bounds = string.interp(strings.statBounds, interpVal)
end