[TSR] various text fixes

This commit is contained in:
Evan Kranzler 2021-03-05 19:10:29 -05:00
parent bb2e0922ab
commit 6894ad96bc
22 changed files with 153 additions and 169 deletions

View file

@ -26,7 +26,7 @@ public final class CrypticAnnelid extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When Cryptic Annelid enters the battlefield, scry 1, then scry 2, then scry 3. // When Cryptic Annelid enters the battlefield, scry 1, then scry 2, then scry 3.
Ability ability = new EntersBattlefieldTriggeredAbility(new ScryEffect(1)); Ability ability = new EntersBattlefieldTriggeredAbility(new ScryEffect(1).setText("scry 1"));
Effect effect = new ScryEffect(2); Effect effect = new ScryEffect(2);
effect.setText(", then scry 2"); effect.setText(", then scry 2");
ability.addEffect(effect); ability.addEffect(effect);

View file

@ -1,10 +1,10 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.CompositeCost;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -19,22 +19,25 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class CrystalShard extends CardImpl { public final class CrystalShard extends CardImpl {
public CrystalShard(UUID ownerId, CardSetInfo setInfo) { public CrystalShard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// {3}, {tap} or {U}, {tap}: Return target creature to its owner's hand unless its controller pays {1}. // {3}, {tap} or {U}, {tap}: Return target creature to its owner's hand unless its controller pays {1}.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrystalShardEffect(new GenericManaCost(1)), new ManaCostsImpl("{3}")); Ability ability = new SimpleActivatedAbility(
ability.addCost(new TapSourceCost()); new CrystalShardEffect(),
ability.addTarget(new TargetCreaturePermanent()); new OrCost(
this.addAbility(ability); new CompositeCost(new GenericManaCost(3), new TapSourceCost(), ""),
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrystalShardEffect(new GenericManaCost(1)), new ManaCostsImpl("{U}")); new CompositeCost(new ManaCostsImpl("{U}"), new TapSourceCost(), ""),
ability.addCost(new TapSourceCost()); "{3}, {T} or {U}, {T}"
)
);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
} }
@ -51,17 +54,13 @@ public final class CrystalShard extends CardImpl {
class CrystalShardEffect extends OneShotEffect { class CrystalShardEffect extends OneShotEffect {
protected Cost cost; CrystalShardEffect() {
public CrystalShardEffect(Cost cost) {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Return target creature to its owner's hand unless its controller pays {1}"; this.staticText = "return target creature to its owner's hand unless its controller pays {1}";
this.cost = cost;
} }
public CrystalShardEffect(final CrystalShardEffect effect) { private CrystalShardEffect(final CrystalShardEffect effect) {
super(effect); super(effect);
this.cost = effect.cost.copy();
} }
@Override @Override
@ -72,23 +71,19 @@ class CrystalShardEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); if (controller == null || targetCreature == null) {
if (targetCreature != null) {
Player player = game.getPlayer(targetCreature.getControllerId());
if (player != null) {
cost.clearPaid();
final StringBuilder sb = new StringBuilder("Pay {1}? (Otherwise ").append(targetCreature.getName()).append(" will be returned to its owner's hand)");
if (player.chooseUse(Outcome.Benefit, sb.toString(), source, game)) {
cost.pay(source, game, source, targetCreature.getControllerId(), false, null);
}
if (!cost.isPaid()) {
controller.moveCards(targetCreature, Zone.HAND, source, game);
}
}
}
return true; return true;
} }
return false; Player player = game.getPlayer(targetCreature.getControllerId());
if (player == null) {
return true;
}
Cost cost = new GenericManaCost(1);
String message = "Pay {1}? (Otherwise " + targetCreature.getName() + " will be returned to its owner's hand)";
if (player.chooseUse(Outcome.Benefit, message, source, game)) {
cost.pay(source, game, source, targetCreature.getControllerId(), false, null);
}
return cost.isPaid() || controller.moveCards(targetCreature, Zone.HAND, source, game);
} }
} }

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.keyword.FlashbackAbility; import mage.abilities.keyword.FlashbackAbility;
@ -11,23 +9,28 @@ import mage.constants.CardType;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/** /**
*
* @author jonubuu * @author jonubuu
*/ */
public final class DreadReturn extends CardImpl { public final class DreadReturn extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("creatures");
public DreadReturn(UUID ownerId, CardSetInfo setInfo) { public DreadReturn(UUID ownerId, CardSetInfo setInfo) {
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()); this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false));
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.
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3, 3, new FilterControlledCreaturePermanent("three creatures"), true)), TimingRule.SORCERY)); this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, filter)), TimingRule.SORCERY));
} }
private DreadReturn(final DreadReturn card) { private DreadReturn(final DreadReturn card) {

View file

@ -1,10 +1,8 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
@ -14,27 +12,27 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledEnchantmentPermanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class EtherealArmor extends CardImpl { public final class EtherealArmor extends CardImpl {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("enchantment you control"); private static final FilterPermanent filter
= new FilterControlledEnchantmentPermanent("enchantment you control");
static { private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
filter.add(TargetController.YOU.getControllerPredicate());
}
public EtherealArmor (UUID ownerId, CardSetInfo setInfo) { public EtherealArmor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
@ -43,13 +41,16 @@ public final class EtherealArmor extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Enchanted creature gets +1/+1 for each enchantment you control and has first strike. // Enchanted creature gets +1/+1 for each enchantment you control and has first strike.
PermanentsOnBattlefieldCount countEnchantments = new PermanentsOnBattlefieldCount(new FilterEnchantmentPermanent(filter)); ability = new SimpleStaticAbility(new BoostEnchantedEffect(
SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(countEnchantments, countEnchantments, Duration.WhileOnBattlefield)); xValue, xValue, Duration.WhileOnBattlefield
ability2.addEffect(new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA)); ));
this.addAbility(ability2); ability.addEffect(new GainAbilityAttachedEffect(
FirstStrikeAbility.getInstance(), AttachmentType.AURA
).setText("and has first strike"));
this.addAbility(ability);
} }
public EtherealArmor (final EtherealArmor card) { private EtherealArmor(final EtherealArmor card) {
super(card); super(card);
} }
@ -57,5 +58,4 @@ public final class EtherealArmor extends CardImpl {
public EtherealArmor copy() { public EtherealArmor copy() {
return new EtherealArmor(this); return new EtherealArmor(this);
} }
} }

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BecomesTargetTriggeredAbility; import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -11,22 +9,24 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class GossamerPhantasm extends CardImpl { public final class GossamerPhantasm extends CardImpl {
public GossamerPhantasm(UUID ownerId, CardSetInfo setInfo) { public GossamerPhantasm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add(SubType.ILLUSION); this.subtype.add(SubType.ILLUSION);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Gossamer Phantasm becomes the target of a spell or ability, sacrifice it. // When Gossamer Phantasm becomes the target of a spell or ability, sacrifice it.
this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect().setText("sacrifice it")));
} }
private GossamerPhantasm(final GossamerPhantasm card) { private GossamerPhantasm(final GossamerPhantasm card) {

View file

@ -86,6 +86,6 @@ class LostAuramancersAbility extends PutIntoGraveFromBattlefieldSourceTriggeredA
@Override @Override
public String getRule() { public String getRule() {
return "When {this} is put into a graveyard from play, if it had no time counters on it, you may search your library for an enchantment card and put it into play. If you do, shuffle your library."; return "When {this} dies, if it had no time counters on it, you may search your library for an enchantment card and put it onto the battlefield. If you do, shuffle your library.";
} }
} }

