fix(engine): Kozilek's Command castable with Eldrazi Temple restricted mana (#2011) - #2462
Conversation
phase-rs#2011) Affordability now evaluates choosable X values instead of leaving symbolic {X} in the cost, and auto-tap treats multi-{C} activations as one atomic combination so restricted Eldrazi Temple mana can pay {C}{C} in a single tap.
There was a problem hiding this comment.
Code Review
This pull request addresses issue #2011 by ensuring that multi-mana activations from a single source (such as Eldrazi Temple or Sol Ring) are surfaced as a single atomic combination, preventing the auto-tap planner from planning multiple taps of the same source. This is implemented in crates/engine/src/game/mana_sources.rs and verified with a new integration test suite. The review feedback points out that ManaProduction::Fixed should also be included in this match arm to provide sibling coverage for other multi-mana producers like Ravnica bounce lands or Castle Garenbrig.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Break the Fixed | Colorless | Mixed production arm across lines so CI fmt passes.
🤖 Architecture Review (automated)Verdict: Seam: PASS — X-affordability lives in Findings
CR verification performed: 601.2f ✓, 107.1b ✓, 117.1d ✓ (all found in |
|
Pushed maintainer follow-up commit |
matthewevans
left a comment
There was a problem hiding this comment.
Maintainer sign-off after follow-up commit 121adff: review findings addressed at the existing casting/mana-source/legal-action seams; local Tilt clippy, test-engine, and card-data are green.
Head branch was pushed to by a user without write access
Summary
Fixes #2011: the game auto-passed on main phase when the only colorless source was an untapped Eldrazi Temple and Kozilek's Command (
{X}{C}{C}) was in hand.can_feasibly_pay_mana_cost: For costs with{X}, evaluate each affordable X (viamax_x_value_excluding) on the concretized cost instead of leaving the symbolic{X}shard in the affordability check.emit_source_rows:{T}: Add {C}{C}(andMixedproduction) emit anatomic_combinationso auto-tap plans one activation for both colorless requirements, including Colorless Eldrazi spend restrictions.Test plan
cargo test -p engine --lib issue_2011_kozilekcargo test -p engine --test integration issue_2011{C}{C}, choose X, complete cast