Skip to content

Fix Tovolar's Packleader (another-target subject stripping)#5880

Open
e11734937-beep wants to merge 1 commit into
phase-rs:mainfrom
e11734937-beep:fix/another-target-subject-strip
Open

Fix Tovolar's Packleader (another-target subject stripping)#5880
e11734937-beep wants to merge 1 commit into
phase-rs:mainfrom
e11734937-beep:fix/another-target-subject-strip

Conversation

@e11734937-beep

Copy link
Copy Markdown
Contributor

Summary

The subject-strip dispatch gate starts_with_subject_prefix (parser/oracle_effect/subject.rs) recognized the bare target subject prefix but not another target . An imperative effect whose subject was another target ... was therefore never subject-stripped: it fell through to first-word dispatch on "another" and lowered to Effect::Unimplemented. So "Target creature phases out" parsed to Effect::PhaseOut, but "Another target nonland permanent phases out" (The Phasing of Zhalfir) did not.

This adds another target as a sibling arm to the existing target arm in the gate. The clause then routes through the same parse_subject_application "another target" handler (which applies the Another / source-exclusion filter property via add_another_property, exactly as the bare "target" sibling does) and the existing imperative effect + runtime. No new effect variant and no new runtime path.

Method: /engine-implementer

Track: Developer

Model: claude-opus-4-8, Thinking: high

Gate A PASS head=1bf1bfc370b3f27344c18f58820adbaeea8797fd base=553b97bd5c9f1a28bf7a6ebe80f6cb3a0e296c0d

Anchored on: subject.rs tag("target ") sibling arm + subject.rs:2046 parse_subject_application "another target" handler.

Final review-impl PASS head=1bf1bfc370b3f27344c18f58820adbaeea8797fd

Claimed parse impact

  • Tovolar's Packleader, Cybernetica Datasmith, Feral Contest supported (+3)
  • The Phasing of Zhalfir phase-out gap resolved

Validation Failures: None

CI Failures: None

The subject-strip dispatch gate `starts_with_subject_prefix`
(parser/oracle_effect/subject.rs) recognized the bare "target " subject
prefix but not "another target ". So an imperative effect whose subject
was "another target ..." was never subject-stripped: it fell through to
first-word dispatch on "another" and lowered to Effect::Unimplemented.
"Target creature phases out" parsed to Effect::PhaseOut, but "Another
target nonland permanent phases out" (The Phasing of Zhalfir, Chapter
I/II) did not.

Add "another target " as a sibling arm to the existing "target " arm.
The clause then routes through the same parse_subject_application
"another target" handler (which applies the Another / source-exclusion
filter property, exactly as the bare "target" sibling does) and the
existing imperative effect + runtime. No new effect variant and no
runtime path.

Flips three cards from unsupported to fully supported -- Tovolar's
Packleader ("{2}{G}{G}: Another target Wolf or Werewolf you control
fights target creature you don't control."), Cybernetica Datasmith
("Another target player creates a 4/4 ... Robot ... creature token"),
and Feral Contest ("Another target creature blocks it this turn if
able") -- and resolves the phase-out clause gap of The Phasing of
Zhalfir (gap_count 1 -> 0). Coverage 31351 -> 31354 supported, no
regressions.

Adds a discriminating integration test that drives the real cast ->
resolve -> PhaseOut pipeline via the phase-out variant (the cleanest
runtime-state delta); it fails on main, where the clause lowers to
Unimplemented and the target never phases out.

@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 adds support for parsing "another target ..." subjects on imperative effects by adding the "another target " prefix to the subject-strip dispatch gate in the parser. This fixes a parser near-miss where such clauses fell through to first-word dispatch and resolved to Unimplemented, and a new integration test has been added to verify the fix. The review feedback correctly identifies a violation of Style Guide Rule R6, pointing out that the newly added parser arm is missing a mandatory CR annotation (CR 115.10a).

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.

Comment on lines +5816 to +5824
// "another target X" mirrors the bare "target " arm below; the
// "another" source-exclusion is applied downstream in
// parse_subject_application (add_another_property). Without this arm,
// an imperative predicate on an "another target ..." subject (e.g.
// "another target nonland permanent phases out", The Phasing of
// Zhalfir) is not subject-stripped and falls through to first-word
// dispatch on "another", lowering to Unimplemented instead of
// reaching the existing effect.
value((), tag("another target ")),

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.

medium

Style Guide Violation: Missing CR Annotation

According to the repository style guide (R6. CR annotations are mandatory and verified), every rules-touching line of engine code must carry a comment of the form CR <number>: <description>.

Since this parser arm handles the "another target " prefix (which corresponds to CR 115.10a regarding the "another" target filter property), please prepend the CR 115.10a annotation to the comment.

Suggested change
// "another target X" mirrors the bare "target " arm below; the
// "another" source-exclusion is applied downstream in
// parse_subject_application (add_another_property). Without this arm,
// an imperative predicate on an "another target ..." subject (e.g.
// "another target nonland permanent phases out", The Phasing of
// Zhalfir) is not subject-stripped and falls through to first-word
// dispatch on "another", lowering to Unimplemented instead of
// reaching the existing effect.
value((), tag("another target ")),
// CR 115.10a: "another target X" mirrors the bare "target " arm below; the
// "another" source-exclusion is applied downstream in
// parse_subject_application (add_another_property). Without this arm,
// an imperative predicate on an "another target ..." subject (e.g.
// "another target nonland permanent phases out", The Phasing of
// Zhalfir) is not subject-stripped and falls through to first-word
// dispatch on "another", lowering to Unimplemented instead of
// reaching the existing effect.
value((), tag("another target ")),
References
  1. R6. CR annotations are mandatory and verified. Every rules-touching line of engine code must carry a comment of the form CR : . (link)

@github-actions

Copy link
Copy Markdown

Parse changes introduced by this PR · 5 card(s), 7 signature(s) (baseline: main 553b97bd5c9f)

4 card(s) · ability/another · removed: another

Examples: Bloodrage Alpha, Cybernetica Datasmith, Feral Contest (+1 more)

1 card(s) · ability/Fight · added: Fight (kind=activated, target=opponent controls creature)

Examples: Tovolar's Packleader

1 card(s) · ability/Fight · added: Fight (target=opponent controls creature)

Examples: Bloodrage Alpha

1 card(s) · ability/ForceBlock · added: ForceBlock (target=another creature)

Examples: Feral Contest

1 card(s) · ability/PhaseOut · added: PhaseOut (target=another permanent non-land)

Examples: The Phasing of Zhalfir

1 card(s) · ability/Token · added: Token (token=+4/+4 Robot (Artifact Creature Robot))

Examples: Cybernetica Datasmith

1 card(s) · ability/another · removed: another (kind=activated)

Examples: Tovolar's Packleader

1 card(s) had Oracle-text changes (errata/reprint) — excluded as non-parser.

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