Skip to content

Add Coastal Wizard - #4900

Merged
matthewevans merged 2 commits into
phase-rs:mainfrom
e11734937-beep:add-coastal-wizard
Jul 2, 2026
Merged

Add Coastal Wizard#4900
matthewevans merged 2 commits into
phase-rs:mainfrom
e11734937-beep:add-coastal-wizard

Conversation

@e11734937-beep

Copy link
Copy Markdown
Contributor

Summary

Adds engine support for Coastal Wizard — "{T}: Return this creature and another target creature to their owners' hands." — and, from the same fix, Lady Sun.

The compound bounce splits on " and " into "Return ~" (bounce self) plus the
verbless second conjunct "another target creature".
try_split_targeted_compound's verb-carry-forward — which re-parses a verbless
trailing conjunct by prepending the primary effect's verb — only fired when that
conjunct began with "target ". "another target creature" begins with
"another ", so the carry-forward was skipped and the second creature was
orphaned (Effect::Unimplemented); only the source returned to hand.

The fix extends that one guard to also accept a "another target " head (CR
608.2c). "another target creature" is already a first-class FilterProp::Another
target used by ~249 supported cards, so the re-parse of "Return another target
creature" lowers to a real bounce with no other changes. The fix is generic — it
covers any <verb> X and another target Y compound, not just these two cards.

Files changed

  • crates/engine/src/parser/oracle_effect/mod.rs — carry-forward guard accepts "another target "
  • crates/engine/tests/coastal_wizard_bounce_self_and_another.rs — integration test

Anchored on

  • crates/engine/src/parser/oracle_effect/mod.rs — the existing "target " verb-carry-forward in try_split_targeted_compound ("exile target creature and target artifact"). This change adds "another target " to the same guard.
  • crates/engine/src/parser/oracle_target.rs (~line 510 / 1703) — parse_target already recognizes "another target creature" → FilterProp::Another; ~249 supported cards use it, so the carried-forward "Return another target creature" parses without new target work.

CR references

  • CR 608.2c — resolving each part of a compound instruction; the trailing verbless conjunct inherits the primary effect's verb.
  • CR 115.1 — "another target creature" is a target constrained to a creature other than the source (FilterProp::Another).

Track

Developer

LLM

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

Verification

  • cargo fmt --all — clean
  • cargo clippy-strict — clean (0 warnings)
  • ./scripts/check-parser-combinators.sh — clean
  • cargo test -p engine — N pass / 0 fail (adds coastal_wizard_returns_self_and_another_target_to_hand)
  • ./scripts/gen-card-data.sh — Coastal Wizard / Lady Sun: 0 Unimplemented entries
  • cargo coverage — both: supported: true, gap_count: 0
  • Coverage regression diff (clean HEAD baseline vs this change, scripts/coverage-regression-check.sh --fail-on-engine): supported 31197 → 31199 (net +2). GAINED: 2 (Coastal Wizard, Lady Sun). REGRESSED (engine): 0. REGRESSED (coverage honesty): 0. ORACLE CHANGED: 0. (The ~249 existing "another target creature" cards are unchanged.)
  • cargo semantic-audit — Coastal Wizard & Lady Sun: 0 findings (32301 cards audited)

The integration test drives the real activate → target → resolve pipeline:
activate the {T} ability, target a second creature, and assert BOTH the source
and the targeted creature return to hand. It flips if the fix is reverted — the
second bounce conjunct would be dropped and the targeted creature would remain on
the battlefield.

Scope Expansion

None.

Validation Failures

None.

CI Failures

None.

Support "{T}: Return this creature and another target creature to their owners'
hands." (Coastal Wizard) and, from the same fix, Lady Sun. The compound bounce
split on " and " into "Return ~" plus the verbless "another target creature";
try_split_targeted_compound's verb-carry-forward only re-parsed a trailing
conjunct that began with "target ", so "another target creature" was dropped and
only the source returned to hand.

Extend that guard to also accept an "another target " head (CR 608.2c). "another
target creature" is already a first-class FilterProp::Another target (~249 cards
use it), so the carried-forward "Return another target creature" lowers to a real
bounce with no other changes. Generic: covers any "<verb> X and another target Y"
compound.

CR 608.2c / CR 115.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@matthewevans

Copy link
Copy Markdown
Member

Reviewed the current head. I do not see a code-level blocker in the narrow verb-carry-forward change, but this touches parser output and the required parse-diff sticky is absent for this head. Please wait for the parse-diff evidence to publish before this can be approved or queued.

@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 current head. I do not see a code-level blocker in the narrow verb-carry-forward change, but this touches parser output and the required parse-diff sticky is absent for this head. Holding approval/queue until the parse-diff evidence publishes.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Parse changes introduced by this PR · 2 card(s), 2 signature(s) (baseline: main cbe7e4a117e3)

2 card(s) · ability/Bounce · added: Bounce (target=another creature)

Examples: Coastal Wizard, Lady Sun

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

Examples: Coastal Wizard, Lady Sun

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

@matthewevans matthewevans self-assigned this Jul 2, 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.

Maintainer review: narrow parser carry-forward fix; parse-diff is limited to Coastal Wizard/Lady Sun and the runtime test exercises the activate/resolve path. Approving for merge-when-ready.

@matthewevans matthewevans added the bug Bug fix label Jul 2, 2026
@matthewevans
matthewevans enabled auto-merge July 2, 2026 10:21
@matthewevans matthewevans removed their assignment Jul 2, 2026
@matthewevans
matthewevans added this pull request to the merge queue Jul 2, 2026
Merged via the queue into phase-rs:main with commit f1ee658 Jul 2, 2026
11 checks passed
@matthewevans matthewevans added enhancement New feature or request quality For high-quality minimal to no-churn PRs labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix enhancement New feature or request quality For high-quality minimal to no-churn PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants