* Fixed a bug that mana in the mana pool could not be used to pay mana costs that could only be payed with "you may spend mana as thought" effects (fixes #2581).

This commit is contained in:
LevelX2 2018-02-25 21:53:47 +01:00
parent 2c28f64294
commit 2fceafda93
4 changed files with 77 additions and 10 deletions

View file

@ -134,4 +134,34 @@ public class SpendOtherManaTest extends CardTestPlayerBase {
assertHandCount(playerA, "Nissa, Voice of Zendikar", 0);
assertPermanentCount(playerA, "Nissa, Voice of Zendikar", 1);
}
@Test
public void testUseSpendManaAsThoughWithManaFromPool() {
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); // Creature {1}{W}
// When Hostage Taker enters the battlefield, exile another target artifact or creature until Hostage Taker leaves the battlefield.
// You may cast that card as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell.
addCard(Zone.HAND, playerA, "Hostage Taker"); // {2}{U}{B}
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hostage Taker");
setChoice(playerA, "Silvercoat Lion");
activateManaAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}: Add {R} to your mana pool."); // red mana to pool
activateManaAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}: Add {R} to your mana pool."); // red mana to pool
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Silvercoat Lion"); // cast it from exile with red mana from pool
setStopAt(1, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, "Hostage Taker", 1);
assertTappedCount("Mountain", true, 4);
assertPermanentCount(playerA, "Silvercoat Lion", 1);
}
}