game_state.py#
- class sc2.game_state.GameState(response_observation, previous_observation=None) None [source]#
- property action_errors: list[ActionError]#
List of erroneous actions since last frame. See Blizzard/s2client-proto
- property actions: list[ActionRawUnitCommand | ActionRawToggleAutocast | ActionRawCameraMove]#
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]#
List of successful autocast toggle actions since last frame. See Blizzard/s2client-proto
- property actions_unit_commands: list[ActionRawUnitCommand]#
List of successful unit actions since last frame. See Blizzard/s2client-proto
- property alerts: list[int]#
Game alerts, see Blizzard/s2client-proto
- property chat: list[ChatMessage]#
List of chat messages sent this frame (by either player).
- property dead_units: set[int]#
A set of unit tags that died this frame
-
effects:
set
[EffectData
]# Usage: for effect in self.state.effects:
- if effect.id == EffectId.RAVAGERCORROSIVEBILECP:
positions = effect.positions # dodge the ravager biles