Search in sources :

Example 56 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ReflectingPoolTest method testWithTriomeAndManaConfluence.

/**
 * I only control 3 lands, a Triome, a Reflecting Pool, and a Mana
 * Confluence. The Reflecting Pool is able to tap for colorless, but it
 * should not be able to.
 *
 * https://blogs.magicjudges.org/rulestips/2012/09/you-have-to-name-a-color-when-you-add-one-mana-of-any-color-to-your-mana-pool/
 */
@Test
public void testWithTriomeAndManaConfluence() {
    // {T}: Add {C}.
    // {1}{U}, {T}: Put target artifact card from your graveyard on top of your library.
    addCard(Zone.BATTLEFIELD, playerA, "Academy Ruins", 1);
    // {T}, Pay 1 life: Add one mana of any color.
    addCard(Zone.BATTLEFIELD, playerA, "Mana Confluence", 1);
    // {T}: Add one mana of any type that a land you control could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    ManaOptions options = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player A should be able to create only 2 different mana options", 2, options.size());
    assertManaOptions("{C}{C}{Any}", options);
    assertManaOptions("{C}{Any}{Any}", options);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) Test(org.junit.Test)

Example 57 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ReflectingPoolTest method testWithDifferentLands.

/**
 * Reflecting Pool does not see Gaea's Cradle or Serra's Sanctum as
 * producing mana
 */
@Test
public void testWithDifferentLands() {
    addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
    // {T}: Add one mana of any type that a land you control could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1);
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Exotic Orchard", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerB, "Exotic Orchard", 1);
    addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    ManaOptions options = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player A should be able to create only 3 different mana options", 3, options.size());
    assertManaOptions("{G}{G}{G}", options);
    assertManaOptions("{G}{G}{W}", options);
    assertManaOptions("{G}{W}{W}", options);
    options = playerB.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player B should be able to create only 2 different mana options", 2, options.size());
    assertManaOptions("{G}{W}", options);
    assertManaOptions("{W}{W}", options);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) Test(org.junit.Test)

Example 58 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ReflectingPoolTest method testWithExoticOrchard.

/**
 * Reflecting Pool does not see what mana Exotic Orchard can produce
 */
@Test
public void testWithExoticOrchard() {
    addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
    // {T}: Add one mana of any type that a land you control could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1);
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Exotic Orchard", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    ManaOptions options = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player should be able to create 2 red mana", "{R}{R}", options.get(0).toString());
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) Test(org.junit.Test)

Example 59 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ReflectingPoolTest method testWith2ExoticOrchard.

/**
 * Test 2 Reflecting Pools
 */
@Test
public void testWith2ExoticOrchard() {
    addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
    // {T}: Add one mana of any type that a land you control could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Reflecting Pool", 1);
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Exotic Orchard", 2);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    ManaOptions options = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player should be able to create 3 red mana", "{R}{R}{R}", options.get(0).toString());
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) Test(org.junit.Test)

Example 60 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class SylvokExplorerTest method testTwoInstances.

@Test
public void testTwoInstances() {
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerB, "Exotic Orchard", 2);
    // {T}: Add one mana of any color that a land an opponent controls could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Sylvok Explorer", 2);
    addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    setStrictChooseMode(true);
    execute();
    assertAllCommandsUsed();
    ManaOptions options = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("Player should be able to create 3 white mana", "{W}{W}{W}", options.get(0).toString());
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) Test(org.junit.Test)

Aggregations

ManaOptions (mage.abilities.mana.ManaOptions)99 Test (org.junit.Test)85 ManaOptionsTestUtils.assertManaOptions (org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions)75 ManaOptionsTestUtils.assertDuplicatedManaOptions (org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions)38 Permanent (mage.game.permanent.Permanent)9 Mana (mage.Mana)8 Player (mage.players.Player)5 ActivatedManaAbilityImpl (mage.abilities.mana.ActivatedManaAbilityImpl)4 FilterCard (mage.filter.FilterCard)4 FilterPermanent (mage.filter.FilterPermanent)4 TargetPermanent (mage.target.TargetPermanent)4 AlternateManaPaymentAbility (mage.abilities.costs.mana.AlternateManaPaymentAbility)3 ManaCost (mage.abilities.costs.mana.ManaCost)3 ValueHint (mage.abilities.hint.ValueHint)3 FilterControlledPermanent (mage.filter.common.FilterControlledPermanent)3 UUID (java.util.UUID)2 ConditionalMana (mage.ConditionalMana)2 PassAbility (mage.abilities.common.PassAbility)2 PlayLandAsCommanderAbility (mage.abilities.common.PlayLandAsCommanderAbility)2 WhileSearchingPlayFromLibraryAbility (mage.abilities.common.WhileSearchingPlayFromLibraryAbility)2