text fix for ReturnFromGraveyardToBattlefieldTargetEffect

This commit is contained in:
Evan Kranzler 2021-04-22 09:50:22 -04:00
parent f7340a946e
commit 97b8871122
43 changed files with 67 additions and 74 deletions

View file

@ -33,7 +33,7 @@ public final class ArchonOfFallingStars extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Archon of Falling Stars dies, you may return target enchantment card from your graveyard to the battlefield. // 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)); ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -18,7 +18,7 @@ public final class ArgivianRestoration extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}");
// Return target artifact card from your graveyard to the battlefield. // 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"))); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard")));
} }

View file

@ -1,4 +1,3 @@
package mage.cards.c; package mage.cards.c;
import mage.MageInt; import mage.MageInt;
@ -16,6 +15,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.AnotherPredicate; 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. // {3}{B}{B}, {T}, Sacrifice X other creatures: Return X target creatures from your graveyard to the battlefield.
Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
effect.setText("Return X target creatures from your graveyard to the battlefield"); 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 ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{3}{B}{B}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeXTargetCost(filter)); 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); ability.setTargetAdjuster(ChampionOfStraySoulsAdjuster.instance);
this.addAbility(ability); this.addAbility(ability);
@ -88,4 +88,4 @@ enum ChampionOfStraySoulsAdjuster implements TargetAdjuster {
} }
} }
} }
} }

View file

@ -29,7 +29,7 @@ public final class CoffinPuppets extends CardImpl {
private static final FilterControlledPermanent filter private static final FilterControlledPermanent filter
= new FilterControlledPermanent("you control a Swamp"); = new FilterControlledPermanent("you control a Swamp");
private static final FilterControlledPermanent filter2 private static final FilterControlledPermanent filter2
= new FilterControlledLandPermanent("two lands"); = new FilterControlledLandPermanent("lands");
static { static {
filter.add(SubType.SWAMP.getPredicate()); filter.add(SubType.SWAMP.getPredicate());

View file

@ -41,9 +41,8 @@ public final class CustodiSoulcaller extends CardImpl {
this.addAbility(new MeleeAbility()); 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. // 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.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); ability.setTargetAdjuster(CustodiSoulcallerAdjuster.instance);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -25,7 +25,7 @@ public final class DefyDeath extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); 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. // 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().addEffect(new DefyDeathEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
} }

View file

@ -26,7 +26,7 @@ public final class DreadReturn extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
// Return target creature card from your graveyard to the battlefield. // 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)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Flashback-Sacrifice three creatures. // Flashback-Sacrifice three creatures.

View file

@ -25,12 +25,11 @@ public final class EntreatTheDead extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{B}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{B}{B}{B}");
// Return X target creature cards from your graveyard to the battlefield. // Return X target creature cards from your graveyard to the battlefield.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText("return X target creature cards from your graveyard to the battlefield"));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(1, StaticFilters.FILTER_CARD_CREATURE));
this.getSpellAbility().setTargetAdjuster(EntreatTheDeadAdjuster.instance); this.getSpellAbility().setTargetAdjuster(EntreatTheDeadAdjuster.instance);
// Miracle {X}{B}{B} // 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) { private EntreatTheDead(final EntreatTheDead card) {

View file

@ -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 // 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. // 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"))); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard")));
Effect effect = new BecomesBlackZombieAdditionEffect(); Effect effect = new BecomesBlackZombieAdditionEffect();
effect.setText("Each of those creatures is a black Zombie in addition to its other colors and types"); effect.setText("Each of those creatures is a black Zombie in addition to its other colors and types");

View file

@ -31,7 +31,7 @@ public final class FatedReturn extends CardImpl {
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom, this.getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom,
"It gains indestructible")); "It gains indestructible"));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance, this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.instance,
"If it's your turn, scry 2 <i>(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.)</i>")); "If it's your turn, scry 2. <i>(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.)</i>"));
this.getSpellAbility().addHint(MyTurnHint.instance); this.getSpellAbility().addHint(MyTurnHint.instance);
} }

View file

