Fix The Soul Stone and Masked Vandal each exiling to unique exile zones. Related to #12244

This commit is contained in:
PurpleCrowbar 2026-01-05 19:11:26 +00:00
parent 804677c500
commit 9ed0a368c0
3 changed files with 26 additions and 10 deletions

View file

@ -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);

View file

@ -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.

View file

@ -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<Permanent> 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<Permanent> 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;
}
}