Skip to content

Support graveyard-cast triggers and fix attacking-counter parsing - #328

Merged
valzargaming merged 2 commits into
mainfrom
improve/graveyard-cast-coverage
Oct 20, 2026
Merged

valzargaming merged 2 commits into
mainfrom
improve/graveyard-cast-coverage

Conversation

@valzargaming

@valzargaming valzargaming commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Capture the actual cast origin and trigger the supported exact “Whenever you cast a spell from your graveyard” clause only for the caster's permanents. Reuse existing effects, target selection, stack resolution, and persistence.
  • Fix an absent optional regex capture in “each attacking creature” counters. The immutable main baseline fails imported-card validation on that warning; this patch fixes it without adding recognition coverage.
  • Add real-card behavior tests and a hashed, reproducible corpus checkpoint. Preserve the separate enchanted/equipped family in Read "As long as CARDNAME is enchanted (equipped)" #327.

Validation

  • PHP 8.4.24 local focused tests: 18 tests, 141 assertions passed (graveyard-cast plus attacking-counter tests).
  • Final full suite with the local corpus enabled: 673 tests, 102,464 assertions passed, zero skips. This includes all focused cases and both corpus tests.
  • Separately enabled corpus tests: 2 tests, 71,268 assertions passed, including all imported card parsing and 50 deterministic official-deck simulations.
  • Full Pint and git diff --check passed.
  • Independent source/test review found no blocking findings. Exact-head public CI is requested by this PR; no live bot testing or deployment.

Coverage evidence and limits

Same MTGJSON corpus 5.3.0+20261019 and unchanged importer for before/after:

  • Modern recognized whole: 9,514 → 9,517 / 22,399 (42.5%).
  • All imported pools recognized whole: 11,254 → 11,257 / 28,729 (39.2%).
  • New wholly recognized pool entries: Secrets of the Dead, Burning Vengeance, Devoted Grafkeeper // Departed Soulkeeper. Tests cover the relevant behavior, including Grafkeeper front/back distinctions.

Recognition is not whole-card gameplay support. Most cards still have unsupported text, and the coverage task remains open. Ominous Roost's combined enter/cast clause deliberately remains unsupported. See docs/card-coverage-progress.md for corpus hashes, exact scope, tests, and remaining work.

@valzargaming
valzargaming merged commit e280cce into main Oct 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant