From 56d37b3496dbe644a6b935c483d427d3e8cbf01a Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 15 Apr 2023 21:11:25 -0400 Subject: [PATCH] [MOM] various text fixes --- Mage.Sets/src/mage/cards/e/EleshNorn.java | 12 ++++++++++-- .../src/mage/cards/i/InvasionOfRegatha.java | 7 +++++-- .../src/mage/cards/i/InvasionOfSegovia.java | 4 ++-- .../src/mage/cards/o/OmnathLocusOfAll.java | 18 ++++++++++++++---- .../cards/r/RealmbreakerTheInvasionTree.java | 1 + Mage.Sets/src/mage/cards/s/ScrappyBruiser.java | 3 ++- .../cards/t/ThaliaAndTheGitrogMonster.java | 10 ++++++---- Mage.Sets/src/mage/cards/t/TheGreatWork.java | 2 +- .../java/mage/verify/VerifyCardDataTest.java | 2 +- .../condition/common/CardsInHandCondition.java | 14 +++++++------- .../decorator/ConditionalActivatedAbility.java | 2 +- 11 files changed, 50 insertions(+), 25 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/EleshNorn.java b/Mage.Sets/src/mage/cards/e/EleshNorn.java index 8ffd88d23b..83dc157acd 100644 --- a/Mage.Sets/src/mage/cards/e/EleshNorn.java +++ b/Mage.Sets/src/mage/cards/e/EleshNorn.java @@ -15,7 +15,9 @@ import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; @@ -29,6 +31,12 @@ import java.util.UUID; */ public final class EleshNorn extends CardImpl { + private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("other creatures"); + + static { + filter.add(AnotherPredicate.instance); + } + public EleshNorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); @@ -51,7 +59,7 @@ public final class EleshNorn extends CardImpl { new ExileAndReturnSourceEffect(PutCards.BATTLEFIELD_TRANSFORMED), new ManaCostsImpl<>("{2}{W}") ); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/InvasionOfRegatha.java b/Mage.Sets/src/mage/cards/i/InvasionOfRegatha.java index 9493d980d7..6096e87685 100644 --- a/Mage.Sets/src/mage/cards/i/InvasionOfRegatha.java +++ b/Mage.Sets/src/mage/cards/i/InvasionOfRegatha.java @@ -44,8 +44,11 @@ public final class InvasionOfRegatha extends CardImpl { // When Invasion of Regatha enters the battlefield, it deals 4 damage to another target battle or opponent and 1 damage to up to one target creature. Ability ability = new EntersBattlefieldTriggeredAbility( - new DamageTargetEffect(4, "it") - .setUseOnlyTargetPointer(true) + new DamageTargetEffect( + 4, true, + "another target battle or opponent", "it" + + ).setUseOnlyTargetPointer(true) ); ability.addTarget(new TargetPermanentOrPlayer(filter)); ability.addEffect(new DamageTargetEffect(1) diff --git a/Mage.Sets/src/mage/cards/i/InvasionOfSegovia.java b/Mage.Sets/src/mage/cards/i/InvasionOfSegovia.java index 0e150c2a2e..fee4ad0287 100644 --- a/Mage.Sets/src/mage/cards/i/InvasionOfSegovia.java +++ b/Mage.Sets/src/mage/cards/i/InvasionOfSegovia.java @@ -7,7 +7,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.game.permanent.token.KrakenToken; +import mage.game.permanent.token.Kraken11Token; import java.util.UUID; @@ -27,7 +27,7 @@ public final class InvasionOfSegovia extends CardImpl { this.addAbility(new SiegeAbility()); // When Invasion of Segovia enters the battlefield, create two 1/1 blue Kraken creature tokens with trample. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KrakenToken(), 2))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new Kraken11Token(), 2))); } private InvasionOfSegovia(final InvasionOfSegovia card) { diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfAll.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfAll.java index 02803235ea..f4fd68accd 100644 --- a/Mage.Sets/src/mage/cards/o/OmnathLocusOfAll.java +++ b/Mage.Sets/src/mage/cards/o/OmnathLocusOfAll.java @@ -1,6 +1,7 @@ package mage.cards.o; import mage.MageInt; +import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -83,8 +84,8 @@ class OmnathLocusOfAllCardEffect extends OneShotEffect { OmnathLocusOfAllCardEffect() { super(Outcome.Benefit); this.staticText = "look at the top card of your library. You may reveal that card if it has three or more " + - "colored mana symbols in its mana cost. If you do, add three mana in any combination of colors and " + - "put it into your hand. If you don't reveal it, put it into your hand."; + "colored mana symbols in its mana cost. If you do, add three mana in any combination of its colors " + + "and put it into your hand. If you don't reveal it, put it into your hand."; } private OmnathLocusOfAllCardEffect(final OmnathLocusOfAllCardEffect effect) { @@ -115,9 +116,18 @@ class OmnathLocusOfAllCardEffect extends OneShotEffect { .map(c -> "" + c) .filter(wubrg::contains) .count() >= 3 - && player.chooseUse(outcome, "Reveal " + card.getName() + '?', source, game)) { + && player.chooseUse(outcome, "Reveal " + card.getName() + '?', source, game) + ) { player.revealCards(source, new CardsImpl(card), game); - new AddManaInAnyCombinationEffect(3).apply(game, source); + ColoredManaSymbol[] colors = card + .getColor(game) + .getColors() + .stream() + .map(ObjectColor::getOneColoredManaSymbol) + .toArray(ColoredManaSymbol[]::new); + if (colors.length > 0) { + new AddManaInAnyCombinationEffect(3, colors).apply(game, source); + } } player.moveCards(card, Zone.HAND, source, game); return true; diff --git a/Mage.Sets/src/mage/cards/r/RealmbreakerTheInvasionTree.java b/Mage.Sets/src/mage/cards/r/RealmbreakerTheInvasionTree.java index 3031bfaf4d..7c7b0db1e1 100644 --- a/Mage.Sets/src/mage/cards/r/RealmbreakerTheInvasionTree.java +++ b/Mage.Sets/src/mage/cards/r/RealmbreakerTheInvasionTree.java @@ -51,6 +51,7 @@ public final class RealmbreakerTheInvasionTree extends CardImpl { ability.addCost(new TapSourceCost()); ability.addEffect(new RealmbreakerTheInvasionTreeEffect()); ability.addTarget(new TargetOpponent()); + this.addAbility(ability); // {10}, {T}, Sacrifice Realmbreaker, the Invasion Tree: Search your library for any number of Praetor cards, put them onto the battlefield, then shuffle. ability = new SimpleActivatedAbility(new SearchLibraryPutInPlayEffect( diff --git a/Mage.Sets/src/mage/cards/s/ScrappyBruiser.java b/Mage.Sets/src/mage/cards/s/ScrappyBruiser.java index b12571161c..61dd8bf3c8 100644 --- a/Mage.Sets/src/mage/cards/s/ScrappyBruiser.java +++ b/Mage.Sets/src/mage/cards/s/ScrappyBruiser.java @@ -31,7 +31,8 @@ public final class ScrappyBruiser extends CardImpl { this.toughness = new MageInt(4); // Whenever Scrappy Bruiser attacks, up to one target attacking creature gets +2/+0 and gains trample until end of turn. Return that creature to its owner's hand at end of combat. - Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(2, 0)); + Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(2, 0) + .setText("up to one target attacking creature gets +2/+0")); ability.addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance()) .setText("and gains trample until end of turn")); ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/t/ThaliaAndTheGitrogMonster.java b/Mage.Sets/src/mage/cards/t/ThaliaAndTheGitrogMonster.java index cdd72dfa12..a1e803e7e3 100644 --- a/Mage.Sets/src/mage/cards/t/ThaliaAndTheGitrogMonster.java +++ b/Mage.Sets/src/mage/cards/t/ThaliaAndTheGitrogMonster.java @@ -14,7 +14,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; import java.util.UUID; @@ -26,6 +25,7 @@ public final class ThaliaAndTheGitrogMonster extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("creatures and nonbasic lands your opponents control"); + private static final FilterPermanent filter2 = new FilterPermanent("a creature or land"); static { filter.add(Predicates.or( @@ -36,6 +36,10 @@ public final class ThaliaAndTheGitrogMonster extends CardImpl { ) )); filter.add(TargetController.OPPONENT.getControllerPredicate()); + filter2.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.LAND.getPredicate() + )); } public ThaliaAndTheGitrogMonster(UUID ownerId, CardSetInfo setInfo) { @@ -63,9 +67,7 @@ public final class ThaliaAndTheGitrogMonster extends CardImpl { this.addAbility(new SimpleStaticAbility(new PermanentsEnterBattlefieldTappedEffect(filter))); // Whenever Thalia and The Gitrog Monster attacks, sacrifice a creature or land, then draw a card. - Ability ability = new AttacksTriggeredAbility(new SacrificeControllerEffect( - StaticFilters.FILTER_CONTROLLED_ARTIFACT_OR_CREATURE_SHORT_TEXT, 1, null - )); + Ability ability = new AttacksTriggeredAbility(new SacrificeControllerEffect(filter2, 1, null)); ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TheGreatWork.java b/Mage.Sets/src/mage/cards/t/TheGreatWork.java index 5e908ba6d1..116b281fab 100644 --- a/Mage.Sets/src/mage/cards/t/TheGreatWork.java +++ b/Mage.Sets/src/mage/cards/t/TheGreatWork.java @@ -139,7 +139,7 @@ class TheGreatWorkReplacementEffect extends ReplacementEffectImpl { public TheGreatWorkReplacementEffect() { super(Duration.EndOfTurn, Outcome.Exile); - staticText = "iIf a spell cast this way would be put into a graveyard, exile it instead"; + staticText = "if a spell cast this way would be put into a graveyard, exile it instead"; } private TheGreatWorkReplacementEffect(final TheGreatWorkReplacementEffect effect) { diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index bf588b24f4..bd0c12929f 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -87,7 +87,7 @@ public class VerifyCardDataTest { private static final List evergreenKeywords = Arrays.asList( "flying", "lifelink", "menace", "trample", "haste", "first strike", "hexproof", "fear", "deathtouch", "double strike", "indestructible", "reach", "flash", "defender", "vigilance", - "plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk", "myriad" + "plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk", "myriad", "prowess" ); private static final List doubleNumbers = new ArrayList<>(); diff --git a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java index d40f9a1eab..db0de6fd71 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java @@ -88,31 +88,31 @@ public class CardsInHandCondition implements Condition { StringBuilder sb = new StringBuilder("if"); switch (targetController) { case YOU: - sb.append(" you have"); + sb.append(" you have "); break; case ANY: - sb.append(" each player has"); + sb.append(" each player has "); break; } switch (this.type) { case FEWER_THAN: - sb.append(CardUtil.numberToText(count)); + sb.append(CardUtil.numberToText(count - 1)); sb.append(" or fewer "); break; case MORE_THAN: - sb.append(CardUtil.numberToText(count)); + sb.append(CardUtil.numberToText(count + 1)); sb.append(" or more "); break; case EQUAL_TO: if (count > 0) { - sb.append(" exactly "); + sb.append("exactly "); sb.append(CardUtil.numberToText(count)); } else { - sb.append(" no "); + sb.append("no "); } break; } - sb.append(" cards in hand"); + sb.append("cards in hand"); return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java index 5617df1b41..b8e4803281 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java @@ -78,7 +78,7 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { StringBuilder sb = new StringBuilder(super.getRule()); sb.append(" Activate only "); if (timing == TimingRule.SORCERY) { - sb.append("as a sorcery and only"); + sb.append("as a sorcery and only "); } String conditionText = condition.toString(); if (conditionText.startsWith("during")