## Interaction of deathtouch and trample

General Discussion of the Intricacies

**Moderator:** CCGHQ Admins

### Interaction of deathtouch and trample

by **Incantus** » 15 Dec 2009, 17:56

Hey rules lawyers, I'm a bit stuck implementing the new combat damage rules. How do deathtouch and trample interact when you are checking the damage assignment of one attqcker with several blockers. For example, imagine an 8/8 with deathtouch and trample attacking, and being blocked by a 3/3 (call it A), 2/2 (B), and a 1/1(C). You order them in that way: A, B, C. Which of the following are valid damage assignments (and i it is invalid, why)?

A: 3, B: 2, C: 1

A: 3, B: 3, C: 0

A: 1, B: 2, C: 3

A: 1, B: 1, C: 1

A: 3, B: 2, C: 1

A: 3, B: 3, C: 0

A: 1, B: 2, C: 3

A: 1, B: 1, C: 1

### Re: Interaction of deathtouch and trample

by **Arch** » 15 Dec 2009, 18:36

You did mean a 6/6 dt,trample right?

A: 3, B: 2, C: 1

Yes.

A: 3, B: 3, C: 0

Yes.

A: 1, B: 2, C: 3

Yes.

A: 1, B: 1, C: 1

No. You must assign damage equal to your power. Deathtouch only allows you to "divided that damage as he or she chooses". It doesn't allow you to deal less damage.

A: 3, B: 2, C: 1

Yes.

A: 3, B: 3, C: 0

Yes.

A: 1, B: 2, C: 3

Yes.

A: 1, B: 1, C: 1

No. You must assign damage equal to your power. Deathtouch only allows you to "divided that damage as he or she chooses". It doesn't allow you to deal less damage.

### Re: Interaction of deathtouch and trample

by **Marek14** » 15 Dec 2009, 18:38

Well, if I assume that you assign the 2 leftover damage to player, only the first line is valid.Incantus wrote:Hey rules lawyers, I'm a bit stuck implementing the new combat damage rules. How do deathtouch and trample interact when you are checking the damage assignment of one attqcker with several blockers. For example, imagine an 8/8 with deathtouch and trample attacking, and being blocked by a 3/3 (call it A), 2/2 (B), and a 1/1(C). You order them in that way: A, B, C. Which of the following are valid damage assignments (and i it is invalid, why)?

A: 3, B: 2, C: 1

A: 3, B: 3, C: 0

A: 1, B: 2, C: 3

A: 1, B: 1, C: 1

Deathtouch allows you to divide the damage as you want, BUT that doesn't override rule for trample damage, which says that ALL blockers must be assigned at least lethal damage before any of it can be assigned to the defending player or planeswalker.

### Re: Interaction of deathtouch and trample

by **Incantus** » 16 Dec 2009, 03:21

OK, I think I understand. Going back to my example (8/8 with trample and deathtouch blocked by a 3/3 (A), 2/2 (B), and 1/1 (C), blocked in that order), the following assignment is valid:

A: 1

B: 1

C: 6

although no damage will be trampled. One way to get trample damage is to assign damage as follows (with 2 damage assigned to defending player):

A: 3

B: 2

1: 1

Is this correct? If so, then I believe I have a succinct function to determine whether a multiple creature damage assignment is correct (taking into account deathtouch and trample).

This seems to handle all possible cases that I can think of.

A: 1

B: 1

C: 6

although no damage will be trampled. One way to get trample damage is to assign damage as follows (with 2 damage assigned to defending player):

A: 3

B: 2

1: 1

Is this correct? If so, then I believe I have a succinct function to determine whether a multiple creature damage assignment is correct (taking into account deathtouch and trample).

- Code: Select all
`def check_assignment(attacker, blockers, assignment, trample=False, deathtouch=False):`

total = attacker.combatDamage()

valid_lethal = True

for blocker in blockers:

dmg = assignment[blocker]

total -= dmg

if (dmg < blocker.lethalDamage() and total > 0):

valid_lethal = False

return ((deathtouch or valid_lethal) and

((trample and valid_lethal and total > 0) or (total == 0))

This seems to handle all possible cases that I can think of.

Last edited by Incantus on 16 Dec 2009, 13:09, edited 2 times in total.

### Re: Interaction of deathtouch and trample

by **Marek14** » 16 Dec 2009, 07:18

Hmm, seems to.Incantus wrote:OK, I think I understand. Going back to my example (8/8 with trample and deathtouch blocked by a 3/3 (A), 2/2 (B), and 1/1 (C), blocked in that order), the following assignment is valid:

A: 1

B: 1

C: 6

although no damage will be trampled. One way to get trample damage is to assign damage as follows (with 2 damage assigned to defending player):

A: 3

B: 2

1: 1

Is this correct? If so, then I believe I have a succinct function to determine whether a multiple creature damage assignment is correct (taking into account deathtouch and trample).This seems to handle all possible cases that I can think of.

- Code: Select all
`def check_assignment(attacker, blockers, assignment, trample=False, deathtouch=False):`

total = attacker.combatDamage()

valid_lethal = True

for blocker in blockers:

dmg = assignment[blocker]

total -= dmg

if (dmg < blocker.lethalDamage() and total > 0):

valid_lethal = False

return ((deathtouch or valid_lethal) and

((trample and valid_lethal and total > 0) or (total == 0))

### Re: Interaction of deathtouch and trample

by **rocketnia** » 24 Dec 2009, 08:52

Have you considered the case when a blocker is being assigned damage from multiple attackers? Unless lethalDamage() is really clever, I think your algorithm fails there; it'll call a trampler's damage assignment illegal even though some other attacker is contributing the missing damage. It's probably a bit more accurate to check every attacker's damage assignments all at once.

### Re: Interaction of deathtouch and trample

by **Incantus** » 09 Jan 2010, 14:21

Hi Rocketnia,

You are correct that this doesn't account for a blocker blocking multiple attackers. That isn't really supported by incantus yet, but it will definitely complicate this algorithm. If you have any insight I'd definitely like to hear it. Thanks!

You are correct that this doesn't account for a blocker blocking multiple attackers. That isn't really supported by incantus yet, but it will definitely complicate this algorithm. If you have any insight I'd definitely like to hear it. Thanks!

7 posts
• Page

**1**of**1**Return to Magic Rules Engine Programming

### Who is online

Users browsing this forum: No registered users and 1 guest