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 damage assignment for attackers with trample and blockers blocking multiple creatures #11567

Open
xenohedron opened this issue Dec 21, 2023 · 12 comments · May be fixed by #13279
Open

Combat damage assignment for attackers with trample and blockers blocking multiple creatures #11567

xenohedron opened this issue Dec 21, 2023 · 12 comments · May be fixed by #13279
Labels
bug Bugs and errors refactoring Developers topics about code and programming

Comments

@xenohedron
Copy link
Contributor

Noticed today in the XDHS with [[Guardian of the Gateless]] but is presumably a general issue with how combat is implemented. It was blocking a 3/5, 4/4 trample, and 4/4 not trample (so becoming a 6/6). The correct functionality would be to assign 0-4 trample damage. However, the way it seems to work was assigning 3 from the 3/5, then prompting to assign 3 or 4 from the trampler (so 0 or 1 to face), then 4 from the non trampler all to the blocker.

702.19b The controller of an attacking creature with trample first assigns damage to the creature(s) blocking it. Once all those blocking creatures are assigned lethal damage, any excess damage is assigned as its controller chooses among those blocking creatures and the player, planeswalker, or battle the creature is attacking. When checking for assigned lethal damage, take into account damage already marked on the creature and damage from other creatures that’s being assigned during the same combat damage step, but not any abilities or effects that might change the amount of damage that’s actually dealt. The attacking creature’s controller need not assign lethal damage to all those blocking creatures but in that case can’t assign any damage to the player or planeswalker it’s attacking.

One potential kludge to fix this in most scenarios would be to order attackers (i.e. combat groups) as follows when assigning damage:

  1. Attackers without trample
  2. Attackers with trample and deathtouch
  3. Attackers with trample but not deathtouch

More formally true to rules would be like, have the attackers assign in any order, tramplers can assign 0-N, at the end check that the blocker is receiving lethal and if not reject all assignments and make them try again, but that seems a bit trickier! Ideally it would be possible to assign damage from three 2/4 tramplers to one 3/3 blocker as 1+1 1+1 1+1 (if you wanted each creature to trigger damage to player for example).

@xenohedron xenohedron added bug Bugs and errors refactoring Developers topics about code and programming labels Dec 21, 2023
Copy link

Guardian of the Gateless - (Gatherer) (Scryfall) (EDHREC)

{4}{W}
Creature — Angel
3/3
Flying
Guardian of the Gateless can block any number of creatures.
Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it's blocking.

@ssk97
Copy link
Contributor

ssk97 commented Dec 21, 2023

Key rule for proper handling:

510.1e Once a player has assigned combat damage from each attacking or blocking creature they control, 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 728, “Handling Illegal Actions.”)

An assigned order would likely be much simpler to implement though.

@tiera3
Copy link
Contributor

tiera3 commented Dec 21, 2023

The other thing to take into account with this fix is cards like Pride of Lions that have oracle text of "You may have ~ assign its combat damage as though it weren’t blocked". Is this choice made at the start of the damage assignment step? If so, it shouldn't be a problem.

https://scryfall.com/search?q=o%3A%22weren%27t+blocked%22 currently returns 19 relevant cards.

Simply putting them first in the evaluation order will work most of the time - unless that creature itself has trample making things more complicated.

@JayDi85
Copy link
Member

JayDi85 commented Oct 25, 2024

I don’t understand the problem — mtg rules uses Damage Assignment Order. It’s defined by players on declare blockers step. All other calculations use that order. Players can change excess damage distribution only (trample), but not the order (it’s defined at the start).

Can you explain:

  1. Current xmage behaviour;
  2. What’s wrong;
  3. Correct xmage behaviour.

@ssk97
Copy link
Contributor

