Changes

Implement stat values at remodel level
Line 22: Line 22:  
_kekkon_max_template = "Maximum after marriage: ${value}",
 
_kekkon_max_template = "Maximum after marriage: ${value}",
 
_kekkon_template = "After marriage: ${value}",
 
_kekkon_template = "After marriage: ${value}",
 +
_remodel_level_stat_value_template = "At remodel level: ${value}",
 
_nick_template = " (''${nick} ${japanese_nick}'')",
 
_nick_template = " (''${nick} ${japanese_nick}'')",
 
_overridden_category_template = "[[Category:Pages that override data modules]]",
 
_overridden_category_template = "[[Category:Pages that override data modules]]",
Line 265: Line 266:  
evasion_max = self._ship:evasion_max()
 
evasion_max = self._ship:evasion_max()
 
end
 
end
local result = Formatting:format_stat_with_max(evasion, evasion_max)
   
if not overridden and evasion and evasion_max then
 
if not overridden and evasion and evasion_max then
result = Formatting:tooltip(result, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:evasion_leveled(155))})
+
    local remodel_level = self._ship:remodel_level()
 +
    if self._ship:remodel_level() then
 +
        evasion = Formatting:tooltip(evasion, format{self._remodel_level_stat_value_template, value = Formatting:format_stat(self._ship:evasion_leveled(remodel_level))})
 +
    end
 +
evasion_max = Formatting:tooltip(evasion_max, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:evasion_leveled(155))})
 
end
 
end
 +
local result = Formatting:format_stat_with_max(evasion, evasion_max)
 
if overridden then
 
if overridden then
 
result = result .. self._overridden_category_template
 
result = result .. self._overridden_category_template
Line 300: Line 305:  
asw_max = self._ship:asw_max()
 
asw_max = self._ship:asw_max()
 
end
 
end
local result = Formatting:format_stat_with_max(asw, asw_max)
   
if not overridden and asw and asw_max then
 
if not overridden and asw and asw_max then
result = Formatting:tooltip(result, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:asw_leveled(155))})
+
    local remodel_level = self._ship:remodel_level()
 +
    if self._ship:remodel_level() then
 +
    asw = Formatting:tooltip(asw, format{self._remodel_level_stat_value_template, value = Formatting:format_stat(self._ship:asw_leveled(remodel_level))})
 +
        end
 +
asw_max = Formatting:tooltip(asw_max, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:asw_leveled(155))})
 
end
 
end
 +
local result = Formatting:format_stat_with_max(asw, asw_max)
 
if overridden then
 
if overridden then
 
result = result .. self._overridden_category_template
 
result = result .. self._overridden_category_template
Line 331: Line 340:  
los_max = self._ship:los_max()
 
los_max = self._ship:los_max()
 
end
 
end
local result = Formatting:format_stat_with_max(los, los_max)
   
if not overridden and los and los_max then
 
if not overridden and los and los_max then
result = Formatting:tooltip(result, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:los_leveled(155))})
+
    local remodel_level = self._ship:remodel_level()
 +
    if self._ship:remodel_level() then
 +
    los = Formatting:tooltip(los, format{self._remodel_level_stat_value_template, value = Formatting:format_stat(self._ship:los_leveled(remodel_level))})
 +
        end
 +
los_max = Formatting:tooltip(los_max, format{self._kekkon_max_template, value = Formatting:format_stat(self._ship:los_leveled(155))})
 
end
 
end
 +
local result = Formatting:format_stat_with_max(los, los_max)
 
if overridden then
 
if overridden then
 
result = result .. self._overridden_category_template
 
result = result .. self._overridden_category_template
Anonymous user