@ -39,7 +39,7 @@ public final class FaultRiders extends CardImpl {
effect, effect,
new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))));
effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); 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); ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -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. // {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( Ability ability = new SimpleActivatedAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ManaCostsImpl("{R}") new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{R}")
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));

View file

@ -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. // {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, Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ReturnFromGraveyardToBattlefieldTargetEffect(),
new TapSourceCost(), new TapSourceCost(),
new IsStepCondition(PhaseStep.UPKEEP), null); new IsStepCondition(PhaseStep.UPKEEP), null);
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));

View file

@ -99,6 +99,6 @@ class InkEyesServantOfOniTriggeredAbility extends TriggeredAbilityImpl {
public String getRule() { public String getRule() {
return "Whenever {this} deals combat damage to a player, " return "Whenever {this} deals combat damage to a player, "
+ "you may put target creature card from that player's " + "you may put target creature card from that player's "
+ "graveyard onto the battlefield under your control"; + "graveyard onto the battlefield under your control.";
} }
} }

View file

@ -48,7 +48,7 @@ public final class InscriptionOfRuin extends CardImpl {
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
// Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. // 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)); mode.addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);

View file

@ -31,7 +31,7 @@ public final class JourneyForTheElixir extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); 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. // 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) { private JourneyForTheElixir(final JourneyForTheElixir card) {

View file

@ -56,7 +56,7 @@ public final class KardursViciousReturn extends CardImpl {
// III Return target creature card from your graveyard to the battlefield. // 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. // Put a +1/+1 counter on it. It gains haste until your next turn.
Effects effects = new Effects( Effects effects = new Effects(
new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ReturnFromGraveyardToBattlefieldTargetEffect(),
new AddCountersTargetEffect(CounterType.P1P1.createInstance()) new AddCountersTargetEffect(CounterType.P1P1.createInstance())
.setText("Put a +1/+1 counter on it"), .setText("Put a +1/+1 counter on it"),
new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn) new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn)

View file

@ -50,7 +50,7 @@ public final class LilianaDefiantNecromancer extends CardImpl {
this.addAbility(new LoyaltyAbility(new DiscardEachPlayerEffect(1, false), 2)); 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. // -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.addTarget(new TargetCardInYourGraveyard(filter));
ability.setTargetAdjuster(LilianaDefiantNecromancerAdjuster.instance); ability.setTargetAdjuster(LilianaDefiantNecromancerAdjuster.instance);
this.addAbility(ability); this.addAbility(ability);

View file

@ -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. // 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 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); this.getSpellAbility().addEffect(effect);
FilterCard filter = new FilterCreatureCard(); FilterCard filter = new FilterCreatureCard();
filter.add(SubType.ALLY.getPredicate()); filter.add(SubType.ALLY.getPredicate());

View file

@ -35,7 +35,7 @@ public final class ObsessiveStitcher extends CardImpl {
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new TapSourceCost())); 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. // {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 TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));

View file

@ -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. // 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().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. // 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}")); ForecastAbility ability = new ForecastAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{5}{W}"));

View file

@ -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. // * Return target creature card with converted mana cost X or less from your graveyard to the battlefield.
Mode mode = new Mode(); 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"))); mode.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card with mana value X or less from your graveyard")));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);

View file

@ -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. // 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( Ability ability = new ActivateAsSorceryActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), new ReturnFromGraveyardToBattlefieldTargetEffect(),
new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)) new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT))
); );
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));

View file

@ -44,7 +44,7 @@ public final class RenegadeRallier extends CardImpl {
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
new ReturnFromGraveyardToBattlefieldTargetEffect(), false), RevoltCondition.instance, new ReturnFromGraveyardToBattlefieldTargetEffect(), false), RevoltCondition.instance,
"<i>Revolt</i> &mdash; When {this} enters the battlefield, if a permanent you controlled left" "<i>Revolt</i> &mdash; 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.setAbilityWord(AbilityWord.REVOLT);
ability.addTarget(new TargetCardInYourGraveyard(filter)); ability.addTarget(new TargetCardInYourGraveyard(filter));
ability.addWatcher(new RevoltWatcher()); ability.addWatcher(new RevoltWatcher());

View file

