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

ZONE_CHANGE_GROUP event must be reworked to fix duplicated events #8009

Open
JayDi85 opened this issue Jul 14, 2021 · 6 comments
Open

ZONE_CHANGE_GROUP event must be reworked to fix duplicated events #8009

JayDi85 opened this issue Jul 14, 2021 · 6 comments
Labels
refactoring Developers topics about code and programming

Comments

@JayDi85
Copy link
Member

JayDi85 commented Jul 14, 2021

From #7572 (comment)

Group event (ZONE_CHANGE_GROUP) introduced long ago for triggers like whenever one or more cards (example: [[The Gitrog Monster]]). E.g. you must catch only one event at the end and trigger on it. ~13 cards uses it.

Current grouping code splits events by zones/source/player (see ZoneChangeData), e.g. it creates multiple group events instead one. It can be potentially buggy for some some use cases.

Possible solution: do not split events by multiple groups. Use one group instead. And keep all necessary information (cards/tokens list, map between card and original event).

@JayDi85 JayDi85 added the refactoring Developers topics about code and programming label Jul 14, 2021
@github-actions
Copy link

The Gitrog Monster - (Gatherer) (Scryfall) (EDHREC)

{3}{B}{G}
Legendary Creature — Frog Horror
6/6
Deathtouch
At the beginning of your upkeep, sacrifice The Gitrog Monster unless you sacrifice a land.
You may play an additional land on each of your turns.
Whenever one or more land cards are put into your graveyard from anywhere, draw a card.

@theelk801
Copy link
Contributor

this is another thing I was hoping to work on soon once there aren't any new sets coming out for a little while

@jeffwadsworth
Copy link
Contributor

It doesn’t use player to group the events anymore. Now it groups on the source ability. Makes no sense to group on the player.

@jeffwadsworth
Copy link
Contributor

Also, The Gitrog Monster works fine now.

@jeffwadsworth
Copy link
Contributor

Checked the other ZONE_CHANGE_GROUP cards and they work fine as well.

@JayDi85
Copy link
Member Author

JayDi85 commented Feb 2, 2024

BatchGameEvent can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developers topics about code and programming
Projects
None yet
Development

No branches or pull requests

3 participants