View file

@ -1,8 +1,7 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -12,11 +11,11 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class MasterOfThePearlTrident extends CardImpl { public final class MasterOfThePearlTrident extends CardImpl {
@ -28,15 +27,20 @@ public final class MasterOfThePearlTrident extends CardImpl {
} }
public MasterOfThePearlTrident(UUID ownerId, CardSetInfo setInfo) { public MasterOfThePearlTrident(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}");
this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.MERFOLK);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Other Merfolk creatures you control get +1/+1 and have islandwalk. // Other Merfolk creatures you control get +1/+1 and have islandwalk.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IslandwalkAbility(), Duration.WhileOnBattlefield, filter, true))); 1, 1, Duration.WhileOnBattlefield, filter, true
));
ability.addEffect(new GainAbilityControlledEffect(
new IslandwalkAbility(), Duration.WhileOnBattlefield, filter, true
).setText("and have islandwalk"));
this.addAbility(ability);
} }
private MasterOfThePearlTrident(final MasterOfThePearlTrident card) { private MasterOfThePearlTrident(final MasterOfThePearlTrident card) {

View file

@ -43,7 +43,7 @@ class PongifyEffect extends OneShotEffect {
public PongifyEffect() { public PongifyEffect() {
super(Outcome.PutCreatureInPlay); super(Outcome.PutCreatureInPlay);
this.staticText = "That creature's controller creates a 3/3 green Ape creature token"; this.staticText = "Its controller creates a 3/3 green Ape creature token";
} }
public PongifyEffect(final PongifyEffect effect) { public PongifyEffect(final PongifyEffect effect) {

View file

@ -1,7 +1,5 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
@ -10,20 +8,20 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ReadTheBones extends CardImpl { public final class ReadTheBones extends CardImpl {
public ReadTheBones(UUID ownerId, CardSetInfo setInfo) { public ReadTheBones(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Scry 2, then draw two cards. You lose 2 life. // Scry 2, then draw two cards. You lose 2 life.
this.getSpellAbility().addEffect(new ScryEffect(2)); this.getSpellAbility().addEffect(new ScryEffect(2, false));
Effect effect = new DrawCardSourceControllerEffect(2); Effect effect = new DrawCardSourceControllerEffect(2);
effect.setText("then draw two cards"); effect.setText(", then draw two cards");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
} }

View file

@ -58,7 +58,7 @@ class CantCastSerraAvengerEffect extends ContinuousRuleModifyingEffectImpl {
public CantCastSerraAvengerEffect() { public CantCastSerraAvengerEffect() {
super(Duration.WhileOnBattlefield, Outcome.Detriment); super(Duration.WhileOnBattlefield, Outcome.Detriment);
staticText = "You can't cast {this} during your first, second, or third turns of the game"; staticText = "You can't cast this spell during your first, second, or third turns of the game";
} }
public CantCastSerraAvengerEffect(final CantCastSerraAvengerEffect effect) { public CantCastSerraAvengerEffect(final CantCastSerraAvengerEffect effect) {

View file

@ -1,7 +1,6 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
@ -9,27 +8,33 @@ 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.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class TendrilsOfCorruption extends CardImpl { public final class TendrilsOfCorruption extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamp you control"); private static final FilterPermanent filter = new FilterControlledPermanent();
static { static {
filter.add(SubType.SWAMP.getPredicate()); filter.add(SubType.SWAMP.getPredicate());
} }
public TendrilsOfCorruption(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}");
this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); public TendrilsOfCorruption(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue)
.setText("{this} deals X damage to target creature"));
this.getSpellAbility().addEffect(new GainLifeEffect(xValue)
.setText("and you gain X life, where X is the number of Swamps you control"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)));
} }
private TendrilsOfCorruption(final TendrilsOfCorruption card) { private TendrilsOfCorruption(final TendrilsOfCorruption card) {

View file

@ -2,7 +2,6 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.SearchEffect; import mage.abilities.effects.SearchEffect;
@ -10,18 +9,20 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl; 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.ComparisonType; import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/** /**
* @author ayratn * @author ayratn
*/ */
public final class TrinketMage extends CardImpl { public final class TrinketMage extends CardImpl {
private static final FilterCard filter = new FilterCard("artifact card with converted mana cost 1 or less"); private static final FilterCard filter = new FilterCard("an artifact card with converted mana cost 1 or less");
static { static {
filter.add(CardType.ARTIFACT.getPredicate()); filter.add(CardType.ARTIFACT.getPredicate());
@ -29,7 +30,7 @@ public final class TrinketMage extends CardImpl {
} }
public TrinketMage(UUID ownerId, CardSetInfo setInfo) { public TrinketMage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
@ -37,7 +38,7 @@ public final class TrinketMage extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Trinket Mage enters the battlefield, you may search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. If you do, shuffle your library. // When Trinket Mage enters the battlefield, you may search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. If you do, shuffle your library.
TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); TargetCardInLibrary target = new TargetCardInLibrary(filter);
SearchEffect effect = new SearchLibraryPutInHandEffect(target, true, true); SearchEffect effect = new SearchLibraryPutInHandEffect(target, true, true);
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true));
} }

View file

@ -3,8 +3,8 @@ package mage.cards.v;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.AsTurnedFaceUpEffect; import mage.abilities.effects.AsTurnedFaceUpEffect;
@ -39,20 +39,22 @@ public final class VesuvanShapeshifter extends CardImpl {
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
// As Vesuvan Shapeshifter turned face up, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature // As Vesuvan Shapeshifter turned face up, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AsTurnedFaceUpEffect(new VesuvanShapeshifterEffect(), false)); Ability ability = new SimpleStaticAbility(new AsTurnedFaceUpEffect(
new VesuvanShapeshifterEffect(), false
).setText("As {this} enters the battlefield or is turned face up, " +
"you may choose another creature on the battlefield. If you do, " +
"until {this} is turned face down, it becomes a copy of that creature, " +
"except it has \"At the beginning of your upkeep, you may turn this creature face down.\"")
);
ability.setWorksFaceDown(true); ability.setWorksFaceDown(true);
this.addAbility(ability); this.addAbility(ability);
// As Vesuvan Shapeshifter etbs, you may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature // As Vesuvan Shapeshifter etbs, you may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new VesuvanShapeShifterFaceUpCopyApplier()); ability = new AsEntersBattlefieldAbility(new CopyPermanentEffect(
effect.setText("as a copy of any creature on the battlefield until {this} is turned faced down"); StaticFilters.FILTER_PERMANENT_CREATURE, new VesuvanShapeShifterFaceUpCopyApplier()
ability = new EntersBattlefieldAbility(effect, true); ));
ability.setWorksFaceDown(false); ability.setWorksFaceDown(false);
this.addAbility(ability); ability.setRuleVisible(false);
// and has "At the beginning of your upkeep, you may turn this creature face down".
effect = new VesuvanShapeshifterFaceDownEffect();
ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true);
this.addAbility(ability); this.addAbility(ability);
// Morph {1}{U} // Morph {1}{U}
@ -82,12 +84,12 @@ class VesuvanShapeShifterFaceUpCopyApplier extends CopyApplier {
class VesuvanShapeshifterEffect extends OneShotEffect { class VesuvanShapeshifterEffect extends OneShotEffect {
public VesuvanShapeshifterEffect() { VesuvanShapeshifterEffect() {
super(Outcome.Copy); super(Outcome.Copy);
staticText = "have {this} become a copy of a creature, except it has this ability"; staticText = "have {this} become a copy of a creature, except it has this ability";
} }
public VesuvanShapeshifterEffect(final VesuvanShapeshifterEffect effect) { private VesuvanShapeshifterEffect(final VesuvanShapeshifterEffect effect) {
super(effect); super(effect);
} }
@ -123,12 +125,12 @@ class VesuvanShapeshifterEffect extends OneShotEffect {
class VesuvanShapeshifterFaceDownEffect extends OneShotEffect { class VesuvanShapeshifterFaceDownEffect extends OneShotEffect {
public VesuvanShapeshifterFaceDownEffect() { VesuvanShapeshifterFaceDownEffect() {
super(Outcome.Copy); super(Outcome.Copy);
staticText = "have {this} become a morphed, faced down creature"; staticText = "turn this creature face down";
} }
public VesuvanShapeshifterFaceDownEffect(final VesuvanShapeshifterFaceDownEffect effect) { private VesuvanShapeshifterFaceDownEffect(final VesuvanShapeshifterFaceDownEffect effect) {
super(effect); super(effect);
} }
@ -142,25 +144,25 @@ class VesuvanShapeshifterFaceDownEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId()); Permanent permanent = game.getPermanent(source.getSourceId());
if (controller != null && permanent != null) { if (controller == null || permanent == null) {
permanent.removeAllAbilities(source.getSourceId(), game); return false;
}
permanent.removeAllAbilities(source.getSourceId(), game);
// Set any previous copy effects to 'discarded' // Set any previous copy effects to 'discarded'
for (Effect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) { for (Effect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) {
if (effect instanceof CopyEffect) { if (effect instanceof CopyEffect) {
CopyEffect copyEffect = (CopyEffect) effect; CopyEffect copyEffect = (CopyEffect) effect;
if (copyEffect.getSourceId().equals(permanent.getId())) { if (copyEffect.getSourceId().equals(permanent.getId())) {
copyEffect.discard(); copyEffect.discard();
}
} }
} }
permanent.turnFaceDown(source, game, source.getControllerId());
permanent.setManifested(false);
permanent.setMorphed(true);
return permanent.isFaceDown(game);
} }
return false; permanent.turnFaceDown(source, game, source.getControllerId());
permanent.setManifested(false);
permanent.setMorphed(true);
return permanent.isFaceDown(game);
} }
} }

View file

@ -1,43 +1,37 @@
package mage.cards.w; package mage.cards.w;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.turn.AddExtraTurnTargetEffect;
import mage.abilities.keyword.BuybackAbility; import mage.abilities.keyword.BuybackAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
import mage.game.turn.TurnMod;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class WalkTheAeons extends CardImpl { public final class WalkTheAeons extends CardImpl {
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("three Islands"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands");
static { static {
filter.add(SubType.ISLAND.getPredicate()); filter.add(SubType.ISLAND.getPredicate());
} }
public WalkTheAeons(UUID ownerId, CardSetInfo setInfo) { public WalkTheAeons(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
// BuybackSacrifice three Islands. (You may sacrifice three Islands in addition to any other costs as you cast this spell. If you do, put this card into your hand as it resolves.) // BuybackSacrifice three Islands. (You may sacrifice three Islands in addition to any other costs as you cast this spell. If you do, put this card into your hand as it resolves.)
this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(3,3, filter, true)))); this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, filter))));
// Target player takes an extra turn after this one. // Target player takes an extra turn after this one.
this.getSpellAbility().addEffect(new ExtraTurnEffect()); this.getSpellAbility().addEffect(new AddExtraTurnTargetEffect());
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
} }
@ -50,27 +44,3 @@ public final class WalkTheAeons extends CardImpl {
return new WalkTheAeons(this); return new WalkTheAeons(this);
} }
} }
class ExtraTurnEffect extends OneShotEffect {
public ExtraTurnEffect() {
super(Outcome.ExtraTurn);
staticText = "Target player takes an extra turn after this one";
}
public ExtraTurnEffect(final ExtraTurnEffect effect) {
super(effect);
}
@Override
public ExtraTurnEffect copy() {
return new ExtraTurnEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
game.getState().getTurnMods().add(new TurnMod(getTargetPointer().getFirst(game, source), false));
return true;
}
}

