From 23eb555f59c4a38de0a3f3a876c21974362f37a4 Mon Sep 17 00:00:00 2001 From: drmDev Date: Wed, 27 Jul 2016 11:35:56 -0400 Subject: [PATCH] added test for #2053 that confirms bug with sacrificing tokens with Leyline of VOid out and cards with Morbid ability --- .../replacement/LeylineOfTheVoidTest.java | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java index b691b34da03..3cc04e65a29 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java @@ -105,14 +105,17 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { @Test public void testMorbidAbility() { addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + // If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. + // If a card would be put into an opponent's graveyard from anywhere, exile it instead. addCard(Zone.BATTLEFIELD, playerA, "Leyline of the Void"); addCard(Zone.HAND, playerA, "Murder"); + // Morbid — At the beginning of each end step, if a creature died this turn, you may draw a card. addCard(Zone.BATTLEFIELD, playerB, "Deathreap Ritual"); addCard(Zone.BATTLEFIELD, playerB, "Memnite"); - - + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Murder"); setChoice(playerA, "Memnite"); + setChoice(playerB, "Yes"); setStopAt(2, PhaseStep.END_TURN); execute(); @@ -121,5 +124,28 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { assertExileCount(playerB, 1); } + + @Test + public void testMorbidAbilityWithAwakeningZoneTokens() { + // At the beginning of your upkeep, you may put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. + // It has "Sacrifice this creature: Add mana symbol 1 to your mana pool." + addCard(Zone.BATTLEFIELD, playerA, "Awakening Zone"); + // If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. + // If a card would be put into an opponent's graveyard from anywhere, exile it instead. + addCard(Zone.BATTLEFIELD, playerA, "Leyline of the Void"); + // Morbid — At the beginning of each end step, if a creature died this turn, you may draw a card. + addCard(Zone.BATTLEFIELD, playerB, "Deathreap Ritual"); + + setChoice(playerA, "Yes"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sacrifice"); + setChoice(playerB, "Yes"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Eldrazi Spawn", 0); + assertExileCount(playerB, 0); + assertHandCount(playerB, 0); + } }