diff --git a/Mage.Sets/src/mage/cards/m/MaskedVandal.java b/Mage.Sets/src/mage/cards/m/MaskedVandal.java index 8905b48c8ad..b609dc7371d 100644 --- a/Mage.Sets/src/mage/cards/m/MaskedVandal.java +++ b/Mage.Sets/src/mage/cards/m/MaskedVandal.java @@ -46,7 +46,7 @@ public final class MaskedVandal extends CardImpl { Ability ability = new EntersBattlefieldTriggeredAbility( new DoIfCostPaid(new ExileTargetEffect(), new ExileFromGraveCost( new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_A) - )) + ).withSourceExileZone(false)) ); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TheSoulStone.java b/Mage.Sets/src/mage/cards/t/TheSoulStone.java index 252ea24aafa..4f48be7e60c 100644 --- a/Mage.Sets/src/mage/cards/t/TheSoulStone.java +++ b/Mage.Sets/src/mage/cards/t/TheSoulStone.java @@ -45,7 +45,9 @@ public final class TheSoulStone extends CardImpl { // {6}{B}, {T}, Exile a creature you control: Harness The Soul Stone. Ability ability = new SimpleActivatedAbility(new HarnessSourceEffect(), new ManaCostsImpl<>("{6}{B}")); ability.addCost(new TapSourceCost()); - ability.addCost(new ExileTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE))); + ability.addCost(new ExileTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE)) + .withSourceExileZone(false) + ); this.addAbility(ability); // ∞ -- At the beginning of your upkeep, return target creature card from your graveyard to the battlefield. diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java index 07cf32a50c9..2cd8b16b742 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java @@ -1,5 +1,3 @@ - - package mage.abilities.costs.common; import mage.abilities.Ability; @@ -24,6 +22,7 @@ import java.util.UUID; public class ExileTargetCost extends CostImpl { List permanents = new ArrayList<>(); + boolean useSourceExileZone = true; public ExileTargetCost(TargetControlledPermanent target) { target.withNotTarget(true); @@ -36,6 +35,7 @@ public class ExileTargetCost extends CostImpl { for (Permanent permanent : cost.permanents) { this.permanents.add(permanent.copy()); } + this.useSourceExileZone = cost.useSourceExileZone; } @Override @@ -55,13 +55,19 @@ public class ExileTargetCost extends CostImpl { // 117.11. The actions performed when paying a cost may be modified by effects. // Even if they are, meaning the actions that are performed don't match the actions // that are called for, the cost has still been paid. - // so return state here is not important because the user indended to exile the target anyway + // so return state here is not important because the user intended to exile the target anyway } - player.moveCardsToExile( - cards.getCards(game), source, game, true, - CardUtil.getExileZoneId(game, source), - CardUtil.getSourceName(game, source) - ); + if (useSourceExileZone) { + player.moveCardsToExile( + cards.getCards(game), source, game, true, + CardUtil.getExileZoneId(game, source), + CardUtil.getSourceName(game, source) + ); + } + else { + player.moveCardsToExile(cards.getCards(game), source, game, false, null, ""); + } + paid = true; return paid; } @@ -79,4 +85,12 @@ public class ExileTargetCost extends CostImpl { public List getPermanents() { return permanents; } + + /** + * Put exiled cards to source zone, so next linked ability can find it + */ + public ExileTargetCost withSourceExileZone(boolean useSourceExileZone) { + this.useSourceExileZone = useSourceExileZone; + return this; + } }