View file

@ -56,7 +56,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "ZNR"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "TSR"; // check all abilities and output cards with wrong abilities texts;
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run
private static final HashMap<String, Set<String>> skipCheckLists = new HashMap<>(); private static final HashMap<String, Set<String>> skipCheckLists = new HashMap<>();

View file

@ -20,7 +20,7 @@ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl {
private final SetTargetPointer setTargetPointer; private final SetTargetPointer setTargetPointer;
public BecomesTargetTriggeredAbility(Effect effect) { public BecomesTargetTriggeredAbility(Effect effect) {
this(effect, StaticFilters.FILTER_SPELL_OR_ABILITY); this(effect, StaticFilters.FILTER_SPELL_OR_ABILITY_A);
} }
public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter) { public BecomesTargetTriggeredAbility(Effect effect, FilterStackObject filter) {

View file

@ -39,7 +39,7 @@ public class PactDelayedTriggeredAbility extends DelayedTriggeredAbility {
@Override @Override
public String getRule() { public String getRule() {
return "At the beginning of your next upkeep " + modes.getText(); return "<br>At the beginning of your next upkeep, " + modes.getText();
} }
} }

View file

@ -45,7 +45,7 @@ public class SwitchPowerToughnessTargetEffect extends ContinuousEffectImpl {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Switch target ").append(mode.getTargets().get(0).getTargetName()).append("'s power and toughness") sb.append("switch target ").append(mode.getTargets().get(0).getTargetName()).append("'s power and toughness")
.append(' ').append(duration.toString()); .append(' ').append(duration.toString());
return sb.toString(); return sb.toString();
} }

