diff --git a/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java b/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java index 29411ee59d8..84d371d943d 100644 --- a/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java +++ b/Mage.Sets/src/mage/cards/e/EidolonOfCountlessBattles.java @@ -44,7 +44,7 @@ public final class EidolonOfCountlessBattles extends CardImpl { // Eidolon of Countless Battles and enchanted creature get +1/+1 for each creature you control and +1/+1 for each Aura you control. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1); Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield); - effect.setText("{this} and enchanted creature get +1/+1 for each creature you control"); + effect.setText("{this} and enchanted creature each get +1/+1 for each creature you control"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield); effect.setText("and +1/+1 for each Aura you control"); diff --git a/Mage.Sets/src/mage/cards/e/EllivereOfTheWildCourt.java b/Mage.Sets/src/mage/cards/e/EllivereOfTheWildCourt.java index 45ee9b6be98..be67e26f6b7 100644 --- a/Mage.Sets/src/mage/cards/e/EllivereOfTheWildCourt.java +++ b/Mage.Sets/src/mage/cards/e/EllivereOfTheWildCourt.java @@ -40,7 +40,7 @@ public final class EllivereOfTheWildCourt extends CardImpl { // Whenever Ellivere of the Wild Court enters the battlefield or attacks, create a Virtuous Role token attached to another target creature you control. Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new CreateRoleAttachedTargetEffect(RoleType.VIRTUOUS)); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL)); this.addAbility(ability); // Whenever an enchanted creature you control deals combat damage to a player, draw a card. diff --git a/Mage.Sets/src/mage/cards/g/GiantInheritance.java b/Mage.Sets/src/mage/cards/g/GiantInheritance.java index 43eacea99f8..679975fa152 100644 --- a/Mage.Sets/src/mage/cards/g/GiantInheritance.java +++ b/Mage.Sets/src/mage/cards/g/GiantInheritance.java @@ -46,7 +46,10 @@ public final class GiantInheritance extends CardImpl { this.addAbility(ability); // When Giant Inheritance is put into a graveyard from the battlefield, return it to its owner's hand. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility( + new ReturnToHandSourceEffect() + .setText("return it to its owner's hand") + )); } private GiantInheritance(final GiantInheritance card) { diff --git a/Mage.Sets/src/mage/cards/k/KorvoldGleefulGlutton.java b/Mage.Sets/src/mage/cards/k/KorvoldGleefulGlutton.java index 2fa9e95236b..f6074c44fb7 100644 --- a/Mage.Sets/src/mage/cards/k/KorvoldGleefulGlutton.java +++ b/Mage.Sets/src/mage/cards/k/KorvoldGleefulGlutton.java @@ -63,8 +63,9 @@ public final class KorvoldGleefulGlutton extends CardImpl { // Whenever Korvold deals combat damage to a player, put X +1/+1 counters on Korvold and draw X cards, where X is the number of permanent types among cards in your graveyard. Ability combatDamageAbility = new DealsCombatDamageToAPlayerTriggeredAbility( - new AddCountersSourceEffect(CounterType.P1P1.createInstance(), PermanentTypesInGraveyardCount.instance, true), - false + new AddCountersSourceEffect(CounterType.P1P1.createInstance(), PermanentTypesInGraveyardCount.instance, true) + .setText("put X +1/+1 counters on {this}"), + false ); combatDamageAbility.addEffect(new DrawCardSourceControllerEffect(PermanentTypesInGraveyardCount.instance).setText("and draw X cards, where X is the number of permanent types among cards in your graveyard")); combatDamageAbility.addHint(new ValueHint("Permanent types among cards in your graveyard", PermanentTypesInGraveyardCount.instance)); diff --git a/Mage.Sets/src/mage/cards/n/NymrisOonasTrickster.java b/Mage.Sets/src/mage/cards/n/NymrisOonasTrickster.java index 23d7d5bdd27..a113819efb0 100644 --- a/Mage.Sets/src/mage/cards/n/NymrisOonasTrickster.java +++ b/Mage.Sets/src/mage/cards/n/NymrisOonasTrickster.java @@ -34,10 +34,10 @@ public final class NymrisOonasTrickster extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever you cast your first spell during each opponent's turn, look at the top two cards of your library. - // Put one of those cards into your hand and the other into your graveyard. + // Whenever you cast your first spell during each opponent's turn, look at the top two cards of your library. Put one of those cards into your hand and the other into your graveyard. this.addAbility(new FirstSpellOpponentsTurnTriggeredAbility( - new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.GRAVEYARD), + new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.GRAVEYARD) + .setText("look at the top two cards of your library. Put one of those cards into your hand and the other into your graveyard"), false)); } diff --git a/Mage.Sets/src/mage/cards/p/PicklockPrankster.java b/Mage.Sets/src/mage/cards/p/PicklockPrankster.java index 546bb8780d6..34d8d932f20 100644 --- a/Mage.Sets/src/mage/cards/p/PicklockPrankster.java +++ b/Mage.Sets/src/mage/cards/p/PicklockPrankster.java @@ -18,7 +18,7 @@ import java.util.UUID; */ public final class PicklockPrankster extends AdventureCard { - private static final FilterCard filter = new FilterCard("instant, sorcery, or Faerie card"); + private static final FilterCard filter = new FilterCard("an instant, sorcery, or Faerie card"); static { filter.add(Predicates.or( @@ -44,7 +44,7 @@ public final class PicklockPrankster extends AdventureCard { // Free the Fae // Mill four cards. Then put an instant, sorcery, or Faerie card from among the milled cards into your hand. - this.getSpellCard().getSpellAbility().addEffect(new MillThenPutInHandEffect(4, filter)); + this.getSpellCard().getSpellAbility().addEffect(new MillThenPutInHandEffect(4, filter, true)); this.finalizeAdventure(); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedIsle.java b/Mage.Sets/src/mage/cards/t/TaintedIsle.java index 3b445cab3aa..f4ef8dade40 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedIsle.java +++ b/Mage.Sets/src/mage/cards/t/TaintedIsle.java @@ -22,7 +22,7 @@ import java.util.UUID; */ public final class TaintedIsle extends CardImpl { - private static final FilterLandPermanent filter = new FilterLandPermanent("you control a swamp"); + private static final FilterLandPermanent filter = new FilterLandPermanent("you control a Swamp"); static { filter.add(SubType.SWAMP.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/t/TimelyWard.java b/Mage.Sets/src/mage/cards/t/TimelyWard.java index 8bdcaba560c..0e9d9ef01eb 100644 --- a/Mage.Sets/src/mage/cards/t/TimelyWard.java +++ b/Mage.Sets/src/mage/cards/t/TimelyWard.java @@ -39,7 +39,7 @@ public final class TimelyWard extends CardImpl { // You may cast this spell as though it had flash if it targets a commander. this.addAbility(new CastAsThoughItHadFlashIfConditionAbility(condition, - "You may cast this spell as though it had flash if it targets a commander." + "You may cast {this} as though it had flash if it targets a commander." )); // Enchant creature diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 7d50fbee52d..d381d1b1d99 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -63,7 +63,7 @@ public class VerifyCardDataTest { private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); - private static final String FULL_ABILITIES_CHECK_SET_CODES = "WOE"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all + private static final String FULL_ABILITIES_CHECK_SET_CODES = "WOE;WOC"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all private static final boolean CHECK_ONLY_ABILITIES_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run @@ -2153,8 +2153,10 @@ public class VerifyCardDataTest { }*/ private static boolean compareText(String cardText, String refText, String name) { return cardText.equals(refText) - || cardText.replace(name, name.split(", ")[0]).equals(refText) - || cardText.replace(name, name.split(" ")[0]).equals(refText); + || cardText.replace(name, name.split(", ")[0]) + .equals(refText.replace(name, name.split(", ")[0])) + || cardText.replace(name, name.split(" ")[0]) + .equals(refText.replace(name, name.split(" ")[0])); } private static boolean checkForEffect(Card card, Class effectClazz) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/MillThenPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/MillThenPutInHandEffect.java index 37820e93b3b..ca013bb0d83 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/MillThenPutInHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/MillThenPutInHandEffect.java @@ -21,6 +21,7 @@ import mage.util.CardUtil; public class MillThenPutInHandEffect extends OneShotEffect { private final int amount; + private final boolean mandatory; // If true, putting a card in hand is mandatory if possible. private final FilterCard filter; private final Effect otherwiseEffect; @@ -28,16 +29,26 @@ public class MillThenPutInHandEffect extends OneShotEffect { this(amount, filter, null); } + public MillThenPutInHandEffect(int amount, FilterCard filter, boolean mandatory) { + this(amount, filter, null, mandatory); + } + public MillThenPutInHandEffect(int amount, FilterCard filter, Effect otherwiseEffect) { + this(amount, filter, otherwiseEffect, false); + } + + public MillThenPutInHandEffect(int amount, FilterCard filter, Effect otherwiseEffect, boolean mandatory) { super(Outcome.Benefit); this.amount = amount; this.filter = filter; + this.mandatory = mandatory; this.otherwiseEffect = otherwiseEffect; } private MillThenPutInHandEffect(final MillThenPutInHandEffect effect) { super(effect); this.amount = effect.amount; + this.mandatory = effect.mandatory; this.filter = effect.filter; this.otherwiseEffect = effect.otherwiseEffect; } @@ -57,7 +68,7 @@ public class MillThenPutInHandEffect extends OneShotEffect { if (cards.isEmpty()) { return applyOtherwiseEffect(game, source); } - TargetCard target = new TargetCard(0, 1, Zone.ALL, filter); + TargetCard target = new TargetCard(this.mandatory ? 1 : 0, 1, Zone.ALL, filter); player.choose(Outcome.DrawCard, cards, target, source, game); Card card = game.getCard(target.getFirstTarget()); if (card == null) { @@ -82,15 +93,12 @@ public class MillThenPutInHandEffect extends OneShotEffect { if (staticText == null && !staticText.isEmpty()) { return staticText; } - StringBuilder sb = new StringBuilder("mill "); - sb.append(CardUtil.numberToText(amount)); - sb.append(" cards. You may put "); - sb.append(filter.getMessage()); - sb.append(" from among the milled cards into your hand"); + String text = "mill " + CardUtil.numberToText(amount) + " cards. "; + text += this.mandatory ? "Then " : "You may "; + text += "put " + filter.getMessage() + " from among the milled cards into your hand"; if (otherwiseEffect != null) { - sb.append(". If you don't, "); - sb.append(otherwiseEffect.getText(mode)); + text += ". If you don't, " + otherwiseEffect.getText(mode); } - return sb.toString(); + return text; } }