test(engine): add Dina sacrifice-draw regression tests (#718)#5303
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds integration tests for Dina, Essence Brewer (issue #718) to verify her sacrifice-to-draw trigger, ensuring it triggers on creature sacrifice, respects the once-per-turn constraint, and correctly handles token sacrifices using last-known information. The feedback suggests querying the resolved outcome states instead of the runner's state directly to maintain consistency and avoid relying on in-place runner mutations.
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.
matthewevans
left a comment
There was a problem hiding this comment.
Maintainer review: test-only regression coverage for #718, Gemini comments addressed, CR citations verified, and branch updated with origin/main.
Summary
Closes the loop on issue #718 by adding end-to-end integration tests for Dina, Essence Brewer's "Whenever you sacrifice a creature, draw a card" trigger. No engine changes — the runtime fixes were already on
main:match_sacrificedLKI lookback for ceased-to-exist tokens (CR 603.10a)greater_good_activation)This PR adds the discriminating runtime tests proposed in the issue's implementation plan but never landed.
Oracle text
Changes
crates/engine/tests/integration/issue_718_dina_sacrifice_draw.rscrates/engine/tests/integration/main.rsTests
dina_draws_when_you_sacrifice_a_creaturedina_draw_trigger_fires_only_once_per_turnOncePerTurn)dina_draws_when_you_sacrifice_a_token_creatureAll tests use
GameScenario+AbilityActivation::resolve()— no hand-built trigger state.Test plan
cargo test -p engine --test integration dina_drawcargo fmt --alltest-engineTilt resource green (if applicable)Closes
Fixes #718