Events Guide¶
Whenever a game event occurs, the event handler will trigger an event. Game objects can subscribe and react to the events (see Implementing a Card for examples).
A triggered event may have one or more parameters that describe more specific information about the event. The names of these parameters are specific to the event.
The different types of events are outlined below, along with an explanation of each event’s respective parameters.
Turn Events¶
Turn events are events that trigger when a game, turn, phase or step begins or ends.
Event | Description | Parameters |
---|---|---|
|
The game began (resp. ended). |
|
|
A turn began (resp. ended). |
|
|
A phase began (resp. ended). |
|
Player Events¶
Player events are triggered for in-game events affecting a player in the game.
Event | Description | Parameters |
---|---|---|
PLAYER_CONCEDED |
A player conceded. |
|
PLAYER_DIED |
A player died. |
|
DRAW |
A player drew a card. |
|
|
A player gained or lost life. |
|
|
Mana was added to or removed from a player’s mana pool. |
|
Card & Spell Events¶
Card and spell events are triggered for events that are relevant to cards, spells and abilities.
Note
Generally the game does not distinguish (currently) between cards and other game objects. They are also referred to as cards for this purpose.
The card and spell events are as follows:
Event | Description | Parameters |
---|---|---|
CARD_CAST |
A card was cast. |
|
SPELL_COUNTERED |
A spell was countered. |
|
SPELL_RESOLVED |
A spell resolved. |
|
STATUS_CHANGED |
A card’s status was changed. |
|
|
A card entered or left a zone. |
|