use of mage.abilities.mana.builder.common.InstantOrSorcerySpellManaBuilder in project mage by magefree.
the class ManaPoolTest method test_ConditionalMana_OneXSpell.
@Test
public void test_ConditionalMana_OneXSpell() {
addCustomCardWithAbility("add 10", playerA, new SimpleActivatedAbility(Zone.ALL, new AddConditionalManaEffect(Mana.RedMana(10), new InstantOrSorcerySpellManaBuilder()), new ManaCostsImpl("")));
// {X}{R}{R}
addCard(Zone.HAND, playerA, "Volcanic Geyser");
// make mana
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {R}");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 10);
// use for spell
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Volcanic Geyser", playerB);
setChoice(playerA, "X=1");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 10 - 3);
checkLife("after", 1, PhaseStep.END_TURN, playerB, 20 - 1);
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
}
use of mage.abilities.mana.builder.common.InstantOrSorcerySpellManaBuilder in project mage by magefree.
the class ManaPoolTest method test_ConditionalMana_MultipleXSpell.
@Test
public void test_ConditionalMana_MultipleXSpell() {
addCustomCardWithAbility("add 10", playerA, new SimpleActivatedAbility(Zone.ALL, new AddConditionalManaEffect(Mana.RedMana(10), new InstantOrSorcerySpellManaBuilder()), new ManaCostsImpl("")));
// {X}{R}{R}
addCard(Zone.HAND, playerA, "Volcanic Geyser", 2);
// make mana
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {R}");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 10);
// use for spell 1
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Volcanic Geyser", playerB);
setChoice(playerA, "X=1");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 10 - 3);
// use for spell 2
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Volcanic Geyser", playerB);
setChoice(playerA, "X=1");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkManaPool("mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 10 - 3 * 2);
checkLife("after", 1, PhaseStep.END_TURN, playerB, 20 - 1 * 2);
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
}
Aggregations