use of mage.abilities.mana.ManaOptions in project mage by magefree.
the class NonTappingManaAbilitiesTest method Test_ManaCache.
@Test
public void Test_ManaCache() {
setStrictChooseMode(true);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
// At the beginning of each player's end step, put a charge counter on Mana Cache for each untapped land that player controls.
// Remove a charge counter from Mana Cache: Add {C}. Any player may activate this ability but only during their turn before the end step.
addCard(Zone.BATTLEFIELD, playerA, "Mana Cache", 1);
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
execute();
assertAllCommandsUsed();
assertCounterCount("Mana Cache", CounterType.CHARGE, 2);
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
assertManaOptions("{C}{C}{B}{B}", manaOptions);
}
use of mage.abilities.mana.ManaOptions in project mage by magefree.
the class NonTappingManaAbilitiesTest method TestJunglePatrol.
@Test
public void TestJunglePatrol() {
setStrictChooseMode(true);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
// {1}{G}, {T}: Create a 0/1 green Wall creature token with defender named Wood.
// Sacrifice a token named Wood: Add {R}.
addCard(Zone.BATTLEFIELD, playerA, "Jungle Patrol", 1);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{G}, {T}: Create");
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{G}, {T}: Create");
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{G}, {T}: Create");
setStopAt(5, PhaseStep.BEGIN_COMBAT);
execute();
assertAllCommandsUsed();
assertPermanentCount(playerA, "Wood", 3);
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
assertManaOptions("{R}{R}{R}", manaOptions);
}
use of mage.abilities.mana.ManaOptions in project mage by magefree.
the class NonTappingManaAbilitiesTest method druidsRepositoryTest.
@Test
public void druidsRepositoryTest() {
setStrictChooseMode(true);
// Creature {W}{W}
addCard(Zone.HAND, playerA, "Alaborn Grenadier", 1);
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 2);
// Whenever a creature you control attacks, put a charge counter on Druids' Repository.
// Remove a charge counter from Druids' Repository: Add one mana of any color.
// Enchantment {1}{G}{G}
addCard(Zone.BATTLEFIELD, playerA, "Druids' Repository", 1);
attack(1, playerA, "Silvercoat Lion");
attack(1, playerA, "Silvercoat Lion");
setChoice(playerA, "Whenever a creature you control");
setStopAt(1, PhaseStep.END_COMBAT);
execute();
assertTappedCount("Silvercoat Lion", true, 2);
assertCounterCount(playerA, "Druids' Repository", CounterType.CHARGE, 2);
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
assertManaOptions("{Any}{Any}", manaOptions);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Alaborn Grenadier");
setChoice(playerA, "White");
setChoice(playerA, "White");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertCounterCount(playerA, "Druids' Repository", CounterType.CHARGE, 0);
assertPermanentCount(playerA, "Alaborn Grenadier", 1);
}
use of mage.abilities.mana.ManaOptions in project mage by magefree.
the class ReflectingPoolTest method test2WithExoticOrchard.
/**
* Test 2 Reflecting Pools
*/
@Test
public void test2WithExoticOrchard() {
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", 2);
// {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 3 red mana", "{R}{R}{R}", options.get(0).toString());
}
use of mage.abilities.mana.ManaOptions in project mage by magefree.
the class ReflectingPoolTest method testWithGaeasCradle.
/**
* Reflecting Pool does not see Gaea's Cradle or Serra's Sanctum as
* producing mana
*/
@Test
public void testWithGaeasCradle() {
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 {G} for each creature you control.
addCard(Zone.BATTLEFIELD, playerA, "Gaea's Cradle", 1);
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
execute();
ManaOptions options = playerA.getAvailableManaTest(currentGame);
Assert.assertEquals("Player should be able to create 2 red mana", "{G}{G}", options.get(0).toString());
}
Aggregations