From 3cc6d97fbdbe0981b1422440251d85bc08abadbb Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Apr 2016 09:38:54 +0200 Subject: [PATCH] Added test. --- .../cards/asthough/SpendOtherManaTest.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java index a81a40c044..d649b5b5ae 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/SpendOtherManaTest.java @@ -97,4 +97,41 @@ public class SpendOtherManaTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Chandra, Flamecaller", 1); } + + /** + * I was unable to cast Nissa, Voice of Zendikar using black mana with Oath + * of Nissa in play. Pretty sure Oath is working usually, so here were the + * conditions in my game: + * + * -Cast Dark Petition with spell mastery -Attempt to cast Nissa, Voice of + * Zendikar using the triple black mana from Dark Petition + */ + @Test + public void testOathOfNissaWithDarkPetition() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + // When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. + // You may spend mana as though it were mana of any color to cast planeswalker spells. + addCard(Zone.BATTLEFIELD, playerA, "Oath of Nissa"); + addCard(Zone.GRAVEYARD, playerA, "Lightning Bolt", 2); + + // Search your library for a card and put that card into your hand. Then shuffle your library. + // Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. + addCard(Zone.HAND, playerA, "Dark Petition"); // {3}{B}{B} + + // +1: Put a 0/1 green Plant creature token onto the battlefield. + // -2: Put a +1/+1 counter on each creature you control. + // -7: You gain X life and draw X cards, where X is the number of lands you control. + addCard(Zone.LIBRARY, playerA, "Nissa, Voice of Zendikar"); // {1}{G}{G} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dark Petition"); + setChoice(playerA, "Nissa, Voice of Zendikar"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Nissa, Voice of Zendikar"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Dark Petition", 1); + assertHandCount(playerA, "Nissa, Voice of Zendikar", 0); + assertPermanentCount(playerA, "Nissa, Voice of Zendikar", 1); + } }