mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Conditional mana - fixed that some mana cant be used for paying “counter unless” cost and other things (#11447)
* Add tests for conditional mana usage with soft counterspells * Fix "to cast" conditions on common ManaCondition classes * Add fix to all remaining ManaCondition classes * SimpleActivatedAbilityConditionalMana is tested to pay for a soft counterspell activated ability * Remove now-unused imports
This commit is contained in:
parent
2cc9957753
commit
e43e918c67
30 changed files with 81 additions and 55 deletions
|
|
@ -389,6 +389,45 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
|||
assertManaOptions("{C}{C}{C}{C}{C}{C}{C}{R}[{XCostManaCondition}{TitansNestManaCondition}]", manaOptions);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConditionalManaSoftCounter() {
|
||||
addCard(Zone.HAND, playerA, "Fallaji Excavation", 1);
|
||||
addCard(Zone.HAND, playerA, "Gigantosaurus", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
addCard(Zone.HAND, playerB, "Mana Leak");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fallaji Excavation");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Gigantosaurus");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Mana Leak", "Gigantosaurus");
|
||||
setChoice(playerA, true);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertPermanentCount(playerA, "Gigantosaurus", 1);
|
||||
assertTappedCount("Powerstone Token", true, 3);
|
||||
}
|
||||
@Test
|
||||
public void testConditionalManaCantSoftCounter() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Jaya Ballard");
|
||||
addCard(Zone.HAND, playerA, "Gigantosaurus", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
addCard(Zone.HAND, playerB, "Mana Leak");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Add");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, true);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gigantosaurus");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Mana Leak", "Gigantosaurus");
|
||||
setChoice(playerA, true);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertPermanentCount(playerA, "Gigantosaurus", 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConditionalManaDeduplication() {
|
||||
ManaOptions manaOptions = new ManaOptions();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue