• 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
Handle nil asw_leveled
Line 425: Line 425:  
return "No"
 
return "No"
 
end
 
end
local ship_asw, equipment_asw, depth_charge, sonar, bomber = self._ship:asw_leveled() / 5, 0, false, false, false
+
local asw_leveled = self._ship:asw_leveled()
 +
local ship_asw, equipment_asw, depth_charge, sonar, bomber = (asw_leveled or 0) / 5, 0, false, false, false
 
for i = 1, self._ship:slots() or 0 do
 
for i = 1, self._ship:slots() or 0 do
 
local equipment, size = self._ship:slot(i)
 
local equipment, size = self._ship:slot(i)
Line 448: Line 449:  
depth_charge_sonar_boost = 1.15
 
depth_charge_sonar_boost = 1.15
 
end
 
end
return format{"Yes (${attack_power}, ${phases})", attack_power = self:_attack_power_cap(depth_charge_sonar_boost * (base_asw + 2 * equipment_asw + ship_asw / 5), 100), phases = phases}
+
return format{"Yes (${attack_power}${plus}, ${phases})", attack_power = self:_attack_power_cap(depth_charge_sonar_boost * (base_asw + 2 * equipment_asw + ship_asw / 5), 100), plus = (not asw_leveled) and "+" or "", phases = phases}
 
end
 
end
  
Anonymous user

Navigation menu