Changes

Night Aviation ASW attack detection
Line 412: Line 412:  
function ShipCapabilities:asw_attack()
 
function ShipCapabilities:asw_attack()
 
local base_asw
 
local base_asw
local asw_override = self._ship:asw_attack()
+
local asw_override, phases = self._ship:asw_attack(), "Day/Night"
 
if asw_override == false then
 
if asw_override == false then
 
return "No"
 
return "No"
Line 419: Line 419:  
elseif self:_is_asw_aviation_ship() then
 
elseif self:_is_asw_aviation_ship() then
 
base_asw = 10
 
base_asw = 10
 +
if not self._ship:night_bombing() then
 +
phases = "Day Only"
 +
end
 
else
 
else
 
return "No"
 
return "No"
Line 445: Line 448:  
depth_charge_sonar_boost = 1.15
 
depth_charge_sonar_boost = 1.15
 
end
 
end
return format{"Yes (${attack_power})", attack_power = self:_attack_power_cap(depth_charge_sonar_boost * (base_asw + 2 * equipment_asw + ship_asw / 5), 100)}
+
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}
 
end
 
end
  
Anonymous user