Change Operation to a static class

Removed always True "event successful"

Add `AirWarEvent` as the primary game `Event` applied to every miz

Cleanup of `FrontLineAttackEvent`

Change `Operation.is_awacs_enabled` to two bools for each side red/blue
Currently controlled by whether an AWACs is available for the faction
(and only ever true for Blue)
This commit is contained in:
walterroach
2020-11-23 16:46:05 -06:00
parent 63bdbebcaa
commit da17d1e5d1
8 changed files with 182 additions and 206 deletions

View File

@@ -182,8 +182,7 @@ class Game:
def finish_event(self, event: Event, debriefing: Debriefing):
logging.info("Finishing event {}".format(event))
event.commit(debriefing)
if event.is_successful(debriefing):
self.budget += event.bonus()
self.budget += event.bonus()
if event in self.events:
self.events.remove(event)
@@ -194,7 +193,7 @@ class Game:
if isinstance(event, Event):
return event and event.attacker_name and event.attacker_name == self.player_name
else:
return event and event.name and event.name == self.player_name
raise RuntimeError(f"{event} was passed when an expected")
def on_load(self) -> None:
LuaPluginManager.load_settings(self.settings)