Skip to content

Advanced Event Timing

None of the following is required to enjoy the game. However, understanding the advanced quirks can help you determine if certain actions will play out in the order you expect.

Typical Events

  • Creatures entering the field, being replaced, being destroyed, or moving.
  • Creatures dealing damage, to other creatures or players, direct or battle damage.
  • Player playing a card, gaining health.
  • Turn based occurrences like starting a turn, ending a turn, gaining a rank.
  • Spells can cause a number of the above events.

Normal Batches

When events happen, they are placed into a "batch". A batch will start after the effects of a primary action (like playing a card, using a Mobility or Activate effect) have completed, or the previous batch finishes resolving. For example, casting Dreadbolt on a creature will create a batch containing the events Card Played and Creature Destroyed. This batch will not start until the creature is marked as dead, and the card has been leveled into the discard.

When starting to process a batch, we figure out what will or could be triggered by the events in the batch. Those triggers are then split into three piles:

  • Non interactive triggers belonging to the active player.
  • Non interactive triggers belonging to the non-active player.
  • Interactive triggers belonging to the active player.

Each pile is then processed in the order above. If any triggers generate new events, they are queued in the next batch. That batch will be processed when the current batch finishes. The order of resolution in each bucket is deterministic, but is tricky to outline with concise rules. See the related entry in the faq, and a more in-depth analysis below.

Death Checking

Creature and player death is not finalized until the end of the batch. For example, a creature with 1 health, having Poison 2 and Regenerate 2, will be considered alive at the end of the batch processing the Turn Start event.

This can explain why you may see a creature with negative health during an interactive trigger. The choice you are making takes place inside the batch, so you may have the chance to boost the creature back to life prior to the death check.

Battle Batches

During battle, the activities are split into three batches. Death is checked at the end of each.

  1. A batch where all eligible creatures engage in battle. Battle damage is applied to creatures and players.
  2. A batch to process any combat/damage events from the battle. These apply even if the creature with the ability died in the first batch. E.g. Blight Walker destroys a creature it damaged, even if Blight Walker died in combat.
  3. A batch to process any death related events from the battle. Again, they apply even if the creature has been dead since the first batch. E.g. Graveborn Glutton killed in combat will perform its Vengeance damage in this batch.

Any new and unhandled events raised in the second and third batches are processed in a fourth batch, which is a normal batch.

Trigger Resolution Order

The order in which triggers resolve is deterministic, but can be difficult for a person to track in more complex scenarios. A number of factors influence the order.

Events cause the triggers to activate, so the order in which events entered the batch matters. This is not obvious since non-interactive and combo'd things happen in order as dictated by the code. Events are processed in a newest-first order.

  • For spells, the Card Played event is typically last
  • For forging creatures the Card Played event is usually first.
  • For creature replacement the replacement event is created before the creature enters event.

There are other less common permutations that I won't list out. In our Dreadbolt example above, we can determine the Creature Destroyed event entered the batch before the Card Played event.

The order creatures appeared on the board matters. On the same event, triggers on a newer creature will be processed before an older creature. This can be difficult to track in cases with multiple Spawns.

The order a creature gains triggers matters, primarily when a creature has two triggers that react to the same event. As an example, if Spiritflame Mystic has Shallow Grave casted on it and then dies later in the turn, will the resurrected Mystic get hit with the original Mystic's Vengeance effect? Triggers are also processed in a newest-first order, so in this case, yes. The Vengeance trigger was assigned at creature creation, the Shallow Grave trigger was assigned on a subsequent card play.

Triggers on the player are resolved before triggers on creatures. These include things like Ambush triggers and Echoes spells turn end triggers.

Remember the three batch piles triggers fall into will also influence the order in which things occur.

The main takeaway is if encountering similar board state, the trigger resolution should be the same. Basic interactions can be predicted, complex cascades of triggers not so much.

Trigger Resolution Algo

For the real keeners, here is a rough outline of the trigger resolution order. Valid creatures for trigger testing include any active creature, or any creature that was destroyed or replaced in the current chain of batches.

text
Create an empty trigger reaction list.

For each Event in the batch (newest to oldest)
  For both players
    Test player triggers (newest to oldest) and add to the reaction list
  For each creature (newest to oldest)
    Test creature triggers (newest to oldest) and add to the reaction list

Re-arrange the reaction list into three categories
  Active player passive, inactive player passive, active player interactive
  Otherwise the relative order of the trigger reactions does not change

Process the trigger reactions in order

Grousewood Games