magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.86k stars 761 forks source link

Obstinate Baloth life gain does not trigger when put into battlefield via discard-related ability #606

Closed Blitkun closed 9 years ago

Blitkun commented 9 years ago

Happened twice in a game, once with Smallpox, then with Raven's Crime. My opponent discarded the Baloth, but the life gain did not trigger when it entered the battlefield.

LevelX2 commented 9 years ago

I can't reproduce this with a created test case. Can you provide the game log (saved to mage-client/gamelogs automatically) from the game?

Blitkun commented 9 years ago

here it is:

15:05: blitkun has joined the game 15:05: isildursbane has joined the game :
Match score:
isildursbane - 1 win
blitkun - 0 wins

You have to win 2 games to win the complete match

Game has started

15:05: isildursbane shuffles his or her library. 15:05: blitkun shuffles his or her library. 15:05: blitkun chooses that he or she takes the first turn 15:05: blitkun draws seven cards 15:05: isildursbane draws seven cards 15:06: blitkun keeps hand 15:06: isildursbane keeps hand 15:06: Turn 1 blitkun (20 - 20) 15:06: blitkun plays Mountain 15:06: blitkun casts Faithless Looting 15:06: blitkun draws two cards 15:06: blitkun discards Life from the Loam 15:06: blitkun discards Raven's Crime 15:06: blitkun attacks with 0 creatures 15:06: Turn 2 isildursbane (20 - 20) 15:06: isildursbane draws a card 15:06: isildursbane plays Forest 15:06: isildursbane casts Noble Hierarch 15:06: isildursbane attacks with 0 creatures 15:06: Turn 3 blitkun (20 - 20) 15:06: blitkun draws a card 15:06: blitkun plays Graven Cairns 15:07: blitkun casts Smallpox 15:07: blitkun loses 1 life 15:07: isildursbane loses 1 life 15:07: blitkun discards Raging Ravine 15:07: isildursbane discards Obstinate Baloth 15:07: isildursbane sacrificed Obstinate Baloth 15:07: blitkun sacrificed Mountain 15:07: isildursbane sacrificed Forest 15:07: blitkun attacks with 0 creatures 15:07: Turn 4 isildursbane (19 - 19) 15:08: isildursbane draws a card 15:08: isildursbane plays Breeding Pool 15:08: isildursbane attacks with 1 creature 15:08: Ability triggers: Noble Hierarch - Exalted 15:08: Attacker: Noble Hierarch (1/2) unblocked 15:08: blitkun loses 1 life 15:08: Turn 5 blitkun (19 - 18) 15:08: blitkun dreges Life from the Loam 15:08: blitkun puts Seismic Assault from library into his or her graveyard 15:08: blitkun puts Stomping Ground from library into his or her graveyard 15:08: blitkun puts Bloodstained Mire from library into his or her graveyard 15:08: blitkun puts Life from the Loam from graveyard into his or her hand 15:09: blitkun loses 2 life 15:09: blitkun plays Overgrown Tomb 15:09: blitkun attacks with 0 creatures 15:09: Turn 6 isildursbane (19 - 16) 15:09: isildursbane draws a card 15:09: isildursbane loses 2 life 15:09: isildursbane plays Temple Garden 15:09: isildursbane loses 2 life 15:09: isildursbane casts Birthing Pod 15:09: isildursbane attacks with 0 creatures 15:09: Turn 7 blitkun (15 - 16) 15:09: blitkun draws a card 15:10: blitkun plays Mountain 15:10: blitkun casts Life from the Loam targeting Stomping Ground Bloodstained Mire Mountain 15:10: blitkun puts Stomping Ground from graveyard into his or her hand 15:10: blitkun puts Bloodstained Mire from graveyard into his or her hand 15:10: blitkun puts Mountain from graveyard into his or her hand 15:10: blitkun discards Bloodstained Mire 15:10: blitkun casts Raven's Crime from graveyard targeting isildursbane 15:10: isildursbane discards Obstinate Baloth 15:10: Ability triggers: Obstinate Baloth - When Obstinate Baloth enters the battlefield, You gain 4 life. 15:10: isildursbane gains 4 life 15:10: blitkun attacks with 0 creatures 15:10: Turn 8 isildursbane (19 - 16) 15:10: isildursbane draws a card 15:11: isildursbane plays Grove of the Burnwillows 15:11: isildursbane attacks with 1 creature 15:11: Ability triggers: Noble Hierarch - Exalted 15:11: Attacker: Obstinate Baloth (5/5) unblocked 15:11: blitkun loses 5 life 15:11: Turn 9 blitkun (19 - 11) 15:12: blitkun draws a card 15:12: blitkun plays Mountain 15:12: blitkun flashbacks Faithless Looting 15:12: blitkun casts Faithless Looting from graveyard 15:12: blitkun dreges Life from the Loam 15:12: blitkun puts Worm Harvest from library into his or her graveyard 15:12: blitkun puts Flame Jab from library into his or her graveyard 15:12: blitkun puts Faithless Looting from library into his or her graveyard 15:12: blitkun puts Life from the Loam from graveyard into his or her hand 15:12: blitkun draws a card 15:12: blitkun has conceded. 15:12: isildursbane has won the game 15:12: blitkun has lost the game.
Blitkun commented 9 years ago

ok, the ability triggered, but it did nothing - my bad

LevelX2 commented 9 years ago

No in the first case with Raven's Crime it did work correctly. The player also got 4 life.

The bug happens only with smallpox. Obstinate Baloth enters the battlefield and will also be sacrificed during the resolution of Smallpox. So it's triggered ability goes to the stack as the Obstinate Baloth has already left the battlefield again. And until now EntersBattlefieldTriggeredAbility was restricted to work only if the source is onto the battlefield. But EntersBattlefieldTriggeredAbility has to work in all zones as a consequence. I changed this and now it does also trigger if discarded and sacrificed during the resolution of Smallpox.