From f86cfe9e3db33704ccbe65855157260c4f574684 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Wed, 21 Nov 2018 16:56:31 +0400 Subject: [PATCH] Tests: fixed EchoTest --- .../cards/abilities/keywords/EchoTest.java | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EchoTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EchoTest.java index c75ebd9b231..07cf2e1902d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EchoTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EchoTest.java @@ -1,4 +1,3 @@ - package org.mage.test.cards.abilities.keywords; import mage.constants.PhaseStep; @@ -7,29 +6,27 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * * @author LevelX2 */ public class EchoTest extends CardTestPlayerBase { - /* - * I flickered an Avalanche Riders with its Echo trigger on the stack with Restoration Angel. - * When the trigger resolved, my Riders was sacrificed, even though it should have been - * considered a new permanent. - */ + /* + * I flickered an Avalanche Riders with its Echo trigger on the stack with Restoration Angel. + * When the trigger resolved, my Riders was sacrificed, even though it should have been + * considered a new permanent. + */ @Test public void testEchoTriggerChecksIdentity() { - - addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); - // Avalanche Riders Creature - Human Nomad 2/2 + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + // Avalanche Riders Creature - Human Nomad 2/2 {3}{R} // Haste // Echo (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.) // When Avalanche Riders enters the battlefield, destroy target land. addCard(Zone.HAND, playerA, "Avalanche Riders"); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); // Restoration Angel {3}{W} // Flash // Flying @@ -37,12 +34,19 @@ public class EchoTest extends CardTestPlayerBase { // then return that card to the battlefield under your control. addCard(Zone.HAND, playerA, "Restoration Angel"); - addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); + // cast Avalanche Riders and destroy forest + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Avalanche Riders"); + addTarget(playerA, "Forest"); + // Avalanche Riders go to echo, cast Restoration Angel to restore rider (do not apply echo with 4 mana) + activateManaAbility(3, PhaseStep.UPKEEP, playerA, "{T}: Add {W}"); + activateManaAbility(3, PhaseStep.UPKEEP, playerA, "{T}: Add {W}"); + activateManaAbility(3, PhaseStep.UPKEEP, playerA, "{T}: Add {W}"); + activateManaAbility(3, PhaseStep.UPKEEP, playerA, "{T}: Add {W}"); castSpell(3, PhaseStep.UPKEEP, playerA, "Restoration Angel", null, "Echo {3}{R} (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.)"); - addTarget(playerA, "Avalanche Riders"); + setChoice(playerA, "Yes"); // raider do restore setStopAt(3, PhaseStep.PRECOMBAT_MAIN); execute(); @@ -52,7 +56,9 @@ public class EchoTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Avalanche Riders", 1); assertPermanentCount(playerA, "Restoration Angel", 1); - assertPermanentCount(playerB, "Mountain", 0); + assertPermanentCount(playerB, "Forest", 0); + assertTappedCount("Plains", true, 4); + assertTappedCount("Mountain", true, 0); }