changed ExileSpellEffect from being singleton

This commit is contained in:
Evan Kranzler 2021-04-17 18:47:45 -04:00
parent b5e3ad2814
commit 213564f8cd
70 changed files with 81 additions and 91 deletions

View file

@ -31,7 +31,7 @@ public final class AllHallowsEve extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
// Exile All Hallow's Eve with two scream counters on it.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addEffect(new AddCountersSourceEffect(
CounterType.SCREAM.createInstance(), StaticValue.get(2), true, true
).setText("with 2 scream counters on it"));

View file

@ -48,7 +48,7 @@ public final class AllSunsDawn extends CardImpl {
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filterBlack));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 1, filterWhite));
// Exile All Suns' Dawn.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private AllSunsDawn(final AllSunsDawn card) {

View file

@ -22,7 +22,7 @@ public final class AlrundsEpiphany extends CardImpl {
// Create two 1/1 blue Bird creature tokens with flying. Take an extra turn after this one. Exile Alrund's Epiphany.
this.getSpellAbility().addEffect(new CreateTokenEffect(new OwlToken(), 2));
this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// Foretell {4}{U}{U}
this.addAbility(new ForetellAbility(this, "{4}{U}{U}"));

View file

@ -27,7 +27,7 @@ public final class ArcBlade extends CardImpl {
// Arc Blade deals 2 damage to any target.
this.getSpellAbility().addEffect(new DamageTargetEffect(2));
// Exile Arc Blade
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// with three time counters on it.
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true);
effect.setText("with three time counters on it");

View file

@ -27,7 +27,7 @@ public final class BondOfInsight extends CardImpl {
// Each player puts the top four cards of their library into their graveyard. Return up to two instant and/or sorcery cards from your graveyard to your hand. Exile Bond of Insight.
this.getSpellAbility().addEffect(new BondOfInsightEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private BondOfInsight(final BondOfInsight card) {

View file

@ -28,7 +28,7 @@ public final class BurningWish extends CardImpl {
this.getSpellAbility().addEffect(new WishEffect(filter));
// Exile Burning Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private BurningWish(final BurningWish card) {

View file

@ -28,7 +28,7 @@ public final class ChronomanticEscape extends CardImpl {
// Until your next turn, creatures can't attack you. Exile Chronomantic Escape with three time counters on it.
getSpellAbility().addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
getSpellAbility().addEffect(ExileSpellEffect.getInstance());
getSpellAbility().addEffect(new ExileSpellEffect());
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), true, true);
effect.setText("with 3 time counters on it");
getSpellAbility().addEffect(effect);

View file

@ -28,7 +28,7 @@ public final class CunningWish extends CardImpl {
this.getSpellAbility().addEffect(new WishEffect(filter));
// Exile Cunning Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private CunningWish(final CunningWish card) {

View file

@ -28,7 +28,7 @@ public final class CyclicalEvolution extends CardImpl {
// Target creature gets +3/+3 until end of turn. Exile Cyclical Evolution with three time counters on it.
getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
getSpellAbility().addTarget(new TargetCreaturePermanent());
getSpellAbility().addEffect(ExileSpellEffect.getInstance());
getSpellAbility().addEffect(new ExileSpellEffect());
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), true, true);
effect.setText("with 3 time counters on it");
getSpellAbility().addEffect(effect);

View file

@ -25,7 +25,7 @@ public final class DeathWish extends CardImpl {
this.getSpellAbility().addEffect(new LoseHalfLifeEffect());
// Exile Death Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private DeathWish(final DeathWish card) {

View file

@ -36,7 +36,7 @@ public final class DeliverUntoEvil extends CardImpl {
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 4));
// Exile Deliver Unto Evil.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private DeliverUntoEvil(final DeliverUntoEvil card) {

View file

@ -50,7 +50,7 @@ public final class DraconicIntervention extends CardImpl {
this.getSpellAbility().addWatcher(new DamagedByWatcher(false));
// Exile Draconic Intervention.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private DraconicIntervention(final DraconicIntervention card) {

View file

@ -38,7 +38,7 @@ public final class EcologicalAppreciation extends CardImpl {
// Search your library and graveyard for up to four creature cards with different names that each have mana value X or less and reveal them. An opponent chooses two of those cards. Shuffle the chosen cards into your library and put the rest onto the battlefield. Exile Ecological Appreciation.
this.getSpellAbility().addEffect(new EcologicalAppreciationEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private EcologicalAppreciation(final EcologicalAppreciation card) {

View file

@ -38,7 +38,7 @@ public final class EldritchEvolution extends CardImpl {
// Search your library for a creature card with converted mana cost X or less, where X is 2 plus the sacrificed creature's converted mana cost.
// Put that card onto the battlefield, then shuffle your library. Exile Eldritch Evolution.
this.getSpellAbility().addEffect(new EldritchEvolutionEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private EldritchEvolution(final EldritchEvolution card) {

View file

@ -73,7 +73,7 @@ class EmergencyPowersEffect extends OneShotEffect {
if (AddendumCondition.instance.apply(game, source)) {
new PutCardFromHandOntoBattlefieldEffect(filter).apply(game, source);
}
return ExileSpellEffect.getInstance().apply(game, source);
return new ExileSpellEffect().apply(game, source);
}
}
// I am the senate!

View file

@ -30,7 +30,7 @@ public final class EmergentUltimatum extends CardImpl {
// Search your library for up to three monocolored cards with different names and exile them. An opponent chooses one of those cards. Shuffle that card into your library. You may cast the other cards without paying their mana costs. Exile Emergent Ultimatum.
this.getSpellAbility().addEffect(new EmergentUltimatumEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private EmergentUltimatum(final EmergentUltimatum card) {

View file

@ -27,7 +27,7 @@ public final class ExperimentalOverload extends CardImpl {
// Create an X/X blue and red Weird creature token, where X is the number of instant and sorcery cards in your graveyard. Then you may return an instant or sorcery card from your graveyard to your hand. Exile Experimental Overload.
this.getSpellAbility().addEffect(new ExperimentalOverloadEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private ExperimentalOverload(final ExperimentalOverload card) {

View file

@ -35,7 +35,7 @@ public final class Expropriate extends CardImpl {
// <i>Council's dilemma</i> &mdash; Starting with you, each player votes for time or money. For each time vote,
// take an extra turn after this one. For each money vote, choose a permanent owned by the voter and gain control of it. Exile Expropriate
this.getSpellAbility().addEffect(new ExpropriateEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private Expropriate(final Expropriate card) {

View file

@ -27,7 +27,7 @@ public final class FesteringMarch extends CardImpl {
// Creatures your opponents control get -1/-1 until end of turn.
this.getSpellAbility().addEffect(new BoostOpponentsEffect(-1, -1, Duration.EndOfTurn));
// Exile Festering March
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// with three time counters on it.
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true);
effect.setText("with 3 time counters on it");

View file

@ -27,7 +27,7 @@ public final class FinaleOfRevelation extends CardImpl {
this.getSpellAbility().addEffect(new FinaleOfRevelationEffect());
// Exile Finale of Revelation.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private FinaleOfRevelation(final FinaleOfRevelation card) {

View file

@ -58,7 +58,7 @@ public final class FlamescrollCelebrant extends ModalDoubleFacesCard {
this.getRightHalfCard().getSpellAbility().addEffect(new RevelInSilenceEffect());
// Exile Revel in Silence.
this.getRightHalfCard().getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getRightHalfCard().getSpellAbility().addEffect(new ExileSpellEffect());
}
private FlamescrollCelebrant(final FlamescrollCelebrant card) {

View file

@ -22,7 +22,7 @@ public final class FloodOfRecollection extends CardImpl {
// Return target instant or sorcery card from your graveyard to your hand. Exile Flood of Recollection.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard")));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private FloodOfRecollection(final FloodOfRecollection card) {

View file

@ -28,7 +28,7 @@ public final class GamePlan extends CardImpl {
Effect effect = new DrawCardAllEffect(7);
effect.setText(", then draws seven cards");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private GamePlan(final GamePlan card) {

View file

@ -29,7 +29,7 @@ public final class GenesisUltimatum extends CardImpl {
// Look at the top five cards of your library. Put any number of permanent cards from among them onto the battlefield and the rest into your hand. Exile Genesis Ultimatum.
this.getSpellAbility().addEffect(new GenesisUltimatumEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private GenesisUltimatum(final GenesisUltimatum card) {

View file

@ -29,7 +29,7 @@ public final class GlitteringWish extends CardImpl {
this.getSpellAbility().addEffect(new WishEffect(filter));
// Exile Glittering Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private GlitteringWish(final GlitteringWish card) {

View file

@ -31,7 +31,7 @@ public final class GoldenWish extends CardImpl {
this.getSpellAbility().addEffect(new WishEffect(filter));
// Exile Golden Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private GoldenWish(final GoldenWish card) {

View file

@ -27,7 +27,7 @@ public final class HarnessInfinity extends CardImpl {
this.getSpellAbility().addEffect(new HarnessInfinityEffect());
// Exile Harness Infinity.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private HarnessInfinity(final HarnessInfinity card) {

View file

@ -30,7 +30,7 @@ public final class HealingTechnique extends CardImpl {
// Return target card from your graveyard to your hand. You gain life equal to that card's mana value. Exile Healing Technique.
this.getSpellAbility().addEffect(new HealingTechniqueEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
}

View file

@ -28,7 +28,7 @@ public final class IllGottenGains extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}");
// Exile Ill-Gotten Gains.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// Each player discards their hand,
this.getSpellAbility().addEffect(new DiscardHandAllEffect());

View file

@ -23,7 +23,7 @@ public final class InspiringRefrain extends CardImpl {
// Draw two cards. Exile Inspiring Refrain with three time counters on it.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addEffect(new AddCountersSourceEffect(
CounterType.TIME.createInstance(), StaticValue.get(3), false, true
).setText("with 3 time counters on it"));

View file

@ -33,7 +33,7 @@ public final class KarnsTemporalSundering extends CardImpl {
this.getSpellAbility().addEffect(new KarnsTemporalSunderingEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addTarget(new TargetNonlandPermanent(0, 1, false));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private KarnsTemporalSundering(final KarnsTemporalSundering card) {

View file

@ -31,7 +31,7 @@ public final class LivingWish extends CardImpl {
this.getSpellAbility().addEffect(new WishEffect(filter));
// Exile Living Wish.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private LivingWish(final LivingWish card) {

View file

@ -34,12 +34,12 @@ public final class MizzixsMastery extends CardImpl {
this.getSpellAbility().addEffect(new MizzixsMasteryEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(
new FilterInstantOrSorceryCard("card that's an instant or sorcery from your graveyard")));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// Overload {5}{R}{R}{R}
Ability ability = new OverloadAbility(this, new MizzixsMasteryOverloadEffect(),
new ManaCostsImpl("{5}{R}{R}{R}"));
ability.addEffect(ExileSpellEffect.getInstance());
ability.addEffect(new ExileSpellEffect());
this.addAbility(ability);
}

View file

@ -32,7 +32,7 @@ public final class MnemonicBetrayal extends CardImpl {
this.getSpellAbility().addEffect(new MnemonicBetrayalExileEffect());
// Exile Mnemonic Betrayal.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private MnemonicBetrayal(final MnemonicBetrayal card) {

View file

@ -26,7 +26,7 @@ public final class MnemonicDeluge extends CardImpl {
// Exile target instant or sorcery card from a graveyard. Copy that card three times. You may cast the copies without paying their mana costs. Exile Mnemonic Deluge.
this.getSpellAbility().addEffect(new MnemonicDelugeEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY));
}

View file

@ -39,7 +39,7 @@ public final class NecromanticSelection extends CardImpl {
// Destroy all creatures, then return a creature card put into a graveyard this way to the battlefield under your control. It's a black Zombie in addition to its other colors and types. Exile Necromantic Selection.
this.getSpellAbility().addEffect(new NecromanticSelectionEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}

View file

@ -35,7 +35,7 @@ public final class NostalgicDreams extends CardImpl {
this.getSpellAbility().setTargetAdjuster(NostalgicDreamsAdjuster.instance);
// Exile Nostalgic Dreams.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private NostalgicDreams(final NostalgicDreams card) {

View file

@ -85,17 +85,17 @@ class OnceAndFutureEffect extends OneShotEffect {
}
if (card2 == null) {
player.putInHand(card1, game);
return ExileSpellEffect.getInstance().apply(game, source);
return new ExileSpellEffect().apply(game, source);
}
if (AdamantCondition.GREEN.apply(game, source)) {
Cards cards = new CardsImpl();
cards.add(card1);
cards.add(card2);
player.moveCards(cards, Zone.HAND, source, game);
return ExileSpellEffect.getInstance().apply(game, source);
return new ExileSpellEffect().apply(game, source);
}
player.putInHand(card1, game);
player.putCardsOnTopOfLibrary(new CardsImpl(card2), game, source, false);
return ExileSpellEffect.getInstance().apply(game, source);
return new ExileSpellEffect().apply(game, source);
}
}

View file

@ -34,7 +34,7 @@ public final class OnceMoreWithFeeling extends CardImpl {
effect.setText(", then draws seven cards");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new SetPlayerLifeAllEffect(10));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// DCI ruling A deck can have only one card named Once More with Feeling.
// (according to rule 112.6m, this shouldn't do anything)

View file

@ -20,7 +20,7 @@ public final class PartTheWaterveil extends CardImpl {
// Take an extra turn after this one. Exile Part the Waterveil.
this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// Awaken 6-{6}{U}{U}{U}
this.addAbility(new AwakenAbility(this, 6, "{6}{U}{U}{U}"));

View file

@ -83,7 +83,7 @@ public final class PestilentCauldron extends ModalDoubleFacesCard {
// Return up to two target creature, land, and/or planeswalker cards from your graveyard to your hand. Each player gains 4 life. Exile Restorative Burst.
this.getRightHalfCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getRightHalfCard().getSpellAbility().addEffect(new RestorativeBurstEffect());
this.getRightHalfCard().getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getRightHalfCard().getSpellAbility().addEffect(new ExileSpellEffect());
this.getRightHalfCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, filter));
}

View file

@ -27,7 +27,7 @@ public final class PraetorsCounsel extends CardImpl {
// Return all cards from your graveyard to your hand. Exile Praetor's Counsel. You have no maximum hand size for the rest of the game.
this.getSpellAbility().addEffect(new PraetorsCounselEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addEffect(new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, HandSizeModification.SET));
}

View file

@ -40,7 +40,7 @@ public final class PullFromTheDeep extends CardImpl {
effect.setTargetPointer(new SecondTargetPointer());
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0,1,filterSorcery));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private PullFromTheDeep(final PullFromTheDeep card) {

View file

@ -39,7 +39,7 @@ public final class RallyTheAncestors extends CardImpl {
// Return each creature card with converted mana cost X or less from your graveyard to the battlefield.
// Exile those creatures at the beginning of your next upkeep. Exile Rally the Ancestors.
this.getSpellAbility().addEffect(new RallyTheAncestorsEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private RallyTheAncestors(final RallyTheAncestors card) {

View file

@ -28,7 +28,7 @@ public final class RealityStrobe extends CardImpl {
// Return target permanent to its owner's hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
// Exile Reality Strobe
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// with three time counters on it.
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), StaticValue.get(3), false, true);
effect.setText("with 3 time counters on it");

View file

@ -65,6 +65,6 @@ class ReapThePastEffect extends OneShotEffect {
cards.remove(cards.getRandom(game));
}
player.moveCards(cards, Zone.HAND, source, game);
return ExileSpellEffect.getInstance().apply(game, source);
return new ExileSpellEffect().apply(game, source);
}
}

View file

@ -29,7 +29,7 @@ public final class Recall extends CardImpl {
// Discard X cards, then return a card from your graveyard to your hand for each card discarded this way.
this.getSpellAbility().addEffect(new RecallEffect());
// Exile Recall.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private Recall(final Recall card) {

View file

@ -55,7 +55,7 @@ public final class ReconstructHistory extends CardImpl {
));
// Exile Reconstruct History.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private ReconstructHistory(final ReconstructHistory card) {

View file

@ -64,7 +64,7 @@ public final class RescueFromTheUnderworld extends CardImpl {
this.getSpellAbility().addEffect(new RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(new RescueFromTheUnderworldDelayedTriggeredAbility()));
Target target = new TargetCardInYourGraveyard(new FilterCreatureCard("creature card in your graveyard"));
this.getSpellAbility().addTarget(target);
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private RescueFromTheUnderworld(final RescueFromTheUnderworld card) {

View file

@ -25,7 +25,7 @@ public final class Restock extends CardImpl {
effect.setText("Return two target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(2, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private Restock(final Restock card) {

View file

@ -27,7 +27,7 @@ public final class RevivalExperiment extends CardImpl {
// For each permanent type, return up to one card of that type from your graveyard to the battlefield. You lose 3 life for each card returned this way. Exile Revival Experiment.
this.getSpellAbility().addEffect(new RevivalExperimentEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private RevivalExperiment(final RevivalExperiment card) {

View file

@ -30,7 +30,7 @@ public final class RousingRefrain extends CardImpl {
// Add {R} for each card in target opponent's hand. Until end of turn, you don't lose this mana as steps and phases end. Exile Rousing Refrain with three time counters on it.
this.getSpellAbility().addEffect(new RousingRefrainEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addEffect(new AddCountersSourceEffect(
CounterType.TIME.createInstance(), StaticValue.get(3), false, true
).setText("with 3 time counters on it"));

View file

@ -28,7 +28,7 @@ public final class SeedsOfRenewal extends CardImpl {
effect.setText("Return up to two target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, StaticFilters.FILTER_CARD_FROM_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}

View file

@ -48,7 +48,7 @@ public final class Spelltwine extends CardImpl {
this.getSpellAbility().addEffect(new SpelltwineEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addTarget(new TargetCardInOpponentsGraveyard(filter2));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}

View file

@ -27,7 +27,7 @@ public final class StunningReversal extends CardImpl {
this.getSpellAbility().addEffect(new StunningReversalEffect());
// Exile Stunning Reversal.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private StunningReversal(final StunningReversal card) {

View file

@ -39,7 +39,7 @@ public final class TeferisProtection extends CardImpl {
this.getSpellAbility().addEffect(new TeferisProtectionPhaseOutEffect());
// Exile Teferi's Protection.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private TeferisProtection(final TeferisProtection card) {

View file

@ -21,7 +21,7 @@ public final class TemporalMastery extends CardImpl {
// Take an extra turn after this one. Exile Temporal Mastery.
this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
// Miracle {1}{U}
this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{1}{U}")));

View file

@ -22,7 +22,7 @@ public final class TemporalTrespass extends CardImpl {
this.addAbility(new DelveAbility());
// Take an extra turn after this one. Exile Temporal Trespass.
this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private TemporalTrespass(final TemporalTrespass card) {

View file

@ -30,7 +30,7 @@ public final class TheGreatAurora extends CardImpl {
// Each player shuffles all cards from their hand and all permanents they own into their library, then draws that many cards. Each player may put any number of land cards from their hand onto the battlefield. Exile The Great Aurora.
this.getSpellAbility().addEffect(new TheGreatAuroraEffect());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private TheGreatAurora(final TheGreatAurora card) {

View file

@ -24,7 +24,7 @@ public final class TimeReversal extends CardImpl {
Effect effect = new DrawCardAllEffect(7);
effect.setText(", then draws seven cards");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private TimeReversal(final TimeReversal card) {

View file

@ -26,7 +26,7 @@ public final class TimeSpiral extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
// Exile Time Spiral. Each player shuffles their graveyard and hand into their library, then draws seven cards. You untap up to six lands.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
this.getSpellAbility().addEffect(new TimeSpiralEffect());
Effect effect = new DrawCardAllEffect(7);
effect.setText(", then draws seven cards");

View file

@ -23,7 +23,7 @@ public final class TreasuredFind extends CardImpl {
// Return target card from your graveyard to your hand. Exile Treasured Find.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private TreasuredFind(final TreasuredFind card) {

View file

@ -31,7 +31,7 @@ public final class VengefulRebirth extends CardImpl {
this.getSpellAbility().addEffect(new VengefulRebirthEffect());
// Exile Vengeful Rebirth.
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private VengefulRebirth(final VengefulRebirth card) {

View file

@ -28,7 +28,7 @@ public final class VividRevival extends CardImpl {
// Return up to three target multicolor cards from your graveyard to your hand. Exile Vivid Revival.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 3, filter));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private VividRevival(final VividRevival card) {

View file

@ -31,7 +31,7 @@ public final class VolcanicVision extends CardImpl {
// Return target instant or sorcery card from your graveyard to your hand. Volcanic Visions deals damage equal to that card's converted mana cost to each creature your opponents control. Exile Volcanic Vision.
this.getSpellAbility().addEffect(new VolcanicVisionReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard")));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private VolcanicVision(final VolcanicVision card) {

View file

@ -29,7 +29,7 @@ public final class WildestDreams extends CardImpl {
effect.setText("Return X target cards from your graveyard to your hand");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().setTargetAdjuster(WildestDreamsAdjuster.instance);
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private WildestDreams(final WildestDreams card) {

View file

@ -30,7 +30,7 @@ public final class WoodlandGuidance extends CardImpl {
this.getSpellAbility().addEffect(new DoIfClashWonEffect(new UntapAllLandsControllerEffect(new FilterLandPermanent(SubType.FOREST, "Forests"))));
// Remove WoodlandGuidance from the game
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private WoodlandGuidance(final WoodlandGuidance card) {

View file

@ -22,7 +22,7 @@ public final class WorstFears extends CardImpl {
// You control target player during that player's next turn. Exile Worst Fears. (You see all cards that player could see and make all decisions for that player.)
this.getSpellAbility().addEffect(new ControlTargetPlayerNextTurnEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private WorstFears(final WorstFears card) {

View file

@ -48,7 +48,7 @@ public final class YawgmothsVileOffering extends CardImpl {
this.getSpellAbility().addEffect(new YawgmothsVileOfferingEffect());
this.getSpellAbility().addTarget(new TargetCardInGraveyard(0, 1, cardFilter));
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker(0, 1, new FilterCreatureOrPlaneswalkerPermanent(), false));
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
this.getSpellAbility().addEffect(new ExileSpellEffect());
}
private YawgmothsVileOffering(final YawgmothsVileOffering card) {

View file

@ -1,9 +1,7 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.MageSingleton;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
@ -13,37 +11,29 @@ import mage.players.Player;
/**
* @author BetaSteward_at_googlemail.com
*/
public class ExileSpellEffect extends OneShotEffect implements MageSingleton {
private static final ExileSpellEffect instance = new ExileSpellEffect();
public static ExileSpellEffect getInstance() {
return instance;
}
public class ExileSpellEffect extends OneShotEffect {
private ExileSpellEffect() {
super(Outcome.Exile);
staticText = "Exile {this}";
}
private ExileSpellEffect(final ExileSpellEffect effect) {
super(effect);
}
@Override
public ExileSpellEffect copy() {
return instance;
return new ExileSpellEffect();
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Spell spell = game.getStack().getSpell(source.getId());
if (spell != null) {
Card spellCard = spell.getCard();
if (spellCard != null) {
controller.moveCards(spellCard, Zone.EXILED, source, game);
}
}
Spell spell = game.getStack().getSpell(source.getId());
if (controller == null || spell == null) {
return true;
}
return false;
return controller.moveCards(spell.getCard(), Zone.EXILED, source, game);
}
}