use of mage.abilities.decorator.ConditionalCostModificationEffect in project mage by magefree.
the class ConditionalCostModificationTest method test_ModificationConditionalActive.
@Test
public void test_ModificationConditionalActive() {
addCustomCardWithAbility("mod", playerA, new SimpleStaticAbility(new ConditionalCostModificationEffect(new AbilitiesCostReductionControllerEffect(EquipAbility.class, "equip"), MyTurnCondition.instance, "")));
addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears", 1);
addCard(Zone.BATTLEFIELD, playerA, "Dagger of the Worthy", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", "Balduvian Bears");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertAllCommandsUsed();
assertTappedCount("Mountain", true, 1);
assertTappedCount("Mountain", false, 1);
}
use of mage.abilities.decorator.ConditionalCostModificationEffect in project mage by magefree.
the class ConditionalCostModificationTest method test_ModificationConditionalNotActiveWithOtherEffect.
@Test
public void test_ModificationConditionalNotActiveWithOtherEffect() {
addCustomCardWithAbility("mod", playerA, new SimpleStaticAbility(new ConditionalCostModificationEffect(new AbilitiesCostReductionControllerEffect(EquipAbility.class, "equip"), NotMyTurnCondition.instance, new SpellsCostIncreasingAllEffect(1, new FilterCard(), TargetController.ANY), "")));
addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears", 1);
addCard(Zone.BATTLEFIELD, playerA, "Dagger of the Worthy", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
addCard(Zone.HAND, playerA, "Lightning Bolt", 1);
// no mod, 2 cost
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", "Balduvian Bears");
// +1 for spell, 2 cost
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertAllCommandsUsed();
assertTappedCount("Mountain", true, 4);
assertTappedCount("Mountain", false, 0);
assertLife(playerB, 20 - 3);
}
use of mage.abilities.decorator.ConditionalCostModificationEffect in project mage by magefree.
the class ConditionalCostModificationTest method test_ModificationConditionalNotActive.
@Test
public void test_ModificationConditionalNotActive() {
addCustomCardWithAbility("mod", playerA, new SimpleStaticAbility(new ConditionalCostModificationEffect(new AbilitiesCostReductionControllerEffect(EquipAbility.class, "equip"), NotMyTurnCondition.instance, "")));
addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears", 1);
addCard(Zone.BATTLEFIELD, playerA, "Dagger of the Worthy", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", "Balduvian Bears");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertAllCommandsUsed();
assertTappedCount("Mountain", true, 2);
assertTappedCount("Mountain", false, 0);
}
Aggregations