Search in sources :

Example 36 with ManaOptions

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

the class TappedForManaRelatedTest method TestEyeOfRamos.

@Test
public void TestEyeOfRamos() {
    setStrictChooseMode(true);
    // {T}: Add {U}.
    // Sacrifice Eye of Ramos: Add {U}.
    addCard(Zone.BATTLEFIELD, playerA, "Eye of Ramos", 2);
    setStopAt(1, PhaseStep.BEGIN_COMBAT);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{U}{U}{U}{U}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 37 with ManaOptions

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

the class TappedForManaRelatedTest method TestCalciformPools2Counter.

@Test
public void TestCalciformPools2Counter() {
    // {T}: Add {C}.
    // {1}, {T}: Put a storage counter on Calciform Pools.
    // {1}, Remove X storage counters from Calciform Pools: Add X mana in any combination of {W} and/or {U}.
    addCard(Zone.BATTLEFIELD, playerA, "Calciform Pools", 1);
    addCounters(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Calciform Pools", CounterType.STORAGE, 2);
    setStopAt(1, PhaseStep.BEGIN_COMBAT);
    execute();
    assertCounterCount("Calciform Pools", CounterType.STORAGE, 2);
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
    assertManaOptions("{W}{W}", manaOptions);
    assertManaOptions("{W}{U}", manaOptions);
    assertManaOptions("{U}{U}", manaOptions);
    assertManaOptions("{C}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 38 with ManaOptions

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

the class TappedForManaRelatedTest method TestParadiseMantle.

@Test
public void TestParadiseMantle() {
    setStrictChooseMode(true);
    // Equipped creature has "{T}: Add one mana of any color."
    // Equip {1}
    // Creature {1}{B}  1/2
    addCard(Zone.BATTLEFIELD, playerA, "Paradise Mantle", 1);
    // Flying;
    // {2}, {untap}: Add one mana of any color.
    // Artifact Creature (1/1)
    addCard(Zone.BATTLEFIELD, playerA, "Pili-Pala", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
    activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip");
    // Select a creature you control
    addTarget(playerA, "Pili-Pala");
    setStopAt(1, PhaseStep.BEGIN_COMBAT);
    execute();
    assertAllCommandsUsed();
    Permanent pp = getPermanent("Pili-Pala");
    Assert.assertTrue("Pili-Pala has 1 attachment", pp.getAttachments().size() == 1);
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{Any}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Permanent(mage.game.permanent.Permanent) Test(org.junit.Test)

Example 39 with ManaOptions

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

the class TitansNestTest method testTitansNest.

@Test
public void testTitansNest() {
    setStrictChooseMode(true);
    // At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard.
    // Exile a card from your graveyard: Add {C}. Spend this mana only to cast a colored spell without {X} in its mana cost.
    // Enchantment {1}{B}{G}{U}
    addCard(Zone.HAND, playerA, "Titans' Nest");
    addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
    addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
    addCard(Zone.GRAVEYARD, playerA, "Grizzly Bears", 2);
    castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Titans' Nest");
    setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    assertPermanentCount(playerA, "Titans' Nest", 1);
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{C}{C}[{TitansNestManaCondition}]", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 40 with ManaOptions

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

the class HarvestMageTest method testOneInstance.

@Test
public void testOneInstance() {
    setStrictChooseMode(true);
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
    addCard(Zone.HAND, playerA, "Silvercoat Lion");
    // {G}, {T}, Discard a card: Until end of turn, if you tap a land for mana, it produces one mana of a color of your choice instead of any other type and amount.
    // Creature 1/1 {G}
    addCard(Zone.HAND, playerA, "Harvest Mage", 1);
    castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Harvest Mage");
    activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{G}, {T}, Discard a card: Until end of turn");
    setChoice(playerA, "Silvercoat Lion");
    setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    assertPermanentCount(playerA, "Harvest Mage", 1);
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{Any}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) 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