Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:NanaminFunctions
(view source)
Revision as of 01:36, 23 April 2015
126 bytes added
,
9 years ago
m
no edit summary
Line 21:
Line 21:
end
end
−
function NanaminFunctions.add_to_elos_ship(current_elos, ship)
+
function NanaminFunctions.add_to_elos_ship(current_elos,
entry, use_los)
+
local
ship
= Ship(entry[1], entry[2]
)
local los = ship:los() or 0
local los = ship:los() or 0
local los_max = ship:los_max() or los
local los_max = ship:los_max() or los
−
los = math.floor(los + ((los_max - los) * tonumber(entry[3]) / 99))
+
if use_los then
+
los = tonumber(entry[3])
+
else
+
los = math.floor(los + ((los_max - los) * tonumber(entry[3]) / 99))
+
end
return current_elos + math.sqrt(los) * 1.69
return current_elos + math.sqrt(los) * 1.69
end
end
Nanamin
48
edits