Add Unravel (counter spell; draw if mana value paid was less) - #3618
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Drive Unravel through the real cast->resolve pipeline: cast a {3} target
spell (paid below its mana value via a static cost reducer, or at full
cost), counter it with Unravel, and assert the conditional draw rider
fires only when mana spent to cast the target was less than its mana
value (CR 601.2f/601.2h + 608.2c). The mana-spent state is produced
authentically by the engine's payment path; the test fails on revert of
the parser's intervening-if lowering (the rider would draw unconditionally).
Parser by @jaso0n0818 (salvaged from #3573); runtime test added by maintainer.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
matthewevans
enabled auto-merge
June 17, 2026 18:55
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvaged from #3573 (jaso0n0818, closed). The original parser work is sound and is cherry-picked here with authorship preserved; what the closed PR lacked — across multiple review cycles — was a runtime test that drives the engine through cast→resolve and fails on revert. This adds that test.
What it does
Unravel counters target spell; if the total mana spent to cast that spell was less than its mana value, you draw a card. jaso0n0818's parser change lowers the conditional draw rider to
AbilityConditioncomparing mana-spent vs mana value (conditions.rs).Discriminating test
unravel_counter_mana_value.rs: P1 counters P0's spell with Unravel in two scenarios driven through the real payment path —The mana-spent state is produced authentically by the engine (no hand-set fields). Verified discriminating: neutralizing the parser dispatch (so the rider parses unconditionally) makes the "full mana value" case fail
left: 1, right: 0.Co-authored parser work by jaso0n0818; maintainer-authored runtime test.