Search in sources :

Example 16 with ManaOptions

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

the class ManaOptionsTest method testTinderFarm.

// Tinder Farm enters the battlefield tapped.
// {T}: Add {G}.
// {T}, Sacrifice Tinder Farm: Add {R}{W}.
@Test
public void testTinderFarm() {
    addCard(Zone.BATTLEFIELD, playerA, "Tinder Farm", 3);
    setStopAt(2, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
    assertManaOptions("{G}{G}{G}", manaOptions);
    assertManaOptions("{R}{G}{G}{W}", manaOptions);
    assertManaOptions("{R}{R}{G}{W}{W}", manaOptions);
    assertManaOptions("{R}{R}{R}{W}{W}{W}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 17 with ManaOptions

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

the class ManaOptionsTest method testCabalCoffers1.

/**
 * Don't use mana sources that only reduce available mana
 */
@Test
public void testCabalCoffers1() {
    addCard(Zone.BATTLEFIELD, playerA, "Cabal Coffers", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{W}{B}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 18 with ManaOptions

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

the class ManaOptionsTest method testDuplicatedDontHave1.

@Test
public void testDuplicatedDontHave1() {
    // Any
    addCard(Zone.BATTLEFIELD, playerA, "City of Brass", 2);
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 19 with ManaOptions

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

the class ManaOptionsTest method testSungrassPrairie3.

@Test
public void testSungrassPrairie3() {
    // {1}, {T}: Add {G}{W}.
    addCard(Zone.BATTLEFIELD, playerA, "Sungrass Prairie", 1);
    // ({T}: Add {U} or {W} to your mana pool.)
    addCard(Zone.BATTLEFIELD, playerA, "Tundra", 1);
    // ({T}: Add {G} or {U} to your mana pool.)
    addCard(Zone.BATTLEFIELD, playerA, "Tropical Island", 1);
    setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
    assertManaOptions("{U}{U}", manaOptions);
    assertManaOptions("{G}{G}{W}", manaOptions);
    assertManaOptions("{G}{W}{U}", manaOptions);
    assertManaOptions("{G}{W}{W}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 20 with ManaOptions

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

the class CostReduceForEachTest method test_BenthicExplorers_BottomlessVault.

@Test
public void test_BenthicExplorers_BottomlessVault() {
    // {T}, Untap a tapped land an opponent controls: Add one mana of any type that land could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Benthic Explorers", 1);
    // Bottomless Vault enters the battlefield tapped.
    // You may choose not to untap Bottomless Vault during your untap step.
    // At the beginning of your upkeep, if Bottomless Vault is tapped, put a storage counter on it.
    // Tap, Remove any number of storage counters from Bottomless Vault: Add Black for each storage counter removed this way.
    // give 1 mana
    addCard(Zone.BATTLEFIELD, playerB, "Bottomless Vault", 1);
    setStrictChooseMode(true);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{B}", 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