test(engine): Obuun land animation regression - #3152
Conversation
Guard Obuun's begin-combat trigger so animated lands become X/X from the source's power instead of dying as 0/0 creatures. Fixes phase-rs#2398 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request adds an integration test for Issue #2398 to verify that Obuun, Mul Daya Ancestor's begin-combat animation correctly sets the target land's power and toughness to Obuun's power. The review feedback suggests avoiding conditional actions in the integration test by asserting the expected game state directly to prevent masking potential bugs.
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.
| if matches!( | ||
| runner.state().waiting_for, | ||
| engine::types::game_state::WaitingFor::TriggerTargetSelection { .. } | ||
| ) { | ||
| runner | ||
| .act(GameAction::SelectTargets { | ||
| targets: vec![TargetRef::Object(forest)], | ||
| }) | ||
| .expect("select land target for Obuun"); | ||
| } |
There was a problem hiding this comment.
[MEDIUM] Avoid conditional actions in integration tests. Using if matches!(...) can mask bugs where the trigger fails to fire entirely, leading to confusing failure messages later in the test. Asserting the expected state directly ensures the test fails immediately at the point of failure.
assert!(matches!(
runner.state().waiting_for,
engine::types::game_state::WaitingFor::TriggerTargetSelection { .. }
));
runner
.act(GameAction::SelectTargets {
targets: vec![TargetRef::Object(forest)],
})
.expect("select land target for Obuun");
matthewevans
left a comment
There was a problem hiding this comment.
Approved. This is test-only and covers the right production path: the regression advances to beginning of combat, responds through target selection, then checks the animated land survives as Obuun-power X/X with trample and haste. No engine logic is duplicated or bypassed. The focused issue_2398 integration test passed locally and GitHub CI is green.
For future PRs, please sync with origin/main before opening/updating and use the /engine-implementer skill for non-trivial parser or engine work so the plan, implementation, and review all stay aligned with the project architecture.
matthewevans
left a comment
There was a problem hiding this comment.
Re-reviewed current head e8e88b9fb1a3 after the contributor merge-from-main commit. The PR delta remains test-only: the Obuun regression drives the production beginning-of-combat trigger, selects the land target, resolves the stack, and asserts the animated land stays on battlefield as 3/3 with trample/haste. That would fail if the source-power animation fix regressed back to 0/0.
Summary
Test plan
cargo test -p engine --test integration issue_2398cargo clippy -p engine -- -D warningsFixes #2398
Made with Cursor