Skip to content

feat(parser): compound-subject land type-change static (CR 611.3 / CR 305.7)#5296

Merged
matthewevans merged 1 commit into
phase-rs:mainfrom
claytonlin1110:clayton/compound-subject-land-type-change
Jul 7, 2026
Merged

feat(parser): compound-subject land type-change static (CR 611.3 / CR 305.7)#5296
matthewevans merged 1 commit into
phase-rs:mainfrom
claytonlin1110:clayton/compound-subject-land-type-change

Conversation

@claytonlin1110

Copy link
Copy Markdown
Contributor

Summary

Mirrors the structural pattern from #5219 (compound-subject static dispatch) for the land type-change axis:

  • parse_compound_all_subjects_land_type_change in type_change.rs
  • Reuses parse_compound_all_subjects_filter for Or subject distribution (CR 611.3)
  • Factors predicate parsing into parse_land_type_change_modifications, shared with parse_land_type_change
  • Dispatched after compound animation handlers, before parse_land_animation / single-subject parse_land_type_change
  • "creature" gate keeps animation compounds (Life and Limb) on the animation path

Closes #5294

Files changed

  • crates/engine/src/parser/oracle_static/type_change.rs
  • crates/engine/src/parser/oracle_static/dispatch.rs
  • crates/engine/src/parser/oracle_static/tests.rs

Test plan

  • cargo fmt --all — clean
  • cargo check -p engine — clean
  • cargo test -p engine --lib parser::oracle_static — blocked locally by Windows linker; CI should verify
  • Replacement compound All Mountains and all Forests are Plains.Or + SetBasicLandType
  • Additive compound … Swamps in addition to their other land typesAddSubtype
  • Life and Limb animation compound still parses via animation handler

… 305.7)

Adds parse_compound_all_subjects_land_type_change mirroring the phase-rs#5219 compound animation structure: Or-distributed subjects via parse_compound_all_subjects_filter and a single predicate parsed through a factored parse_land_type_change_modifications helper.

Closes phase-rs#5294

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for parsing compound-subject land type-changing static abilities (e.g., 'All Mountains and all Forests are Plains') under CR 611.3 and CR 305.7. It refactors the existing single-subject land type-change parser to extract predicate parsing into a shared helper, parse_land_type_change_modifications, which is then reused by a new compound-subject parser parse_compound_all_subjects_land_type_change. Comprehensive unit tests were also added to verify both replacement and additive predicates. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Parse changes introduced by this PR

✓ No card-parse changes detected.

@matthewevans matthewevans self-assigned this Jul 7, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the parser seam and changed files against the phase.rs review bar. The implementation reuses the compound-subject filter and shared land-type predicate lowering, CR 611.3/305.7/205.1b citations resolve locally, GitHub CI is green, and the required parse-diff sticky reports no current card-parse changes.

@matthewevans matthewevans added the enhancement New feature or request label Jul 7, 2026
@matthewevans matthewevans added this pull request to the merge queue Jul 7, 2026
@matthewevans matthewevans removed their assignment Jul 7, 2026
Merged via the queue into phase-rs:main with commit 3a15e2c Jul 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(parser): compound-subject land type-change static (CR 611.3 / CR 305.7)

2 participants