From 5a8bea6e9cfed1bf3ab1f977196d570154872573 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 8 Nov 2022 19:11:22 -0500 Subject: [PATCH] [BRC] various text fixes --- .../cards/b/BrudicladTelchorEngineer.java | 2 +- Mage.Sets/src/mage/cards/c/CabalPaladin.java | 2 +- .../cards/j/JhoiraWeatherlightCaptain.java | 14 +++++++++---- .../src/mage/cards/m/MetalworkColossus.java | 2 +- .../src/mage/cards/s/ScavengedBrawler.java | 1 + Mage.Sets/src/mage/cards/s/SerraDisciple.java | 14 +++++++------ .../mage/cards/s/SlobadGoblinTinkerer.java | 20 ++++++++----------- .../src/mage/cards/s/SphinxsRevelation.java | 15 ++++++-------- .../mage/cards/t/TesharAncestorsApostle.java | 2 +- .../src/mage/cards/t/TheArchimandrite.java | 2 +- Mage.Sets/src/mage/cards/t/TradingPost.java | 14 ++++++------- .../java/mage/verify/VerifyCardDataTest.java | 2 +- .../common/CreateTokenCopyTargetEffect.java | 5 +++++ .../filter/common/FilterHistoricSpell.java | 8 +------- 14 files changed, 52 insertions(+), 51 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BrudicladTelchorEngineer.java b/Mage.Sets/src/mage/cards/b/BrudicladTelchorEngineer.java index 863c43269a..86ab590629 100644 --- a/Mage.Sets/src/mage/cards/b/BrudicladTelchorEngineer.java +++ b/Mage.Sets/src/mage/cards/b/BrudicladTelchorEngineer.java @@ -70,7 +70,7 @@ class BrudicladTelchorEngineerEffect extends OneShotEffect { public BrudicladTelchorEngineerEffect() { super(Outcome.Sacrifice); - this.staticText = " create a 2/1 blue Phyrexian Myr artifact creature token. Then you may choose a token you control. If you do, each other token you control becomes a copy of that token"; + this.staticText = "create a 2/1 blue Phyrexian Myr artifact creature token. Then you may choose a token you control. If you do, each other token you control becomes a copy of that token"; } public BrudicladTelchorEngineerEffect(final BrudicladTelchorEngineerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/CabalPaladin.java b/Mage.Sets/src/mage/cards/c/CabalPaladin.java index effb89b24f..5f47303d4e 100644 --- a/Mage.Sets/src/mage/cards/c/CabalPaladin.java +++ b/Mage.Sets/src/mage/cards/c/CabalPaladin.java @@ -32,7 +32,7 @@ public final class CabalPaladin extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility( new DamagePlayersEffect(Outcome.Damage, StaticValue.get(2), TargetController.OPPONENT) .setText("{this} deals 2 damage to each opponent. (Artifacts, legendaries, and Sagas are historic.)"), - new FilterHistoricSpell("a historic spell"), false + new FilterHistoricSpell(), false )); } diff --git a/Mage.Sets/src/mage/cards/j/JhoiraWeatherlightCaptain.java b/Mage.Sets/src/mage/cards/j/JhoiraWeatherlightCaptain.java index a31d1d7889..be430ab610 100644 --- a/Mage.Sets/src/mage/cards/j/JhoiraWeatherlightCaptain.java +++ b/Mage.Sets/src/mage/cards/j/JhoiraWeatherlightCaptain.java @@ -1,6 +1,5 @@ package mage.cards.j; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -9,10 +8,15 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; +import mage.filter.FilterSpell; import mage.filter.common.FilterHistoricSpell; +import java.util.UUID; + public final class JhoiraWeatherlightCaptain extends CardImpl { + private static final FilterSpell filter = new FilterHistoricSpell(); + public JhoiraWeatherlightCaptain(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); addSuperType(SuperType.LEGENDARY); @@ -21,9 +25,11 @@ public final class JhoiraWeatherlightCaptain extends CardImpl { toughness = new MageInt(3); // Whenever you cast a historic spell, draw a card. (Artifacts, legendaries, and Sagas are historic.) - addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1) - .setText("draw a card. (Artifacts, legendaries, and Sagas are historic.)"), - new FilterHistoricSpell(), false)); + this.addAbility(new SpellCastControllerTriggeredAbility( + new DrawCardSourceControllerEffect(1) + .setText("draw a card. (Artifacts, legendaries, and Sagas are historic.)"), + filter, false + )); } diff --git a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java index aa3251ee3f..e877b553d6 100644 --- a/Mage.Sets/src/mage/cards/m/MetalworkColossus.java +++ b/Mage.Sets/src/mage/cards/m/MetalworkColossus.java @@ -67,7 +67,7 @@ public final class MetalworkColossus extends CardImpl { class totalNonCreatureArtifactManaValue implements DynamicValue { - private static final String message = "total mana value of noncreature artifacts you control"; + private static final String message = "the total mana value of noncreature artifacts you control"; private static final FilterPermanent filter = new FilterControlledArtifactPermanent("noncreature artifacts you control"); static { diff --git a/Mage.Sets/src/mage/cards/s/ScavengedBrawler.java b/Mage.Sets/src/mage/cards/s/ScavengedBrawler.java index 20f0c67704..55d059dc95 100644 --- a/Mage.Sets/src/mage/cards/s/ScavengedBrawler.java +++ b/Mage.Sets/src/mage/cards/s/ScavengedBrawler.java @@ -65,6 +65,7 @@ public final class ScavengedBrawler extends CardImpl { CounterType.LIFELINK.createInstance() ).setText(", and a lifelink counter on that creature")); ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); } private ScavengedBrawler(final ScavengedBrawler card) { diff --git a/Mage.Sets/src/mage/cards/s/SerraDisciple.java b/Mage.Sets/src/mage/cards/s/SerraDisciple.java index 4e2bc968a1..29ae0368a2 100644 --- a/Mage.Sets/src/mage/cards/s/SerraDisciple.java +++ b/Mage.Sets/src/mage/cards/s/SerraDisciple.java @@ -1,8 +1,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -12,10 +10,15 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; +import mage.filter.FilterSpell; import mage.filter.common.FilterHistoricSpell; +import java.util.UUID; + public final class SerraDisciple extends CardImpl { + private static final FilterSpell filter = new FilterHistoricSpell(); + public SerraDisciple(UUID ownerId, CardSetInfo cardSetInfo) { super(ownerId, cardSetInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); subtype.add(SubType.BIRD, SubType.CLERIC); @@ -27,10 +30,9 @@ public final class SerraDisciple extends CardImpl { addAbility(FirstStrikeAbility.getInstance()); // Whenever you cast a historic spell, Serra Disciple gets +1/+1 until end of turn - Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), new FilterHistoricSpell(), false, - "Whenever you cast a historic spell, {this} gets +1/+1 until end of turn. (Artifacts, legendaries, and Sagas are historic.)"); - - addAbility(ability); + addAbility(new SpellCastControllerTriggeredAbility( + new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter, false + )); } public SerraDisciple(final SerraDisciple serraDisciple) { diff --git a/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java b/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java index eec1216d65..2f7aca34ae 100644 --- a/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java +++ b/Mage.Sets/src/mage/cards/s/SlobadGoblinTinkerer.java @@ -1,27 +1,24 @@ - - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.SuperType; -import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -36,7 +33,7 @@ public final class SlobadGoblinTinkerer extends CardImpl { } public SlobadGoblinTinkerer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.ARTIFICER); @@ -45,10 +42,10 @@ public final class SlobadGoblinTinkerer extends CardImpl { this.toughness = new MageInt(2); // Sacrifice an artifact: Target artifact is indestructible this turn. - Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn); - effect.setText("Target artifact is indestructible this turn"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - effect, new SacrificeTargetCost(new TargetControlledPermanent(filterControlled))); + Ability ability = new SimpleActivatedAbility( + new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)) + ); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } @@ -61,5 +58,4 @@ public final class SlobadGoblinTinkerer extends CardImpl { public SlobadGoblinTinkerer copy() { return new SlobadGoblinTinkerer(this); } - } diff --git a/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java b/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java index 2deef801c4..a9363767fa 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java +++ b/Mage.Sets/src/mage/cards/s/SphinxsRevelation.java @@ -1,8 +1,5 @@ - - package mage.cards.s; -import java.util.UUID; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.GainLifeEffect; @@ -10,23 +7,23 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class SphinxsRevelation extends CardImpl { - public SphinxsRevelation (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}{U}{U}"); - + public SphinxsRevelation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{U}{U}"); // You gain X life and draw X cards. ManacostVariableValue manaX = ManacostVariableValue.REGULAR; this.getSpellAbility().addEffect(new GainLifeEffect(manaX)); - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(manaX)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(manaX).concatBy("and")); } - public SphinxsRevelation (final SphinxsRevelation card) { + public SphinxsRevelation(final SphinxsRevelation card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/t/TesharAncestorsApostle.java b/Mage.Sets/src/mage/cards/t/TesharAncestorsApostle.java index 3942479468..ae8cb1c600 100644 --- a/Mage.Sets/src/mage/cards/t/TesharAncestorsApostle.java +++ b/Mage.Sets/src/mage/cards/t/TesharAncestorsApostle.java @@ -46,7 +46,7 @@ public final class TesharAncestorsApostle extends CardImpl { // Whenever you cast a historic spell, return target creature card with converted mana cost 3 or less from your graveyard to the battlefield. Ability ability = new SpellCastControllerTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect() .setText("return target creature card with mana value 3 or less from your graveyard to the battlefield. " - + "(Artifacts, legendaries, and Sagas are historic.)"), new FilterHistoricSpell("a historic spell"), false); + + "(Artifacts, legendaries, and Sagas are historic.)"), new FilterHistoricSpell(), false); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TheArchimandrite.java b/Mage.Sets/src/mage/cards/t/TheArchimandrite.java index 502bf1ca9b..7a2a5f5968 100644 --- a/Mage.Sets/src/mage/cards/t/TheArchimandrite.java +++ b/Mage.Sets/src/mage/cards/t/TheArchimandrite.java @@ -41,7 +41,7 @@ public final class TheArchimandrite extends CardImpl { private static final FilterPermanent filter = new FilterControlledPermanent(); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent(); private static final FilterControlledPermanent filter3 - = new FilterControlledPermanent("Advisors, Artificers, and/or Monks you control"); + = new FilterControlledPermanent("untapped Advisors, Artificers, and/or Monks you control"); private static final Predicate predicate = Predicates.or( SubType.ADVISOR.getPredicate(), SubType.ARTIFICER.getPredicate(), diff --git a/Mage.Sets/src/mage/cards/t/TradingPost.java b/Mage.Sets/src/mage/cards/t/TradingPost.java index 1108795967..10658359f6 100644 --- a/Mage.Sets/src/mage/cards/t/TradingPost.java +++ b/Mage.Sets/src/mage/cards/t/TradingPost.java @@ -1,7 +1,6 @@ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.DiscardTargetCost; @@ -17,16 +16,17 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; -import mage.filter.common.FilterArtifactCard; -import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.StaticFilters; import mage.game.permanent.token.GoatToken; import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInHand; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + +import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; + /** - * * @author jeffwadsworth */ public final class TradingPost extends CardImpl { @@ -48,7 +48,7 @@ public final class TradingPost extends CardImpl { // {1}, {T}, Sacrifice a creature: Return target artifact card from your graveyard to your hand. Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1)); - ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("an artifact card in your graveyard"))); + ability3.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_ARTIFACT_FROM_YOUR_GRAVEYARD)); ability3.addCost(new TapSourceCost()); ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); this.addAbility(ability3); @@ -56,7 +56,7 @@ public final class TradingPost extends CardImpl { // {1}, {T}, Sacrifice an artifact: Draw a card. Ability ability4 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1)); ability4.addCost(new TapSourceCost()); - ability4.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); + ability4.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN))); this.addAbility(ability4); } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 57c4e481f1..eff49b0a9c 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -60,7 +60,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODE = "BRO"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "BRC"; // 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 ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java index 87b77585c1..f258d5712d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java @@ -307,6 +307,11 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { if (mode.getTargets().isEmpty()) { throw new UnsupportedOperationException("Using default rule generation of target effect without having a target object"); } + if (mode.getTargets().get(0).getMinNumberOfTargets() == 0) { + sb.append("up to "); + sb.append(CardUtil.numberToText(mode.getTargets().get(0).getMaxNumberOfTargets())); + sb.append(' '); + } String targetName = mode.getTargets().get(0).getTargetName(); if (!targetName.startsWith("another target")) { sb.append("target "); diff --git a/Mage/src/main/java/mage/filter/common/FilterHistoricSpell.java b/Mage/src/main/java/mage/filter/common/FilterHistoricSpell.java index 13ccb99ea1..49a000f096 100644 --- a/Mage/src/main/java/mage/filter/common/FilterHistoricSpell.java +++ b/Mage/src/main/java/mage/filter/common/FilterHistoricSpell.java @@ -1,21 +1,15 @@ - package mage.filter.common; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.HistoricPredicate; /** - * * @author igoudt */ public class FilterHistoricSpell extends FilterSpell { public FilterHistoricSpell() { - this("historic spell"); - } - - public FilterHistoricSpell(String name) { - super(name); + super("a historic spell"); this.add(HistoricPredicate.instance); }