Page 1 of 1

[fixed]Leyline Phantom bounces with lethal damage

PostPosted: 12 Feb 2016, 20:22
by Korath
Describe the Bug:
Leyline Phantom bounces itself while it has lethal damage.

Which card did behave improperly ?
Leyline Phantom

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
BFZv2.

What exactly should be the correct behavior/interaction ?
"(Return it only if it survived combat.)"

Are any other cards possibly affected by this bug ?
Strictly speaking, no effects that trigger on damage dealing should resolve until after state-based actions are checked. I can't think of any others offhand that so clearly subvert the design intent of the card, though.

Fungusaur's workaround might be reusable.

Re: [confirmed]Leyline Phantom bounces with lethal damage

PostPosted: 13 Feb 2016, 00:10
by Korath
In Shandalar, at least, delaying to EVENT_AFTER_DAMAGE like with Fungusaur wasn't enough; it still got bounced despite being flagged as dying. (The specific bug EVENT_AFTER_DAMAGE seems to have been put into place to fix is to keep a counterless Fungusaur from killing a 2/3 creature.) Delaying it until after the regeneration phase is complete wasn't enough, either, since then a Leyline Phantom with first strike bounced itself after being blocked by a 5/6, and triggers still aren't supposed to get put on the stack yet at that point. What I ended up doing was to give it an end-of-combat trigger instead.

Re: [confirmed]Leyline Phantom bounces with lethal damage

PostPosted: 18 Apr 2016, 13:35
by Gargaroz
It only needed a check for "damage_on_card" (tested and seems to work).
Fixed in 4249eb2

Re: [fixed]Leyline Phantom bounces with lethal damage

PostPosted: 18 Apr 2016, 16:54
by Korath
That seems fragile. The most obvious points of failure would be it not bouncing if it was indestructible but has 5 damage marked, or if it incorrectly bouncing if it had less than 5 points of deathtouch damage marked.

Re: [fixed]Leyline Phantom bounces with lethal damage

PostPosted: 18 Apr 2016, 20:26
by Gargaroz
I incorporate your reports in c5cab29, plus the check for other kind of "fatal" special damages (Pit Spawn, Phage the Untouchable and so).

Re: [fixed/closed]Leyline Phantom bounces with lethal damage

PostPosted: 30 Oct 2016, 15:33
by Aswan jaguar
Leyline Phantom is still getting bounced at times although it has received lethal combat damage.The problem is that if Leyline Phantom receives lethal combat damage equal to it's toughness then it bounces back to hand if it takes +1 or more damage from it's toughness then it goes to graveyard.

Re: [still bugged]Leyline Phantom bounces with lethal damage

PostPosted: 25 Oct 2019, 13:41
by Aswan jaguar
Fixed - receives lethal combat damage equal to it's toughness - in commit 8982dbe5.
Korath wrote:a Leyline Phantom with first strike bounced itself after being blocked by a 5/6, and triggers still aren't supposed to get put on the stack yet at that point. What I ended up doing was to give it an end-of-combat trigger instead.
This is still true however I believe it works right as Drana, Liberator of Malakir and others work like this and their rules say so:
8/25/2015 Drana’s last ability triggers after combat damage has been dealt, so only attacking creatures that survive the combat damage step in which Drana deals combat damage will have +1/+1 counters put on them.
8/25/2015 The +1/+1 counter won’t change how much damage Drana or any other attacking creature with first strike or double strike deals during that combat damage step. However, the +1/+1 counters that are put on attacking creatures without first strike will affect the damage those creatures deal during the regular combat damage step.

As a result the trigger of Leyline Phantom should fire in first strike step and resolve in second before lethal damage occurs otherwise why does Drana's ability do so.