What problem does it solve?
The MTG rules engine presents significant complexity around casting, stack management, and condition evaluation. This Skill provides a structured approach to implementing, validating, and extending the casting pipeline to ensure correct behavior and consistency across spell casting and abilities.
Core Features & Use Cases
- Cohesive casting flow: unify spell casting, target selection, and cost handling with a shared set of primitives.
- Modal and resolution-time support: enable modal choices and interactive resolutions using a robust WaitingFor state machine.
- Extensibility for new casting steps and conditions: add or modify casting steps, costs, and conditional logic with minimal risk.
- Use Case: engine developers adding new casting features or refining interactivity within the stack, priority, and resolution paths.
Quick Start
Review the Casting, Stack & Condition Systems to implement or adjust a casting step, stack behavior, or condition check in the engine.