• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
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

Navigation menu