Open JayDi85 opened 7 months ago
Essence Flux - (Gatherer) (Scryfall) (EDHREC)
{U} Instant Exile target creature you control, then return that card to the battlefield under its owner's control. If it's a Spirit, put a +1/+1 counter on it.
this seems to be part of the meld/mutate problem of having multiple card making up a single permanent? Both sides of the meld return, and each one is affected by further effect (here, each one has a +1/+1 on it if Spirit)
That code needs to support that rules:
When a pair of cards are melded, the result is a single creature that's represented by two cards. If the melded creature dies, both cards are put into your graveyard. As it leaves the battlefield, both of those cards are turned face up again. If the cards are put on the top or bottom of your library, you choose their relative order. (2022-10-14)
If an effect moves a melded permanent to a new zone and then affects "that card," it affects both cards. (2022-10-14)
this seems to be part of the meld/mutate problem of having multiple card
Yes, looks like it’s a part of “mutate problem” — xmage engine do not support work with multiple objects as one. So such workaround required. But it’s impossible to modify all potential effects with that code.
It’s a global problem for all “move objects + do something with it” effects. Code example from starting topic is workaround to fix it. But it hard to use in every effects.
Better solution: “move to zone” method must return really moved ids, not true/false or original zone events like current code (that’s data already collected inside move code). So related effects can use it to find really moved objects.
Found a strange code in [[Essence Flux]] and another few cards, search problem code by
instanceof meldcard
:Most of the exile and return effects like
ExileThenReturnTargetEffect
uses a simple return code (main card usage):Need to research: