diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ObstinateBalothTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ObstinateBalothTest.java index 21e63de6fe0..cf0436c5803 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ObstinateBalothTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ObstinateBalothTest.java @@ -64,5 +64,34 @@ public class ObstinateBalothTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 24); // + 4 from Obstinate Baloth entering the battlefield - } + } + + /* + 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. + So EntersBattlefieldTriggeredAbility has to work in all zones as a consequence. + */ + @Test + public void TestWithSmallpox() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2); + // Each player loses 1 life, discards a card, sacrifices a creature, then sacrifices a land. + addCard(Zone.HAND, playerA, "Smallpox"); + + addCard(Zone.HAND, playerB, "Obstinate Baloth"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Smallpox"); + setChoice(playerB, "Obstinate Baloth"); // comes into play after directly after discard + setChoice(playerB, "Obstinate Baloth"); // and can and has to be sacrificed here + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Smallpox", 1); + assertPermanentCount(playerB, "Obstinate Baloth", 0); + assertGraveyardCount(playerB, "Obstinate Baloth", 1); + + assertLife(playerA, 19); + assertLife(playerB, 23); // -1 from Smallpox + 4 from Obstinate Baloth entering the battlefield + } } diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java b/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java index 08f6b7f3e05..9f63db704ab 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/EntersBattlefieldTriggeredAbility.java @@ -56,7 +56,7 @@ public class EntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl { } public EntersBattlefieldTriggeredAbility(Effect effect, boolean optional, String rulePrefix) { - super(Zone.BATTLEFIELD, effect, optional); + super(Zone.ALL, effect, optional); // Zone.All because a creature with trigger can be put into play and be sacrificed during the resolution of an effect (discard Obstinate Baloth with Smallpox) this.rulePrefix = rulePrefix; }