@ -42,7 +42,7 @@ class RethinkEffect extends OneShotEffect {
RethinkEffect() { RethinkEffect() {
super(Outcome.Detriment); 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) { RethinkEffect(final RethinkEffect effect) {

View file

@ -38,7 +38,7 @@ public final class Reveillark extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); 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. // 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)); ability.addTarget(new TargetCardInYourGraveyard(0,2,filter));
this.addAbility(ability); this.addAbility(ability);
// Evoke {5}{W} // Evoke {5}{W}

View file

@ -85,7 +85,7 @@ class RhysticCaveManaEffect extends ManaEffect {
public RhysticCaveManaEffect() { public RhysticCaveManaEffect() {
super(); 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) { public RhysticCaveManaEffect(final RhysticCaveManaEffect effect) {

View file

@ -30,7 +30,7 @@ public final class RhythmicWaterVortex extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); 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. // 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("<br>"));
} }
private RhythmicWaterVortex(final RhythmicWaterVortex card) { private RhythmicWaterVortex(final RhythmicWaterVortex card) {

View file

@ -18,7 +18,7 @@ public final class RiseAgain extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Return target creature card from your graveyard to the battlefield. // 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)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
} }

View file

@ -36,7 +36,7 @@ public final class SalvagingStation extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); 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. // {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)); secondAbility.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(secondAbility); this.addAbility(secondAbility);
// Whenever a creature dies, you may untap Salvaging Station. // Whenever a creature dies, you may untap Salvaging Station.

View file

@ -37,7 +37,7 @@ public final class Scaretiller extends CardImpl {
)); ));
// Return target land card from your graveyard to the battlefield tapped. // 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)); mode.addTarget(new TargetCardInYourGraveyard(filter));
ability.addMode(mode); ability.addMode(mode);
this.addAbility(ability); this.addAbility(ability);

View file

@ -95,6 +95,6 @@ class ScionOfDarknessTriggeredAbility extends TriggeredAbilityImpl {
public String getRule() { public String getRule() {
return "Whenever {this} deals combat damage to a player, " return "Whenever {this} deals combat damage to a player, "
+ "you may put target creature card from that player's " + "you may put target creature card from that player's "
+ "graveyard onto the battlefield under your control"; + "graveyard onto the battlefield under your control.";
} }
} }

View file

