diff --git a/Mage.Sets/src/mage/cards/b/BurningWish.java b/Mage.Sets/src/mage/cards/b/BurningWish.java index 39f191083a..e94879b444 100644 --- a/Mage.Sets/src/mage/cards/b/BurningWish.java +++ b/Mage.Sets/src/mage/cards/b/BurningWish.java @@ -16,7 +16,7 @@ import mage.filter.FilterCard; */ public final class BurningWish extends CardImpl { - private static final FilterCard filter = new FilterCard("a sorcery card"); + private static final FilterCard filter = new FilterCard("sorcery card"); static { filter.add(CardType.SORCERY.getPredicate()); @@ -25,7 +25,7 @@ public final class BurningWish extends CardImpl { public BurningWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); - // You may choose a sorcery card you own from outside the game, reveal that card, and put it into your hand. + // You may reveal a sorcery card you own from outside the game and put it into your hand. this.getSpellAbility().addEffect(new WishEffect(filter)); this.getSpellAbility().addHint(OpenSideboardHint.instance); diff --git a/Mage.Sets/src/mage/cards/c/CoaxFromTheBlindEternities.java b/Mage.Sets/src/mage/cards/c/CoaxFromTheBlindEternities.java index 8c94e73125..a38308132f 100644 --- a/Mage.Sets/src/mage/cards/c/CoaxFromTheBlindEternities.java +++ b/Mage.Sets/src/mage/cards/c/CoaxFromTheBlindEternities.java @@ -16,7 +16,7 @@ import mage.filter.FilterCard; */ public final class CoaxFromTheBlindEternities extends CardImpl { - private static final FilterCard filter = new FilterCard("an Eldrazi card"); + private static final FilterCard filter = new FilterCard("Eldrazi card"); static { filter.add(SubType.ELDRAZI.getPredicate()); @@ -25,8 +25,10 @@ public final class CoaxFromTheBlindEternities extends CardImpl { public CoaxFromTheBlindEternities(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); - // You may choose an Eldrazi card you own from outside the game or in exile, reveal that card, and put it into your hand. - this.getSpellAbility().addEffect(new WishEffect(filter, true, true)); + // You may reveal an Eldrazi card you own from outside the game + // or choose a face-up Eldrazi card you own in exile. + // Put that card into your hand. + this.getSpellAbility().addEffect(new WishEffect(filter, true)); this.getSpellAbility().addHint(OpenSideboardHint.instance); } diff --git a/Mage.Sets/src/mage/cards/c/CunningWish.java b/Mage.Sets/src/mage/cards/c/CunningWish.java index 1b085f99d3..67b48cde31 100644 --- a/Mage.Sets/src/mage/cards/c/CunningWish.java +++ b/Mage.Sets/src/mage/cards/c/CunningWish.java @@ -16,7 +16,7 @@ import mage.filter.FilterCard; */ public final class CunningWish extends CardImpl { - private static final FilterCard filter = new FilterCard("an instant card"); + private static final FilterCard filter = new FilterCard("instant card"); static { filter.add(CardType.INSTANT.getPredicate()); @@ -25,7 +25,7 @@ public final class CunningWish extends CardImpl { public CunningWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); - // You may choose an instant card you own from outside the game, reveal that card, and put it into your hand. + // You may reveal an instant card you own from outside the game and put it into your hand. this.getSpellAbility().addEffect(new WishEffect(filter)); this.getSpellAbility().addHint(OpenSideboardHint.instance); diff --git a/Mage.Sets/src/mage/cards/d/DeathWish.java b/Mage.Sets/src/mage/cards/d/DeathWish.java index 526112d3cf..16a8e5661c 100644 --- a/Mage.Sets/src/mage/cards/d/DeathWish.java +++ b/Mage.Sets/src/mage/cards/d/DeathWish.java @@ -7,7 +7,6 @@ import mage.abilities.hint.common.OpenSideboardHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.StaticFilters; import java.util.UUID; @@ -19,8 +18,8 @@ public final class DeathWish extends CardImpl { public DeathWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); - // You may choose a card you own from outside the game and put it into your hand. - this.getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A, false)); + // You may put a card you own from outside the game into your hand. + this.getSpellAbility().addEffect(new WishEffect()); this.getSpellAbility().addHint(OpenSideboardHint.instance); // You lose half your life, rounded up. diff --git a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java index ab1a4ce465..2dac6ad521 100644 --- a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java +++ b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java @@ -45,7 +45,7 @@ public final class FaeOfWishes extends AdventureCard { this.addAbility(ability); // Granted - // You may choose a noncreature card you own from outside the game, reveal it, and put it into your hand. + // You may reveal a noncreature card you own from outside the game and put it into your hand. this.getSpellCard().getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_CREATURE)); this.getSpellCard().getSpellAbility().addHint(OpenSideboardHint.instance); } diff --git a/Mage.Sets/src/mage/cards/g/GlitteringWish.java b/Mage.Sets/src/mage/cards/g/GlitteringWish.java index 4faed70214..f9f6bab8f6 100644 --- a/Mage.Sets/src/mage/cards/g/GlitteringWish.java +++ b/Mage.Sets/src/mage/cards/g/GlitteringWish.java @@ -17,7 +17,7 @@ import mage.filter.predicate.mageobject.MulticoloredPredicate; */ public final class GlitteringWish extends CardImpl { - private static final FilterCard filter = new FilterCard("a multicolored card"); + private static final FilterCard filter = new FilterCard("multicolored card"); static { filter.add(MulticoloredPredicate.instance); @@ -26,7 +26,7 @@ public final class GlitteringWish extends CardImpl { public GlitteringWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{W}"); - // You may choose a multicolored card you own from outside the game, reveal that card, and put it into your hand. + // You may reveal a multicolored card you own from outside the game and put it into your hand. this.getSpellAbility().addEffect(new WishEffect(filter)); this.getSpellAbility().addHint(OpenSideboardHint.instance); diff --git a/Mage.Sets/src/mage/cards/g/GoldenWish.java b/Mage.Sets/src/mage/cards/g/GoldenWish.java index b7e35b52e1..b38b7c2f9a 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenWish.java +++ b/Mage.Sets/src/mage/cards/g/GoldenWish.java @@ -17,7 +17,7 @@ import mage.filter.predicate.Predicates; */ public final class GoldenWish extends CardImpl { - private static final FilterCard filter = new FilterCard("an artifact or enchantment card"); + private static final FilterCard filter = new FilterCard("artifact or enchantment card"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/cards/k/KarnTheGreatCreator.java b/Mage.Sets/src/mage/cards/k/KarnTheGreatCreator.java index 9b03477534..a65402c901 100644 --- a/Mage.Sets/src/mage/cards/k/KarnTheGreatCreator.java +++ b/Mage.Sets/src/mage/cards/k/KarnTheGreatCreator.java @@ -48,9 +48,9 @@ public final class KarnTheGreatCreator extends CardImpl { ability.addTarget(new TargetPermanent(0, 1, filter, false)); this.addAbility(ability); - // -2: You may choose an artifact card you own from outside the game or in exile, reveal that card, and put it into your hand. + // -2: You may reveal an artifact card you own from outside the game or choose a face-up artifact card you own in exile. Put that card into your hand. this.addAbility(new LoyaltyAbility(new WishEffect( - StaticFilters.FILTER_CARD_ARTIFACT_AN, true, true + StaticFilters.FILTER_CARD_ARTIFACT, true ), -2).addHint(OpenSideboardHint.instance)); } diff --git a/Mage.Sets/src/mage/cards/l/LegionAngel.java b/Mage.Sets/src/mage/cards/l/LegionAngel.java index c9ed5e7a01..28de6e5040 100644 --- a/Mage.Sets/src/mage/cards/l/LegionAngel.java +++ b/Mage.Sets/src/mage/cards/l/LegionAngel.java @@ -37,7 +37,7 @@ public final class LegionAngel extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Legion Angel enters the battlefield, you may reveal a card you own named Legion Angel from outside the game and put it into your hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new WishEffect(filter, true, false) + this.addAbility(new EntersBattlefieldTriggeredAbility(new WishEffect(filter) .setText("you may reveal a card you own named Legion Angel from outside the game and put it into your hand")) .addHint(OpenSideboardHint.instance)); } diff --git a/Mage.Sets/src/mage/cards/l/LivingWish.java b/Mage.Sets/src/mage/cards/l/LivingWish.java index b6c62a9977..908e848bd4 100644 --- a/Mage.Sets/src/mage/cards/l/LivingWish.java +++ b/Mage.Sets/src/mage/cards/l/LivingWish.java @@ -17,7 +17,7 @@ import mage.filter.predicate.Predicates; */ public final class LivingWish extends CardImpl { - private static final FilterCard filter = new FilterCard("a creature or land card"); + private static final FilterCard filter = new FilterCard("creature or land card"); static { filter.add(Predicates.or( @@ -28,7 +28,7 @@ public final class LivingWish extends CardImpl { public LivingWish(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); - // You may choose a creature or land card you own from outside the game, reveal that card, and put it into your hand. + // You may reveal a creature or land card you own from outside the game and put it into your hand. this.getSpellAbility().addEffect(new WishEffect(filter)); this.getSpellAbility().addHint(OpenSideboardHint.instance); diff --git a/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java b/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java index d1324c9b0c..8957f7fea2 100644 --- a/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java +++ b/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java @@ -7,7 +7,6 @@ import mage.abilities.hint.common.OpenSideboardHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; import java.util.UUID; @@ -24,9 +23,8 @@ public final class MastermindsAcquisition extends CardImpl { // Search your library for a card and put that card into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary())); - // Choose a card you own from outside the game and put it into your hand. - Mode mode = new Mode(new WishEffect(StaticFilters.FILTER_CARD_A, false) - .setText("Put a card you own from outside the game into your hand")); + // Put a card you own from outside the game into your hand. + Mode mode = new Mode(new WishEffect().setText("put a card you own from outside the game into your hand")); this.getSpellAbility().addMode(mode); this.getSpellAbility().addHint(OpenSideboardHint.instance); } diff --git a/Mage.Sets/src/mage/cards/r/RingOfMaruf.java b/Mage.Sets/src/mage/cards/r/RingOfMaruf.java index b0e284423d..2abb2ffaa2 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfMaruf.java +++ b/Mage.Sets/src/mage/cards/r/RingOfMaruf.java @@ -16,7 +16,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.FilterCard; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; @@ -68,7 +67,7 @@ class RingOfMarufEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - new WishEffect(new FilterCard(), false).apply(game, source); + new WishEffect().apply(game, source); this.discard(); return true; } diff --git a/Mage.Sets/src/mage/cards/t/TheRavensWarning.java b/Mage.Sets/src/mage/cards/t/TheRavensWarning.java index f6aeef0abb..2f70aca27d 100644 --- a/Mage.Sets/src/mage/cards/t/TheRavensWarning.java +++ b/Mage.Sets/src/mage/cards/t/TheRavensWarning.java @@ -15,7 +15,6 @@ import mage.constants.SubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; @@ -50,7 +49,7 @@ public final class TheRavensWarning extends CardImpl { // III — You may put a card you own from outside the game on top of your library. sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, - new WishEffect(StaticFilters.FILTER_CARD_A, false, false, true) + new WishEffect(true) ); sagaAbility.addHint(OpenSideboardHint.instance); this.addAbility(sagaAbility); diff --git a/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java b/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java index 1bab419d82..ac170c7e55 100644 --- a/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java +++ b/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java @@ -58,8 +58,8 @@ public final class VivienArkbowRanger extends CardImpl { ability.addTarget(new TargetCreatureOrPlaneswalker()); this.addAbility(ability); - // −5: You may choose a creature card you own from outside the game, reveal it, and put it into your hand. - this.addAbility(new LoyaltyAbility(new WishEffect(StaticFilters.FILTER_CARD_CREATURE_A), -5) + // −5: You may reveal a creature card you own from outside the game and put it into your hand. + this.addAbility(new LoyaltyAbility(new WishEffect(StaticFilters.FILTER_CARD_CREATURE), -5) .addHint(OpenSideboardHint.instance)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/WishEffect.java b/Mage/src/main/java/mage/abilities/effects/common/WishEffect.java index e40c35439c..7c6e46de9b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/WishEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/WishEffect.java @@ -9,9 +9,11 @@ import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; +import mage.util.CardUtil; import java.util.List; import java.util.Set; @@ -24,35 +26,41 @@ public class WishEffect extends OneShotEffect { private final FilterCard filter; private final boolean reveal; private final boolean alsoFromExile; - private final String choiceText; private final boolean topOfLibrary; + private final String choiceText; + + public WishEffect() { + this(false); + } + + public WishEffect(boolean topOfLibrary) { + super(Outcome.DrawCard); + this.filter = StaticFilters.FILTER_CARD; + this.reveal = false; + this.alsoFromExile = false; + this.topOfLibrary = topOfLibrary; + choiceText = "Put a card you own from outside the game " + + (topOfLibrary ? "on top of your library?" : "into your hand?"); + staticText = "You may " + Character.toLowerCase(choiceText.charAt(0)) + choiceText.substring(1, choiceText.length() - 1); + } public WishEffect(FilterCard filter) { - this(filter, true); + this(filter, false); } - public WishEffect(FilterCard filter, boolean reveal) { - this(filter, reveal, false); + public WishEffect(FilterCard filter, boolean alsoFromExile) { + this(filter, alsoFromExile, false); } - public WishEffect(FilterCard filter, boolean reveal, boolean alsoFromExile) { - this(filter, reveal, alsoFromExile, false); - } - - public WishEffect(FilterCard filter, boolean reveal, boolean alsoFromExile, boolean topOfLibrary) { + public WishEffect(FilterCard filter, boolean alsoFromExile, boolean topOfLibrary) { super(Outcome.DrawCard); this.filter = filter; + this.reveal = true; this.alsoFromExile = alsoFromExile; - this.reveal = reveal; this.topOfLibrary = topOfLibrary; - if (!reveal) { - choiceText = "Put a card you own from outside the game " - + (topOfLibrary ? "on top of your library." : "into your hand."); - } else { - choiceText = (topOfLibrary ? "Put " : "Reveal ") + filter.getMessage() + " you own from outside the game" - + (alsoFromExile ? " or choose " + makeExileText(filter) - + " you own in exile. Put that card into your hand." : " and put it into your hand."); - } + choiceText = "Reveal " + CardUtil.addArticle(filter.getMessage()) + " you own from outside the game " + + (alsoFromExile ? "or choose " + makeExileText(filter) + " you own in exile. Put that card" : "and put it") + + (topOfLibrary ? " on top of your library?" : " into your hand?"); staticText = "You may " + Character.toLowerCase(choiceText.charAt(0)) + choiceText.substring(1, choiceText.length() - 1); } @@ -69,10 +77,10 @@ public class WishEffect extends OneShotEffect { public WishEffect(final WishEffect effect) { super(effect); this.filter = effect.filter; - this.alsoFromExile = effect.alsoFromExile; this.reveal = effect.reveal; - this.choiceText = effect.choiceText; + this.alsoFromExile = effect.alsoFromExile; this.topOfLibrary = effect.topOfLibrary; + this.choiceText = effect.choiceText; } @Override