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

Combat causes too many life loss triggers #10805

Open
AaronMcGarry opened this issue Aug 14, 2023 · 19 comments · May be fixed by #12202
Open

Combat causes too many life loss triggers #10805

AaronMcGarry opened this issue Aug 14, 2023 · 19 comments · May be fixed by #12202
Labels
bug Bugs and errors

Comments

@AaronMcGarry
Copy link

Exquisite Blood and similar cards should only trigger once if a player is damaged by multiple creatures in the same combat, right now it triggers once for each creature.

@Susucre
Copy link
Contributor

Susucre commented Aug 14, 2023

[[Exquisite Blood]]

@github-actions
Copy link

Exquisite Blood - (Gatherer) (Scryfall) (EDHREC)

{4}{B}
Enchantment
Whenever an opponent loses life, you gain that much life.

@Susucre
Copy link
Contributor

Susucre commented Aug 14, 2023

Indeed, the triggers should use a batched Event for those life loss. Not sure we have one at the ready.

@xenohedron
Copy link
Contributor

Oof, that could be a substantial rework to implement. Might have to change logic in CombatGroup. Maybe related to #10773 .

Looking at 510.2 I don't see a straightforward rules reference describing how this works though... can anyone point to a ruling?

@AaronMcGarry
Copy link
Author

Just ran a test with [[Rakdos Charm]] where the opponent controlled two creatures and it triggered multiple times. Pretty sure this should have the same behavior, but I couldn't find a specific ruling online.

@github-actions
Copy link

Rakdos Charm - (Gatherer) (Scryfall) (EDHREC)

{B}{R}
Instant
Choose one —
• Exile target player's graveyard.
• Destroy target artifact.
• Each creature deals 1 damage to its controller.

@AaronMcGarry
Copy link
Author

It looks like rakdos charm should also trigger just once
https://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/829907-rakdos-charm-damage

@xenohedron xenohedron added the bug Bugs and errors label Aug 15, 2023
@Susucre
Copy link
Contributor

Susucre commented Aug 15, 2023

Ok there is no official ruling for that it seems.

Relevant rulings on damage:

Combat damage is done simulatenously.

510.2. Second, all combat damage that's been assigned is dealt simultaneously. [...]

Damage is done to player in the form of life loss, should keep the simultaenous part?

120.3a. Damage dealt to a player by a source without infect causes that player to lose that much life.

Quite irrelevant here, but life loss is taken into accont when damage is processed.

120.4c. Third, damage that's been dealt is processed into its results, as modified by replacement effects that interact with those results (such as life loss or counters).

I did not find anything relevant to describe if that particular trigger event is batching or not, so it is not clear to me if there is batching or not.

@AaronMcGarry
Copy link
Author

It looks like Arena handles it as one trigger.
https://youtu.be/hg7CS40n0fw?t=994

@xenohedron
Copy link
Contributor

Also see #8725

@JayDi85
Copy link
Member

JayDi85 commented Nov 27, 2023

Exquisite Blood and similar cards should only trigger once if a player is damaged by multiple creatures in the same combat

Yes, in combat phase must be only one event with life lose (after all damage assigned and applied), see rule 510.1e about combat damage assignment:

510.1e
Once a player has assigned combat damage from each attacking or blocking creature he or she controls, the total damage assignment (not solely the damage assignment of any individual attacking or blocking creature) is checked to see if it complies with the above rules. If it doesn’t, the combat damage assignment is illegal; the game returns to the moment before that player began to assign combat damage. (See rule 717, “Handling Illegal Actions”).

But in other phases must be multiple lose life events (e.g. from Rakdos Charm and multi creatures).

So Exquisite Blood's code is fine, it must catch life lose event, not batches

@skiwkr
Copy link
Contributor

skiwkr commented Mar 7, 2024

I believe that this is also an issue with implementing [[Ob Nixilis, Captive Kingpin]] (#10020) as it also needs to trigger off the life loss event, however the LOST_LIFE event fires for every player that loses life, and Ob Nixilis should only trigger once regardless of how many players lose one life.

Taking damage has DAMAGED_BATCH_FOR_PLAYERS to ensure triggers only happen once, so i would think the same batch event should be made for life loss, however after giving it my best effort I think I'll leave it as an opportunity for someone who understands batch events better than I do.

Also, I believe that [[Enduring Angel]] (#8725) would also benefit from this event as it currently uses LOSE_LIFE, which either fires as often as LOST_LIFE or never fires at all based on my interpretation of the loseLife method in PlayerImpl.java. [[Bloodletter Of Aclazotz]] also uses this same LOSE_LIFE event, however it does need to fire the event for each player so it can do the replacement effect.

Copy link

github-actions bot commented Mar 7, 2024

Ob Nixilis, Captive Kingpin - (Gatherer) (Scryfall) (EDHREC)

{2}{B}{R}
Legendary Creature — Demon
4/3
Flying, trample
Whenever one or more opponents each lose exactly 1 life, put a +1/+1 counter on Ob Nixilis, Captive Kingpin. Exile the top card of your library. Until your next end step, you may play that card.

Enduring Angel // Angelic Enforcer - (Gatherer) (Scryfall) (EDHREC)

{2}{W}{W}{W}
Creature — Angel
3/3
Flying, double strike
You have hexproof.
If your life total would be reduced to 0 or less, instead transform Enduring Angel and your life total becomes 3. Then if Enduring Angel didn't transform this way, you lose the game.
🔄
Creature — Angel
/
Flying
You have hexproof.
Angelic Enforcer's power and toughness are each equal to your life total.
Whenever Angelic Enforcer attacks, double your life total.

Bloodletter of Aclazotz - (Gatherer) (Scryfall) (EDHREC)

{1}{B}{B}{B}
Creature — Vampire Demon
2/4
Flying
If an opponent would lose life during your turn, they lose twice that much life instead. (Damage causes loss of life.)

@xenohedron
Copy link
Contributor

See rework from #11974 , perhaps can be used to fix this

@JayDi85
Copy link
Member

JayDi85 commented Apr 29, 2024

@Susucre is it still actual after latest batched damage changes?

@Susucre
Copy link
Contributor

Susucre commented Apr 29, 2024

Uhm I'll check that tomorrow or the day after. There should be a batch event now for life loss, but not sure it is used everywhere.

@Susucre
Copy link
Contributor

Susucre commented Apr 29, 2024

Ok quick check shows it is not using the batch event:
image

I'll try to find them all later this week. Could you give a look at #12173 ? I'd like to not add other batch refactor before some version of that gets merged.

@Susucre
Copy link
Contributor

Susucre commented Apr 30, 2024

Ok, I found why gaining life is different from losing life with very similar wording:

119.9. Some triggered abilities are written, "Whenever [a player] gains life, . . . ." Such abilities are treated as though they are written, "Whenever a source causes [a player] to gain life, . . . ." If a player gains 0 life, no life gain event has occurred, and these abilities won't trigger.

So "Whenever you gain life" triggers should not be batched, but "Whenever you lose life" should, as there is no similar rule for losing life.

I think this should be all of them:

https://scryfall.com/search?q=o%3A%2Fwhen%5B%5E%2C%5D%2Alose%5B%5E%2C%5D%2Alife%2F+game%3Apaper&order=name&as=grid&unique=cards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants