Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Sandbox/Fleet
(view source)
Revision as of 16:53, 15 June 2019
163 bytes added
,
5 years ago
no edit summary
Line 50:
Line 50:
local function formatHp(hps, maxHp)
local function formatHp(hps, maxHp)
−
return string.format('{{tooltip|~/%s|%s}}', maxHp, U.ijoin(hps, ', '))
+
local minHp = U.imin(hps)
+
if minHp / maxHp <= 0.5 then
+
return string.format('{{color|red|{{tooltip|~/%s|%s}}}}', maxHp, U.ijoin(hps, ', '))
+
else
+
return string.format('{{tooltip|~/%s|%s}}', maxHp, U.ijoin(hps, ', '))
+
end
end
end
がか
cssedit, gkautomate
7,064
edits