- 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 288:
Line 288:
− +
− +
+
+
+
− +
Line 304:
Line 307:
− +
− +
+
+
+
− +
Line 320:
Line 326:
− +
− +
+
+
+
− +
Add specifying level for evasion/asw/los_leveled()
end
end
function ShipData:asw_leveled()
function ShipData:asw_leveled(level)
if self._level then
if not level and self._level then
level = self._level
end
if level then
local asw = self:asw()
local asw = self:asw()
return math.floor((self:asw_max() - asw) * self._level / 99 + asw)
return math.floor((self:asw_max() - asw) * level / 99 + asw)
end
end
return self:asw_max()
return self:asw_max()
end
end
function ShipData:evasion_leveled()
function ShipData:evasion_leveled(level)
if self._level then
if not level and self._level then
level = self._level
end
if level then
local evasion = self:evasion()
local evasion = self:evasion()
return math.floor((self:evasion_max() - evasion) * self._level / 99 + evasion)
return math.floor((self:evasion_max() - evasion) * level / 99 + evasion)
end
end
return self:evasion_max()
return self:evasion_max()
end
end
function ShipData:los_leveled()
function ShipData:los_leveled(level)
if self._level then
if not level and self._level then
level = self._level
end
if level then
local los = self:los()
local los = self:los()
return math.floor((self:los_max() - los) * self._level / 99 + los)
return math.floor((self:los_max() - los) * level / 99 + los)
end
end
return self:los_max()
return self:los_max()