What problem does it solve?
Enables consistent modeling and wiring of MTG triggered abilities within the engine, covering the full trigger lifecycle from event detection to resolution, including TriggerDefinition, TriggerMode, the matcher registry, APNAP ordering, targeting, intervening-if, constraints, and parser wiring.
Core Features & Use Cases
- Defines TriggerDefinition with fields like mode, execute, origin, destination, trigger_zones, and condition.
- Provides matchers to detect relevant events (ChangesZone, SpellCast, DamageDone, etc.) and a central registry to dispatch them.
- Handles APNAP ordering, targeting extraction, and constraint checks (OncePerTurn, OncePerGame, OnlyDuringYourTurn) during fire and resolution.
- Integrates with oracle_trigger parser to convert Oracle-style trigger lines into executable definitions, enabling end-to-end trigger support.
Quick Start
Define a TriggerDefinition, register a matcher, and parse an oracle trigger line to verify correct frontmatter and activation.