Search in sources :

Example 51 with ManaOptions

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

the class NonTappingManaAbilitiesTest method TestSquanderedResourcesTwoSwamps.

@Test
public void TestSquanderedResourcesTwoSwamps() {
    setStrictChooseMode(true);
    addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
    // Sacrifice a land: Add one mana of any type the sacrificed land could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Squandered Resources", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{B}{B}{B}{B}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 52 with ManaOptions

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

the class NonTappingManaAbilitiesTest method TestTreasonousOgre.

@Test
public void TestTreasonousOgre() {
    setStrictChooseMode(true);
    // Dethrone
    // Pay 3 life: Add {R}.
    addCard(Zone.BATTLEFIELD, playerA, "Treasonous Ogre", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{R}{R}{R}{R}{R}{R}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 53 with ManaOptions

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

the class NonTappingManaAbilitiesTest method TestFarrelitePriest.

@Test
public void TestFarrelitePriest() {
    setStrictChooseMode(true);
    // {1}: Add {W}. If this ability has been activated four or more times this turn, sacrifice Farrelite Priest at the beginning of the next end step.
    addCard(Zone.BATTLEFIELD, playerA, "Farrelite Priest", 1);
    addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
    setStopAt(1, PhaseStep.BEGIN_COMBAT);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 5, manaOptions.size());
    assertManaOptions("{W}{W}{W}{W}", manaOptions);
    assertManaOptions("{W}{W}{W}{B}", manaOptions);
    assertManaOptions("{W}{W}{B}{B}", manaOptions);
    assertManaOptions("{W}{B}{B}{B}", manaOptions);
    assertManaOptions("{B}{B}{B}{B}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 54 with ManaOptions

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

the class NonTappingManaAbilitiesTest method TestSquanderedResources.

@Test
public void TestSquanderedResources() {
    setStrictChooseMode(true);
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
    // ({T}: Add {R} or {G}.)
    addCard(Zone.BATTLEFIELD, playerA, "Taiga", 1);
    // {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);
    // {T}: Add {U}. If you played a land this turn, add {B} instead.
    addCard(Zone.BATTLEFIELD, playerA, "River of Tears", 1);
    // Sacrifice a land: Add one mana of any type the sacrificed land could produce.
    addCard(Zone.BATTLEFIELD, playerA, "Squandered Resources", 1);
    setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
    execute();
    assertAllCommandsUsed();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    Assert.assertEquals("mana variations don't fit", 9, manaOptions.size());
    assertManaOptions("{C}{G}{G}{U}{U}{U}{R}{R}", manaOptions);
    assertManaOptions("{C}{G}{G}{G}{G}{U}{U}{U}", manaOptions);
    assertManaOptions("{C}{G}{G}{G}{U}{U}{U}{R}", manaOptions);
    assertManaOptions("{C}{C}{G}{G}{U}{U}{R}{R}", manaOptions);
    assertManaOptions("{C}{C}{G}{G}{G}{G}{U}{U}", manaOptions);
    assertManaOptions("{C}{C}{G}{G}{G}{U}{U}{R}", manaOptions);
    assertManaOptions("{C}{R}{R}{G}{G}{W}{U}{U}", manaOptions);
    assertManaOptions("{C}{G}{G}{G}{G}{W}{U}{U}", manaOptions);
    assertManaOptions("{C}{R}{G}{G}{G}{W}{U}{U}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) Test(org.junit.Test)

Example 55 with ManaOptions

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

the class ReflectingPoolTest method testWithCalciformPools.

@Test
public void testWithCalciformPools() {
    // {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);
    // {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 3 different mana options", 3, options.size());
    assertManaOptions("{C}{C}", options);
    assertManaOptions("{C}{W}", options);
    assertManaOptions("{C}{U}", options);
}
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