RestartGameEffect using initVariantsZones creates duplicate cards
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 158
Description
`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.
Contributor guide
Assessment
This issue has not been assessed yet.