mage icon indicating copy to clipboard operation
mage copied to clipboard

Swathcutter Giant ability fizzle if removed in response with Angel of the Dire Hour

Open copperfield42 opened this issue 1 year ago • 9 comments

image

my opponent attack me with [[Swathcutter Giant]] its ability goes to the stack and in response I cast [[Angel of the Dire Hour]], the stack resolve, the giant is remove but no damage was deal...

copperfield42 avatar Sep 09 '22 02:09 copperfield42

Swathcutter Giant - (Gatherer) (Scryfall) (EDHREC)

{4}{R}{W} Creature — Giant Soldier 5/5 Vigilance Whenever Swathcutter Giant attacks, it deals 1 damage to each creature defending player controls.

Angel of the Dire Hour - (Gatherer) (Scryfall) (EDHREC)

{5}{W}{W} Creature — Angel 5/4 Flash Flying When Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures.

github-actions[bot] avatar Sep 09 '22 02:09 github-actions[bot]

508.5. If an ability of an attacking creature refers to a defending player, or a spell or ability refers to both an attacking creature and a defending player, then unless otherwise specified, the defending player it’s referring to is the player that creature is attacking, or the controller of the planeswalker that creature is attacking. If that creature is no longer attacking, the defending player it’s referring to is the player that creature was attacking before it was removed from combat or the controller of the planeswalker that creature was attacking before it was removed from combat.

I think the cleanest solution is to store some kind of last-known defending player map in Combat and fall back to that when getDefendingPlayerId is called for a creature that was removed from combat, either by being removed from the battlefield altogether or by an effect like [[Labyrinth of Skophos]].

awjackson avatar Sep 09 '22 03:09 awjackson

Labyrinth of Skophos - (Gatherer) (Scryfall) (EDHREC)

Land {T}: Add {C}. {4}, {T}: Remove target attacking or blocking creature from combat.

github-actions[bot] avatar Sep 09 '22 03:09 github-actions[bot]

There already is a setTargetPointer flag in AttacksTriggeredAbility that sets that target to the defending player. I think we just need to use that for Swathcutter Giant right?

Only issue I can see is if there's some effect that can change who the creature is attacking. Not sure that exists though and if it's supposed to evaluate the defending player at the time when the ability triggers, the current implementation is correct anyway.

weirddan455 avatar Sep 09 '22 03:09 weirddan455

That doesn't solve the problem that was noted in the other issue, with targeted abilities like [[Rust Scarab]].

awjackson avatar Sep 09 '22 03:09 awjackson

Rust Scarab - (Gatherer) (Scryfall) (EDHREC)

{4}{G} Creature — Insect 4/5 Whenever Rust Scarab becomes blocked, you may destroy target artifact or enchantment defending player controls.

github-actions[bot] avatar Sep 09 '22 03:09 github-actions[bot]

Only issue I can see is if there's some effect that can change who the creature is attacking

There is at least one card that can retroactively change which player or planeswalker a creature is attacking: [[Portal Mage]]. It is implemented in xmage. Its Gatherer notes specifically state that the effect changes the "defending player" for targetting purposes (and presumably also for things like Swathcutter Giant)

If an ability targets something controlled by the “defending player” of an attacking creature and the defending player for that creature changes before that ability resolves, the ability won’t resolve because its target has become illegal.

awjackson avatar Sep 09 '22 03:09 awjackson

Portal Mage - (Gatherer) (Scryfall) (EDHREC)

{2}{U} Creature — Human Wizard 2/2 Flash When Portal Mage enters the battlefield during the declare attackers step, you may reselect which player or planeswalker target attacking creature is attacking. (It can't attack its controller or its controller's planeswalkers.)

github-actions[bot] avatar Sep 09 '22 03:09 github-actions[bot]

I see. Your suggestion makes sense to me then.

weirddan455 avatar Sep 09 '22 03:09 weirddan455

I'd like to add a couple tests with the cards mentioned here, but #10734 's cleanup should have fixed them.

Susucre avatar Aug 12 '23 12:08 Susucre