From 97b887112256d87d5d5e17f75ca3dfcd625c4093 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 22 Apr 2021 09:50:22 -0400 Subject: [PATCH] text fix for ReturnFromGraveyardToBattlefieldTargetEffect --- .../mage/cards/a/ArchonOfFallingStars.java | 2 +- .../src/mage/cards/a/ArgivianRestoration.java | 2 +- .../mage/cards/c/ChampionOfStraySouls.java | 10 +++--- Mage.Sets/src/mage/cards/c/CoffinPuppets.java | 2 +- .../src/mage/cards/c/CustodiSoulcaller.java | 3 +- Mage.Sets/src/mage/cards/d/DefyDeath.java | 2 +- Mage.Sets/src/mage/cards/d/DreadReturn.java | 2 +- .../src/mage/cards/e/EntreatTheDead.java | 5 ++- Mage.Sets/src/mage/cards/e/EverAfter.java | 2 +- Mage.Sets/src/mage/cards/f/FatedReturn.java | 2 +- Mage.Sets/src/mage/cards/f/FaultRiders.java | 2 +- .../src/mage/cards/g/GoblinEngineer.java | 2 +- .../src/mage/cards/h/HellsCaretaker.java | 2 +- .../src/mage/cards/i/InkEyesServantOfOni.java | 2 +- .../src/mage/cards/i/InscriptionOfRuin.java | 2 +- .../src/mage/cards/j/JourneyForTheElixir.java | 2 +- .../mage/cards/k/KardursViciousReturn.java | 2 +- .../cards/l/LilianaDefiantNecromancer.java | 2 +- .../src/mage/cards/m/MarchFromTheTomb.java | 2 +- .../src/mage/cards/o/ObsessiveStitcher.java | 2 +- .../mage/cards/p/ProclamationOfRebirth.java | 2 +- .../src/mage/cards/p/ProfaneCommand.java | 2 +- .../src/mage/cards/r/RecurringNightmare.java | 2 +- .../src/mage/cards/r/RenegadeRallier.java | 2 +- Mage.Sets/src/mage/cards/r/Rethink.java | 2 +- Mage.Sets/src/mage/cards/r/Reveillark.java | 2 +- Mage.Sets/src/mage/cards/r/RhysticCave.java | 2 +- .../src/mage/cards/r/RhythmicWaterVortex.java | 2 +- Mage.Sets/src/mage/cards/r/RiseAgain.java | 2 +- .../src/mage/cards/s/SalvagingStation.java | 2 +- Mage.Sets/src/mage/cards/s/Scaretiller.java | 2 +- .../src/mage/cards/s/ScionOfDarkness.java | 2 +- .../src/mage/cards/s/ShepherdOfTheCosmos.java | 2 +- .../src/mage/cards/s/SilentSentinel.java | 13 ++++---- .../src/mage/cards/s/SilverquillCommand.java | 2 +- .../src/mage/cards/s/StarfieldOfNyx.java | 4 +-- Mage.Sets/src/mage/cards/s/SunTitan.java | 2 +- .../mage/cards/t/TheCauldronOfEternity.java | 2 +- Mage.Sets/src/mage/cards/t/TriassicEgg.java | 3 +- Mage.Sets/src/mage/cards/u/UnburialRites.java | 2 +- Mage.Sets/src/mage/cards/u/Unearth.java | 2 +- Mage.Sets/src/mage/cards/v/VigorMortis.java | 2 +- ...romGraveyardToBattlefieldTargetEffect.java | 31 +++++++++---------- 43 files changed, 67 insertions(+), 74 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfFallingStars.java b/Mage.Sets/src/mage/cards/a/ArchonOfFallingStars.java index 0e32d828501..6d21ccd3c21 100644 --- a/Mage.Sets/src/mage/cards/a/ArchonOfFallingStars.java +++ b/Mage.Sets/src/mage/cards/a/ArchonOfFallingStars.java @@ -33,7 +33,7 @@ public final class ArchonOfFallingStars extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Archon of Falling Stars dies, you may return target enchantment card from your graveyard to the battlefield. - Ability ability = new DiesSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), true); + Ability ability = new DiesSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArgivianRestoration.java b/Mage.Sets/src/mage/cards/a/ArgivianRestoration.java index 3e8845c32b0..9b555630301 100644 --- a/Mage.Sets/src/mage/cards/a/ArgivianRestoration.java +++ b/Mage.Sets/src/mage/cards/a/ArgivianRestoration.java @@ -18,7 +18,7 @@ public final class ArgivianRestoration extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); // Return target artifact card from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); } diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java index 45168297c1e..be43b08456e 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java @@ -1,4 +1,3 @@ - package mage.cards.c; import mage.MageInt; @@ -16,6 +15,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.AnotherPredicate; @@ -51,11 +51,11 @@ public final class ChampionOfStraySouls extends CardImpl { */ // {3}{B}{B}, {T}, Sacrifice X other creatures: Return X target creatures from your graveyard to the battlefield. Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); - effect.setText("Return X target creatures from your graveyard to the battlefield"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{B}{B}")); + effect.setText("Return X target creature cards from your graveyard to the battlefield"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{3}{B}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeXTargetCost(filter)); - ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + ability.addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_CREATURES_YOUR_GRAVEYARD)); ability.setTargetAdjuster(ChampionOfStraySoulsAdjuster.instance); this.addAbility(ability); @@ -88,4 +88,4 @@ enum ChampionOfStraySoulsAdjuster implements TargetAdjuster { } } } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/c/CoffinPuppets.java b/Mage.Sets/src/mage/cards/c/CoffinPuppets.java index 9e1b2b5d197..67c9fde117c 100644 --- a/Mage.Sets/src/mage/cards/c/CoffinPuppets.java +++ b/Mage.Sets/src/mage/cards/c/CoffinPuppets.java @@ -29,7 +29,7 @@ public final class CoffinPuppets extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control a Swamp"); private static final FilterControlledPermanent filter2 - = new FilterControlledLandPermanent("two lands"); + = new FilterControlledLandPermanent("lands"); static { filter.add(SubType.SWAMP.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java b/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java index d43f233aa26..96697093d0d 100644 --- a/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java +++ b/Mage.Sets/src/mage/cards/c/CustodiSoulcaller.java @@ -41,9 +41,8 @@ public final class CustodiSoulcaller extends CardImpl { this.addAbility(new MeleeAbility()); // Whenever Custodi Soulcaller attacks, return target creature card with converted mana cost X or less from your graveyard to the battlefield, where X is the number of players you attacked with a creature this combat. - Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false); + Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect().setText("return target creature card with mana value X or less from your graveyard to the battlefield, where X is the number of players you attacked this combat"), false); ability.addWatcher(new CustodiSoulcallerWatcher()); - ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card with mana value X or less from your graveyard, where X is the number of players you attacked with a creature this combat"))); ability.setTargetAdjuster(CustodiSoulcallerAdjuster.instance); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DefyDeath.java b/Mage.Sets/src/mage/cards/d/DefyDeath.java index 9691efd5771..a9e0f111bf0 100644 --- a/Mage.Sets/src/mage/cards/d/DefyDeath.java +++ b/Mage.Sets/src/mage/cards/d/DefyDeath.java @@ -25,7 +25,7 @@ public final class DefyDeath extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); // Return target creature card from your graveyard to the battlefield. If it's an Angel, put two +1/+1 counters on it. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addEffect(new DefyDeathEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); } diff --git a/Mage.Sets/src/mage/cards/d/DreadReturn.java b/Mage.Sets/src/mage/cards/d/DreadReturn.java index ddb3591049f..f68946f58a0 100644 --- a/Mage.Sets/src/mage/cards/d/DreadReturn.java +++ b/Mage.Sets/src/mage/cards/d/DreadReturn.java @@ -26,7 +26,7 @@ public final class DreadReturn extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); // Return target creature card from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); // Flashback-Sacrifice three creatures. diff --git a/Mage.Sets/src/mage/cards/e/EntreatTheDead.java b/Mage.Sets/src/mage/cards/e/EntreatTheDead.java index 44c51c62339..0781e016ba6 100644 --- a/Mage.Sets/src/mage/cards/e/EntreatTheDead.java +++ b/Mage.Sets/src/mage/cards/e/EntreatTheDead.java @@ -25,12 +25,11 @@ public final class EntreatTheDead extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{B}{B}{B}"); // Return X target creature cards from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(1, StaticFilters.FILTER_CARD_CREATURE)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText("return X target creature cards from your graveyard to the battlefield")); this.getSpellAbility().setTargetAdjuster(EntreatTheDeadAdjuster.instance); // Miracle {X}{B}{B} - this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{X}{B}{B}"))); + this.addAbility(new MiracleAbility(this, new ManaCostsImpl<>("{X}{B}{B}"))); } private EntreatTheDead(final EntreatTheDead card) { diff --git a/Mage.Sets/src/mage/cards/e/EverAfter.java b/Mage.Sets/src/mage/cards/e/EverAfter.java index dd2297a21e2..f27e9391d4d 100644 --- a/Mage.Sets/src/mage/cards/e/EverAfter.java +++ b/Mage.Sets/src/mage/cards/e/EverAfter.java @@ -23,7 +23,7 @@ public final class EverAfter extends CardImpl { // Return up to two target creature cards from your graveyard to the battlefield. Each of those creatures is a black Zombie in addition // to its other colors and types. Put Ever After on the bottom of its owner's library. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard"))); Effect effect = new BecomesBlackZombieAdditionEffect(); effect.setText("Each of those creatures is a black Zombie in addition to its other colors and types"); diff --git a/Mage.Sets/src/mage/cards/f/FatedReturn.java b/Mage.Sets/src/mage/cards/f/FatedReturn.java index 4546ee620cf..17ef52dd54e 100644 --- a/Mage.Sets/src/mage/cards/f/FatedReturn.java +++ b/Mage.Sets/src/mage/cards/f/FatedReturn.java @@ -31,7 +31,7 @@ public final class FatedReturn extends CardImpl { this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom, "It gains indestructible")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, - "If it's your turn, scry 2 (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)")); + "If it's your turn, scry 2. (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)")); this.getSpellAbility().addHint(MyTurnHint.instance); } diff --git a/Mage.Sets/src/mage/cards/f/FaultRiders.java b/Mage.Sets/src/mage/cards/f/FaultRiders.java index aca1563c68d..8ec58194fea 100644 --- a/Mage.Sets/src/mage/cards/f/FaultRiders.java +++ b/Mage.Sets/src/mage/cards/f/FaultRiders.java @@ -39,7 +39,7 @@ public final class FaultRiders extends CardImpl { effect, new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); - effect.setText("and gains first strike"); + effect.setText("and gains first strike until end of turn"); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinEngineer.java b/Mage.Sets/src/mage/cards/g/GoblinEngineer.java index e06230255d1..c17f3450b66 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinEngineer.java +++ b/Mage.Sets/src/mage/cards/g/GoblinEngineer.java @@ -53,7 +53,7 @@ public final class GoblinEngineer extends CardImpl { // {R}, {T}, Sacrifice an artifact: Return target artifact card with converted mana cost 3 or less from your graveyard to the battlefield. Ability ability = new SimpleActivatedAbility( - new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ManaCostsImpl("{R}") + new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{R}") ); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); diff --git a/Mage.Sets/src/mage/cards/h/HellsCaretaker.java b/Mage.Sets/src/mage/cards/h/HellsCaretaker.java index deb906c923b..7de49f99068 100644 --- a/Mage.Sets/src/mage/cards/h/HellsCaretaker.java +++ b/Mage.Sets/src/mage/cards/h/HellsCaretaker.java @@ -34,7 +34,7 @@ public final class HellsCaretaker extends CardImpl { // {tap}, Sacrifice a creature: Return target creature card from your graveyard to the battlefield. Activate this ability only during your upkeep. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, - new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), + new ReturnFromGraveyardToBattlefieldTargetEffect(), new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP), null); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); diff --git a/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java b/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java index 11b1eb68511..2ad0b5c7ba0 100644 --- a/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java +++ b/Mage.Sets/src/mage/cards/i/InkEyesServantOfOni.java @@ -99,6 +99,6 @@ class InkEyesServantOfOniTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever {this} deals combat damage to a player, " + "you may put target creature card from that player's " - + "graveyard onto the battlefield under your control"; + + "graveyard onto the battlefield under your control."; } } diff --git a/Mage.Sets/src/mage/cards/i/InscriptionOfRuin.java b/Mage.Sets/src/mage/cards/i/InscriptionOfRuin.java index e2d4c696131..c91c0060892 100644 --- a/Mage.Sets/src/mage/cards/i/InscriptionOfRuin.java +++ b/Mage.Sets/src/mage/cards/i/InscriptionOfRuin.java @@ -48,7 +48,7 @@ public final class InscriptionOfRuin extends CardImpl { this.getSpellAbility().addTarget(new TargetOpponent()); // • Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. - Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect()); mode.addTarget(new TargetCardInYourGraveyard(filter)); this.getSpellAbility().addMode(mode); diff --git a/Mage.Sets/src/mage/cards/j/JourneyForTheElixir.java b/Mage.Sets/src/mage/cards/j/JourneyForTheElixir.java index 550ec8c23e0..3051f4f1189 100644 --- a/Mage.Sets/src/mage/cards/j/JourneyForTheElixir.java +++ b/Mage.Sets/src/mage/cards/j/JourneyForTheElixir.java @@ -31,7 +31,7 @@ public final class JourneyForTheElixir extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); // Search your library and graveyard for a basic land card and a card named Jiang Yanggu, reveal them, put them into your hand, then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new JourneyForTheElixirLibraryTarget())); + this.getSpellAbility().addEffect(new JourneyForTheElixirEffect()); } private JourneyForTheElixir(final JourneyForTheElixir card) { diff --git a/Mage.Sets/src/mage/cards/k/KardursViciousReturn.java b/Mage.Sets/src/mage/cards/k/KardursViciousReturn.java index 58290c0b11a..36ff9e8d073 100644 --- a/Mage.Sets/src/mage/cards/k/KardursViciousReturn.java +++ b/Mage.Sets/src/mage/cards/k/KardursViciousReturn.java @@ -56,7 +56,7 @@ public final class KardursViciousReturn extends CardImpl { // III — Return target creature card from your graveyard to the battlefield. // Put a +1/+1 counter on it. It gains haste until your next turn. Effects effects = new Effects( - new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), + new ReturnFromGraveyardToBattlefieldTargetEffect(), new AddCountersTargetEffect(CounterType.P1P1.createInstance()) .setText("Put a +1/+1 counter on it"), new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn) diff --git a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java index cd16582fde8..53587507f17 100644 --- a/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LilianaDefiantNecromancer.java @@ -50,7 +50,7 @@ public final class LilianaDefiantNecromancer extends CardImpl { this.addAbility(new LoyaltyAbility(new DiscardEachPlayerEffect(1, false), 2)); // -X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield. - Ability ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + Ability ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); ability.addTarget(new TargetCardInYourGraveyard(filter)); ability.setTargetAdjuster(LilianaDefiantNecromancerAdjuster.instance); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/MarchFromTheTomb.java b/Mage.Sets/src/mage/cards/m/MarchFromTheTomb.java index c006b945d82..9288987ed6b 100644 --- a/Mage.Sets/src/mage/cards/m/MarchFromTheTomb.java +++ b/Mage.Sets/src/mage/cards/m/MarchFromTheTomb.java @@ -28,7 +28,7 @@ public final class MarchFromTheTomb extends CardImpl { // Return any number of target Ally creature cards with total converted mana cost of 8 or less from your graveyard to the battlefield. Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); - effect.setText("Return any number of target Ally creature cards with total mana value of 8 or less from your graveyard to the battlefield"); + effect.setText("Return any number of target Ally creature cards with total mana value 8 or less from your graveyard to the battlefield"); this.getSpellAbility().addEffect(effect); FilterCard filter = new FilterCreatureCard(); filter.add(SubType.ALLY.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/o/ObsessiveStitcher.java b/Mage.Sets/src/mage/cards/o/ObsessiveStitcher.java index 27a4904513f..53b024c014d 100644 --- a/Mage.Sets/src/mage/cards/o/ObsessiveStitcher.java +++ b/Mage.Sets/src/mage/cards/o/ObsessiveStitcher.java @@ -35,7 +35,7 @@ public final class ObsessiveStitcher extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new TapSourceCost())); // {2}{U}{B}, {T}, Sacrifice Obsessive Stitcher: Return target creature card from your graveyard to the battlefield. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ManaCostsImpl("{2}{U}{B}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{2}{U}{B}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); diff --git a/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java b/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java index 9bf85466637..e45cba5a1a1 100644 --- a/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java +++ b/Mage.Sets/src/mage/cards/p/ProclamationOfRebirth.java @@ -31,7 +31,7 @@ public final class ProclamationOfRebirth extends CardImpl { // Return up to three target creature cards with converted mana cost 1 or less from your graveyard to the battlefield. this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 3, filter3)); - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); // Forecast - {5}{W}, Reveal Proclamation of Rebirth from your hand: Return target creature card with converted mana cost 1 or less from your graveyard to the battlefield. ForecastAbility ability = new ForecastAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{5}{W}")); diff --git a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java index 694961c93f6..04d7d0ce49b 100644 --- a/Mage.Sets/src/mage/cards/p/ProfaneCommand.java +++ b/Mage.Sets/src/mage/cards/p/ProfaneCommand.java @@ -47,7 +47,7 @@ public final class ProfaneCommand extends CardImpl { // * Return target creature card with converted mana cost X or less from your graveyard to the battlefield. Mode mode = new Mode(); - mode.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + mode.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); mode.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card with mana value X or less from your graveyard"))); this.getSpellAbility().addMode(mode); diff --git a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java index 6a82489060f..b0ff7867537 100644 --- a/Mage.Sets/src/mage/cards/r/RecurringNightmare.java +++ b/Mage.Sets/src/mage/cards/r/RecurringNightmare.java @@ -26,7 +26,7 @@ public final class RecurringNightmare extends CardImpl { // Sacrifice a creature, Return Recurring Nightmare to its owner's hand: Return target creature card from your graveyard to the battlefield. Activate this ability only any time you could cast a sorcery. Ability ability = new ActivateAsSorceryActivatedAbility( Zone.BATTLEFIELD, - new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), + new ReturnFromGraveyardToBattlefieldTargetEffect(), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)) ); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java index 655ccb7de04..f3a0bfc3595 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java @@ -44,7 +44,7 @@ public final class RenegadeRallier extends CardImpl { Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new ReturnFromGraveyardToBattlefieldTargetEffect(), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" - + " the battlefield this turn, return target permanent card with mana value 2 or less from your graveyard to your battlefield."); + + " the battlefield this turn, return target permanent card with mana value 2 or less from your graveyard to the battlefield."); ability.setAbilityWord(AbilityWord.REVOLT); ability.addTarget(new TargetCardInYourGraveyard(filter)); ability.addWatcher(new RevoltWatcher()); diff --git a/Mage.Sets/src/mage/cards/r/Rethink.java b/Mage.Sets/src/mage/cards/r/Rethink.java index 0337ad7836b..a750eda58f1 100644 --- a/Mage.Sets/src/mage/cards/r/Rethink.java +++ b/Mage.Sets/src/mage/cards/r/Rethink.java @@ -42,7 +42,7 @@ class RethinkEffect extends OneShotEffect { RethinkEffect() { super(Outcome.Detriment); - this.staticText = "Counter target spell unless that player pays {X}, where X is its mana value"; + this.staticText = "Counter target spell unless its controller pays {X}, where X is its mana value"; } RethinkEffect(final RethinkEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/Reveillark.java b/Mage.Sets/src/mage/cards/r/Reveillark.java index 373a8a7b629..e7dc662a6d6 100644 --- a/Mage.Sets/src/mage/cards/r/Reveillark.java +++ b/Mage.Sets/src/mage/cards/r/Reveillark.java @@ -38,7 +38,7 @@ public final class Reveillark extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Reveillark leaves the battlefield, return up to two target creature cards with power 2 or less from your graveyard to the battlefield. - Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), false); + Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false); ability.addTarget(new TargetCardInYourGraveyard(0,2,filter)); this.addAbility(ability); // Evoke {5}{W} diff --git a/Mage.Sets/src/mage/cards/r/RhysticCave.java b/Mage.Sets/src/mage/cards/r/RhysticCave.java index 5b6f885f5e9..ea347ae91b4 100644 --- a/Mage.Sets/src/mage/cards/r/RhysticCave.java +++ b/Mage.Sets/src/mage/cards/r/RhysticCave.java @@ -85,7 +85,7 @@ class RhysticCaveManaEffect extends ManaEffect { public RhysticCaveManaEffect() { super(); - this.staticText = "Choose a color. Add one mana of that color "; + this.staticText = "Choose a color. Add one mana of that color"; } public RhysticCaveManaEffect(final RhysticCaveManaEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RhythmicWaterVortex.java b/Mage.Sets/src/mage/cards/r/RhythmicWaterVortex.java index 8b9ead0b1a0..18c722bc35b 100644 --- a/Mage.Sets/src/mage/cards/r/RhythmicWaterVortex.java +++ b/Mage.Sets/src/mage/cards/r/RhythmicWaterVortex.java @@ -30,7 +30,7 @@ public final class RhythmicWaterVortex extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); // Search your library and/or graveyard for a card named Mu Yanling, reveal it, and put it into your hand. If you searched your library this way, shuffle it. - this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect(filter)); + this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect(filter).concatBy("
")); } private RhythmicWaterVortex(final RhythmicWaterVortex card) { diff --git a/Mage.Sets/src/mage/cards/r/RiseAgain.java b/Mage.Sets/src/mage/cards/r/RiseAgain.java index 11e7c1e6a8b..a87bc573962 100644 --- a/Mage.Sets/src/mage/cards/r/RiseAgain.java +++ b/Mage.Sets/src/mage/cards/r/RiseAgain.java @@ -18,7 +18,7 @@ public final class RiseAgain extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); // Return target creature card from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); } diff --git a/Mage.Sets/src/mage/cards/s/SalvagingStation.java b/Mage.Sets/src/mage/cards/s/SalvagingStation.java index f6c1c25102a..f2adc872eca 100644 --- a/Mage.Sets/src/mage/cards/s/SalvagingStation.java +++ b/Mage.Sets/src/mage/cards/s/SalvagingStation.java @@ -36,7 +36,7 @@ public final class SalvagingStation extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); // {tap}: Return target noncreature artifact card with converted mana cost 1 or less from your graveyard to the battlefield. - Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new TapSourceCost()); + Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new TapSourceCost()); secondAbility.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(secondAbility); // Whenever a creature dies, you may untap Salvaging Station. diff --git a/Mage.Sets/src/mage/cards/s/Scaretiller.java b/Mage.Sets/src/mage/cards/s/Scaretiller.java index bca852d03fe..e12a8c1ba03 100644 --- a/Mage.Sets/src/mage/cards/s/Scaretiller.java +++ b/Mage.Sets/src/mage/cards/s/Scaretiller.java @@ -37,7 +37,7 @@ public final class Scaretiller extends CardImpl { )); // • Return target land card from your graveyard to the battlefield tapped. - Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect(true, false)); + Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect(true)); mode.addTarget(new TargetCardInYourGraveyard(filter)); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java b/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java index dc53d5fa91b..1db5653daab 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfDarkness.java @@ -95,6 +95,6 @@ class ScionOfDarknessTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever {this} deals combat damage to a player, " + "you may put target creature card from that player's " - + "graveyard onto the battlefield under your control"; + + "graveyard onto the battlefield under your control."; } } diff --git a/Mage.Sets/src/mage/cards/s/ShepherdOfTheCosmos.java b/Mage.Sets/src/mage/cards/s/ShepherdOfTheCosmos.java index c3e67d8cd43..f62ecd723f0 100644 --- a/Mage.Sets/src/mage/cards/s/ShepherdOfTheCosmos.java +++ b/Mage.Sets/src/mage/cards/s/ShepherdOfTheCosmos.java @@ -43,7 +43,7 @@ public final class ShepherdOfTheCosmos extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Shepherd of the Cosmos enters the battlefield, return target permanent card with converted mana cost 2 or less from your graveyard to the battlefield. - Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SilentSentinel.java b/Mage.Sets/src/mage/cards/s/SilentSentinel.java index 96c00185675..9eef6dfd099 100644 --- a/Mage.Sets/src/mage/cards/s/SilentSentinel.java +++ b/Mage.Sets/src/mage/cards/s/SilentSentinel.java @@ -1,7 +1,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -11,24 +10,24 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; import mage.filter.FilterCard; -import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class SilentSentinel extends CardImpl { private static final FilterCard filter = new FilterCard("enchantment card from your graveyard"); + static { filter.add(CardType.ENCHANTMENT.getPredicate()); - filter.add(TargetController.YOU.getOwnerPredicate()); } public SilentSentinel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); this.subtype.add(SubType.ARCHON); this.power = new MageInt(4); @@ -38,7 +37,7 @@ public final class SilentSentinel extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield. Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); - ability.addTarget(new TargetCardInGraveyard(filter)); + ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SilverquillCommand.java b/Mage.Sets/src/mage/cards/s/SilverquillCommand.java index aea201b4180..4543da487ee 100644 --- a/Mage.Sets/src/mage/cards/s/SilverquillCommand.java +++ b/Mage.Sets/src/mage/cards/s/SilverquillCommand.java @@ -53,7 +53,7 @@ public final class SilverquillCommand extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // • Return target creature card with mana value 2 or less from your graveyard to the battlefield. - Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect()); mode.addTarget(new TargetCardInYourGraveyard(filter)); this.getSpellAbility().addMode(mode); diff --git a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java index 0ee86cc2455..76f698f279c 100644 --- a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java +++ b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java @@ -19,6 +19,7 @@ import mage.filter.predicate.mageobject.AnotherPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; /** * @@ -41,7 +42,6 @@ public final class StarfieldOfNyx extends CardImpl { static { filterGraveyardEnchantment.add(CardType.ENCHANTMENT.getPredicate()); - filterGraveyardEnchantment.add(TargetController.YOU.getOwnerPredicate()); } public StarfieldOfNyx(UUID ownerId, CardSetInfo setInfo) { @@ -51,7 +51,7 @@ public final class StarfieldOfNyx extends CardImpl { // from your graveyard to the battlefield. Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), TargetController.YOU, true); - ability.addTarget(new TargetCardInGraveyard(filterGraveyardEnchantment)); + ability.addTarget(new TargetCardInYourGraveyard(filterGraveyardEnchantment)); this.addAbility(ability); // As long as you control five or more enchantments, each other non-Aura enchantment diff --git a/Mage.Sets/src/mage/cards/s/SunTitan.java b/Mage.Sets/src/mage/cards/s/SunTitan.java index 0b05acc9d6a..4d1ba790262 100644 --- a/Mage.Sets/src/mage/cards/s/SunTitan.java +++ b/Mage.Sets/src/mage/cards/s/SunTitan.java @@ -39,7 +39,7 @@ public final class SunTitan extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // Whenever Sun Titan enters the battlefield or attacks, you may return target permanent card with converted mana cost 3 or less from your graveyard to the battlefield. - Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), true); + Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TheCauldronOfEternity.java b/Mage.Sets/src/mage/cards/t/TheCauldronOfEternity.java index 2aca28116c2..a1d627c1de4 100644 --- a/Mage.Sets/src/mage/cards/t/TheCauldronOfEternity.java +++ b/Mage.Sets/src/mage/cards/t/TheCauldronOfEternity.java @@ -48,7 +48,7 @@ public final class TheCauldronOfEternity extends CardImpl { // {2}{B}, {T}, Pay 2 life: Return target creature card from your graveyard to the battlefield. Activate this ability only any time you could cast a sorcery. ability = new ActivateAsSorceryActivatedAbility( - Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ManaCostsImpl("{2}{B}") + Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{2}{B}") ); ability.addCost(new TapSourceCost()); ability.addCost(new PayLifeCost(2)); diff --git a/Mage.Sets/src/mage/cards/t/TriassicEgg.java b/Mage.Sets/src/mage/cards/t/TriassicEgg.java index 926ed0ec1dd..c6e283da8ff 100644 --- a/Mage.Sets/src/mage/cards/t/TriassicEgg.java +++ b/Mage.Sets/src/mage/cards/t/TriassicEgg.java @@ -42,8 +42,7 @@ public final class TriassicEgg extends CardImpl { ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A), new SacrificeSourceCost(), - new SourceHasCounterCondition(CounterType.HATCHLING, 2, Integer.MAX_VALUE), - "Sacrifice Triassic Egg: Choose one - You may put a creature card from your hand onto the battlefield; or return target creature card from your graveyard to the battlefield. Activate only if two or more hatchling counters are on {this}."); + new SourceHasCounterCondition(CounterType.HATCHLING, 2, Integer.MAX_VALUE)); // or return target creature card from your graveyard to the battlefield. Activate this ability only if two or more hatchling counters are on Triassic Egg. Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/u/UnburialRites.java b/Mage.Sets/src/mage/cards/u/UnburialRites.java index 6cf5a696e18..222d344b74b 100644 --- a/Mage.Sets/src/mage/cards/u/UnburialRites.java +++ b/Mage.Sets/src/mage/cards/u/UnburialRites.java @@ -21,7 +21,7 @@ public final class UnburialRites extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); // Return target creature card from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); // Flashback {3}{W} diff --git a/Mage.Sets/src/mage/cards/u/Unearth.java b/Mage.Sets/src/mage/cards/u/Unearth.java index 3ef2db8354f..a764d042f4b 100644 --- a/Mage.Sets/src/mage/cards/u/Unearth.java +++ b/Mage.Sets/src/mage/cards/u/Unearth.java @@ -31,7 +31,7 @@ public final class Unearth extends CardImpl { // Return target creature card with converted mana cost 3 or less from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); // Cycling {2} diff --git a/Mage.Sets/src/mage/cards/v/VigorMortis.java b/Mage.Sets/src/mage/cards/v/VigorMortis.java index 72da7a8f615..5be2dccf0c1 100644 --- a/Mage.Sets/src/mage/cards/v/VigorMortis.java +++ b/Mage.Sets/src/mage/cards/v/VigorMortis.java @@ -33,7 +33,7 @@ public final class VigorMortis extends CardImpl { this.getSpellAbility().addEffect(new VigorMortisReplacementEffect()); // has to be added before the moving effect this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addEffect(new InfoEffect("If {G} was spent to cast this spell, that creature enters the battlefield with an additional +1/+1 counter on it")); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE)); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java index b86191c5155..860bfef7ed2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToBattlefieldTargetEffect.java @@ -9,6 +9,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.Target; +import mage.target.common.TargetCardInYourGraveyard; import mage.util.CardUtil; import java.util.HashSet; @@ -20,27 +21,20 @@ import java.util.UUID; */ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect { - private boolean tapped; - private boolean showUnderControlText = false; + private final boolean tapped; public ReturnFromGraveyardToBattlefieldTargetEffect() { this(false); } public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped) { - this(tapped, true); - } - - public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped, boolean showUnderControlText) { super(Outcome.PutCreatureInPlay); this.tapped = tapped; - this.showUnderControlText = showUnderControlText; } - public ReturnFromGraveyardToBattlefieldTargetEffect(final ReturnFromGraveyardToBattlefieldTargetEffect effect) { + protected ReturnFromGraveyardToBattlefieldTargetEffect(final ReturnFromGraveyardToBattlefieldTargetEffect effect) { super(effect); this.tapped = effect.tapped; - this.showUnderControlText = effect.showUnderControlText; } @Override @@ -71,24 +65,27 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect return staticText; } StringBuilder sb = new StringBuilder(); - + boolean yourGrave = !mode.getTargets().isEmpty() + && mode.getTargets().get(0) instanceof TargetCardInYourGraveyard; + sb.append(yourGrave ? "return " : "put "); if (mode.getTargets().isEmpty()) { - sb.append("return target creature to the battlefield"); + sb.append("target creature"); } else { Target target = mode.getTargets().get(0); - sb.append("return "); if (target.getMaxNumberOfTargets() > 1) { if (target.getMaxNumberOfTargets() != target.getNumberOfTargets()) { sb.append("up to "); } sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' '); } - sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" to the battlefield"); - if (tapped) { - sb.append(" tapped"); - } + sb.append("target ").append(mode.getTargets().get(0).getTargetName()); } - if (showUnderControlText) { + sb.append(yourGrave ? " to" : " onto"); + sb.append(" the battlefield"); + if (tapped) { + sb.append(" tapped"); + } + if (!yourGrave) { sb.append(" under your control"); } return sb.toString();