From 6851e553d820c5021b95160878eef9d76bde3e88 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 8 Feb 2022 19:41:26 -0500 Subject: [PATCH] [NEO] various text fixes --- .../src/mage/cards/a/AcquisitionOctopus.java | 2 +- .../src/mage/cards/a/AnimusOfNightsReach.java | 4 +- .../src/mage/cards/a/ArmguardFamiliar.java | 1 + .../mage/cards/a/AtsushiTheBlazingSky.java | 2 +- .../src/mage/cards/b/BitingPalmNinja.java | 2 +- .../mage/cards/b/BoseijuReachesSkyward.java | 5 ++- .../src/mage/cards/d/DragonsparkReactor.java | 7 +++- .../mage/cards/e/ExplosiveSingularity.java | 2 +- Mage.Sets/src/mage/cards/j/JukaiTrainee.java | 4 +- .../src/mage/cards/j/JunjiTheMidnightSky.java | 4 +- Mage.Sets/src/mage/cards/k/KindledFury.java | 15 +++++--- .../src/mage/cards/k/KuraTheBoundlessSky.java | 2 +- Mage.Sets/src/mage/cards/n/NinjasKunai.java | 2 +- .../src/mage/cards/r/RunawayTrashBot.java | 2 +- .../src/mage/cards/s/SelflessSamurai.java | 12 +++++- .../src/mage/cards/s/SevenTailMentor.java | 2 +- .../src/mage/cards/s/SilverFurMaster.java | 2 +- .../cards/s/SokenzanCrucibleOfDefiance.java | 5 +-- .../src/mage/cards/s/SpringLeafAvenger.java | 7 +++- .../src/mage/cards/s/SurgehackerMech.java | 4 +- .../src/mage/cards/t/TheWanderingEmperor.java | 4 +- .../src/mage/cards/t/ThunderingRaiju.java | 3 +- .../src/mage/cards/t/TributeToHorobi.java | 2 +- .../src/mage/cards/t/TwinshotSniper.java | 4 +- .../src/mage/cards/t/TwistedEmbrace.java | 2 +- Mage.Sets/src/mage/cards/v/VoltageSurge.java | 12 ++---- .../java/mage/verify/VerifyCardDataTest.java | 2 +- .../common/BecomesTappedTriggeredAbility.java | 3 +- ...rBecomesBlockedSourceTriggeredAbility.java | 6 ++- ...rnToHandChosenControlledPermanentCost.java | 10 ++--- .../CostsLessForExiledCardsEffect.java | 4 +- .../SacrificeOpponentsUnlessPayEffect.java | 38 ++++++++++--------- .../effects/common/TapTargetEffect.java | 4 +- .../continuous/GainControlAllEffect.java | 2 +- .../abilities/keyword/ReconfigureAbility.java | 2 +- .../main/java/mage/filter/StaticFilters.java | 6 +++ .../game/permanent/token/HumanMonkToken.java | 2 +- 37 files changed, 113 insertions(+), 79 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AcquisitionOctopus.java b/Mage.Sets/src/mage/cards/a/AcquisitionOctopus.java index e49d61f649..1d55d604dd 100644 --- a/Mage.Sets/src/mage/cards/a/AcquisitionOctopus.java +++ b/Mage.Sets/src/mage/cards/a/AcquisitionOctopus.java @@ -80,6 +80,6 @@ class AcquisitionOctopusTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When {this} or equipped creature deals combat damage to a player, draw a card."; + return "Whenever {this} or equipped creature deals combat damage to a player, draw a card."; } } diff --git a/Mage.Sets/src/mage/cards/a/AnimusOfNightsReach.java b/Mage.Sets/src/mage/cards/a/AnimusOfNightsReach.java index e612681826..fae6c4995c 100644 --- a/Mage.Sets/src/mage/cards/a/AnimusOfNightsReach.java +++ b/Mage.Sets/src/mage/cards/a/AnimusOfNightsReach.java @@ -52,8 +52,8 @@ public final class AnimusOfNightsReach extends CardImpl { // Whenever Animus of Night's Reach attacks, it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect( - xValue, StaticValue.get(0), Duration.EndOfTurn, true) - ).addHint(AnimusOfNightsReachHint.instance)); + xValue, StaticValue.get(0), Duration.EndOfTurn, true + ).setText("it gets +X/+0 until end of turn, where X is the number of creature cards in defending player's graveyard")).addHint(AnimusOfNightsReachHint.instance)); } private AnimusOfNightsReach(final AnimusOfNightsReach card) { diff --git a/Mage.Sets/src/mage/cards/a/ArmguardFamiliar.java b/Mage.Sets/src/mage/cards/a/ArmguardFamiliar.java index baf092ccf7..33a58c83ab 100644 --- a/Mage.Sets/src/mage/cards/a/ArmguardFamiliar.java +++ b/Mage.Sets/src/mage/cards/a/ArmguardFamiliar.java @@ -37,6 +37,7 @@ public final class ArmguardFamiliar extends CardImpl { ability.addEffect(new GainAbilityAttachedEffect( new WardAbility(new GenericManaCost(2)), AttachmentType.EQUIPMENT ).setText("and has ward {2}")); + this.addAbility(ability); // Reconfigure {4} this.addAbility(new ReconfigureAbility("{4}")); diff --git a/Mage.Sets/src/mage/cards/a/AtsushiTheBlazingSky.java b/Mage.Sets/src/mage/cards/a/AtsushiTheBlazingSky.java index 803b710089..84c2e721ca 100644 --- a/Mage.Sets/src/mage/cards/a/AtsushiTheBlazingSky.java +++ b/Mage.Sets/src/mage/cards/a/AtsushiTheBlazingSky.java @@ -41,7 +41,7 @@ public final class AtsushiTheBlazingSky extends CardImpl { // When Atsushi, the Blazing Sky dies, choose one — // • Exile the top two cards of your library. Until the end of your next turn, you may play those cards. Ability ability = new DiesSourceTriggeredAbility(new ExileTopXMayPlayUntilEndOfTurnEffect( - 3, false, Duration.UntilEndOfYourNextTurn + 2, false, Duration.UntilEndOfYourNextTurn ), false); // • Create three Treasure tokens. diff --git a/Mage.Sets/src/mage/cards/b/BitingPalmNinja.java b/Mage.Sets/src/mage/cards/b/BitingPalmNinja.java index 54545f492f..8197edfd74 100644 --- a/Mage.Sets/src/mage/cards/b/BitingPalmNinja.java +++ b/Mage.Sets/src/mage/cards/b/BitingPalmNinja.java @@ -44,7 +44,7 @@ public final class BitingPalmNinja extends CardImpl { new DoWhenCostPaid(new ReflexiveTriggeredAbility( new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND), false, "that player reveals their hand and you choose a nonland card from it. Exile that card" - ), new RemoveCountersSourceCost(CounterType.MENACE.createInstance()), "Remove a menace counter?"), false, true + ), new RemoveCountersSourceCost(CounterType.MENACE.createInstance()).setText("remove a menace counter from it"), "Remove a menace counter?"), false, true )); } diff --git a/Mage.Sets/src/mage/cards/b/BoseijuReachesSkyward.java b/Mage.Sets/src/mage/cards/b/BoseijuReachesSkyward.java index ca783adf1e..61aa70ab4e 100644 --- a/Mage.Sets/src/mage/cards/b/BoseijuReachesSkyward.java +++ b/Mage.Sets/src/mage/cards/b/BoseijuReachesSkyward.java @@ -12,7 +12,7 @@ import mage.constants.SagaChapter; import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; -import mage.filter.StaticFilters; +import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInYourGraveyard; @@ -24,6 +24,7 @@ import java.util.UUID; public final class BoseijuReachesSkyward extends CardImpl { private static final FilterCard filter = new FilterCard("basic Forest cards"); + private static final FilterCard filter2 = new FilterLandCard("land card from your graveyard"); static { filter.add(SuperType.BASIC.getPredicate()); @@ -51,7 +52,7 @@ public final class BoseijuReachesSkyward extends CardImpl { sagaAbility.addChapterEffect( this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II, new PutOnLibraryTargetEffect(true), - new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_LAND) + new TargetCardInYourGraveyard(0, 1, filter2) ); // III — Exile this Saga, then return it to the battlefield transformed under your control. diff --git a/Mage.Sets/src/mage/cards/d/DragonsparkReactor.java b/Mage.Sets/src/mage/cards/d/DragonsparkReactor.java index 177e921035..38c01c29f8 100644 --- a/Mage.Sets/src/mage/cards/d/DragonsparkReactor.java +++ b/Mage.Sets/src/mage/cards/d/DragonsparkReactor.java @@ -31,13 +31,16 @@ public final class DragonsparkReactor extends CardImpl { // Whenever Dragonspark Reactor or another artifact enters the battlefield under your control, put a charge counter on Dragonspark Reactor. this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility( - new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), StaticFilters.FILTER_PERMANENT_ARTIFACT, false, true )); // {4}, Sacrifice Dragonspark Reactor: It deals damage equal to the number of charge counters on it to target player and that much damage to up to one target creature. Ability ability = new SimpleActivatedAbility( - new DamageTargetEffect(xValue, "it"), new GenericManaCost(4) + new DamageTargetEffect(xValue).setText( + "it deals damage equal to the number of charge counters on it to target player " + + "and that much damage to up to one target creature" + ), new GenericManaCost(4) ); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveSingularity.java b/Mage.Sets/src/mage/cards/e/ExplosiveSingularity.java index 55ba1fcf56..b7b09459fa 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveSingularity.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveSingularity.java @@ -30,7 +30,7 @@ public final class ExplosiveSingularity extends CardImpl { // As an additional cost to cast this spell, you may tap any number of untapped creatures you control. This spell costs {1} less to cast for each creature tapped this way. this.getSpellAbility().addCost(new TapTargetCost(new TargetControlledPermanent( 0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES, false - )).setText("as an additional cost to cast this spell, you may tap any number of untapped creatures you control. " + + )).setText("you may tap any number of untapped creatures you control. " + "This spell costs {1} less to cast for each creature tapped this way")); Ability ability = new SimpleStaticAbility(Zone.ALL, new ExplosiveSingularityEffect()); ability.setRuleVisible(false); diff --git a/Mage.Sets/src/mage/cards/j/JukaiTrainee.java b/Mage.Sets/src/mage/cards/j/JukaiTrainee.java index b528e0952b..147dba078f 100644 --- a/Mage.Sets/src/mage/cards/j/JukaiTrainee.java +++ b/Mage.Sets/src/mage/cards/j/JukaiTrainee.java @@ -26,7 +26,9 @@ public final class JukaiTrainee extends CardImpl { // Whenever Jukai Trainee blocks or becomes blocked, it gets +1/+1 until end of turn. this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility( - new BoostSourceEffect(1, 1, Duration.EndOfTurn), false + new BoostSourceEffect(1, 1, Duration.EndOfTurn) + .setText("it gets +1/+1 until end of turn"), + false, false )); } diff --git a/Mage.Sets/src/mage/cards/j/JunjiTheMidnightSky.java b/Mage.Sets/src/mage/cards/j/JunjiTheMidnightSky.java index 803c73e405..5c61ba24e6 100644 --- a/Mage.Sets/src/mage/cards/j/JunjiTheMidnightSky.java +++ b/Mage.Sets/src/mage/cards/j/JunjiTheMidnightSky.java @@ -29,7 +29,7 @@ import java.util.UUID; */ public final class JunjiTheMidnightSky extends CardImpl { - private static final FilterCard filter = new FilterCreatureCard("non-Dragon creature card"); + private static final FilterCard filter = new FilterCreatureCard("non-Dragon creature card from a graveyard"); static { filter.add(Predicates.not(SubType.DRAGON.getPredicate())); @@ -60,7 +60,7 @@ public final class JunjiTheMidnightSky extends CardImpl { // • Put target non-Dragon creature card from a graveyard onto the battlefield under your control. You lose 2 life. Mode mode = new Mode(new ReturnFromGraveyardToBattlefieldTargetEffect()); mode.addEffect(new LoseLifeSourceControllerEffect(2)); - ability.addTarget(new TargetCardInGraveyard(filter)); + mode.addTarget(new TargetCardInGraveyard(filter)); ability.addMode(mode); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KindledFury.java b/Mage.Sets/src/mage/cards/k/KindledFury.java index ab94e1f9fe..1b851ea648 100644 --- a/Mage.Sets/src/mage/cards/k/KindledFury.java +++ b/Mage.Sets/src/mage/cards/k/KindledFury.java @@ -1,7 +1,5 @@ - package mage.cards.k; -import java.util.UUID; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -11,17 +9,22 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class KindledFury extends CardImpl { public KindledFury(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect( + 1, 0, Duration.EndOfTurn + ).setText("target creature gets +1/+0")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect( + FirstStrikeAbility.getInstance(), Duration.EndOfTurn + ).setText("and gains first strike until end of turn")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java b/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java index 45a0f219b2..801a4ddbfa 100644 --- a/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java +++ b/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java @@ -46,7 +46,7 @@ public final class KuraTheBoundlessSky extends CardImpl { // When Kura, the Boundless Sky dies, choose one — // • Search your library for up to three land cards, reveal them, put them into your hand, then shuffle. Ability ability = new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect( - new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_LANDS) + new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_LANDS), true )); // • Create an X/X green Spirit creature token, where X is the number of lands you control. diff --git a/Mage.Sets/src/mage/cards/n/NinjasKunai.java b/Mage.Sets/src/mage/cards/n/NinjasKunai.java index 7f6c8b3e67..55275ef79a 100644 --- a/Mage.Sets/src/mage/cards/n/NinjasKunai.java +++ b/Mage.Sets/src/mage/cards/n/NinjasKunai.java @@ -33,7 +33,7 @@ public final class NinjasKunai extends CardImpl { // Equipped creature has "{1}, {T}, Sacrifice Ninja's Kunai: Ninja's Kunai deals 3 damage to any target." this.addAbility(new SimpleStaticAbility(new GainAbilityWithAttachmentEffect( - "equipped creature has \"{1}, {T}, Sacrifice {this}: {this} deals 2 damage to any target.\"", + "equipped creature has \"{1}, {T}, Sacrifice {this}: {this} deals 3 damage to any target.\"", new NinjasKunaiEffect(), new TargetAnyTarget(), new SacrificeAttachmentCost(), new GenericManaCost(1), new TapSourceCost() ))); diff --git a/Mage.Sets/src/mage/cards/r/RunawayTrashBot.java b/Mage.Sets/src/mage/cards/r/RunawayTrashBot.java index e2c97a36de..27c5338a43 100644 --- a/Mage.Sets/src/mage/cards/r/RunawayTrashBot.java +++ b/Mage.Sets/src/mage/cards/r/RunawayTrashBot.java @@ -25,7 +25,7 @@ import java.util.UUID; public final class RunawayTrashBot extends CardImpl { private static final FilterCard filter - = new FilterArtifactOrEnchantmentCard("artifact and/or enchantment card in your graveyard"); + = new FilterArtifactOrEnchantmentCard("artifact and/or enchantment card"); private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter); private static final Hint hint = new ValueHint("Artifacts and enchantments in your graveyard", xValue); diff --git a/Mage.Sets/src/mage/cards/s/SelflessSamurai.java b/Mage.Sets/src/mage/cards/s/SelflessSamurai.java index fcbb9a6e27..af1921c859 100644 --- a/Mage.Sets/src/mage/cards/s/SelflessSamurai.java +++ b/Mage.Sets/src/mage/cards/s/SelflessSamurai.java @@ -13,7 +13,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; +import mage.filter.FilterPermanent; import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; import mage.target.TargetPermanent; import java.util.UUID; @@ -23,6 +26,13 @@ import java.util.UUID; */ public final class SelflessSamurai extends CardImpl { + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("another target creature you control"); + + static { + filter.add(AnotherPredicate.instance); + } + public SelflessSamurai(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); @@ -42,7 +52,7 @@ public final class SelflessSamurai extends CardImpl { Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect( IndestructibleAbility.getInstance(), Duration.EndOfTurn ), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)); + ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SevenTailMentor.java b/Mage.Sets/src/mage/cards/s/SevenTailMentor.java index f6a7fa74a1..36bddfaa18 100644 --- a/Mage.Sets/src/mage/cards/s/SevenTailMentor.java +++ b/Mage.Sets/src/mage/cards/s/SevenTailMentor.java @@ -21,7 +21,7 @@ import java.util.UUID; */ public final class SevenTailMentor extends CardImpl { - private static final FilterPermanent filter = new FilterControlledPermanent("creature or Vehicle"); + private static final FilterPermanent filter = new FilterControlledPermanent("creature or Vehicle you control"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/cards/s/SilverFurMaster.java b/Mage.Sets/src/mage/cards/s/SilverFurMaster.java index 44712b2b00..b21dc4ce87 100644 --- a/Mage.Sets/src/mage/cards/s/SilverFurMaster.java +++ b/Mage.Sets/src/mage/cards/s/SilverFurMaster.java @@ -43,7 +43,7 @@ public final class SilverFurMaster extends CardImpl { // Ninjutsu abilities you activate cost {1} less to activate. this.addAbility(new SimpleStaticAbility(new AbilitiesCostReductionControllerEffect( NinjutsuAbility.class, "Ninjutsu" - ))); + ).setText("ninjutsu abilities you activate cost {1} less to activate"))); // Other Ninja and Rogue creatures you control get +1/+1 this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( diff --git a/Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java b/Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java index 78fa7718c1..fceb6b076c 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanCrucibleOfDefiance.java @@ -3,7 +3,6 @@ package mage.cards.s; import mage.abilities.Ability; import mage.abilities.costs.costadjusters.LegendaryCreatureCostAdjuster; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.ChannelAbility; import mage.abilities.keyword.HasteAbility; @@ -34,7 +33,7 @@ public final class SokenzanCrucibleOfDefiance extends CardImpl { this.addAbility(new RedManaAbility()); // Channel — {3}{R}, Discard Sokenzan, Crucible of Defiance: Create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. This ability costs {1} less to activate for each legendary creature you control. - Ability ability = new ChannelAbility("{3}{R}", new CreateTokenEffect(new SpiritToken(), 2)); + Ability ability = new ChannelAbility("{3}{R}", new SokenzanCrucibleOfDefianceEffect()); ability.setCostAdjuster(LegendaryCreatureCostAdjuster.instance); this.addAbility(ability); } @@ -53,7 +52,7 @@ class SokenzanCrucibleOfDefianceEffect extends OneShotEffect { SokenzanCrucibleOfDefianceEffect() { super(Outcome.Benefit); - staticText = "create two colorless 1/1 Spirit creature tokens. They gain haste until end of turn. " + + staticText = "create two 1/1 colorless Spirit creature tokens. They gain haste until end of turn. " + "This ability costs {1} less to activate for each legendary creature you control"; } diff --git a/Mage.Sets/src/mage/cards/s/SpringLeafAvenger.java b/Mage.Sets/src/mage/cards/s/SpringLeafAvenger.java index 1a02e5dccc..d53f32e91e 100644 --- a/Mage.Sets/src/mage/cards/s/SpringLeafAvenger.java +++ b/Mage.Sets/src/mage/cards/s/SpringLeafAvenger.java @@ -9,7 +9,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.StaticFilters; +import mage.filter.FilterCard; +import mage.filter.common.FilterPermanentCard; import mage.target.common.TargetCardInYourGraveyard; import java.util.UUID; @@ -19,6 +20,8 @@ import java.util.UUID; */ public final class SpringLeafAvenger extends CardImpl { + private static final FilterCard filter = new FilterPermanentCard("permanent card from your graveyard"); + public SpringLeafAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); @@ -34,7 +37,7 @@ public final class SpringLeafAvenger extends CardImpl { Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( new ReturnFromGraveyardToHandTargetEffect(), false ); - ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_PERMANENT)); + ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SurgehackerMech.java b/Mage.Sets/src/mage/cards/s/SurgehackerMech.java index 20fa030623..276bd96978 100644 --- a/Mage.Sets/src/mage/cards/s/SurgehackerMech.java +++ b/Mage.Sets/src/mage/cards/s/SurgehackerMech.java @@ -28,7 +28,7 @@ import java.util.UUID; public final class SurgehackerMech extends CardImpl { private static final FilterPermanent filter - = new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker and opponent controls"); + = new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker an opponent controls"); private static final FilterPermanent filter2 = new FilterControlledPermanent(SubType.VEHICLE); @@ -52,7 +52,7 @@ public final class SurgehackerMech extends CardImpl { this.addAbility(new MenaceAbility(false)); // When Surgehacker Mech enters the battlefield, it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue).setText("it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability.addHint(hint)); diff --git a/Mage.Sets/src/mage/cards/t/TheWanderingEmperor.java b/Mage.Sets/src/mage/cards/t/TheWanderingEmperor.java index 2d17a5bbd4..a114a2be2e 100644 --- a/Mage.Sets/src/mage/cards/t/TheWanderingEmperor.java +++ b/Mage.Sets/src/mage/cards/t/TheWanderingEmperor.java @@ -6,7 +6,7 @@ import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; @@ -64,7 +64,7 @@ public final class TheWanderingEmperor extends CardImpl { this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new SamuraiToken()), -1)); // −2: Exile target tapped creature. You gain 2 life. - ability = new LoyaltyAbility(new DestroyTargetEffect(), -2); + ability = new LoyaltyAbility(new ExileTargetEffect(), -2); ability.addEffect(new GainLifeEffect(2)); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/ThunderingRaiju.java b/Mage.Sets/src/mage/cards/t/ThunderingRaiju.java index 5cec969bd3..688e79149d 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderingRaiju.java +++ b/Mage.Sets/src/mage/cards/t/ThunderingRaiju.java @@ -2,6 +2,7 @@ package mage.cards.t; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; @@ -51,7 +52,7 @@ public final class ThunderingRaiju extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Whenever Thundering Raiju attacks, put a +1/+1 counter on target creature you control. Then Thundering Raiju deals X damage to each opponent, where X is the number of modified creatures you control other than Thundering Raiju. - Ability ability = new EntersBattlefieldTriggeredAbility( + Ability ability = new AttacksTriggeredAbility( new AddCountersTargetEffect(CounterType.P1P1.createInstance()) ); ability.addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/t/TributeToHorobi.java b/Mage.Sets/src/mage/cards/t/TributeToHorobi.java index 720eae122a..d6379f3d6e 100644 --- a/Mage.Sets/src/mage/cards/t/TributeToHorobi.java +++ b/Mage.Sets/src/mage/cards/t/TributeToHorobi.java @@ -55,7 +55,7 @@ class TributeToHorobiTokenEffect extends OneShotEffect { public TributeToHorobiTokenEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Each opponent creates a 1/1 black Rat Rouge creature token"; + this.staticText = "Each opponent creates a 1/1 black Rat Rogue creature token"; } private TributeToHorobiTokenEffect(final TributeToHorobiTokenEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TwinshotSniper.java b/Mage.Sets/src/mage/cards/t/TwinshotSniper.java index 9a35569692..9da44c7b3d 100644 --- a/Mage.Sets/src/mage/cards/t/TwinshotSniper.java +++ b/Mage.Sets/src/mage/cards/t/TwinshotSniper.java @@ -31,12 +31,12 @@ public final class TwinshotSniper extends CardImpl { this.addAbility(ReachAbility.getInstance()); // When Twinshot Sniper enters the battlefield, it deals 2 damage to any target. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Channel — {1}{R}, Discard Twinshot Sniper: It deals 2 damage to any target. - ability = new ChannelAbility("{1}{R}", new DamageTargetEffect(2)); + ability = new ChannelAbility("{1}{R}", new DamageTargetEffect(2, "it")); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TwistedEmbrace.java b/Mage.Sets/src/mage/cards/t/TwistedEmbrace.java index e9440c9ed0..c98e9d3601 100644 --- a/Mage.Sets/src/mage/cards/t/TwistedEmbrace.java +++ b/Mage.Sets/src/mage/cards/t/TwistedEmbrace.java @@ -44,7 +44,7 @@ public final class TwistedEmbrace extends CardImpl { this.subtype.add(SubType.AURA); // Enchant artifact or creature you control - TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.addAbility(new EnchantAbility(auraTarget.getTargetName())); diff --git a/Mage.Sets/src/mage/cards/v/VoltageSurge.java b/Mage.Sets/src/mage/cards/v/VoltageSurge.java index c606bf1bd6..ca2d7c391c 100644 --- a/Mage.Sets/src/mage/cards/v/VoltageSurge.java +++ b/Mage.Sets/src/mage/cards/v/VoltageSurge.java @@ -7,8 +7,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterControlledArtifactPermanent; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledPermanent; @@ -23,16 +22,13 @@ import java.util.UUID; */ public final class VoltageSurge extends CardImpl { - private static final FilterControlledPermanent filter - = new FilterControlledArtifactPermanent("you may sacrifice an artifact"); - public VoltageSurge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // As an additional cost to cast this spell, you may sacrifice an artifact. - this.getSpellAbility().addCost(new SacrificeTargetCost( - new TargetControlledPermanent(0, 1, filter, true) - )); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent( + 0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN, true + )).setText("you may sacrifice an artifact")); // Voltage Surge deals 2 damage to target creature or planeswalker. If this spell's additional cost was paid, Voltage Surge deals 4 damage instead. this.getSpellAbility().addEffect(new VoltageSurgeEffect()); diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index ecf6c6332f..512b0cdab8 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -59,7 +59,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODE = "VOC"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "NEO"; // 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/common/BecomesTappedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java index cefceedcb8..828c36ba47 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesTappedTriggeredAbility.java @@ -9,6 +9,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; /** * @author jeffwadsworth @@ -66,6 +67,6 @@ public class BecomesTappedTriggeredAbility extends TriggeredAbilityImpl { @Override public String getTriggerPhrase() { - return "Whenever " + filter.getMessage() + " becomes tapped, "; + return "Whenever " + CardUtil.addArticle(filter.getMessage()) + " becomes tapped, "; } } diff --git a/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedSourceTriggeredAbility.java index ba64cb6b26..3cefef7c51 100644 --- a/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedSourceTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BlocksOrBecomesBlockedSourceTriggeredAbility.java @@ -21,7 +21,11 @@ public class BlocksOrBecomesBlockedSourceTriggeredAbility extends TriggeredAbili protected boolean setTargetPointer; public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, boolean optional) { - this(effect, StaticFilters.FILTER_PERMANENT_CREATURE, optional, null, true); + this(effect, optional, true); + } + + public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) { + this(effect, StaticFilters.FILTER_PERMANENT_CREATURE, optional, null, setTargetPointer); } public BlocksOrBecomesBlockedSourceTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java index 7bc29c3503..b89ff713b4 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandChosenControlledPermanentCost.java @@ -1,9 +1,6 @@ package mage.abilities.costs.common; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; @@ -16,8 +13,11 @@ import mage.players.Player; import mage.target.common.TargetControlledPermanent; import mage.util.CardUtil; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public class ReturnToHandChosenControlledPermanentCost extends CostImpl { @@ -31,7 +31,7 @@ public class ReturnToHandChosenControlledPermanentCost extends CostImpl { + (target.getTargetName().endsWith(" you control") ? "" : " you control") + " to their owner's hand"; } else { - this.text = "return " + target.getTargetName() + this.text = "return " + CardUtil.addArticle(target.getTargetName()) + (target.getTargetName().endsWith(" you control") ? "" : " you control") + " to its owner's hand"; } diff --git a/Mage/src/main/java/mage/abilities/effects/CostsLessForExiledCardsEffect.java b/Mage/src/main/java/mage/abilities/effects/CostsLessForExiledCardsEffect.java index 45ccbe31d6..03d0870464 100644 --- a/Mage/src/main/java/mage/abilities/effects/CostsLessForExiledCardsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/CostsLessForExiledCardsEffect.java @@ -67,8 +67,8 @@ public class CostsLessForExiledCardsEffect extends CostModificationEffectImpl { public static void addCostAndEffect(Card card, FilterCard filter) { card.getSpellAbility().addCost(new ExileFromHandCost( new TargetCardInHand(0, Integer.MAX_VALUE, filter) - ).setText("as an additional cost to cast this spell, you may exile any number of " - + filter.getMessage() + ". This spell costs {2} less to cast for each card exiled this way")); + ).setText("you may exile any number of " + filter.getMessage() + + ". This spell costs {2} less to cast for each card exiled this way")); Ability ability = new SimpleStaticAbility(Zone.ALL, new CostsLessForExiledCardsEffect(filter)); ability.setRuleVisible(false); card.addAbility(ability); diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java index f7d199659a..6dee86ae8c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java @@ -1,6 +1,7 @@ package mage.abilities.effects.common; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCost; @@ -60,7 +61,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { this.cost = cost; this.amount = amount; this.filter = filter; - setText(); } public SacrificeOpponentsUnlessPayEffect(DynamicValue genericMana, FilterPermanent filter, DynamicValue amount) { @@ -68,7 +68,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { this.genericMana = genericMana; this.amount = amount; this.filter = filter; - setText(); } public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) { @@ -150,31 +149,36 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { return true; } - private void setText() { + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } StringBuilder sb = new StringBuilder(); sb.append("each opponent sacrifices "); - if (amount.toString().equals("X")) { - sb.append(amount.toString()); - } else { - if (amount.toString().equals("1")) { - if (!filter.getMessage().startsWith("a ") && !filter.getMessage().startsWith("an ")) { - sb.append('a'); - } - } else { + switch (amount.toString()) { + case "1": + sb.append(CardUtil.addArticle(filter.getMessage())); + break; + case "X": + sb.append("X "); + sb.append(filter.getMessage()); + break; + default: sb.append(CardUtil.numberToText(amount.toString())); - } + sb.append(' '); + sb.append(filter.getMessage()); } - sb.append(' '); - sb.append(filter.getMessage()); - sb.append(" unless they pay "); + sb.append(" unless they "); if (cost != null) { + sb.append(CardUtil.checkCostWords(cost.getText()) ? "" : "pay "); sb.append(cost.getText()); } else { - sb.append("{X}"); + sb.append("pay {X}"); } if (genericMana != null && !genericMana.getMessage().isEmpty()) { @@ -182,6 +186,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { sb.append(genericMana.getMessage()); } - staticText = sb.toString(); + return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java index 9afaa42dd2..5173c65fcf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TapTargetEffect.java @@ -58,11 +58,11 @@ public class TapTargetEffect extends OneShotEffect { } Target target = mode.getTargets().get(0); - if (target.getMaxNumberOfTargets() > 1) { + if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) { if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { return "tap " + CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName() + 's'; } else { - return "tap up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName() + 's'; + return "tap up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName() + (target.getMaxNumberOfTargets() > 1 ? "s" : ""); } } else if (target.getMaxNumberOfTargets() == 0) { return "tap X target " + mode.getTargets().get(0).getTargetName(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java index 66c82fdab3..40742c1158 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainControlAllEffect.java @@ -30,7 +30,7 @@ public class GainControlAllEffect extends OneShotEffect { this.filter = filter; this.duration = duration; this.controllingPlayerId = controllingPlayerId; - this.staticText = "Gain control of " + filter.getMessage(); + this.staticText = "gain control of " + filter.getMessage(); } public GainControlAllEffect(final GainControlAllEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java index eb7bc2bb4e..f2d51227b7 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ReconfigureAbility.java @@ -54,7 +54,7 @@ class ReconfigureUnattachAbility extends ActivateAsSorceryActivatedAbility { protected ReconfigureUnattachAbility(String manaString) { super(Zone.BATTLEFIELD, new ReconfigureUnattachEffect(), new ManaCostsImpl<>(manaString)); - this.setRuleVisible(true); + this.setRuleVisible(false); } private ReconfigureUnattachAbility(final ReconfigureUnattachAbility ability) { diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index fbc038bb4d..1d33d25223 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -396,6 +396,12 @@ public final class StaticFilters { FILTER_CONTROLLED_PERMANENT_LAND.setLockedFilter(true); } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_A_LAND = new FilterControlledLandPermanent("a land you control"); + + static { + FILTER_CONTROLLED_PERMANENT_A_LAND.setLockedFilter(true); + } + public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_LANDS = new FilterControlledLandPermanent("lands you control"); static { diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanMonkToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanMonkToken.java index d01233da9f..40160a0bf5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanMonkToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanMonkToken.java @@ -13,7 +13,7 @@ import java.util.Arrays; public final class HumanMonkToken extends TokenImpl { public HumanMonkToken() { - super("Human Monk token", "1/1 green Monk creature token with \"{T}: Add {G}.\""); + super("Human Monk token", "1/1 green Human Monk creature token with \"{T}: Add {G}.\""); cardType.add(CardType.CREATURE); color.setGreen(true); subtype.add(SubType.HUMAN);