fix(parser): "play a land or cast a spell" is a play-card trigger (Shadow of the Goblin #6387)#6591
Open
bitfathers94 wants to merge 1 commit into
Open
fix(parser): "play a land or cast a spell" is a play-card trigger (Shadow of the Goblin #6387)#6591bitfathers94 wants to merge 1 commit into
bitfathers94 wants to merge 1 commit into
Conversation
…adow of the Goblin phase-rs#6387) "Whenever you play a land or cast a spell from anywhere other than your hand" was shadowed by the land-play trigger arm: parse_type_phrase consumed only "a land", the trailing "or cast a spell from anywhere other than your hand" was silently dropped, and the trigger fired on every land played from hand. Per CR 601.1a + CR 701.18b a player plays a card by playing it as a land OR casting it as a spell, so "play a land or cast a spell" is the same event pair as "play a card". Route the spelled-out form to the unified PlayCard mode so the shared origin tail gates both halves: Shadow of the Goblin parses as NotEquals(Hand) (no fire on hand plays/casts), and the tail-less The Endstone / Flubs / Infernal Sovereign class parses as Any. Closes phase-rs#6387
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Oracle trigger parser now treats “play a land or cast a spell” and “play a card” as the same ChangesOracle trigger parsing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Parse changes introduced by this PR✓ No card-parse changes detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(parser): "play a land or cast a spell" is a play-card trigger (Shadow of the Goblin #6387)
"Whenever you play a land or cast a spell from anywhere other than your hand"
was shadowed by the land-play trigger arm: parse_type_phrase consumed only
"a land", the trailing "or cast a spell from anywhere other than your hand"
was silently dropped, and the trigger fired on every land played from hand.
Per CR 601.1a + CR 701.18b a player plays a card by playing it as a land OR
casting it as a spell, so "play a land or cast a spell" is the same event pair
as "play a card". Route the spelled-out form to the unified PlayCard mode so
the shared origin tail gates both halves: Shadow of the Goblin parses as
NotEquals(Hand) (no fire on hand plays/casts), and the tail-less The Endstone /
Flubs / Infernal Sovereign class parses as Any.
Closes #6387
Summary by CodeRabbit
Bug Fixes
Tests