added test for #2053 that confirms bug with sacrificing tokens with Leyline of VOid out and cards with Morbid ability

This commit is contained in:
drmDev 2016-07-27 11:35:56 -04:00
parent 0d8b892272
commit 23eb555f59

View file

@ -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);
}
}