Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:CalcFit
(view source)
Revision as of 18:40, 7 November 2017
460 bytes added
,
8 years ago
no edit summary
Line 1:
Line 1:
local Stat = require("Module:Stat")
local Stat = require("Module:Stat")
+
local Combat2 = require("Module:Combat2")
return {
return {
Line 28:
Line 29:
local diff = 100 * (context.cl2) / (context.cl0 + context.cl1 + context.cl2) - context.critical_hit_rate
local diff = 100 * (context.cl2) / (context.cl0 + context.cl1 + context.cl2) - context.critical_hit_rate
return string.format("%.2f%%", diff)
return string.format("%.2f%%", diff)
+
else
+
return "nil"
+
end
+
end,
+
+
accuracy_value = function(ship, target)
+
local accuracy_value_1, accuracy_value_2, accuracy_value_3 = Combat2.accuracy_value(ship, target)
+
if accuracy_value_1 and accuracy_value_2 and accuracy_value_3 then
+
return string.format('<span class="explain" title="%.2f%%">%d%%</span>', accuracy_value_1, math.floor(accuracy_value_3))
else
else
return "nil"
return "nil"
がか
cssedit, gkautomate,
Interface administrators
,
Widget editors
7,212
edits