mage
mage copied to clipboard
Swathcutter Giant ability fizzle if removed in response with Angel of the Dire Hour
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...
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.
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]].
Labyrinth of Skophos - (Gatherer) (Scryfall) (EDHREC)
Land {T}: Add {C}. {4}, {T}: Remove target attacking or blocking creature from combat.
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.
That doesn't solve the problem that was noted in the other issue, with targeted abilities like [[Rust Scarab]].
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.
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.
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.)
I see. Your suggestion makes sense to me then.
I'd like to add a couple tests with the cards mentioned here, but #10734 's cleanup should have fixed them.