game_state.py#
- class sc2.game_state.GameState(response_observation: ResponseObservation, previous_observation: ResponseObservation | None = None) None[source]#
- Parameters:
response_observation (
ResponseObservation)previous_observation (
ResponseObservation|None)
- property action_errors: list[ActionError][source]#
List of erroneous actions since last frame. See Blizzard/s2client-proto
- property actions: list[ActionRawUnitCommand | ActionRawToggleAutocast | ActionRawCameraMove][source]#
List of successful actions since last frame. See Blizzard/s2client-proto
Each action is converted into Python dataclasses: ActionRawUnitCommand, ActionRawToggleAutocast, ActionRawCameraMove
- property actions_toggle_autocast: list[ActionRawToggleAutocast][source]#
List of successful autocast toggle actions since last frame. See Blizzard/s2client-proto
- property actions_unit_commands: list[ActionRawUnitCommand][source]#
List of successful unit actions since last frame. See Blizzard/s2client-proto
- property alerts: list[int][source]#
Game alerts, see Blizzard/s2client-proto
-
effects:
set[EffectData]# Usage: for effect in self.state.effects:
- if effect.id == EffectId.RAVAGERCORROSIVEBILECP:
positions = effect.positions # dodge the ravager biles