From a789f58068aeaabbc88abad7540e31b90c1884ff Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 22 May 2021 15:37:31 -0700 Subject: [PATCH] Allow SEAD escorts against broken SAMs and EWRs. --- gen/flights/ai_flight_planner.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gen/flights/ai_flight_planner.py b/gen/flights/ai_flight_planner.py index 92c55470..5105bf56 100644 --- a/gen/flights/ai_flight_planner.py +++ b/gen/flights/ai_flight_planner.py @@ -629,8 +629,22 @@ class CoalitionMissionPlanner: # Only include SEAD against SAMs that still have emitters. No need to # suppress an EWR, and SEAD isn't useful against a SAM that no longer has a # radar. + # + # For SAMs without radar and EWRs, we still want a SEAD escort if needed. + # + # Note that there is a quirk here: we should potentially be included a SEAD + # escort *and* SEAD when the target is a radar SAM but the flight path is + # also threatened by SAMs. We don't want to include a SEAD escort if the + # package is *only* threatened by the target though. Could be improved, but + # needs a decent refactor to the escort planning to do so. if isinstance(sam, SamGroundObject) and sam.has_alive_radar: flights.append(ProposedFlight(FlightType.SEAD, 2, self.MAX_SEAD_RANGE)) + else: + flights.append( + ProposedFlight( + FlightType.SEAD_ESCORT, 2, self.MAX_SEAD_RANGE, EscortType.Sead + ) + ) # TODO: Max escort range. flights.append( ProposedFlight(