Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RestartGameEffect using initVariantsZones creates duplicate cards #5943

Open
Jetz72 opened this issue Aug 17, 2024 · 0 comments
Open

RestartGameEffect using initVariantsZones creates duplicate cards #5943

Jetz72 opened this issue Aug 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working Game Mechanics keep no stale

Comments

@Jetz72
Copy link
Contributor

Jetz72 commented Aug 17, 2024

initVariantZones creates all the cards that it puts in the zones it populates. RestartGameEffect sends all the cards from the Battlefield, Library, Graveyard, Hand, and Exile (besides those excluded by other params) back to the deck, sends the commander back to the deck, deletes everything else in the command zone, then calls initVariantZones.

This leaves a duplicate commander in your deck, duplicates your planechase and scheme decks aside from whichever was in the command zone, junks all your active attractions and then doubles that deck without resetting the Junkyard (didn't catch this when I was implementing those, whoops), and I believe it'll also erase any noncommander cards that slipped into the command zone e.g. mutate + Leadership Vacuum. Any conjured cards will also get mixed into your deck.

Could just erase all the variant zones, but might be better to have solution without initVariantZones. Freshly creating all the variant cards with new IDs seems more prone to issues than returning them to their starting zones. At the very least it's inconsistent with what happens to the rest of the cards. Could use isCollectible to filter out any conjured cards that should be removed during the restart.

@Hanmac Hanmac added bug Something isn't working Game Mechanics keep no stale labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Game Mechanics keep no stale
Projects
None yet
Development

No branches or pull requests

3 participants