diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AdherentOfHopeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AdherentOfHopeTest.java new file mode 100644 index 0000000000..943e44273e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AdherentOfHopeTest.java @@ -0,0 +1,47 @@ +package org.mage.test.cards.single.m21; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.counters.CounterType; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class AdherentOfHopeTest extends CardTestPlayerBase { + + // At the beginning of combat on your turn, if you control a Basri planeswalker, put a +1/+1 counter on Adherent of Hope. + + + @Test + public void test_basri_in_play_controllerturn(){ + addCard(Zone.BATTLEFIELD, playerA, "Adherent of Hope", 1); + addCard(Zone.BATTLEFIELD, playerA, "Basri Ket", 1); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertCounterCount(playerA, "Adherent of Hope", CounterType.P1P1, 1); + assertAllCommandsUsed(); + + } + + @Test + public void test_basri_in_play_opponentturn(){ + addCard(Zone.BATTLEFIELD, playerA, "Adherent of Hope", 1); + addCard(Zone.BATTLEFIELD, playerA, "Basri Ket", 1); + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertCounterCount(playerA, "Adherent of Hope", CounterType.P1P1, 1); + assertAllCommandsUsed(); + } + + @Test + public void test_no_basri_in_play_controllerturn(){ + addCard(Zone.BATTLEFIELD, playerA, "Adherent of Hope", 1); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertCounterCount(playerA, "Adherent of Hope", CounterType.P1P1, 0); + assertAllCommandsUsed(); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlchemistsGiftTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlchemistsGiftTest.java new file mode 100644 index 0000000000..daf5ab4c6a --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlchemistsGiftTest.java @@ -0,0 +1,51 @@ +package org.mage.test.cards.single.m21; + +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class AlchemistsGiftTest extends CardTestPlayerBase { + + private final String deathtouch = "Yes"; + private final String lifelink = "No"; + + // Target creature gets +1/+1 and gains your choice of deathtouch or lifelink until end of turn. + + + @Test + public void giveDeathTouch(){ + setStrictChooseMode(true); + addCard(Zone.BATTLEFIELD,playerA, "Adherent of Hope", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp"); + addCard(Zone.HAND, playerA, "Alchemist's Gift"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Alchemist's Gift", "Adherent of Hope"); + setChoice(playerA, deathtouch); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertAbility(playerA, "Adherent of Hope", DeathtouchAbility.getInstance(), true); + assertAbility(playerA, "Adherent of Hope", LifelinkAbility.getInstance(), false); + assertPowerToughness(playerA, "Adherent of Hope", 3, 2); + } + + @Test + public void giveLifelink(){ + setStrictChooseMode(true); + addCard(Zone.BATTLEFIELD,playerA, "Adherent of Hope", 1); + addCard(Zone.BATTLEFIELD, playerA, "Swamp"); + addCard(Zone.HAND, playerA, "Alchemist's Gift"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Alchemist's Gift", "Adherent of Hope"); + setChoice(playerA, lifelink); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertAbility(playerA, "Adherent of Hope", LifelinkAbility.getInstance(), true); + assertAbility(playerA, "Adherent of Hope", DeathtouchAbility.getInstance(), false); + assertPowerToughness(playerA, "Adherent of Hope", 3, 2); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlpineHoundmasterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlpineHoundmasterTest.java new file mode 100644 index 0000000000..aeb855a343 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AlpineHoundmasterTest.java @@ -0,0 +1,48 @@ +package org.mage.test.cards.single.m21; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class AlpineHoundmasterTest extends CardTestPlayerBase { + + // When Alpine Houndmaster enters the battlefield, you may search your library for a card named Alpine Watchdog and/or a card named Igneous Cur, reveal them, put them into your hand, then shuffle your library. + + + @Test + public void searchDog() { + addCard(Zone.HAND, playerA, "Alpine Houndmaster", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain"); + addCard(Zone.BATTLEFIELD, playerA, "Plains"); + addCard(Zone.LIBRARY, playerA, "Alpine Watchdog"); + addCard(Zone.LIBRARY, playerA, "Igneous Cur"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Alpine Houndmaster"); + setChoice(playerA, "Yes"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertHandCount(playerA, 2); + + } + + // Whenever Alpine Houndmaster attacks, it gets +X/+0 until end of turn, where X is the number of other attacking creatures. + + + @Test + public void attack() { + addCard(Zone.BATTLEFIELD, playerA, "Alpine Houndmaster", 1); + addCard(Zone.BATTLEFIELD, playerA, "Alpine Watchdog"); + addCard(Zone.BATTLEFIELD, playerA, "Igneous Cur"); + + attack(3, playerA, "Alpine Houndmaster"); + attack(3, playerA, "Alpine Watchdog"); + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertPowerToughness(playerA, "Alpine Houndmaster", 3, 2); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AngelicAscensionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AngelicAscensionTest.java new file mode 100644 index 0000000000..fcc9391959 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AngelicAscensionTest.java @@ -0,0 +1,43 @@ +package org.mage.test.cards.single.m21; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class AngelicAscensionTest extends CardTestPlayerBase { + + + // Exile target creature or planeswalker. Its controller creates a 4/4 white Angel creature token with flying. + + @Test + public void exileCreatureOpponent(){ + addCard(Zone.HAND, playerA, "Angelic Ascension"); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Angelic Ascension", "Grizzly Bears"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + setStrictChooseMode(true); + assertAllCommandsUsed(); + assertExileCount(playerB, 1); + assertPermanentCount(playerB, "Angel", 1); + assertPowerToughness(playerB, "Angel", 4, 4); + } + + @Test + public void exileOwnCreature(){ + addCard(Zone.HAND, playerA, "Angelic Ascension"); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Angelic Ascension", "Grizzly Bears"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertExileCount(playerA, 1); + assertPermanentCount(playerA, "Angel", 1); + assertPowerToughness(playerA, "Angel", 4, 4); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AnointedChoristerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AnointedChoristerTest.java new file mode 100644 index 0000000000..1a08b73126 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/m21/AnointedChoristerTest.java @@ -0,0 +1,28 @@ +package org.mage.test.cards.single.m21; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class AnointedChoristerTest extends CardTestPlayerBase { + + // {4}{W}: Anointed Chorister gets +3/+3 until end of turn. + private final String chorister = "Anointed Chorister"; + + + @Test + public void buff(){ + addCard(Zone.BATTLEFIELD, playerA, chorister); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 10); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{4}{W}:"); + attack(3, playerA, chorister); + setStopAt(4, PhaseStep.PRECOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + assertLife(playerA, 24); + assertLife(playerB, 16); + assertPowerToughness(playerA, chorister, 1, 1); + } +}