17 214
contributi
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▼
rleft = roundy.boundsLeft,
--]]▼
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
|
contributi