- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Changes
Jump to navigation
Jump to search
Line 294:
Line 294:
− +
+
+
Line 313:
Line 315:
− +
+
+
Line 332:
Line 336:
− +
+
+
Prevent arithmetic with nil
if level then
if level then
local asw = self:asw()
local asw = self:asw()
return math.floor((self:asw_max() - asw) * level / 99 + asw)
if asw then
return math.floor(((self:asw_max() or asw) - asw) * level / 99 + asw)
end
end
end
return self:asw_max()
return self:asw_max()
if level then
if level then
local evasion = self:evasion()
local evasion = self:evasion()
return math.floor((self:evasion_max() - evasion) * level / 99 + evasion)
if evasion then
return math.floor(((self:evasion_max() or evasion) - evasion) * level / 99 + evasion)
end
end
end
return self:evasion_max()
return self:evasion_max()
if level then
if level then
local los = self:los()
local los = self:los()
return math.floor((self:los_max() - los) * level / 99 + los)
if los then
return math.floor(((self:los_max() or los) - los) * level / 99 + los)
end
end
end
return self:los_max()
return self:los_max()