-
Notifications
You must be signed in to change notification settings - Fork 785
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
Multiple copies of Linked Abilities incorrectly see each other #12752
Comments
Zinnia, Valley's Voice - (Gatherer) (Scryfall) (EDHREC)
Wicker Picker - (Gatherer) (Scryfall) (EDHREC)
|
Game state and watchers with stored data already has all tools. No needs to link java objects -- it's not compatible with game engine (object copied all around, abilities get's new ids on trigger, activate, etc). Card id + zcc + searching key are good. There are also originalId logic (if you need really link two abilities and support multiple instances), but it's a rare usage and I don't recommend to use it without real needs. |
"it's a rare usage" is true in that it is rare for the game state to be such that it matters, but there are several abilities where it can unexpectedly show up and the current behavior is wrong. As an example, have [[Izzet Chemister]] and [[Experiment Kraj]]. If you flicker the Chemister, Kraj should lose track of the previous cards it exiled. Another example would be a card with "Choose a color", then becomes a copy of a card that also has a "choose a color" ability. Current XMage uses the same color for the 2nd, but it should not. Implementing originalId logic everywhere might be able to handle those issues, but it's quite complex to handle correctly, and must be custom re-implemented every time it's used. |
Izzet Chemister - (Gatherer) (Scryfall) (EDHREC)
Experiment Kraj - (Gatherer) (Scryfall) (EDHREC)
|
Yep, that’s wrong usage of xmage’s exile zones (it was a standard code style for years — use shared source related exile zone instead ability related). Card must use some unique prefix for a zone name, so only linked ability will access to it. Izzet don’t have ruling for ref but [[Admonition Angel]] has:
BTW same problem for other effects with standard names for a keys like “damagedPermanent”, etc. It can be accessed by wrong effects in theory. The only reason it’s a not popular bug — there is a little amount of cards and mechanics with massive abilities combine (hello mutate). |
Admonition Angel - (Gatherer) (Scryfall) (EDHREC)
|
Even if you add a unique prefix, the above interaction still wouldn't work since both the original and the post-flicker ability would use the same prefix and thus see the same exile zone. This is wrong (assuming I understood the rules correctly. I haven't confirmed with a judge that the new Chemister permanent gives the same Kraj new abilities). |
It must work with flicker too. Zone name = ability prefix + card/permanent id + zcc. There are special methods to find source zone with zcc offset (e.g. to support “on battlefield leave” logic). |
Ability prefix: same Permanent ID+ZCC: same because the Experiment Kraj is the card with the ability and it has stayed on the battlefield the whole time, its zcc has not changed. The Chemister the ability is being copied from has a new zcc, but that's not helpful here. |
I don't understand you. Izzet + Kraj use case:
Results on good implementation with existing tools (prefix + source zone + zcc):
|
Ah, my apologies, I wasn't clear enough in the scenario. Start with Izzet Chemister and Experiment Kraj on the battlefield.
In step 5 there should be no cards found to be used, since it should be a new ability, copied from a new permanent. Izzet has a new zcc, but Kraj does not. AFAIK there is no reasonable way to have this interaction be correct with the current tools. |
Well, I see. It's a weird use case to "blink" a single ability instead whole object. It's incompatible with current "copy abilities from existing objects" logic (current copy logic keep originalId to support linked abilities). E.g. require some type of ability's zcc. BUT I think that's whole thing with ability's zcc is wrong -- it's SAME ability by MTG rules cause it ref to printed:
If not then any [[Blood Moon]] or other "remove all abilities" must broke all choices and links after reset abilities to normal state. |
Blood Moon - (Gatherer) (Scryfall) (EDHREC)
|
I'm not certain about that but here's another, simpler example: Two Izzet Chemisters are on the battlefield, granting their abilities to one Experiment Kraj. The Kraj should have all four abilities, two pairs of links. I guess originalId would work for this situation? That doesn't seem like a good solution though. |
Yes, originalId as prefix must work with two independent pairs if linked abilities (exile id = prefix/original + object id + zcc) |
Currently, this breaks if the card is copied - that causes all originalIds to be reset to new ones, and there's no way to update the linked ability's stored originalId when they're changed during that copy. |
Right now, Linked Abilities are implemented by storing information on the card/permanent in a manner accessible to all other abilities. This mostly works, but has problems when linked abilities are granted to other cards, which can cause separate abilities to look up their information using the same string. (This information is stored in many different locations: costs tags, exile zone names,
game.getState().setValue
, etc.)For Costs Tags, one example of this is [[Zinnia, Valley's Voice]], where if casting a spell that already has Offspring should make separate triggers and offspring for each cost paid. This also applies to Kicker and Squad (though those currently have no cards where that matters except for the un-set [[Wicker Picker]]) and potentially others.
I think we need some sort of more general way to attach linked abilities to each other, not sure exactly how. This linkage must remain across deep copy effects, but must also create a new link when copying the card it's on (such as by making a non-legendary copy of Zinnia). I don't currently have any solution here, I just wanted to bring the issue up and discuss. For more information on the correct rules, see rule 607 Linked Abilities.
The text was updated successfully, but these errors were encountered: