Changes

Line 14: Line 14:  
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightcoral;" | ${firepower}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightcoral;" | ${firepower}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightskyblue;" | ${torpedo}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightskyblue;" | ${torpedo}
 +
! style="width: 24px; text-align: center; vertical-align: middle; background-color: slategrey;" | ${firepower}${torpedo}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: sandybrown;" | ${aa}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: sandybrown;" | ${aa}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}
 
! style="white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}+
 
! style="white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}+
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: aquamarine;" | ${los}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: aquamarine;" | ${los}
 +
! style="white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: aquamarine;" | ${los}+
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: palegreen;" | ${luck}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: palegreen;" | ${luck}
 +
! style="white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: palegreen;" | ${luck}+
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: pink;" | ${hp}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: pink;" | ${hp}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #F2E279;" | ${armor}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #F2E279;" | ${armor}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}
 +
! style="white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}+
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #72E6E6;" | ${speed}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #72E6E6;" | ${speed}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: silver;" | ${aircraft}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: silver;" | ${aircraft}
Line 36: Line 40:  
"firepower",
 
"firepower",
 
"torpedo",
 
"torpedo",
 +
"night_battle",
 
"aa",
 
"aa",
 
"asw",
 
"asw",
 
"asw_max",
 
"asw_max",
 
"los",
 
"los",
 +
"los_max",
 
"luck",
 
"luck",
 +
"luck_max",
 
"hp",
 
"hp",
 
"armor",
 
"armor",
 
"evasion",
 
"evasion",
 +
"evasion_max",
 
"speed",
 
"speed",
 
"aircraft",
 
"aircraft",
Line 97: Line 105:     
function ShipListKai:firepower(ship)
 
function ShipListKai:firepower(ship)
return {value = Formatting:format_stat(ship:firepower()), text_align = self._center_align}
+
local firepower_max = ship:firepower_max()
 +
if firepower_max == false then
 +
firepower_max = ship:firepower()
 +
end
 +
return {value = Formatting:format_stat(firepower_max), text_align = self._center_align}
 
end
 
end
    
function ShipListKai:torpedo(ship)
 
function ShipListKai:torpedo(ship)
return {value = Formatting:format_stat(ship:torpedo()), text_align = self._center_align}
+
local torpedo_max = ship:torpedo_max()
 +
if torpedo_max == false then
 +
torpedo_max = ship:torpedo()
 +
end
 +
return {value = Formatting:format_stat(torpedo_max), text_align = self._center_align}
 +
end
 +
 
 +
function EliteShipsKai:night_battle(ship)
 +
local firepower_max = ship:firepower_max()
 +
if firepower_max == false then
 +
firepower_max = ship:firepower()
 +
end
 +
local torpedo_max = ship:torpedo_max()
 +
if torpedo_max == false then
 +
torpedo_max = ship:torpedo()
 +
end
 +
local night_battle = firepower_max
 +
if not firepower_max then
 +
    night_battle = torpedo_max
 +
elseif torpedo_max then
 +
    night_battle = night_battle + torpedo_max
 +
end
 +
return {value = Formatting:format_stat(night_battle), text_align = self._center_align}
 
end
 
end
    
function ShipListKai:aa(ship)
 
function ShipListKai:aa(ship)
return {value = Formatting:format_stat(ship:aa()), text_align = self._center_align}
+
local aa_max = ship:aa_max()
 +
if aa_max == false then
 +
aa_max = ship:aa()
 +
end
 +
return {value = Formatting:format_stat(aa_max), text_align = self._center_align}
 
end
 
end
   Line 113: Line 151:     
function ShipListKai:asw_max(ship)
 
function ShipListKai:asw_max(ship)
local ASW = ship:asw_max();
+
local asw_max = ship:asw_max()
if ASW then
+
if asw_max == false then
return {value = Formatting:format_stat(ASW), text_align = self._center_align}
+
asw_max = ship:asw()
else
  −
return {value = Formatting:format_stat(0), text_align = self._center_align}
   
end
 
end
 +
return {value = Formatting:format_stat(asw_max), text_align = self._center_align}
 
end
 
end
    
function ShipListKai:los(ship)
 
function ShipListKai:los(ship)
 
return {value = Formatting:format_stat(ship:los()), text_align = self._center_align}
 
return {value = Formatting:format_stat(ship:los()), text_align = self._center_align}
 +
end
 +
 +
function ShipListKai:los_max(ship)
 +
local los_max = ship:los_max()
 +
if los_max == false then
 +
los_max = ship:los()
 +
end
 +
return {value = Formatting:format_stat(los_max), text_align = self._center_align}
 
end
 
end
    
function ShipListKai:luck(ship)
 
function ShipListKai:luck(ship)
 
return {value = Formatting:format_stat(ship:luck()), text_align = self._center_align}
 
return {value = Formatting:format_stat(ship:luck()), text_align = self._center_align}
 +
end
 +
 +
function ShipListKai:luck_max(ship)
 +
local luck_max = ship:luck_max()
 +
if luck_max == false then
 +
luck_max = ship:luck()
 +
end
 +
return {value = Formatting:format_stat(luck_max), text_align = self._center_align}
 
end
 
end
   Line 134: Line 187:     
function ShipListKai:armor(ship)
 
function ShipListKai:armor(ship)
return {value = Formatting:format_stat(ship:armor()), text_align = self._center_align}
+
local armor_max = ship:armor_max()
 +
if armor_max == false then
 +
armor_max = ship:armor()
 +
end
 +
return {value = Formatting:format_stat(armor_max), text_align = self._center_align}
 
end
 
end
    
function ShipListKai:evasion(ship)
 
function ShipListKai:evasion(ship)
 
return {value = Formatting:format_stat(ship:evasion()), text_align = self._center_align}
 
return {value = Formatting:format_stat(ship:evasion()), text_align = self._center_align}
 +
end
 +
 +
function ShipListKai:evasion_max(ship)
 +
local evasion_max = ship:evasion_max()
 +
if evasion_max == false then
 +
evasion_max = ship:evasion()
 +
end
 +
return {value = Formatting:format_stat(evasion_max), text_align = self._center_align}
 
end
 
end
   Line 229: Line 294:  
asw_max = StatIcons.asw,  
 
asw_max = StatIcons.asw,  
 
los = StatIcons.los,  
 
los = StatIcons.los,  
 +
los_max = StatIcons.los,
 
luck = StatIcons.luck,  
 
luck = StatIcons.luck,  
 +
luck_max = StatIcons.luck,
 
hp = StatIcons.hp,  
 
hp = StatIcons.hp,  
 
armor = StatIcons.armor,
 
armor = StatIcons.armor,
 
evasion = StatIcons.evasion,
 
evasion = StatIcons.evasion,
 +
evasion_max = StatIcons.evasion,
 
speed = StatIcons.speed,
 
speed = StatIcons.speed,
 
aircraft = StatIcons.aircraft,
 
aircraft = StatIcons.aircraft,
966

edits