fix(parser): route name-hate search clauses to MultiZoneSameNameExile#3438
Merged
matthewevans merged 4 commits intoJun 16, 2026
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
matthewevans
approved these changes
Jun 16, 2026
matthewevans
left a comment
Member
There was a problem hiding this comment.
Maintainer review: parser routing and owner/controller zone scoping verified; local pre-push checks passed.
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.
Summary
Classic name-hate spells (Eradicate, Quash, Counterbore, Crumble to Dust, Surgical Extraction, etc.) were parsed as
Unimplementedeven though the engine already supports the full effect chain viaMultiZoneSameNameExile→ChangeZoneAll { InAnyZone[Graveyard, Hand, Library] + SameNameAsParentTarget }+ shuffle (Memoricide / Lost Legacy class).This PR fixes two parser routing gaps:
Chain splitter suffix matcher too narrow —
parse_search_exile_name_suffixonly recognized…with the same name as that card, not the demonstrative card-type back-references Oracle uses on name-hate cards (that creature,that land,that spell, …). When the suffix failed, the bare-andsplitter bisected…and exile theminto a standaloneexile themclause that re-bound toParentTargetinstead of the multi-zone same-name filter.SearchLibrary intrinsic continuation precedence — When a mis-split search clause fell through to
SearchLibrary,parse_intrinsic_continuation_astsynthesized a genericSearchDestination → ChangeZoneexile rider from the full sentence text. Suppress that continuation when the full Oracle sentence matches the existingtry_parse_multi_zone_same_name_exilerecognizer so the correctChangeZoneAlllowering wins.Runtime resolution (
FilterProp::SameNameAsParentTarget, multi-zoneChangeZoneAll, shuffle) is unchanged — this is parser-only.Affected cards (representative)
…same name as that creature……same name as that spell……same name as that land……same name as that card…(also covered; splitter fix is defensive)Changes
crates/engine/src/parser/oracle_effect/sequence.rsparse_search_exile_name_suffixwith composedaltover card-type demonstratives (mirrorstry_parse_multi_zone_same_name_exile).SearchDestinationintrinsic continuation for multi-zone same-name exile compounds.crates/engine/src/parser/oracle_effect/imperative.rstry_parse_multi_zone_same_name_exilefor shared recognition at the continuation layer.crates/engine/src/parser/oracle_effect/mod.rsparse_effect_chaintests for the five issue cards.Rules
Test plan
cargo test -p engine bare_and_keeps_same_name_creature_search_exile_compoundcargo test -p engine bare_and_keeps_same_name_spell_search_exile_compoundcargo test -p engine bare_and_keeps_same_name_land_search_exile_compoundcargo test -p engine name_hate_spells_parse_multi_zone_same_name_exile_chaincargo test -p engine parse_multi_zone_same_name_exile_pattern(existing building-block tests)clippy,test-engine,card-datagreenCloses
#3436