-
Notifications
You must be signed in to change notification settings - Fork 747
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
Refactor batched triggered abilities to expose which part of batch event made them trigger. #12095
Comments
Felix Five-Boots - (Gatherer) (Scryfall) (EDHREC)
Umezawa's Jitte - (Gatherer) (Scryfall) (EDHREC)
|
Can you make reproducible test for master with wrong triggers? |
I don't think the current trigger-caring cards can cause issue at the moment. |
There might be, but it needs to be a combination of one of those: I didn't find the Jitte+Felix example quickly, so maybe there are actual exemple with current cards. |
Maybe it’s possible to use test with custom card. See good usage example from commit crime mechanics: https://github.com/magefree/mage/pull/11859/files#diff-ea86893179679bbafef2d79b9257e24555b8e297789eb3be67a05eadaf6bf5f0 |
Naban, Dean of Iteration - (Gatherer) (Scryfall) (EDHREC)
Unable to retrieve information for "Ingenious artificer" |
Ingenious Artillerist - (Gatherer) (Scryfall) (EDHREC)
|
I have not looked at all of them, but the move zones "If [...] causes a triggered ability of [...] to trigger," all seem to not work on batch move events. |
Interesting find. Is the bug only applicable to NUMBER_OF_TRIGGERS? |
I do think so. This should be the only meta-trigger? |
So with [[Felix Five Boots]] in #12074, we have an issue of Felix incrementing the trigger count for batch events, where the part of the batch Felix cares about has no common part with the part the batch trigger cares about.
I suspect this might occur in a variety of situations, but for now the one I can illustrate the problem with is the following:
DAMAGED_BATCH_FOR_ALL
is triggered with all creatures dealing damage. There is two events in it: Felix dealing damage to playerB, and Elite Vanguard dealing damage to the blocker (there is also the playerB's blocker damage, but irrelevant here)DAMAGED_BATCH_FOR_ALL
, there is the event for Elite Vanguard's damage in it, so it is increased by Felix. This is where the problem is.So to solve the problem, I think we need to improve TriggeredEvents to expose which part of events are relevant to them when they do trigger. For non-batched events, this is trivial, if it did trigger, then the event is what made the trigger triggers.
For Batch events, it is a on a case-by-case basis. For instance Jitte is using
DealsCombatDamageEquippedTriggeredAbility
:Here the part of the batch that are relevant are quite explicit:
So I would be in favor of separating checkTrigger in two:
I think that would help us going forward, as we introduce more batch events and new cards with various
one or more
triggers are more and more frequent.To go back on Felix, the filtering for Felix would call filterEvent of the original trigger to have the relevant part of the batch, then do its own filtering to decide if it triggers.
The text was updated successfully, but these errors were encountered: