def capture(self, game: Game, events: GameUpdateEvents, for_player: bool) -> None: new_coalition = game.coalition_for(for_player) self.ground_unit_orders.refund_all(self.coalition) self.retreat_ground_units(game) self.retreat_air_units(game) self.depopulate_uncapturable_tgos() # All the attached TGOs have either been depopulated or captured. Tell the UI to # update their state. for tgo in self.connected_objectives: events.update_tgo(tgo) self._coalition = new_coalition self.base.set_strength_to_minimum() self._clear_front_lines(events) self._create_missing_front_lines(events) events.update_control_point(self)
def kill(self, events: GameUpdateEvents) -> None: self.alive = False self.ground_object.invalidate_threat_poly() events.update_tgo(self.ground_object)