add-trigger
OfficialDefine and validate MTG triggered abilities.
Authorphase-rs
Version1.0.0
Installs0
System Documentation
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.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: add-trigger Download link: https://github.com/phase-rs/phase/archive/main.zip#add-trigger Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.