mage icon indicating copy to clipboard operation
mage copied to clipboard

ZONE_CHANGE_GROUP event must be reworked to fix duplicated events

Open JayDi85 opened this issue 4 years ago • 6 comments

From https://github.com/magefree/mage/issues/7572#issuecomment-875969895

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 avatar Jul 14 '21 23:07 JayDi85

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.

github-actions[bot] avatar Jul 14 '21 23:07 github-actions[bot]

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

theelk801 avatar Jul 14 '21 23:07 theelk801

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 avatar Jul 15 '21 00:07 jeffwadsworth

Also, The Gitrog Monster works fine now.

jeffwadsworth avatar Jul 15 '21 01:07 jeffwadsworth

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

jeffwadsworth avatar Jul 17 '21 21:07 jeffwadsworth

BatchGameEvent can help

JayDi85 avatar Feb 02 '24 08:02 JayDi85