Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:ShipInfoKai
(view source)
Revision as of 17:11, 29 September 2017
190 bytes added
,
7 years ago
no edit summary
Line 227:
Line 227:
end
end
−
--HP without considering marriage; used directly in EnemyShipInfoKai
function ShipInfoKai:base_hp()
function ShipInfoKai:base_hp()
−
self._vars.hp = Formatting:format_stat(
self._ship:
hp
()
)
+
local hp = self._ship:hp()
+
local hp_mod = self._ship:hp_mod()
+
self._vars.hp =
hp_mod and hp_mod > 0 and Formatting:format_stat_with_max(hp, hp + hp_mod) or
Formatting:format_stat(hp)
end
end
function ShipInfoKai:hp()
function ShipInfoKai:hp()
self:base_hp()
self:base_hp()
−
local
hp_married
= self._ship:hp_married()
+
local
hp
= self._ship:hp_married()
−
if
hp_married
then
+
if
hp
then
−
self._vars.hp = Formatting:tooltip(self._vars.hp, format{self._kekkon_template, value = Formatting:format_stat(
hp_married
)})
+
local hp_mod = self._ship:hp_mod_married()
+
self._vars.hp = Formatting:tooltip(self._vars.hp, format{
+
self._kekkon_template,
+
value =
hp_mod and hp_mod > 0 and Formatting:format_stat_with_max(hp, hp + hp_mod) or
Formatting:format_stat(
hp
)
+
})
end
end
end
end
がか
cssedit, gkautomate
7,064
edits