* Fixed wrong asserts of undying test (#2148)

This commit is contained in:
LevelX2 2016-08-06 19:20:56 +02:00
parent 7a4b358f8a
commit 73a30f5659

View file

@ -274,45 +274,46 @@ public class UndyingTest extends CardTestPlayerBase {
assertPowerToughness(playerA, "Tatterkite", 3, 2); assertPowerToughness(playerA, "Tatterkite", 3, 2);
} }
/** /**
* I stole my opponents Vorapede using Simic Manipulator and shortly after someone played Wrath of God. * I stole my opponents Vorapede using Simic Manipulator and shortly after
* Instead of returning to my opponent's board, Vorapede came back under my control. * someone played Wrath of God. Instead of returning to my opponent's board,
* The rules text for Undying states that it should return under its owner's control, not its controller's. * Vorapede came back under my control. The rules text for Undying states
* that it should return under its owner's control, not its controller's.
*/ */
@Test @Test
public void testUndyingCreatureReturnsUnderOwnersControl() { public void testUndyingCreatureReturnsUnderOwnersControl() {
// Creature Insect // Creature Insect
// Vigilance, trample // Vigilance, trample
// Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.) // Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
addCard(Zone.BATTLEFIELD, playerB, "Vorapede"); // {2}{G}{G}{G} 5/4 addCard(Zone.BATTLEFIELD, playerB, "Vorapede"); // {2}{G}{G}{G} 5/4
addCard(Zone.HAND, playerB, "Doom Blade"); // {1}{B} destroy target non-black creature addCard(Zone.HAND, playerB, "Doom Blade"); // {1}{B} destroy target non-black creature
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
// {2}{R} sorcery - Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. // {2}{R} sorcery - Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
addCard(Zone.HAND, playerA, "Act of Treason"); addCard(Zone.HAND, playerA, "Act of Treason");
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
// playerA takes control of Vorapede from playerB // playerA takes control of Vorapede from playerB
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Vorapede"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Vorapede");
attack(1, playerA, "Vorapede"); attack(1, playerA, "Vorapede");
// playerB kills Vorapede under the control of playerA now // playerB kills Vorapede under the control of playerA now
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Doom Blade", "Vorapede"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Doom Blade", "Vorapede");
setStopAt(1, PhaseStep.END_TURN); setStopAt(1, PhaseStep.END_TURN);
execute(); execute();
assertLife(playerA, 20); assertLife(playerA, 20);
assertLife(playerB, 15); assertLife(playerB, 15);
assertGraveyardCount(playerA, "Act of Treason", 1); assertGraveyardCount(playerA, "Act of Treason", 1);
assertGraveyardCount(playerB, "Doom Blade", 1); assertGraveyardCount(playerB, "Doom Blade", 1);
// Vorapede should return under control of playerA, not playerB // Vorapede should return under control of playerA, not playerB
assertPermanentCount(playerA, "Vorapede", 1); assertPermanentCount(playerB, "Vorapede", 1);
assertPermanentCount(playerB, "Vorapede", 0); assertPermanentCount(playerA, "Vorapede", 0);
assertCounterCount(playerA, "Vorapede", CounterType.P1P1, 1); assertCounterCount(playerB, "Vorapede", CounterType.P1P1, 1);
assertPowerToughness(playerA, "Vorapede", 6, 5); assertPowerToughness(playerB, "Vorapede", 6, 5);
} }
} }