diff --git a/game/missiongenerator/aircraft/waypoints/joinpoint.py b/game/missiongenerator/aircraft/waypoints/joinpoint.py index 59fe56ab..a30f426d 100644 --- a/game/missiongenerator/aircraft/waypoints/joinpoint.py +++ b/game/missiongenerator/aircraft/waypoints/joinpoint.py @@ -11,6 +11,7 @@ from dcs.task import ( ) from game.ato import FlightType +from game.theater import NavalControlPoint from game.utils import nautical_miles from .pydcswaypointbuilder import PydcsWaypointBuilder @@ -32,9 +33,18 @@ class JoinPointBuilder(PydcsWaypointBuilder): waypoint.tasks.append(OptFormation.spread_four_open()) elif self.flight.flight_type == FlightType.SEAD_ESCORT: - self.configure_escort_tasks( - waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated] - ) + if isinstance(self.flight.package.target, NavalControlPoint): + self.configure_escort_tasks( + waypoint, + [ + Targets.All.Naval, + Targets.All.GroundUnits.AirDefence.AAA.SAMRelated, + ], + ) + else: + self.configure_escort_tasks( + waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated] + ) # Let the AI use ECM to preemptively defend themselves. ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar) diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 8a3bdcdd..c23f158b 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -1176,7 +1176,10 @@ class NavalControlPoint(ControlPoint, ABC): # TODO: Inter-ship logistics? ] else: - yield FlightType.ANTISHIP + yield from [ + FlightType.ANTISHIP, + FlightType.SEAD_ESCORT, + ] yield from super().mission_types(for_player) @property @@ -1424,6 +1427,7 @@ class Fob(ControlPoint): if not self.is_friendly(for_player): yield FlightType.STRIKE yield FlightType.AIR_ASSAULT + yield FlightType.OCA_AIRCRAFT yield from super().mission_types(for_player) diff --git a/game/theater/theatergroundobject.py b/game/theater/theatergroundobject.py index 9a0a2013..479a8144 100644 --- a/game/theater/theatergroundobject.py +++ b/game/theater/theatergroundobject.py @@ -350,7 +350,10 @@ class NavalGroundObject(TheaterGroundObject, ABC): from game.ato import FlightType if not self.is_friendly(for_player): - yield FlightType.ANTISHIP + yield from [ + FlightType.ANTISHIP, + FlightType.SEAD_ESCORT, + ] yield from super().mission_types(for_player) @property