View file

@ -14,7 +14,7 @@ public class InvestigateEffect extends CreateTokenEffect {
public InvestigateEffect() { public InvestigateEffect() {
super(new ClueArtifactToken()); super(new ClueArtifactToken());
this.staticText = "Investigate. <i>(Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")</i>"; this.staticText = "investigate. <i>(Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
} }
public InvestigateEffect(final InvestigateEffect effect) { public InvestigateEffect(final InvestigateEffect effect) {

View file

@ -138,7 +138,7 @@ public class SuspendAbility extends SpecialAction {
if (cost != null) { if (cost != null) {
sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append("&mdash;") sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append("&mdash;")
.append(cost.getText()).append(suspend .append(cost.getText()).append(suspend
== Integer.MAX_VALUE ? ". X can't be 0" : ""); == Integer.MAX_VALUE ? ". X can't be 0." : "");
if (!shortRule) { if (!shortRule) {
sb.append(" <i>(Rather than cast this card from your hand, pay ") sb.append(" <i>(Rather than cast this card from your hand, pay ")
.append(cost.getText()) .append(cost.getText())

View file

@ -6,9 +6,9 @@ import mage.constants.SuperType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.*; import mage.filter.common.*;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.mageobject.KickedSpellPredicate; import mage.filter.predicate.mageobject.KickedSpellPredicate;
import mage.filter.predicate.mageobject.MulticoloredPredicate; import mage.filter.predicate.mageobject.MulticoloredPredicate;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.AttackingPredicate;
import mage.filter.predicate.permanent.TokenPredicate; import mage.filter.predicate.permanent.TokenPredicate;
@ -559,6 +559,12 @@ public final class StaticFilters {
FILTER_SPELL_OR_ABILITY.setLockedFilter(true); FILTER_SPELL_OR_ABILITY.setLockedFilter(true);
} }
public static final FilterStackObject FILTER_SPELL_OR_ABILITY_A = new FilterStackObject("a spell or ability");
static {
FILTER_SPELL_OR_ABILITY_A.setLockedFilter(true);
}
public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell"); public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell");
static { static {

View file

@ -14,7 +14,7 @@ import mage.abilities.keyword.FlyingAbility;
public final class CloudSpriteToken extends TokenImpl { public final class CloudSpriteToken extends TokenImpl {
public CloudSpriteToken() { public CloudSpriteToken() {
super("Cloud Sprite", "1/1 blue faerie creature token named Cloud Sprite with flying and \"Cloud Sprite can block only creatures with flying.\""); super("Cloud Sprite", "1/1 blue Faerie creature token named Cloud Sprite. It has flying and \"Cloud Sprite can block only creatures with flying.\"");
this.setOriginalExpansionSetCode("FUT"); this.setOriginalExpansionSetCode("FUT");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setBlue(true); color.setBlue(true);