diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index 30dc896c76..850580b7b4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -418,6 +418,7 @@ public class ManifestTest extends CardTestPlayerBase { activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Sacrifice a creature"); setChoice(playerB, EmptyNames.FACE_DOWN_CREATURE.toString()); + setStrictChooseMode(true); setStopAt(2, PhaseStep.END_TURN); execute(); assertAllCommandsUsed(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java index 16183c2e22..ab8ea35b34 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/counterspell/NotOfThisWorldTest.java @@ -1,4 +1,3 @@ - package org.mage.test.cards.abilities.oneshot.counterspell; import mage.constants.PhaseStep; @@ -7,7 +6,6 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * * @author LevelX2 */ public class NotOfThisWorldTest extends CardTestPlayerBase { @@ -22,20 +20,24 @@ public class NotOfThisWorldTest extends CardTestPlayerBase { public void testCounterFirstSpell() { // At the beginning of each player's upkeep, destroy target nonartifact creature that player controls of their choice. It can't be regenerated. addCard(Zone.BATTLEFIELD, playerA, "The Abyss", 1); - addCard(Zone.BATTLEFIELD, playerB, "Island", 7); + // // Counter target spell or ability that targets a permanent you control. // Not of This World costs {7} less to cast if it targets a spell or ability that targets a creature you control with power 7 or greater. addCard(Zone.HAND, playerB, "Not of This World"); - + // // At the beginning of combat on your turn, choose an opponent at random. Ruhan of the Fomori attacks that player this combat if able. addCard(Zone.BATTLEFIELD, playerB, "Ruhan of the Fomori", 1); // 7/7 + // trigger on upkeep to destroy addTarget(playerB, "Ruhan of the Fomori"); + // try to counter castSpell(2, PhaseStep.UPKEEP, playerB, "Not of This World", "stack ability (At the beginning of each player's upkeep"); + setStrictChooseMode(true); setStopAt(2, PhaseStep.PRECOMBAT_MAIN); execute(); + assertAllCommandsUsed(); assertHandCount(playerB, "Not of This World", 0); assertGraveyardCount(playerB, "Not of This World", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index f20f07ed72..97094b56a7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -364,11 +364,16 @@ public class TestPlayer implements Player { return true; } - // must search any names, even empty + // must search any names, even empty (face down cards) if (CardUtil.haveSameNames(nameOrAlias, object.getName(), true)) { return true; } + // no more empty names needs + if (nameOrAlias.isEmpty()) { + return false; + } + return object.getName().startsWith(nameOrAlias); }