Changes
mLine 225:
Line 225:
+
+
+
+
+
− local hp = Formatting:format_stat(self._ship:hp()) +
− +
− else
− self._vars.hp = hp
Add base_hp() for subclasses
function ShipInfoKai:image()
function ShipInfoKai:image()
self._vars.image = ShipCardKai:get{ship = self._ship}
self._vars.image = ShipCardKai:get{ship = self._ship}
end
--HP without considering marriage; used directly in EnemyShipInfoKai
function ShipInfoKai:base_hp()
self._vars.hp = Formatting:format_stat(self._ship:hp())
end
end
function ShipInfoKai:hp()
function ShipInfoKai:hp()
self:base_hp()
local hp_married = self._ship:hp_married()
local hp_married = self._ship:hp_married()
if hp_married then
if hp_married then
self._vars.hp = Formatting:tooltip(hp, format{self._kekkon_template, value = Formatting:format_stat(hp_married)})
self._vars.hp = Formatting:tooltip(self._vars.hp, format{self._kekkon_template, value = Formatting:format_stat(hp_married)})
end
end
end
end