mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
special flight for AI to SEAD; AI bomb task
This commit is contained in:
@@ -71,6 +71,10 @@ class Event:
|
||||
def ai_banned_tasks(self) -> typing.Collection[typing.Type[Task]]:
|
||||
return []
|
||||
|
||||
@property
|
||||
def player_banned_tasks(self) -> typing.Collection[typing.Type[Task]]:
|
||||
return []
|
||||
|
||||
@property
|
||||
def global_cp_available(self) -> bool:
|
||||
return False
|
||||
|
||||
@@ -20,7 +20,7 @@ class StrikeEvent(Event):
|
||||
@property
|
||||
def tasks(self):
|
||||
if self.is_player_attacking:
|
||||
return [CAP, CAS]
|
||||
return [CAP, CAS, SEAD]
|
||||
else:
|
||||
return [CAP]
|
||||
|
||||
@@ -28,6 +28,10 @@ class StrikeEvent(Event):
|
||||
def ai_banned_tasks(self):
|
||||
return [CAS]
|
||||
|
||||
@property
|
||||
def player_banned_tasks(self):
|
||||
return [SEAD]
|
||||
|
||||
@property
|
||||
def global_cp_available(self) -> bool:
|
||||
return True
|
||||
@@ -38,6 +42,8 @@ class StrikeEvent(Event):
|
||||
return "Escort flight"
|
||||
else:
|
||||
return "CAP flight"
|
||||
elif for_task == SEAD:
|
||||
return "SEAD flight"
|
||||
elif for_task == CAS:
|
||||
return "Strike flight"
|
||||
|
||||
@@ -47,7 +53,7 @@ class StrikeEvent(Event):
|
||||
self.to_cp.base.affect_strength(-self.SINGLE_OBJECT_STRENGTH_INFLUENCE * len(debriefing.destroyed_objects))
|
||||
|
||||
def player_attacking(self, flights: db.TaskForceDict):
|
||||
assert CAP in flights and CAS in flights and len(flights) == 2, "Invalid flights"
|
||||
assert CAP in flights and CAS in flights and SEAD in flights and len(flights) == 3, "Invalid flights"
|
||||
|
||||
op = StrikeOperation(
|
||||
self.game,
|
||||
@@ -60,6 +66,7 @@ class StrikeEvent(Event):
|
||||
|
||||
interceptors = self.to_cp.base.scramble_interceptors(self.game.settings.multiplier)
|
||||
op.setup(strikegroup=flights[CAS],
|
||||
sead=flights[SEAD],
|
||||
escort=flights[CAP],
|
||||
interceptors=assigned_units_from(interceptors))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user