From 9a9ef78583ee54e140254e7aa29511c5a3fa3d96 Mon Sep 17 00:00:00 2001 From: walterroach Date: Mon, 9 Nov 2020 13:34:56 -0600 Subject: [PATCH 1/2] Fix statics not being killed in debrief --- game/event/event.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/game/event/event.py b/game/event/event.py index 5eda578b..1f8742fc 100644 --- a/game/event/event.py +++ b/game/event/event.py @@ -144,8 +144,12 @@ class Event: for i, ground_object in enumerate(cp.ground_objects): if ground_object.is_dead: continue - - if ground_object.is_same_group(destroyed_ground_unit_name): + + if ( + (ground_object.group_name == destroyed_ground_unit_name) + or + (ground_object.is_same_group(destroyed_ground_unit_name)) + ): logging.info("cp {} killing ground object {}".format(cp, ground_object.group_name)) cp.ground_objects[i].is_dead = True From 16d9c1ccad736f6a6c01f546dd6fa782efa069b8 Mon Sep 17 00:00:00 2001 From: walterroach Date: Mon, 9 Nov 2020 14:49:44 -0600 Subject: [PATCH 2/2] Add EWR to destruction events in debrief Also impacted reinforcement generation on turn after EWR destroyed. --- game/event/event.py | 2 +- theater/theatergroundobject.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/game/event/event.py b/game/event/event.py index 1f8742fc..8cc4aea7 100644 --- a/game/event/event.py +++ b/game/event/event.py @@ -165,7 +165,7 @@ class Event: "", self.game.turn) for i, ground_object in enumerate(cp.ground_objects): - if ground_object.dcs_identifier in ["AA", "CARRIER", "LHA"]: + if ground_object.dcs_identifier in ["AA", "CARRIER", "LHA", "EWR"]: for g in ground_object.groups: if not hasattr(g, "units_losts"): g.units_losts = [] diff --git a/theater/theatergroundobject.py b/theater/theatergroundobject.py index c7270f61..0e8b3c87 100644 --- a/theater/theatergroundobject.py +++ b/theater/theatergroundobject.py @@ -25,7 +25,8 @@ NAME_BY_CATEGORY = { "derrick": "Derrick", "ww2bunker": "Bunker", "village": "Village", - "allycamp": "Camp" + "allycamp": "Camp", + "EWR":"EWR", } ABBREV_NAME = {