fix(parser): parse compound activation conditions#5115
Open
ntindle wants to merge 1 commit into
Open
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Summary
if, such asActivate only if this land entered this turn or if you control a basic land.orparse as source-zone conditions, such ason the battlefield or in your graveyard.you control a ...restriction conditions sobasic landbecomesObjectCount(Land + HasSupertype(Basic), controller You) >= 1rather than a literal subtype-like string.Hidden LairandSkyblade's Boonfrom root chore: update coverage stats and badges #28 indocs/parser-misparse-backlog.md.Root Cause
parse_connector_splitsplit restriction conditions onor, then parsed each fragment as atomic condition text. That failed when Oracle repeated the condition marker on the second branch (or if you control ...) or used source-zone shorthand (or in your graveyard). After the compound parse failed, the fallback atomic parser kept only the first recognized leaf it could scan.Parse Audit
Focused before/after export covered all 17 root #28 backlog cards:
Fixer, Techno TerrorGarenbrig SquireGoremandGrizzled WolverineHermit of the NatterknollsHidden LairHighspire Bell-RingerHurkyl's Final MeditationIchneumon DruidMACH-1, Swooping ScoundrelShadowheart, Sharran ClericSkarrgan HellkiteSkyblade's BoonTomb TyrantTrade CaravanUthros Research CraftUthros, Titanic GodcoreRaw changed card keys:
hidden lairskyblade's boonIntentional deltas:
Hidden Lair: second mana ability restriction changes fromSourceEnteredThisTurnonly toOr(SourceEnteredThisTurn, ObjectCount(basic land you control) >= 1).Skyblade's Boon: activated ability restriction changes fromSourceInZone(Graveyard)only toOr(SourceInZone(Battlefield), SourceInZone(Graveyard)).coverage-parse-diffon the focused exports reported no signature-level card-parse changes, which is expected for this internal activation-condition shape.Verification
cargo fmt --all./scripts/check-parser-combinators.shcargo test -p engine --features cli --lib parses_compound_or_if_restriction_fragments -- --nocapturecargo test -p engine --features cli --lib parses_compound_source_zone_shorthand -- --nocapturecargo test -p engine --features cli --lib restriction_condition -- --nocapturetarget/debug/card-data-validate /tmp/phase-root28-after.jsontarget/debug/coverage-parse-diff /tmp/phase-root28-base.json /tmp/phase-root28-after.json --markdown /tmp/phase-root28-diff.md --json /tmp/phase-root28-diff.jsoncargo clippy -p engine --all-targets -- -D warningsgit diff --check