ssk97 commented Oct 25, 2024

  1. When a defending creature can block multiple attacking creatues, the order that the attacking creatures assign their damage in seems arbitrary (In contrast to the order that the blockers take that damage, which is correctly using the Damage Asssignment Order)
  2. If a creature with trample isn't late enough in the attacking order, it can't assign trample damage to the player since the multi-blocking creature doesn't yet have lethal damage assigned to it.
  3. Technically the correct behaviour is to allow any damage assignment and only check for legality once at the very end, but that seems like really bad UI. The automatic ordering of attackers with trample last would cover most cases, though I think it wouldn't solve the same issue when combined with replacement effects that modify how much damage is dealt.

@Grath
Copy link
Contributor

Grath commented Oct 26, 2024

https://magic.wizards.com/en/news/feature/foundations-mechanics This discussion is eerily well timed: damage assignment order is ceasing to exist as of Magic Foundations, so damage assignment in combat will need to be entirely overhauled anyways; I'm not sure how things like assigning damage when multiple attackers are being blocked by multiple defenders (one or more of whom can block multiple attackers at once) would work best; perhaps 'click on an attacking creature that was blocked, assign its damage however you want to each creature blocking it, move on to other creatures until all damage has been assigned'? Would be nice to have some shortcuts like, if you have enough damage to kill all blocking creatures it offers (but does not force - see [[Maarika, Brutal Gladiator]] or any other creature which interacts with excess damage) the option to assign lethal damage to each blocking creature, similar to things like when Palinchron offers to untap all your lands because you can untap more lands than you have tapped lands.

Copy link

Maarika, Brutal Gladiator - (Gatherer) (Scryfall) (EDHREC)

{2}{B}{R}{G}
Legendary Creature — Human Warrior
7/4
Maarika, Brutal Gladiator must be blocked if able.
As long as it's your turn, Maarika has indestructible.
Whenever Maarika deals damage to a creature, if that creature was dealt excess damage this turn, that creature's controller sacrifices a noncreature, nonland permanent.

@JayDi85
Copy link
Member

JayDi85 commented Oct 26, 2024

Well, new rules must simplify UX. No needs in blockers order dialogs. No needs in multiple assign damage dialogs. Now users can use single assignment damage dialog with damage distribution logic between blocking creatures. I was planning to use it in combat after implemented for Master of the Wild Hunt in 0fbd9bb. Now such dialog required by new rules.

@JayDi85
Copy link
Member

JayDi85 commented Oct 26, 2024

Dialog example from Master of the Wild Hunt:

shot_241026_090402

@Grath
Copy link
Contributor

Grath commented Oct 26, 2024

I agree with that UI being a good idea for assigning damage from one creature, but that doesn't solve the problem that this issue has - where you need to be able to choose the order in which attackers deal damage, so that you can maximize the value of trample.

I would suggest this solution, potentially to be used when there's one blocker that's blocking multiple attackers, either "only for the attackers that were blocked by one creature" or "whenever there's one blocker blocking multiple attackers", or used all the time to simplify the flow:

  • In the Combat Damage step, it highlights all the creatures in yellow.
  • You click on a creature, it brings up this UI; if the creature can deal lethal damage to each creature blocking it, it pre-populates this damage distribution window with lethal damage to each creature.
  • Then once each creature has had their damage assigned, the damage is dealt in the order in which the creatures had their damage assigned, so that if you've got a Wall of Glare that's blocking a 2/2, another 2/2, and a 4/4 with trample you can reliably deal 3 damage to the player if you want to.

@ssk97 ssk97 linked a pull request Feb 1, 2025 that will close this issue
@tiera3
Copy link
Contributor

tiera3 commented Feb 3, 2025

Do MTG rules allow you to assign less than lethal damage?

For example, I attack with a 4/4, you block with a 3/3. Can I choose to only assign 2 damage with the other 2 being ignored?

@ssk97
Copy link
Contributor

ssk97 commented Feb 3, 2025

Do MTG rules allow you to assign less than lethal damage?

For example, I attack with a 4/4, you block with a 3/3. Can I choose to only assign 2 damage with the other 2 being ignored?

No, all damage must be assigned. 501.1c 's example lists all possible damage assignments in that scenario.

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

Successfully merging a pull request may close this issue.

5 participants