Tests: fixed EchoTest
-
package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep;
@@ -7,7 +6,6 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
- *
* @author LevelX2
*/
@@ -21,15 +19,14 @@ public class EchoTest extends CardTestPlayerBase {
@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} <i>(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.)</i>");
- 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);
}
