From 2675b75c60e8cc62ddd70c1c76c21f54ab35e6e5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 3 Mar 2022 17:57:39 -0500 Subject: [PATCH] various text fixes --- Mage.Sets/src/mage/cards/a/AlrundGodOfTheCosmos.java | 4 ++-- Mage.Sets/src/mage/cards/b/BlizzardBrawl.java | 2 +- Mage.Sets/src/mage/cards/b/BloodPrice.java | 2 +- Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java | 2 +- Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java | 1 + Mage.Sets/src/mage/cards/g/GlimpseTheCosmos.java | 2 +- Mage.Sets/src/mage/cards/j/JaggedScarArchers.java | 2 +- .../src/mage/cards/r/ReidaneGodOfTheWorthy.java | 5 ++++- .../test/java/mage/verify/VerifyCardDataTest.java | 12 ++++++------ .../continuous/SetPowerToughnessTargetEffect.java | 8 +++++--- 10 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AlrundGodOfTheCosmos.java b/Mage.Sets/src/mage/cards/a/AlrundGodOfTheCosmos.java index 35b4748f591..73f77296623 100644 --- a/Mage.Sets/src/mage/cards/a/AlrundGodOfTheCosmos.java +++ b/Mage.Sets/src/mage/cards/a/AlrundGodOfTheCosmos.java @@ -50,7 +50,7 @@ public final class AlrundGodOfTheCosmos extends ModalDoubleFacesCard { // Alrund gets +1/+1 for each card in your hand and each foretold card you own in exile. Effect effect = new BoostSourceEffect(AlrundGodOfTheCosmosValue.instance, AlrundGodOfTheCosmosValue.instance, Duration.EndOfGame); - effect.setText("Alrund gets +1/+1 for each card in your hand and each foretold card you own in exile."); + effect.setText("{this} gets +1/+1 for each card in your hand and each foretold card you own in exile."); Ability ability = new SimpleStaticAbility(effect); this.getLeftHalfCard().addAbility(ability); @@ -89,7 +89,7 @@ class AlrundGodOfTheCosmosEffect extends OneShotEffect { public AlrundGodOfTheCosmosEffect() { super(Outcome.Neutral); - staticText = ", then reveal the top two cards of your library. Put all cards revealed this way of the chosen type into your hand and the rest on the bottom of your library in any order"; + staticText = ", then reveal the top two cards of your library. Put all cards of the chosen type revealed this way into your hand and the rest on the bottom of your library in any order"; } public AlrundGodOfTheCosmosEffect(final AlrundGodOfTheCosmosEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BlizzardBrawl.java b/Mage.Sets/src/mage/cards/b/BlizzardBrawl.java index 4d82979e5e6..50eacff9f7c 100644 --- a/Mage.Sets/src/mage/cards/b/BlizzardBrawl.java +++ b/Mage.Sets/src/mage/cards/b/BlizzardBrawl.java @@ -61,7 +61,7 @@ class BlizzardBrawlEffect extends OneShotEffect { staticText = "Choose target creature you control and target creature you don't control. " + "If you control three or more snow permanents, the creature you control gets +1/+0 " + "and gains indestructible until end of turn. " + - "Then those creatures fight each other." + + "Then those creatures fight each other. " + "(Each deals damage equal to its power to the other.)"; } diff --git a/Mage.Sets/src/mage/cards/b/BloodPrice.java b/Mage.Sets/src/mage/cards/b/BloodPrice.java index 68dde6c913b..25ec9f02799 100644 --- a/Mage.Sets/src/mage/cards/b/BloodPrice.java +++ b/Mage.Sets/src/mage/cards/b/BloodPrice.java @@ -25,7 +25,7 @@ public final class BloodPrice extends CardImpl { StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false, false, Zone.HAND, false, false, true - ).setText("Look at at the top four cards of your library." + + ).setText("Look at at the top four cards of your library. " + "Put two of them into your hand and the rest on the bottom of your library in any order ")); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java b/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java index 58cf085cc49..0e81a67b938 100644 --- a/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java +++ b/Mage.Sets/src/mage/cards/d/DwynenGiltLeafDaen.java @@ -42,7 +42,7 @@ public final class DwynenGiltLeafDaen extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(SubType.ELF, "Elf creatures"), true))); // Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control. - this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), false)); + this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)).setText("you gain 1 life for each attacking Elf you control"), false)); } private DwynenGiltLeafDaen(final DwynenGiltLeafDaen card) { diff --git a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java index 008265216f5..195da71958a 100644 --- a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java +++ b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java @@ -28,6 +28,7 @@ public final class EvangelOfHeliod extends CardImpl { // When Evangel of Heliod enters the battlefield, create a number of 1/1 white Soldier creature tokens equal to your devotion to white. this.addAbility(new EntersBattlefieldTriggeredAbility( new CreateTokenEffect(new SoldierToken(), DevotionCount.W) + .setText("create a number of 1/1 white Soldier creature tokens equal to your devotion to white") ).addHint(DevotionCount.W.getHint())); } diff --git a/Mage.Sets/src/mage/cards/g/GlimpseTheCosmos.java b/Mage.Sets/src/mage/cards/g/GlimpseTheCosmos.java index be986830a9e..b60d98f16df 100644 --- a/Mage.Sets/src/mage/cards/g/GlimpseTheCosmos.java +++ b/Mage.Sets/src/mage/cards/g/GlimpseTheCosmos.java @@ -105,7 +105,7 @@ class GlimpseTheCosmosReplacementEffect extends ReplacementEffectImpl { public GlimpseTheCosmosReplacementEffect() { super(Duration.EndOfGame, Outcome.Benefit); - staticText = "As long as you control a Giant, you may cast {this} from your graveyard by paying {U} rather than paying its mana cost. If you cast {this} this way and it would be put into your graveyard, exile it instead"; + staticText = "As long as you control a Giant, you may cast {this} from your graveyard by paying {U} rather than paying its mana cost. If you cast {this} this way and it would be put into your graveyard, exile it instead"; } public GlimpseTheCosmosReplacementEffect(final GlimpseTheCosmosReplacementEffect effect) { diff --git a/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java b/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java index 9c883b75b4c..8c71bdc4b70 100644 --- a/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java +++ b/Mage.Sets/src/mage/cards/j/JaggedScarArchers.java @@ -47,7 +47,7 @@ public final class JaggedScarArchers extends CardImpl { // Jagged-Scar Archers's power and toughness are each equal to the number of Elves you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(controlledElvesFilter), Duration.EndOfGame))); // {tap}: Jagged-Scar Archers deals damage equal to its power to target creature with flying. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()).setText("{this} deals damage equal to its power to target creature with flying"), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(flyingCreatureFilter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/ReidaneGodOfTheWorthy.java b/Mage.Sets/src/mage/cards/r/ReidaneGodOfTheWorthy.java index 5395bb93631..bf21dbc3f19 100644 --- a/Mage.Sets/src/mage/cards/r/ReidaneGodOfTheWorthy.java +++ b/Mage.Sets/src/mage/cards/r/ReidaneGodOfTheWorthy.java @@ -182,6 +182,9 @@ class ValkmiraProtectorsShieldTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { + if (event.getTargetId().equals(getSourceId())) { + return false; + } StackObject stackObject = game.getStack().getStackObject(event.getSourceId()); if (stackObject == null || !game.getOpponents(getControllerId()).contains(stackObject.getControllerId())) { return false; @@ -200,7 +203,7 @@ class ValkmiraProtectorsShieldTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you or a permanent you control becomes the target of a spell or ability " + + return "Whenever you or another permanent you control becomes the target of a spell or ability " + "an opponent controls, counter that spell or ability unless its controller pays {1}."; } } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index b429833eff2..cb80ec1e713 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -62,7 +62,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODE = "M21"; // check all abilities and output cards with wrong abilities texts; + private static final String FULL_ABILITIES_CHECK_SET_CODE = "KHC"; // 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 @@ -1630,16 +1630,16 @@ public class VerifyCardDataTest { refText = refText.replaceAll("\\[([\\−\\+]?\\d*)\\]\\: ", "$1: ").replaceAll("\\[\\−X\\]\\: ", "-X: "); // evergreen keyword fix - for (String s : refText.split("[\\$\\\n]")) { + for (String s : refText.replaceAll(" \\(.+?\\)", "").split("[\\$\\\n]")) { if (Arrays - .stream(s.split(", ")) + .stream(s.split("[,;] ")) .map(String::toLowerCase) .allMatch(VerifyCardDataTest::evergreenCheck)) { String replacement = Arrays - .stream(s.split(", ")) + .stream(s.split("[,;] ")) .map(CardUtil::getTextWithFirstCharUpperCase) - .reduce("", (a, b) -> a + '\n' + b); - refText = refText.replace(s, replacement.substring(1)); + .collect(Collectors.joining("\n")); + refText = refText.replace(s, replacement); } } // modal spell fix diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java index 31b08e6b2d6..a888c15697a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetPowerToughnessTargetEffect.java @@ -70,9 +70,11 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl { } StringBuilder sb = new StringBuilder(); if (mode.getTargets().get(0).getMinNumberOfTargets() == 0) { - sb.append("up to "); - sb.append(CardUtil.numberToText(mode.getTargets().get(0).getMaxNumberOfTargets())); - sb.append(' '); + if (!mode.getTargets().get(0).getTargetName().startsWith("any")) { + sb.append("up to "); + sb.append(CardUtil.numberToText(mode.getTargets().get(0).getMaxNumberOfTargets())); + sb.append(' '); + } } if (!mode.getTargets().get(0).getTargetName().contains("target")) { sb.append("target ");