Static Target

from dgisim import StaticTarget

StaticTarget is widely used to locate a certain thing in the game state. It stores 3 values: pid, zone and id.

  • pid tells which player to look for.

  • zone tells which zone is the focus (character, summon, support).

  • id is either the character id, summon type or support id (sid).

class StaticTarget(pid: dgisim.state.enums.Pid, zone: dgisim.effect.enums.Zone, id: int | type['Summon'])
pid: Pid
zone: Zone
id: int | type['Summon']
classmethod from_char_id(pid: Pid, char_id: int) Self
Returns:

the static target for character with char_id of player pid.

classmethod from_player_active(game_state: GameState, pid: Pid) Self
Returns:

the static target for the player pid in game_state.

classmethod from_summon(pid: Pid, summon: type['Summon']) Self
Returns:

the static target for summon of player pid.

classmethod from_support(pid: Pid, sid: int) Self
Returns:

the static target for support with sid of player pid.