From 6894ad96bc9a9b51db67f535b0a4d92c9dbfbe45 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 5 Mar 2021 19:10:29 -0500 Subject: [PATCH] [TSR] various text fixes --- .../src/mage/cards/c/CrypticAnnelid.java | 2 +- Mage.Sets/src/mage/cards/c/CrystalShard.java | 61 +++++++++--------- Mage.Sets/src/mage/cards/d/DreadReturn.java | 15 +++-- Mage.Sets/src/mage/cards/e/EtherealArmor.java | 36 +++++------ .../src/mage/cards/g/GossamerPhantasm.java | 10 +-- .../src/mage/cards/l/LostAuramancers.java | 2 +- .../mage/cards/m/MasterOfThePearlTrident.java | 18 +++--- Mage.Sets/src/mage/cards/p/Pongify.java | 2 +- Mage.Sets/src/mage/cards/r/ReadTheBones.java | 12 ++-- Mage.Sets/src/mage/cards/s/SerraAvenger.java | 2 +- .../mage/cards/t/TendrilsOfCorruption.java | 21 ++++--- Mage.Sets/src/mage/cards/t/TrinketMage.java | 11 ++-- .../src/mage/cards/v/VesuvanShapeshifter.java | 62 ++++++++++--------- Mage.Sets/src/mage/cards/w/WalkTheAeons.java | 46 +++----------- .../java/mage/verify/VerifyCardDataTest.java | 2 +- .../common/BecomesTargetTriggeredAbility.java | 2 +- .../delayed/PactDelayedTriggeredAbility.java | 2 +- .../SwitchPowerToughnessTargetEffect.java | 2 +- .../effects/keyword/InvestigateEffect.java | 2 +- .../abilities/keyword/SuspendAbility.java | 2 +- .../main/java/mage/filter/StaticFilters.java | 8 ++- .../permanent/token/CloudSpriteToken.java | 2 +- 22 files changed, 153 insertions(+), 169 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java b/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java index 565a2a03dd5..28978c197c8 100644 --- a/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java +++ b/Mage.Sets/src/mage/cards/c/CrypticAnnelid.java @@ -26,7 +26,7 @@ public final class CrypticAnnelid extends CardImpl { this.toughness = new MageInt(4); // 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.setText(", then scry 2"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/c/CrystalShard.java b/Mage.Sets/src/mage/cards/c/CrystalShard.java index 1884a1ec2ab..27c9083702e 100644 --- a/Mage.Sets/src/mage/cards/c/CrystalShard.java +++ b/Mage.Sets/src/mage/cards/c/CrystalShard.java @@ -1,10 +1,10 @@ - package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CompositeCost; import mage.abilities.costs.Cost; +import mage.abilities.costs.OrCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -19,22 +19,25 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class CrystalShard extends CardImpl { 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}. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrystalShardEffect(new GenericManaCost(1)), new ManaCostsImpl("{3}")); - ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CrystalShardEffect(new GenericManaCost(1)), new ManaCostsImpl("{U}")); - ability.addCost(new TapSourceCost()); + Ability ability = new SimpleActivatedAbility( + new CrystalShardEffect(), + new OrCost( + new CompositeCost(new GenericManaCost(3), new TapSourceCost(), ""), + new CompositeCost(new ManaCostsImpl("{U}"), new TapSourceCost(), ""), + "{3}, {T} or {U}, {T}" + ) + ); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } @@ -51,17 +54,13 @@ public final class CrystalShard extends CardImpl { class CrystalShardEffect extends OneShotEffect { - protected Cost cost; - - public CrystalShardEffect(Cost cost) { + CrystalShardEffect() { super(Outcome.Detriment); - this.staticText = "Return target creature to its owner's hand unless its controller pays {1}"; - this.cost = cost; + this.staticText = "return target creature to its owner's hand unless its controller pays {1}"; } - public CrystalShardEffect(final CrystalShardEffect effect) { + private CrystalShardEffect(final CrystalShardEffect effect) { super(effect); - this.cost = effect.cost.copy(); } @Override @@ -72,23 +71,19 @@ class CrystalShardEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); - 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); - } - } - } + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (controller == null || targetCreature == null) { 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); } } diff --git a/Mage.Sets/src/mage/cards/d/DreadReturn.java b/Mage.Sets/src/mage/cards/d/DreadReturn.java index 0383ed1aac0..ddb3591049f 100644 --- a/Mage.Sets/src/mage/cards/d/DreadReturn.java +++ b/Mage.Sets/src/mage/cards/d/DreadReturn.java @@ -1,7 +1,5 @@ - package mage.cards.d; -import java.util.UUID; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.keyword.FlashbackAbility; @@ -11,23 +9,28 @@ import mage.constants.CardType; import mage.constants.TimingRule; import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; /** - * * @author jonubuu */ public final class DreadReturn extends CardImpl { + private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("creatures"); + public DreadReturn(UUID ownerId, CardSetInfo setInfo) { 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()); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + // 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) { diff --git a/Mage.Sets/src/mage/cards/e/EtherealArmor.java b/Mage.Sets/src/mage/cards/e/EtherealArmor.java index 9e79307d178..c72bf2cac9f 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealArmor.java +++ b/Mage.Sets/src/mage/cards/e/EtherealArmor.java @@ -1,10 +1,8 @@ - - package mage.cards.e; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -14,27 +12,27 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledEnchantmentPermanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ 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 { - filter.add(TargetController.YOU.getControllerPredicate()); - } + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); - public EtherealArmor (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); + public EtherealArmor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); this.subtype.add(SubType.AURA); - // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); @@ -43,13 +41,16 @@ public final class EtherealArmor extends CardImpl { this.addAbility(ability); // Enchanted creature gets +1/+1 for each enchantment you control and has first strike. - PermanentsOnBattlefieldCount countEnchantments = new PermanentsOnBattlefieldCount(new FilterEnchantmentPermanent(filter)); - SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(countEnchantments, countEnchantments, Duration.WhileOnBattlefield)); - ability2.addEffect(new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA)); - this.addAbility(ability2); + ability = new SimpleStaticAbility(new BoostEnchantedEffect( + xValue, xValue, Duration.WhileOnBattlefield + )); + 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); } @@ -57,5 +58,4 @@ public final class EtherealArmor extends CardImpl { public EtherealArmor copy() { return new EtherealArmor(this); } - } diff --git a/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java b/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java index d55f708bb4b..d14b9635552 100644 --- a/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java +++ b/Mage.Sets/src/mage/cards/g/GossamerPhantasm.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BecomesTargetTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -11,22 +9,24 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** - * * @author LoneFox */ public final class GossamerPhantasm extends CardImpl { 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.power = new MageInt(2); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); + // 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) { diff --git a/Mage.Sets/src/mage/cards/l/LostAuramancers.java b/Mage.Sets/src/mage/cards/l/LostAuramancers.java index 4f3a5f70e78..1a983b7a6cd 100644 --- a/Mage.Sets/src/mage/cards/l/LostAuramancers.java +++ b/Mage.Sets/src/mage/cards/l/LostAuramancers.java @@ -86,6 +86,6 @@ class LostAuramancersAbility extends PutIntoGraveFromBattlefieldSourceTriggeredA @Override 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."; } } diff --git a/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java b/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java index ad92cfb176f..fa47f16b828 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfThePearlTrident.java @@ -1,8 +1,7 @@ - package mage.cards.m; -import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -12,11 +11,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; +import java.util.UUID; + /** - * * @author North */ public final class MasterOfThePearlTrident extends CardImpl { @@ -28,15 +27,20 @@ public final class MasterOfThePearlTrident extends CardImpl { } 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.power = new MageInt(2); this.toughness = new MageInt(2); // 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))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new IslandwalkAbility(), Duration.WhileOnBattlefield, filter, true))); + Ability ability = new SimpleStaticAbility(new BoostControlledEffect( + 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) { diff --git a/Mage.Sets/src/mage/cards/p/Pongify.java b/Mage.Sets/src/mage/cards/p/Pongify.java index aa8e0fc5cb6..292adafd708 100644 --- a/Mage.Sets/src/mage/cards/p/Pongify.java +++ b/Mage.Sets/src/mage/cards/p/Pongify.java @@ -43,7 +43,7 @@ class PongifyEffect extends OneShotEffect { public PongifyEffect() { 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) { diff --git a/Mage.Sets/src/mage/cards/r/ReadTheBones.java b/Mage.Sets/src/mage/cards/r/ReadTheBones.java index bf09130a2bd..eadf6c57371 100644 --- a/Mage.Sets/src/mage/cards/r/ReadTheBones.java +++ b/Mage.Sets/src/mage/cards/r/ReadTheBones.java @@ -1,7 +1,5 @@ - package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; @@ -10,20 +8,20 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ReadTheBones extends CardImpl { 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. - this.getSpellAbility().addEffect(new ScryEffect(2)); + this.getSpellAbility().addEffect(new ScryEffect(2, false)); Effect effect = new DrawCardSourceControllerEffect(2); - effect.setText("then draw two cards"); + effect.setText(", then draw two cards"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/s/SerraAvenger.java b/Mage.Sets/src/mage/cards/s/SerraAvenger.java index 5e17e7a2bb3..991f84cde74 100644 --- a/Mage.Sets/src/mage/cards/s/SerraAvenger.java +++ b/Mage.Sets/src/mage/cards/s/SerraAvenger.java @@ -58,7 +58,7 @@ class CantCastSerraAvengerEffect extends ContinuousRuleModifyingEffectImpl { public CantCastSerraAvengerEffect() { 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) { diff --git a/Mage.Sets/src/mage/cards/t/TendrilsOfCorruption.java b/Mage.Sets/src/mage/cards/t/TendrilsOfCorruption.java index c38f979b1ff..0a769e7c42f 100644 --- a/Mage.Sets/src/mage/cards/t/TendrilsOfCorruption.java +++ b/Mage.Sets/src/mage/cards/t/TendrilsOfCorruption.java @@ -1,7 +1,6 @@ - package mage.cards.t; -import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.GainLifeEffect; @@ -9,27 +8,33 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class TendrilsOfCorruption extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamp you control"); + private static final FilterPermanent filter = new FilterControlledPermanent(); static { filter.add(SubType.SWAMP.getPredicate()); } - public TendrilsOfCorruption(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}"); + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); - 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().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); } private TendrilsOfCorruption(final TendrilsOfCorruption card) { diff --git a/Mage.Sets/src/mage/cards/t/TrinketMage.java b/Mage.Sets/src/mage/cards/t/TrinketMage.java index 3fac4683b35..c446896f7dc 100644 --- a/Mage.Sets/src/mage/cards/t/TrinketMage.java +++ b/Mage.Sets/src/mage/cards/t/TrinketMage.java @@ -2,7 +2,6 @@ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.SearchEffect; @@ -10,18 +9,20 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ComparisonType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * @author ayratn */ 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 { filter.add(CardType.ARTIFACT.getPredicate()); @@ -29,7 +30,7 @@ public final class TrinketMage extends CardImpl { } 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.WIZARD); @@ -37,7 +38,7 @@ public final class TrinketMage extends CardImpl { 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. - TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); + TargetCardInLibrary target = new TargetCardInLibrary(filter); SearchEffect effect = new SearchLibraryPutInHandEffect(target, true, true); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java index b0b6ee45b17..69e6e3c5193 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java @@ -3,8 +3,8 @@ package mage.cards.v; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.AsTurnedFaceUpEffect; @@ -39,20 +39,22 @@ public final class VesuvanShapeshifter extends CardImpl { 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 - 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); 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 - Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new VesuvanShapeShifterFaceUpCopyApplier()); - effect.setText("as a copy of any creature on the battlefield until {this} is turned faced down"); - ability = new EntersBattlefieldAbility(effect, true); + ability = new AsEntersBattlefieldAbility(new CopyPermanentEffect( + StaticFilters.FILTER_PERMANENT_CREATURE, new VesuvanShapeShifterFaceUpCopyApplier() + )); ability.setWorksFaceDown(false); - this.addAbility(ability); - - // 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); + ability.setRuleVisible(false); this.addAbility(ability); // Morph {1}{U} @@ -82,12 +84,12 @@ class VesuvanShapeShifterFaceUpCopyApplier extends CopyApplier { class VesuvanShapeshifterEffect extends OneShotEffect { - public VesuvanShapeshifterEffect() { + VesuvanShapeshifterEffect() { super(Outcome.Copy); 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); } @@ -123,12 +125,12 @@ class VesuvanShapeshifterEffect extends OneShotEffect { class VesuvanShapeshifterFaceDownEffect extends OneShotEffect { - public VesuvanShapeshifterFaceDownEffect() { + VesuvanShapeshifterFaceDownEffect() { 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); } @@ -142,25 +144,25 @@ class VesuvanShapeshifterFaceDownEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); - if (controller != null && permanent != null) { - permanent.removeAllAbilities(source.getSourceId(), game); + if (controller == null || permanent == null) { + return false; + } + permanent.removeAllAbilities(source.getSourceId(), game); - // Set any previous copy effects to 'discarded' - for (Effect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) { - if (effect instanceof CopyEffect) { - CopyEffect copyEffect = (CopyEffect) effect; - if (copyEffect.getSourceId().equals(permanent.getId())) { - copyEffect.discard(); - } + // Set any previous copy effects to 'discarded' + for (Effect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) { + if (effect instanceof CopyEffect) { + CopyEffect copyEffect = (CopyEffect) effect; + if (copyEffect.getSourceId().equals(permanent.getId())) { + 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); + } } diff --git a/Mage.Sets/src/mage/cards/w/WalkTheAeons.java b/Mage.Sets/src/mage/cards/w/WalkTheAeons.java index 1e11490898f..f9608b5dc93 100644 --- a/Mage.Sets/src/mage/cards/w/WalkTheAeons.java +++ b/Mage.Sets/src/mage/cards/w/WalkTheAeons.java @@ -1,43 +1,37 @@ - package mage.cards.w; -import java.util.UUID; -import mage.abilities.Ability; 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.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.SubType; -import mage.filter.common.FilterControlledLandPermanent; -import mage.game.Game; -import mage.game.turn.TurnMod; +import mage.filter.common.FilterControlledPermanent; import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class WalkTheAeons extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("three Islands"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); static { filter.add(SubType.ISLAND.getPredicate()); } 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}"); // Buyback—Sacrifice 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. - this.getSpellAbility().addEffect(new ExtraTurnEffect()); + this.getSpellAbility().addEffect(new AddExtraTurnTargetEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -50,27 +44,3 @@ public final class WalkTheAeons extends CardImpl { 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; - } - -} \ No newline at end of file diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 29b0cff55ea..64c97835f1c 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -56,7 +56,7 @@ public class VerifyCardDataTest { 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 HashMap> skipCheckLists = new HashMap<>(); diff --git a/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java index 7c945d0a196..642099b6d65 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesTargetTriggeredAbility.java @@ -20,7 +20,7 @@ public class BecomesTargetTriggeredAbility extends TriggeredAbilityImpl { private final SetTargetPointer setTargetPointer; 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) { diff --git a/Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java index 442915ff96e..a3fef3628c4 100644 --- a/Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/delayed/PactDelayedTriggeredAbility.java @@ -39,7 +39,7 @@ public class PactDelayedTriggeredAbility extends DelayedTriggeredAbility { @Override public String getRule() { - return "At the beginning of your next upkeep " + modes.getText(); + return "
At the beginning of your next upkeep, " + modes.getText(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java index 3eb33e61e49..c3f4b31fa8a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SwitchPowerToughnessTargetEffect.java @@ -45,7 +45,7 @@ public class SwitchPowerToughnessTargetEffect extends ContinuousEffectImpl { @Override public String getText(Mode mode) { 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()); return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java index dd870faa9f4..5349e86a740 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java @@ -14,7 +14,7 @@ public class InvestigateEffect extends CreateTokenEffect { public InvestigateEffect() { super(new ClueArtifactToken()); - this.staticText = "Investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"; + this.staticText = "investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"; } public InvestigateEffect(final InvestigateEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java index 1bf640ed2f9..9e1ff595cd5 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java @@ -138,7 +138,7 @@ public class SuspendAbility extends SpecialAction { if (cost != null) { sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append("—") .append(cost.getText()).append(suspend - == Integer.MAX_VALUE ? ". X can't be 0" : ""); + == Integer.MAX_VALUE ? ". X can't be 0." : ""); if (!shortRule) { sb.append(" (Rather than cast this card from your hand, pay ") .append(cost.getText()) diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 089357b3b82..612bad629c1 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -6,9 +6,9 @@ import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.*; import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AnotherPredicate; import mage.filter.predicate.mageobject.KickedSpellPredicate; import mage.filter.predicate.mageobject.MulticoloredPredicate; -import mage.filter.predicate.mageobject.AnotherPredicate; import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.TokenPredicate; @@ -559,6 +559,12 @@ public final class StaticFilters { 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"); static { diff --git a/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java b/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java index ecf5ef1b3b9..c4db1218dad 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CloudSpriteToken.java @@ -14,7 +14,7 @@ import mage.abilities.keyword.FlyingAbility; public final class CloudSpriteToken extends TokenImpl { 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"); cardType.add(CardType.CREATURE); color.setBlue(true);