Restore the foretold state when a snapshot is restored - #11420
Closed
cuinhellcat wants to merge 1 commit into
Closed
Restore the foretold state when a snapshot is restored#11420cuinhellcat wants to merge 1 commit into
cuinhellcat wants to merge 1 commit into
Conversation
Cancelling the cast of a foretold card left it in exile without its foretold flag, so it could no longer be cast with Foretell. The two setters for that state have sat commented out in setCardInCopiedGame since the method was introduced; nothing else restores them, and CardCopyService already carries the flags into the snapshot itself. Reproduced by taking a snapshot of a face-down foretold card in exile, turning it face up onto the stack as casting does, and restoring: zone and face-down state come back, isForetold() does not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
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.
Fixes #7844.
Problem
Cancel the cast of a foretold card and it comes back to exile without its foretold state, so it can no longer be cast with Foretell.
setCardInCopiedGamerestores a card's tapped, face-down, manifested, sickness and state-name, but the two lines for the foretold flags are commented out:They have been comments since the method was introduced in "Trying to fix gateway dialog glitching" — never active, so this is not re-enabling something that was switched off for a reason. Nothing else restores that state, while
CardCopyService.copyCardalready carries both flags into the snapshot, so the information is there and simply not read back.Reproduction
Take a snapshot with a face-down foretold card in exile, turn it face up onto the stack the way casting does, restore. The card returns to exile face down, and
isForetold()is false.Notes
isForetold()reads the field for a card in exile and derives it from the cast ability elsewhere, sosetForetold(fromCard.isForetold())restores the value that matters and is a no-op for cards that are not in exile.AI disclosure
Written with Claude Code (Claude Opus 5), as requested in CONTRIBUTING; the agent is also recorded as co-author on the commit.