diff --git a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java index 5435f7b8883..d9e5da23fce 100644 --- a/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java +++ b/Mage.Sets/src/mage/cards/n/NarsetEnlightenedMaster.java @@ -33,6 +33,9 @@ import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; @@ -146,7 +149,7 @@ class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl { if (card != null) { Player player = game.getPlayer(affectedControllerId); if (player != null) { - player.setCastSourceIdWithAlternateMana(objectId, null, null); + player.setCastSourceIdWithAlternateMana(objectId, null, card.getSpellAbility().getCosts()); return true; } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/PlayFromNonHandZoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/PlayFromNonHandZoneTest.java index 5868ed362d0..8c59cbab3d0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/asthough/PlayFromNonHandZoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/asthough/PlayFromNonHandZoneTest.java @@ -33,7 +33,6 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * * @author LevelX2 */ public class PlayFromNonHandZoneTest extends CardTestPlayerBase { @@ -137,4 +136,37 @@ public class PlayFromNonHandZoneTest extends CardTestPlayerBase { } + @Test + public void testNarsetEnlightenedMasterAdditionalCost() { + // First strike + // Hexproof + // Whenever Narset, Enlightented Master attacks, exile the top four cards of your library. Until end of turn, you may cast noncreature cards exiled with Narset this turn without paying their mana costs. + skipInitShuffling(); + + addCard(Zone.BATTLEFIELD, playerB, "Narset, Enlightened Master", 1); + addCard(Zone.HAND, playerB, "Swamp"); + addCard(Zone.LIBRARY, playerB, "Plains"); + addCard(Zone.LIBRARY, playerB, "Plains"); + addCard(Zone.LIBRARY, playerB, "Plains"); + addCard(Zone.LIBRARY, playerB, "Cathartic Reunion"); + addCard(Zone.LIBRARY, playerB, "Forest"); + + attack(2, playerB, "Narset, Enlightened Master"); + + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Cathartic Reunion"); + setChoice(playerB, "Swamp^Forest"); + setStopAt(2, PhaseStep.END_TURN); + execute(); + + assertHandCount(playerB, 3); + assertGraveyardCount(playerB, "Forest", 1); + assertGraveyardCount(playerB, "Swamp", 1); + assertGraveyardCount(playerB, "Cathartic Reunion", 1); + assertGraveyardCount(playerB, 3); + assertExileCount(playerB, "Plains", 3); + assertExileCount(playerB, 3); + + + } + }