@ -43,7 +43,7 @@ public final class ShepherdOfTheCosmos extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); 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. // 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)); ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,6 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
@ -11,24 +10,24 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class SilentSentinel extends CardImpl { public final class SilentSentinel extends CardImpl {
private static final FilterCard filter = new FilterCard("enchantment card from your graveyard"); private static final FilterCard filter = new FilterCard("enchantment card from your graveyard");
static { static {
filter.add(CardType.ENCHANTMENT.getPredicate()); filter.add(CardType.ENCHANTMENT.getPredicate());
filter.add(TargetController.YOU.getOwnerPredicate());
} }
public SilentSentinel(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.ARCHON);
this.power = new MageInt(4); this.power = new MageInt(4);
@ -38,7 +37,7 @@ public final class SilentSentinel extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield. // Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield.
Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true); Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
ability.addTarget(new TargetCardInGraveyard(filter)); ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -53,7 +53,7 @@ public final class SilverquillCommand extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Return target creature card with mana value 2 or less from your graveyard to the battlefield. // 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)); mode.addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);

View file

@ -19,6 +19,7 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCardInYourGraveyard;
/** /**
* *
@ -41,7 +42,6 @@ public final class StarfieldOfNyx extends CardImpl {
static { static {
filterGraveyardEnchantment.add(CardType.ENCHANTMENT.getPredicate()); filterGraveyardEnchantment.add(CardType.ENCHANTMENT.getPredicate());
filterGraveyardEnchantment.add(TargetController.YOU.getOwnerPredicate());
} }
public StarfieldOfNyx(UUID ownerId, CardSetInfo setInfo) { public StarfieldOfNyx(UUID ownerId, CardSetInfo setInfo) {
@ -51,7 +51,7 @@ public final class StarfieldOfNyx extends CardImpl {
// from your graveyard to the battlefield. // from your graveyard to the battlefield.
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
new ReturnFromGraveyardToBattlefieldTargetEffect(), TargetController.YOU, true); new ReturnFromGraveyardToBattlefieldTargetEffect(), TargetController.YOU, true);
ability.addTarget(new TargetCardInGraveyard(filterGraveyardEnchantment)); ability.addTarget(new TargetCardInYourGraveyard(filterGraveyardEnchantment));
this.addAbility(ability); this.addAbility(ability);
// As long as you control five or more enchantments, each other non-Aura enchantment // As long as you control five or more enchantments, each other non-Aura enchantment

View file

@ -39,7 +39,7 @@ public final class SunTitan extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); 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. // 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)); ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -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. // {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( 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 TapSourceCost());
ability.addCost(new PayLifeCost(2)); ability.addCost(new PayLifeCost(2));

View file

@ -42,8 +42,7 @@ public final class TriassicEgg extends CardImpl {
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A), new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A),
new SacrificeSourceCost(), new SacrificeSourceCost(),
new SourceHasCounterCondition(CounterType.HATCHLING, 2, Integer.MAX_VALUE), 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}.");
// 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. // 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(); Mode mode = new Mode();

View file

@ -21,7 +21,7 @@ public final class UnburialRites extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Return target creature card from your graveyard to the battlefield. // 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)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// Flashback {3}{W} // Flashback {3}{W}

View file

@ -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. // 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)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
// Cycling {2} // Cycling {2}

View file

@ -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 VigorMortisReplacementEffect()); // has to be added before the moving effect
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); 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().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));
} }

View file

@ -9,6 +9,7 @@ import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCardInYourGraveyard;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.HashSet; import java.util.HashSet;
@ -20,27 +21,20 @@ import java.util.UUID;
*/ */
public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect { public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect {
private boolean tapped; private final boolean tapped;
private boolean showUnderControlText = false;
public ReturnFromGraveyardToBattlefieldTargetEffect() { public ReturnFromGraveyardToBattlefieldTargetEffect() {
this(false); this(false);
} }
public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped) { public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped) {
this(tapped, true);
}
public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped, boolean showUnderControlText) {
super(Outcome.PutCreatureInPlay); super(Outcome.PutCreatureInPlay);
this.tapped = tapped; this.tapped = tapped;
this.showUnderControlText = showUnderControlText;
} }
public ReturnFromGraveyardToBattlefieldTargetEffect(final ReturnFromGraveyardToBattlefieldTargetEffect effect) { protected ReturnFromGraveyardToBattlefieldTargetEffect(final ReturnFromGraveyardToBattlefieldTargetEffect effect) {
super(effect); super(effect);
this.tapped = effect.tapped; this.tapped = effect.tapped;
this.showUnderControlText = effect.showUnderControlText;
} }
@Override @Override
@ -71,24 +65,27 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
return staticText; return staticText;
} }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
boolean yourGrave = !mode.getTargets().isEmpty()
&& mode.getTargets().get(0) instanceof TargetCardInYourGraveyard;
sb.append(yourGrave ? "return " : "put ");
if (mode.getTargets().isEmpty()) { if (mode.getTargets().isEmpty()) {
sb.append("return target creature to the battlefield"); sb.append("target creature");
} else { } else {
Target target = mode.getTargets().get(0); Target target = mode.getTargets().get(0);
sb.append("return ");
if (target.getMaxNumberOfTargets() > 1) { if (target.getMaxNumberOfTargets() > 1) {
if (target.getMaxNumberOfTargets() != target.getNumberOfTargets()) { if (target.getMaxNumberOfTargets() != target.getNumberOfTargets()) {
sb.append("up to "); sb.append("up to ");
} }
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' '); sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
} }
sb.append("target ").append(mode.getTargets().get(0).getTargetName()).append(" to the battlefield"); sb.append("target ").append(mode.getTargets().get(0).getTargetName());
if (tapped) {
sb.append(" tapped");
}
} }
if (showUnderControlText) { sb.append(yourGrave ? " to" : " onto");
sb.append(" the battlefield");
if (tapped) {
sb.append(" tapped");
}
if (!yourGrave) {
sb.append(" under your control"); sb.append(" under your control");
} }
return sb.toString(); return sb.toString();