diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java index 674e733ad5..88d23b08ee 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java @@ -1,5 +1,6 @@ package org.mage.test.cards.cost.alternate; +import mage.abilities.keyword.DoubleStrikeAbility; import mage.constants.PhaseStep; import mage.constants.Zone; import org.junit.Ignore; @@ -325,7 +326,52 @@ public class CastFromHandWithoutPayingManaCostTest extends CardTestPlayerBase { assertHandCount(playerA, 3); assertLife(playerA, 20); assertLife(playerB, 20); - } - + + @Test + public void testJelevaCastingSavageBeatingFromExile() { + + /* + Jeleva, Nephalia's Scourge {1}{U}{B}{R} + Legendary Creature - Vampire Wizard 1/3 + Flying + When Jeleva, Nephalia's Scourge enters the battlefield, each player exiles the top X cards of his or her library, where X is the amount of mana spent to cast Jeleva. + Whenever Jeleva attacks, you may cast an instant or sorcery card exiled with it without paying its mana cost. + */ + String jeleva = "Jeleva, Nephalia's Scourge"; + + /* + Savage Beating {3}{R}{R} + Instant + Cast Savage Beating only during your turn and only during combat. + Choose one - + - Creatures you control gain double strike until end of turn. + - Untap all creatures you control. After this phase, there is an additional combat phase. + Entwine {1}{R} (Choose both if you pay the entwine cost.) + */ + String savageBeating = "Savage Beating"; + + skipInitShuffling(); + addCard(Zone.LIBRARY, playerA, savageBeating); + addCard(Zone.HAND, playerA, jeleva); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, jeleva); + + attack(3, playerA, jeleva); + setChoice(playerA, "Yes"); // opt to use Jeleva ability + setChoice(playerA, savageBeating); // choose to cast Savage Beating for free + setChoice(playerA, "No"); // opt not to pay entwine cost + setModeChoice(playerA, "1"); // use first mode of Savage Beating granting double strike + + setStopAt(3, PhaseStep.END_COMBAT); + execute(); + + assertTapped(jeleva, true); + assertLife(playerB, 18); + assertAbility(playerA, jeleva, DoubleStrikeAbility.getInstance(), true); + assertGraveyardCount(playerA, savageBeating, 1); + } }