From 5c30467c48e9e0ee2f426cb4368a3f9c4d681ee2 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 25 Feb 2023 14:34:26 +0400 Subject: [PATCH] Fixed wrong/miss numbers in card rules (see #10067 and prev commit) --- Mage.Sets/src/mage/cards/a/AdvancedStitchwing.java | 3 ++- Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java | 2 +- Mage.Sets/src/mage/cards/a/AllosaurusRider.java | 2 +- Mage.Sets/src/mage/cards/a/AnuridBrushhopper.java | 3 ++- Mage.Sets/src/mage/cards/a/AvatarOfDiscord.java | 3 ++- Mage.Sets/src/mage/cards/b/BalancingAct.java | 3 ++- Mage.Sets/src/mage/cards/b/BenthicExplorers.java | 2 +- Mage.Sets/src/mage/cards/b/BetrayalOfFlesh.java | 2 +- Mage.Sets/src/mage/cards/b/Breakthrough.java | 3 ++- Mage.Sets/src/mage/cards/c/CatharticReunion.java | 3 ++- Mage.Sets/src/mage/cards/c/Commandeer.java | 2 +- Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java | 2 +- Mage.Sets/src/mage/cards/c/CosmicLarva.java | 2 +- Mage.Sets/src/mage/cards/d/DarkSupplicant.java | 2 +- Mage.Sets/src/mage/cards/d/DemonicCollusion.java | 3 ++- Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java | 2 +- Mage.Sets/src/mage/cards/d/DrivnodCarnageDominus.java | 2 +- Mage.Sets/src/mage/cards/f/FaeOfWishes.java | 4 +--- Mage.Sets/src/mage/cards/f/Fireblast.java | 2 +- Mage.Sets/src/mage/cards/f/Forbid.java | 3 ++- Mage.Sets/src/mage/cards/f/FungalPlots.java | 2 +- Mage.Sets/src/mage/cards/f/FuryOfTheHorde.java | 2 +- Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java | 3 ++- Mage.Sets/src/mage/cards/g/Ghoulsteed.java | 3 ++- Mage.Sets/src/mage/cards/g/GreelMindRaker.java | 5 ++--- Mage.Sets/src/mage/cards/h/HauntedDead.java | 3 ++- Mage.Sets/src/mage/cards/i/IlluminatedFolio.java | 4 ++-- Mage.Sets/src/mage/cards/j/JeweledSpirit.java | 2 +- Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java | 3 ++- Mage.Sets/src/mage/cards/k/KeldonArsonist.java | 2 +- Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java | 3 +-- Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java | 3 ++- Mage.Sets/src/mage/cards/l/Leviathan.java | 4 ++-- Mage.Sets/src/mage/cards/l/Lifespinner.java | 2 +- Mage.Sets/src/mage/cards/l/LotusVale.java | 2 +- Mage.Sets/src/mage/cards/m/MagetaTheLion.java | 3 ++- Mage.Sets/src/mage/cards/m/MagmaBurst.java | 2 +- Mage.Sets/src/mage/cards/m/MeteorStorm.java | 2 +- Mage.Sets/src/mage/cards/m/MoggAlarm.java | 2 +- Mage.Sets/src/mage/cards/m/MoldDemon.java | 2 +- Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java | 3 ++- Mage.Sets/src/mage/cards/n/NightSoil.java | 2 +- Mage.Sets/src/mage/cards/o/OrganGrinder.java | 2 +- Mage.Sets/src/mage/cards/o/OrmosArchiveKeeper.java | 2 +- Mage.Sets/src/mage/cards/p/Phantasmagorian.java | 3 ++- Mage.Sets/src/mage/cards/p/PlagueReaver.java | 5 ++--- Mage.Sets/src/mage/cards/p/PrimevalForce.java | 2 +- Mage.Sets/src/mage/cards/p/ProwlingPangolin.java | 2 +- Mage.Sets/src/mage/cards/p/PsychicAllergy.java | 2 +- Mage.Sets/src/mage/cards/p/Pulverize.java | 2 +- Mage.Sets/src/mage/cards/r/RathiDragon.java | 2 +- Mage.Sets/src/mage/cards/r/RuthlessKnave.java | 2 +- Mage.Sets/src/mage/cards/s/ScorchedRuins.java | 2 +- Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java | 2 +- Mage.Sets/src/mage/cards/s/SolarTide.java | 2 +- Mage.Sets/src/mage/cards/s/SoldeviSage.java | 4 ++-- Mage.Sets/src/mage/cards/s/SolphimMayhemDominus.java | 3 ++- Mage.Sets/src/mage/cards/s/SoulRansom.java | 3 ++- Mage.Sets/src/mage/cards/s/SoulSpike.java | 2 +- Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java | 2 +- Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java | 2 +- Mage.Sets/src/mage/cards/s/StitchwingSkaab.java | 3 ++- Mage.Sets/src/mage/cards/s/Sunscour.java | 2 +- Mage.Sets/src/mage/cards/t/TorpidMoloch.java | 2 +- Mage.Sets/src/mage/cards/t/TorrentOfStone.java | 2 +- Mage.Sets/src/mage/cards/v/VoldarenPariah.java | 2 +- Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java | 2 +- Mage.Sets/src/mage/cards/z/ZombieInfestation.java | 3 ++- .../java/mage/abilities/costs/common/DiscardTargetCost.java | 2 +- .../mage/abilities/costs/common/ExileFromGraveCost.java | 2 +- .../java/mage/abilities/costs/common/ExileFromHandCost.java | 2 +- .../java/mage/abilities/costs/common/ExileTargetCost.java | 2 +- .../costs/common/ReturnToHandFromGraveyardCost.java | 6 +----- .../abilities/costs/common/RevealTargetFromHandCost.java | 2 +- Mage/src/main/java/mage/target/Target.java | 6 ++++++ 75 files changed, 105 insertions(+), 88 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AdvancedStitchwing.java b/Mage.Sets/src/mage/cards/a/AdvancedStitchwing.java index ee89201842..eb45bfa5d3 100644 --- a/Mage.Sets/src/mage/cards/a/AdvancedStitchwing.java +++ b/Mage.Sets/src/mage/cards/a/AdvancedStitchwing.java @@ -15,6 +15,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -34,7 +35,7 @@ public final class AdvancedStitchwing extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {2}{U}, Discard two cards: Return Advanced Stitchwing from your graveyard to the battlefield tapped. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{2}{U}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java index 3af1dca7b3..9388f52481 100644 --- a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java +++ b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java @@ -40,7 +40,7 @@ public final class AlexiZephyrMage extends CardImpl { effect.setText("Return X target creatures to their owner's hands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}{U}")); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURES)); ability.setTargetAdjuster(XTargetsAdjuster.instance); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AllosaurusRider.java b/Mage.Sets/src/mage/cards/a/AllosaurusRider.java index 7b14ab8030..a8ca68937c 100644 --- a/Mage.Sets/src/mage/cards/a/AllosaurusRider.java +++ b/Mage.Sets/src/mage/cards/a/AllosaurusRider.java @@ -28,7 +28,7 @@ import mage.target.common.TargetCardInHand; */ public final class AllosaurusRider extends CardImpl { - private static final FilterCard filter = new FilterCard("two green cards"); + private static final FilterCard filter = new FilterCard("green cards"); static { filter.add(new ColorPredicate(ObjectColor.GREEN)); diff --git a/Mage.Sets/src/mage/cards/a/AnuridBrushhopper.java b/Mage.Sets/src/mage/cards/a/AnuridBrushhopper.java index c509e050fa..dfce8cc3bb 100644 --- a/Mage.Sets/src/mage/cards/a/AnuridBrushhopper.java +++ b/Mage.Sets/src/mage/cards/a/AnuridBrushhopper.java @@ -12,6 +12,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -30,7 +31,7 @@ public final class AnuridBrushhopper extends CardImpl { // Discard two cards: Exile Anurid Brushhopper. Return it to the battlefield under its owner's control at the beginning of the next end step. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileReturnBattlefieldOwnerNextEndStepSourceEffect(), - new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))))); + new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS)))); } private AnuridBrushhopper(final AnuridBrushhopper card) { diff --git a/Mage.Sets/src/mage/cards/a/AvatarOfDiscord.java b/Mage.Sets/src/mage/cards/a/AvatarOfDiscord.java index 97fe91549a..1400300786 100644 --- a/Mage.Sets/src/mage/cards/a/AvatarOfDiscord.java +++ b/Mage.Sets/src/mage/cards/a/AvatarOfDiscord.java @@ -12,6 +12,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -31,7 +32,7 @@ public final class AvatarOfDiscord extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Avatar of Discord enters the battlefield, sacrifice it unless you discard two cards. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))))); } private AvatarOfDiscord(final AvatarOfDiscord card) { diff --git a/Mage.Sets/src/mage/cards/b/BalancingAct.java b/Mage.Sets/src/mage/cards/b/BalancingAct.java index afc7850a6a..18773fe1bc 100644 --- a/Mage.Sets/src/mage/cards/b/BalancingAct.java +++ b/Mage.Sets/src/mage/cards/b/BalancingAct.java @@ -8,6 +8,7 @@ import mage.cards.Cards; import mage.constants.CardType; import mage.constants.Outcome; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -128,7 +129,7 @@ class BalancingActDiscardEffect extends OneShotEffect { if (player == null) { continue; } - TargetCardInHand target = new TargetCardInHand(minCard, new FilterCard()); + TargetCardInHand target = new TargetCardInHand(minCard, StaticFilters.FILTER_CARD); if (target.choose(Outcome.Benefit, player.getId(), source.getSourceId(), source, game)) { Cards cards = player.getHand().copy(); cards.removeIf(target.getTargets()::contains); diff --git a/Mage.Sets/src/mage/cards/b/BenthicExplorers.java b/Mage.Sets/src/mage/cards/b/BenthicExplorers.java index 661e60a304..0192360492 100644 --- a/Mage.Sets/src/mage/cards/b/BenthicExplorers.java +++ b/Mage.Sets/src/mage/cards/b/BenthicExplorers.java @@ -71,7 +71,7 @@ class BenthicExplorersCost extends CostImpl { public BenthicExplorersCost(TargetLandPermanent target) { this.target = target; - this.text = "Untap " + CardUtil.numberToText(target.getMaxNumberOfTargets(), "") + ' ' + target.getTargetName(); + this.text = "Untap " + target.getDescription(); } public BenthicExplorersCost(final BenthicExplorersCost cost) { diff --git a/Mage.Sets/src/mage/cards/b/BetrayalOfFlesh.java b/Mage.Sets/src/mage/cards/b/BetrayalOfFlesh.java index 08741a0f53..82670293c5 100644 --- a/Mage.Sets/src/mage/cards/b/BetrayalOfFlesh.java +++ b/Mage.Sets/src/mage/cards/b/BetrayalOfFlesh.java @@ -37,7 +37,7 @@ public final class BetrayalOfFlesh extends CardImpl { mode.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); this.getSpellAbility().getModes().addMode(mode); // Entwine-Sacrifice three lands. - this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("three lands"), true)))); + this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true)))); } private BetrayalOfFlesh(final BetrayalOfFlesh card) { diff --git a/Mage.Sets/src/mage/cards/b/Breakthrough.java b/Mage.Sets/src/mage/cards/b/Breakthrough.java index 62bc8b18ae..132a19e4f8 100644 --- a/Mage.Sets/src/mage/cards/b/Breakthrough.java +++ b/Mage.Sets/src/mage/cards/b/Breakthrough.java @@ -9,6 +9,7 @@ import mage.cards.Cards; import mage.constants.CardType; import mage.constants.Outcome; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInHand; @@ -66,7 +67,7 @@ class BreakthroughEffect extends OneShotEffect { if (amountToKeep == 0) { player.discard(player.getHand(), false, source, game); } else if (amountToKeep < player.getHand().size()) { - TargetCardInHand target = new TargetCardInHand(amountToKeep, new FilterCard()); + TargetCardInHand target = new TargetCardInHand(amountToKeep, StaticFilters.FILTER_CARD); target.setTargetName("cards to keep"); target.choose(Outcome.Benefit, player.getId(), source.getSourceId(), source, game); Cards cards = player.getHand().copy(); diff --git a/Mage.Sets/src/mage/cards/c/CatharticReunion.java b/Mage.Sets/src/mage/cards/c/CatharticReunion.java index 414bff97ef..8b34805ae7 100644 --- a/Mage.Sets/src/mage/cards/c/CatharticReunion.java +++ b/Mage.Sets/src/mage/cards/c/CatharticReunion.java @@ -8,6 +8,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -20,7 +21,7 @@ public final class CatharticReunion extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); // As an additional cost to cast Cathartic Reunion, discard two cards. - this.getSpellAbility().addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + this.getSpellAbility().addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); // Draw three cards. getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3)); diff --git a/Mage.Sets/src/mage/cards/c/Commandeer.java b/Mage.Sets/src/mage/cards/c/Commandeer.java index 30a294bf99..27eb9cfc6d 100644 --- a/Mage.Sets/src/mage/cards/c/Commandeer.java +++ b/Mage.Sets/src/mage/cards/c/Commandeer.java @@ -26,7 +26,7 @@ import mage.target.common.TargetCardInHand; */ public final class Commandeer extends CardImpl { - private static final FilterCard filter = new FilterCard("two blue cards"); + private static final FilterCard filter = new FilterCard("blue cards"); static { filter.add(new ColorPredicate(ObjectColor.BLUE)); diff --git a/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java b/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java index cbfe1fcfa9..24d48b93d7 100644 --- a/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java +++ b/Mage.Sets/src/mage/cards/c/ConsecratedByBlood.java @@ -29,7 +29,7 @@ import mage.target.common.TargetCreaturePermanent; */ public final class ConsecratedByBlood extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("two other creatures"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creatures"); static { filter.add(AnotherPredicate.instance); diff --git a/Mage.Sets/src/mage/cards/c/CosmicLarva.java b/Mage.Sets/src/mage/cards/c/CosmicLarva.java index 561639f6e4..07c7fe654b 100644 --- a/Mage.Sets/src/mage/cards/c/CosmicLarva.java +++ b/Mage.Sets/src/mage/cards/c/CosmicLarva.java @@ -31,7 +31,7 @@ public final class CosmicLarva extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); // At the beginning of your upkeep, sacrifice Cosmic Larva unless you sacrifice two lands. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true))), TargetController.YOU, false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), true))), TargetController.YOU, false)); } private CosmicLarva(final CosmicLarva card) { diff --git a/Mage.Sets/src/mage/cards/d/DarkSupplicant.java b/Mage.Sets/src/mage/cards/d/DarkSupplicant.java index 401686a301..2ec6c3789c 100644 --- a/Mage.Sets/src/mage/cards/d/DarkSupplicant.java +++ b/Mage.Sets/src/mage/cards/d/DarkSupplicant.java @@ -31,7 +31,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class DarkSupplicant extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("three Clerics you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Clerics you control"); static { filter.add(SubType.CLERIC.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/d/DemonicCollusion.java b/Mage.Sets/src/mage/cards/d/DemonicCollusion.java index 0f5fb1ce40..1989f63d93 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicCollusion.java +++ b/Mage.Sets/src/mage/cards/d/DemonicCollusion.java @@ -9,6 +9,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; @@ -22,7 +23,7 @@ public final class DemonicCollusion extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); // Buyback—Discard two cards. (You may discard two cards in addition to any other costs as you cast this spell. If you do, put this card into your hand as it resolves.) - this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))))); + this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS)))); // Search your library for a card and put that card into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(),false)); diff --git a/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java b/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java index 4e2067a33d..581a37661d 100644 --- a/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java +++ b/Mage.Sets/src/mage/cards/d/DespoilerOfSouls.java @@ -24,7 +24,7 @@ import java.util.UUID; */ public final class DespoilerOfSouls extends CardImpl { - private static final FilterCard filter = new FilterCreatureCard("two other creature cards from your graveyard"); + private static final FilterCard filter = new FilterCreatureCard("other creature cards from your graveyard"); static { filter.add(AnotherPredicate.instance); diff --git a/Mage.Sets/src/mage/cards/d/DrivnodCarnageDominus.java b/Mage.Sets/src/mage/cards/d/DrivnodCarnageDominus.java index 7260214c9b..7faa7570d9 100644 --- a/Mage.Sets/src/mage/cards/d/DrivnodCarnageDominus.java +++ b/Mage.Sets/src/mage/cards/d/DrivnodCarnageDominus.java @@ -27,7 +27,7 @@ import java.util.UUID; */ public final class DrivnodCarnageDominus extends CardImpl { - private static final FilterCard filter = new FilterCreatureCard("three creature cards from your graveyard"); + private static final FilterCard filter = new FilterCreatureCard("creature cards from your graveyard"); public DrivnodCarnageDominus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); diff --git a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java index b2425218b1..aedcc214f6 100644 --- a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java +++ b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java @@ -24,8 +24,6 @@ import java.util.UUID; */ public final class FaeOfWishes extends AdventureCard { - private static final FilterCard filter = new FilterCard("two cards"); - public FaeOfWishes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{U}", "Granted", "{3}{U}"); @@ -41,7 +39,7 @@ public final class FaeOfWishes extends AdventureCard { Ability ability = new SimpleActivatedAbility( new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{1}{U}") ); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, filter))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); // Granted diff --git a/Mage.Sets/src/mage/cards/f/Fireblast.java b/Mage.Sets/src/mage/cards/f/Fireblast.java index 41d7cf7b8a..7ea4b1a95e 100644 --- a/Mage.Sets/src/mage/cards/f/Fireblast.java +++ b/Mage.Sets/src/mage/cards/f/Fireblast.java @@ -20,7 +20,7 @@ import mage.target.common.TargetAnyTarget; */ public final class Fireblast extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Mountains"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains"); static { filter.add(SubType.MOUNTAIN.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/f/Forbid.java b/Mage.Sets/src/mage/cards/f/Forbid.java index cd6fe355e7..a39cddb912 100644 --- a/Mage.Sets/src/mage/cards/f/Forbid.java +++ b/Mage.Sets/src/mage/cards/f/Forbid.java @@ -9,6 +9,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.TargetSpell; import mage.target.common.TargetCardInHand; @@ -23,7 +24,7 @@ public final class Forbid extends CardImpl { // Buyback-Discard two cards. - this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards"))))); + this.addAbility(new BuybackAbility(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS)))); // Counter target spell. this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addTarget(new TargetSpell()); diff --git a/Mage.Sets/src/mage/cards/f/FungalPlots.java b/Mage.Sets/src/mage/cards/f/FungalPlots.java index 375f5268df..b92edf5187 100644 --- a/Mage.Sets/src/mage/cards/f/FungalPlots.java +++ b/Mage.Sets/src/mage/cards/f/FungalPlots.java @@ -27,7 +27,7 @@ import mage.target.common.TargetControlledPermanent; public final class FungalPlots extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card from your graveyard"); - private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("two Saprolings"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Saprolings"); static { filter2.add(SubType.SAPROLING.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/f/FuryOfTheHorde.java b/Mage.Sets/src/mage/cards/f/FuryOfTheHorde.java index dd4de21781..f810bc6a9f 100644 --- a/Mage.Sets/src/mage/cards/f/FuryOfTheHorde.java +++ b/Mage.Sets/src/mage/cards/f/FuryOfTheHorde.java @@ -21,7 +21,7 @@ import mage.watchers.common.AttackedThisTurnWatcher; */ public final class FuryOfTheHorde extends CardImpl { - private static final FilterCard filter = new FilterCard("two red cards"); + private static final FilterCard filter = new FilterCard("red cards"); static { filter.add(new ColorPredicate(ObjectColor.RED)); diff --git a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java index cbd984e2f9..b459914224 100644 --- a/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java +++ b/Mage.Sets/src/mage/cards/g/GeralfsMasterpiece.java @@ -22,6 +22,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -48,7 +49,7 @@ public final class GeralfsMasterpiece extends CardImpl { // {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{3}{U}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(3, new FilterCard("three cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(3, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Ghoulsteed.java b/Mage.Sets/src/mage/cards/g/Ghoulsteed.java index dfbc7fe180..557a6334ca 100644 --- a/Mage.Sets/src/mage/cards/g/Ghoulsteed.java +++ b/Mage.Sets/src/mage/cards/g/Ghoulsteed.java @@ -14,6 +14,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -31,7 +32,7 @@ public final class Ghoulsteed extends CardImpl { // {2}{B}, Discard two cards: Return Ghouldsteed from your graveyard to the battlefield tapped. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{2}{B}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java index 1b3cf687f4..a901b273c0 100644 --- a/Mage.Sets/src/mage/cards/g/GreelMindRaker.java +++ b/Mage.Sets/src/mage/cards/g/GreelMindRaker.java @@ -14,6 +14,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; import mage.target.common.TargetCardInHand; @@ -24,8 +25,6 @@ import java.util.UUID; */ public final class GreelMindRaker extends CardImpl { - private static final FilterCard filter = new FilterCard("two cards"); - public GreelMindRaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); @@ -40,7 +39,7 @@ public final class GreelMindRaker extends CardImpl { ManacostVariableValue.REGULAR, true ), new ManaCostsImpl<>("{X}{B}")); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, filter))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HauntedDead.java b/Mage.Sets/src/mage/cards/h/HauntedDead.java index d0acb78df3..8fe8a752c7 100644 --- a/Mage.Sets/src/mage/cards/h/HauntedDead.java +++ b/Mage.Sets/src/mage/cards/h/HauntedDead.java @@ -16,6 +16,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.permanent.token.SpiritWhiteToken; import mage.target.common.TargetCardInHand; @@ -36,7 +37,7 @@ public final class HauntedDead extends CardImpl { // {1}{B}, Discard two cards: Return Haunted Dead from your graveyard to the battlefield tapped. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true, false), new ManaCostsImpl<>("{1}{B}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IlluminatedFolio.java b/Mage.Sets/src/mage/cards/i/IlluminatedFolio.java index 53337be7ab..22bf273705 100644 --- a/Mage.Sets/src/mage/cards/i/IlluminatedFolio.java +++ b/Mage.Sets/src/mage/cards/i/IlluminatedFolio.java @@ -52,14 +52,14 @@ public final class IlluminatedFolio extends CardImpl { class IlluminatedFolioTarget extends TargetCardInHand { - private static final FilterCard filter = new FilterCard("two cards from your hand that share a color"); + private static final FilterCard filter = new FilterCard("cards from your hand that share a color"); static { filter.add(Predicates.not(ColorlessPredicate.instance)); } public IlluminatedFolioTarget() { - super(2, 2, filter); + super(2, filter); } private IlluminatedFolioTarget(final IlluminatedFolioTarget target) { diff --git a/Mage.Sets/src/mage/cards/j/JeweledSpirit.java b/Mage.Sets/src/mage/cards/j/JeweledSpirit.java index 257fc064b8..cfee726fa2 100644 --- a/Mage.Sets/src/mage/cards/j/JeweledSpirit.java +++ b/Mage.Sets/src/mage/cards/j/JeweledSpirit.java @@ -43,7 +43,7 @@ public final class JeweledSpirit extends CardImpl { // Sacrifice two lands: Jeweled Spirit gains protection from artifacts or from the color of your choice until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new JeweledSpiritEffect(), - new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true)))); + new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), true)))); } private JeweledSpirit(final JeweledSpirit card) { diff --git a/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java b/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java index 7785cebcb6..b81d5b5451 100644 --- a/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java +++ b/Mage.Sets/src/mage/cards/j/JolraelEmpressOfBeasts.java @@ -15,6 +15,7 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; @@ -40,7 +41,7 @@ public final class JolraelEmpressOfBeasts extends CardImpl { // {2}{G}, {tap}, Discard two cards: All lands target player controls become 3/3 creatures until end of turn. They're still lands. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new JolraelEmpressOfBeastsEffect(), new ManaCostsImpl<>("{2}{G}")); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonArsonist.java b/Mage.Sets/src/mage/cards/k/KeldonArsonist.java index 91ef13c904..fa34917323 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonArsonist.java +++ b/Mage.Sets/src/mage/cards/k/KeldonArsonist.java @@ -32,7 +32,7 @@ public final class KeldonArsonist extends CardImpl { // {1}, Sacrifice two lands: Destroy target land. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new GenericManaCost(1)); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), true))); TargetLandPermanent target = new TargetLandPermanent(); target.setTargetName("land (to destroy)"); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java b/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java index 49e1f71752..e0b08ca163 100644 --- a/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java +++ b/Mage.Sets/src/mage/cards/k/KrarkClanEngineers.java @@ -33,10 +33,9 @@ public final class KrarkClanEngineers extends CardImpl { // {R}, Sacrifice two artifacts: Destroy target artifact. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{R}")); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("artifacts"), true))); ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability); - } private KrarkClanEngineers(final KrarkClanEngineers card) { diff --git a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java index 3178a9b542..ae14274ca1 100644 --- a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java +++ b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java @@ -17,6 +17,7 @@ import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; import mage.target.common.TargetAnyTarget; @@ -37,7 +38,7 @@ public final class LatullaKeldonOverseer extends CardImpl { // {X}{R}, {tap}, Discard two cards: Latulla, Keldon Overseer deals X damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(ManacostVariableValue.REGULAR), new ManaCostsImpl<>("{X}{R}")); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, 2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/Leviathan.java b/Mage.Sets/src/mage/cards/l/Leviathan.java index 7549f7cf35..75c09abdc1 100644 --- a/Mage.Sets/src/mage/cards/l/Leviathan.java +++ b/Mage.Sets/src/mage/cards/l/Leviathan.java @@ -35,7 +35,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class Leviathan extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Islands"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); static { filter.add(SubType.ISLAND.getPredicate()); } @@ -82,7 +82,7 @@ public final class Leviathan extends CardImpl { class LeviathanCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Islands"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); static { filter.add(SubType.ISLAND.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/l/Lifespinner.java b/Mage.Sets/src/mage/cards/l/Lifespinner.java index 13ffd53ec1..d6a4d016c6 100644 --- a/Mage.Sets/src/mage/cards/l/Lifespinner.java +++ b/Mage.Sets/src/mage/cards/l/Lifespinner.java @@ -42,7 +42,7 @@ public final class Lifespinner extends CardImpl { SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new TapSourceCost()); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledCreaturePermanent(SubType.SPIRIT, "three Spirits"), false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledCreaturePermanent(SubType.SPIRIT, "Spirits"), false))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LotusVale.java b/Mage.Sets/src/mage/cards/l/LotusVale.java index 7f8201ce33..e34e42d964 100644 --- a/Mage.Sets/src/mage/cards/l/LotusVale.java +++ b/Mage.Sets/src/mage/cards/l/LotusVale.java @@ -22,7 +22,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class LotusVale extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("two untapped lands"); + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("untapped lands"); static { filter.add(TappedPredicate.UNTAPPED); diff --git a/Mage.Sets/src/mage/cards/m/MagetaTheLion.java b/Mage.Sets/src/mage/cards/m/MagetaTheLion.java index d70d61db82..735d75da2e 100644 --- a/Mage.Sets/src/mage/cards/m/MagetaTheLion.java +++ b/Mage.Sets/src/mage/cards/m/MagetaTheLion.java @@ -17,6 +17,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.AnotherPredicate; import mage.target.common.TargetCardInHand; @@ -44,7 +45,7 @@ public final class MagetaTheLion extends CardImpl { // {2}{W}{W}, {tap}, Discard two cards: Destroy all creatures except for Mageta the Lion. Those creatures can't be regenerated. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAllEffect(filter, true), new ManaCostsImpl<>("{2}{W}{W}")); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2,2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaBurst.java b/Mage.Sets/src/mage/cards/m/MagmaBurst.java index a7185b147d..fae373be57 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaBurst.java +++ b/Mage.Sets/src/mage/cards/m/MagmaBurst.java @@ -27,7 +27,7 @@ public final class MagmaBurst extends CardImpl { // Kicker-Sacrifice two lands. this.addAbility(new KickerAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, - new FilterControlledLandPermanent("two lands"), true)))); + new FilterControlledLandPermanent("lands"), true)))); // Magma Burst deals 3 damage to any target. If Magma Burst was kicked, it deals 3 damage to another any target. Effect effect = new DamageTargetEffect(3); diff --git a/Mage.Sets/src/mage/cards/m/MeteorStorm.java b/Mage.Sets/src/mage/cards/m/MeteorStorm.java index dc15608af7..9abb362bf7 100644 --- a/Mage.Sets/src/mage/cards/m/MeteorStorm.java +++ b/Mage.Sets/src/mage/cards/m/MeteorStorm.java @@ -27,7 +27,7 @@ public final class MeteorStorm extends CardImpl { // {2}{R}{G}, Discard two cards at random: Meteor Storm deals 4 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl<>("{2}{R}{G}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards at random")), true)); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("cards at random")), true)); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoggAlarm.java b/Mage.Sets/src/mage/cards/m/MoggAlarm.java index a3b99b3b63..ad7cedf684 100644 --- a/Mage.Sets/src/mage/cards/m/MoggAlarm.java +++ b/Mage.Sets/src/mage/cards/m/MoggAlarm.java @@ -19,7 +19,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class MoggAlarm extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Mountains"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains"); static { filter.add(SubType.MOUNTAIN.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/m/MoldDemon.java b/Mage.Sets/src/mage/cards/m/MoldDemon.java index c8a9e301f5..cdda3e0588 100644 --- a/Mage.Sets/src/mage/cards/m/MoldDemon.java +++ b/Mage.Sets/src/mage/cards/m/MoldDemon.java @@ -19,7 +19,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class MoldDemon extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("two Swamps"); + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Swamps"); static{ filter.add(SubType.SWAMP.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java b/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java index d1eae78064..eb85297eda 100644 --- a/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java +++ b/Mage.Sets/src/mage/cards/n/NezahalPrimalTide.java @@ -22,6 +22,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterSpell; +import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; import mage.target.common.TargetCardInHand; @@ -59,7 +60,7 @@ public final class NezahalPrimalTide extends CardImpl { // Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileReturnBattlefieldOwnerNextEndStepSourceEffect(true), - new DiscardTargetCost(new TargetCardInHand(3, new FilterCard("three cards"))))); + new DiscardTargetCost(new TargetCardInHand(3, StaticFilters.FILTER_CARD_CARDS)))); } diff --git a/Mage.Sets/src/mage/cards/n/NightSoil.java b/Mage.Sets/src/mage/cards/n/NightSoil.java index a2bef0ae98..6d8651d351 100644 --- a/Mage.Sets/src/mage/cards/n/NightSoil.java +++ b/Mage.Sets/src/mage/cards/n/NightSoil.java @@ -25,7 +25,7 @@ public final class NightSoil extends CardImpl { // {1}, Exile two creature cards from a single graveyard: Create a 1/1 green Saproling creature token. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new GenericManaCost(1)); - ability.addCost(new ExileFromGraveCost(new TargetCardInASingleGraveyard(2, 2, new FilterCreatureCard("two creature cards")))); + ability.addCost(new ExileFromGraveCost(new TargetCardInASingleGraveyard(2, 2, new FilterCreatureCard("creature cards")))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrganGrinder.java b/Mage.Sets/src/mage/cards/o/OrganGrinder.java index ed56b4b564..ca5bde46e7 100644 --- a/Mage.Sets/src/mage/cards/o/OrganGrinder.java +++ b/Mage.Sets/src/mage/cards/o/OrganGrinder.java @@ -31,7 +31,7 @@ public final class OrganGrinder extends CardImpl { // {tap}, Exile three cards from your graveyard: Target player loses 3 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(3), new TapSourceCost()); - ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, new FilterCard("three cards from your graveyard")))); + ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(3, 3, new FilterCard("cards from your graveyard")))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrmosArchiveKeeper.java b/Mage.Sets/src/mage/cards/o/OrmosArchiveKeeper.java index a699befc57..2a2d81784a 100644 --- a/Mage.Sets/src/mage/cards/o/OrmosArchiveKeeper.java +++ b/Mage.Sets/src/mage/cards/o/OrmosArchiveKeeper.java @@ -114,7 +114,7 @@ class OrmosArchiveKeeperEffect extends ReplacementEffectImpl { class OrmosArchiveKeeperTarget extends TargetCardInHand { - private static final FilterCard filter = new FilterCard("three cards with different names"); + private static final FilterCard filter = new FilterCard("cards with different names"); OrmosArchiveKeeperTarget() { super(3, filter); diff --git a/Mage.Sets/src/mage/cards/p/Phantasmagorian.java b/Mage.Sets/src/mage/cards/p/Phantasmagorian.java index 45ed8e484a..f66e50ff61 100644 --- a/Mage.Sets/src/mage/cards/p/Phantasmagorian.java +++ b/Mage.Sets/src/mage/cards/p/Phantasmagorian.java @@ -18,6 +18,7 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.stack.Spell; import mage.players.Player; @@ -39,7 +40,7 @@ public final class Phantasmagorian extends CardImpl { // When you cast Phantasmagorian, any player may discard three cards. If a player does, counter Phantasmagorian. this.addAbility(new CastSourceTriggeredAbility(new CounterSourceEffect())); // Discard three cards: Return Phantasmagorian from your graveyard to your hand. - this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new DiscardTargetCost(new TargetCardInHand(3, 3, new FilterCard("three cards"))))); + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new DiscardTargetCost(new TargetCardInHand(3, StaticFilters.FILTER_CARD_CARDS)))); } private Phantasmagorian(final Phantasmagorian card) { diff --git a/Mage.Sets/src/mage/cards/p/PlagueReaver.java b/Mage.Sets/src/mage/cards/p/PlagueReaver.java index a09f62eabf..1b4d2f9554 100644 --- a/Mage.Sets/src/mage/cards/p/PlagueReaver.java +++ b/Mage.Sets/src/mage/cards/p/PlagueReaver.java @@ -14,6 +14,7 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AnotherPredicate; import mage.game.Game; @@ -30,8 +31,6 @@ import java.util.UUID; */ public final class PlagueReaver extends CardImpl { - private static final FilterCard filter = new FilterCard("two cards"); - public PlagueReaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); @@ -46,7 +45,7 @@ public final class PlagueReaver extends CardImpl { // Discard two cards, Sacrifice Plague Reaver: Choose target opponent. Return Plague Reaver to the battlefield under that player's control at the beginning of their next upkeep. Ability ability = new SimpleActivatedAbility( - new PlagueReaverTriggerEffect(), new DiscardTargetCost(new TargetCardInHand(2, filter)) + new PlagueReaverTriggerEffect(), new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS)) ); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/p/PrimevalForce.java b/Mage.Sets/src/mage/cards/p/PrimevalForce.java index 919b2a1f1e..7ca2bd8b1c 100644 --- a/Mage.Sets/src/mage/cards/p/PrimevalForce.java +++ b/Mage.Sets/src/mage/cards/p/PrimevalForce.java @@ -19,7 +19,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class PrimevalForce extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("three Forests"); + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Forests"); static{ filter.add(SubType.FOREST.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java index fbfdc0d665..e1ce9ac770 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java +++ b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java @@ -66,7 +66,7 @@ class ProwlingPangolinEffect extends OneShotEffect { if (controller != null) { boolean costPaid = false; for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { - Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledCreaturePermanent("two creatures"), true)); + Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledCreaturePermanent("creatures"), true)); Player player = game.getPlayer(playerId); if (player != null && cost.canPay(source, source, playerId, game) diff --git a/Mage.Sets/src/mage/cards/p/PsychicAllergy.java b/Mage.Sets/src/mage/cards/p/PsychicAllergy.java index 02eb3ed918..8dfbd65ba9 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicAllergy.java +++ b/Mage.Sets/src/mage/cards/p/PsychicAllergy.java @@ -27,7 +27,7 @@ import java.util.UUID; */ public final class PsychicAllergy extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Islands"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Islands"); static { filter.add(SubType.ISLAND.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/p/Pulverize.java b/Mage.Sets/src/mage/cards/p/Pulverize.java index bc1384b8fe..51b913b513 100644 --- a/Mage.Sets/src/mage/cards/p/Pulverize.java +++ b/Mage.Sets/src/mage/cards/p/Pulverize.java @@ -19,7 +19,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class Pulverize extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Mountains"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains"); static { filter.add(SubType.MOUNTAIN.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/r/RathiDragon.java b/Mage.Sets/src/mage/cards/r/RathiDragon.java index 77b066801a..e44e5e8b91 100644 --- a/Mage.Sets/src/mage/cards/r/RathiDragon.java +++ b/Mage.Sets/src/mage/cards/r/RathiDragon.java @@ -20,7 +20,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class RathiDragon extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("two Mountains"); + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountains"); static{ filter.add(SubType.MOUNTAIN.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessKnave.java b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java index 2ff8161324..009aeb23c9 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessKnave.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java @@ -26,7 +26,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class RuthlessKnave extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("three Treasures"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Treasures"); static { filter.add(SubType.TREASURE.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/s/ScorchedRuins.java b/Mage.Sets/src/mage/cards/s/ScorchedRuins.java index 62135ec682..33dbe1f1cc 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchedRuins.java +++ b/Mage.Sets/src/mage/cards/s/ScorchedRuins.java @@ -21,7 +21,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class ScorchedRuins extends CardImpl { - private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("two untapped lands"); + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("untapped lands"); static { filter.add(TappedPredicate.UNTAPPED); } diff --git a/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java b/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java index 53aae8277e..489221a4ff 100644 --- a/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java +++ b/Mage.Sets/src/mage/cards/s/SekkiSeasonsGuide.java @@ -29,7 +29,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class SekkiSeasonsGuide extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("eight Spirits"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Spirits"); static { filter.add(SubType.SPIRIT.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/s/SolarTide.java b/Mage.Sets/src/mage/cards/s/SolarTide.java index 414708c2a2..28bc9f08cb 100644 --- a/Mage.Sets/src/mage/cards/s/SolarTide.java +++ b/Mage.Sets/src/mage/cards/s/SolarTide.java @@ -40,7 +40,7 @@ public final class SolarTide extends CardImpl { this.getSpellAbility().getModes().addMode(mode); // Entwine-Sacrifice two lands. - this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true)))); + this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), true)))); } private SolarTide(final SolarTide card) { diff --git a/Mage.Sets/src/mage/cards/s/SoldeviSage.java b/Mage.Sets/src/mage/cards/s/SoldeviSage.java index 3a963c640b..3bc135cb34 100644 --- a/Mage.Sets/src/mage/cards/s/SoldeviSage.java +++ b/Mage.Sets/src/mage/cards/s/SoldeviSage.java @@ -30,9 +30,9 @@ public final class SoldeviSage extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}, Sacrifice two lands: Draw three cards, then discard one of them. + // {T}, Sacrifice two lands: Draw three cards, then discard one of them. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardOneOfThemEffect(3), new TapSourceCost()); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), true))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SolphimMayhemDominus.java b/Mage.Sets/src/mage/cards/s/SolphimMayhemDominus.java index 9818d9ddb8..58cfdd44be 100644 --- a/Mage.Sets/src/mage/cards/s/SolphimMayhemDominus.java +++ b/Mage.Sets/src/mage/cards/s/SolphimMayhemDominus.java @@ -13,6 +13,7 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.DamageEvent; import mage.game.events.GameEvent; @@ -41,7 +42,7 @@ public final class SolphimMayhemDominus extends CardImpl { // {1}{R/P}{R/P}, Discard two cards: Put an indestructible counter on Solphim, Mayhem Dominus. Ability ability = new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.INDESTRUCTIBLE.createInstance()), new ManaCostsImpl<>("{1}{R/P}{R/P}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SoulRansom.java b/Mage.Sets/src/mage/cards/s/SoulRansom.java index b82fb3d2c4..fbd03570fa 100644 --- a/Mage.Sets/src/mage/cards/s/SoulRansom.java +++ b/Mage.Sets/src/mage/cards/s/SoulRansom.java @@ -14,6 +14,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -45,7 +46,7 @@ public final class SoulRansom extends CardImpl { Zone.BATTLEFIELD, new SoulRansomEffect(), new DiscardTargetCost( - new TargetCardInHand(2, 2, new FilterCard("two cards")) + new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS) ) ); ability2.setMayActivate(TargetController.OPPONENT); diff --git a/Mage.Sets/src/mage/cards/s/SoulSpike.java b/Mage.Sets/src/mage/cards/s/SoulSpike.java index 95a70fa287..92dc26a234 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSpike.java +++ b/Mage.Sets/src/mage/cards/s/SoulSpike.java @@ -21,7 +21,7 @@ import mage.target.common.TargetAnyTarget; */ public final class SoulSpike extends CardImpl { - private static final FilterCard filter = new FilterCard("two black cards"); + private static final FilterCard filter = new FilterCard("black cards"); static { filter.add(new ColorPredicate(ObjectColor.BLACK)); diff --git a/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java b/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java index 77e03a33fa..e936572af6 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java +++ b/Mage.Sets/src/mage/cards/s/SphinxOfTheChimes.java @@ -74,7 +74,7 @@ class DiscardTwoNonlandCardsWithTheSameNameCost extends DiscardTargetCost { class TargetTwoNonLandCardsWithSameNameInHand extends TargetCardInHand { public TargetTwoNonLandCardsWithSameNameInHand() { - super(2, 2, new FilterNonlandCard("two nonland cards with the same name")); + super(2, 2, new FilterNonlandCard("nonland cards with the same name")); } public TargetTwoNonLandCardsWithSameNameInHand(final TargetTwoNonLandCardsWithSameNameInHand target) { diff --git a/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java b/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java index 1ff588104f..8f1980224b 100644 --- a/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/s/SpurnmageAdvocate.java @@ -26,7 +26,7 @@ import mage.target.targetpointer.SecondTargetPointer; */ public final class SpurnmageAdvocate extends CardImpl { - private static final FilterCard filter = new FilterCard("two target cards from an opponent's graveyard"); + private static final FilterCard filter = new FilterCard("target cards from an opponent's graveyard"); static { filter.add(TargetController.OPPONENT.getOwnerPredicate()); diff --git a/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java b/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java index 95c5b92a23..b2127720ec 100644 --- a/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java +++ b/Mage.Sets/src/mage/cards/s/StitchwingSkaab.java @@ -15,6 +15,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; /** @@ -35,7 +36,7 @@ public final class StitchwingSkaab extends CardImpl { // {1}{U}, Discard two cards: Return Stitchwing Skaab from your graveyard to the battlefield tapped. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true, false), new ManaCostsImpl<>("{1}{U}")); - ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Sunscour.java b/Mage.Sets/src/mage/cards/s/Sunscour.java index 7ca537f792..b9c13ac9bb 100644 --- a/Mage.Sets/src/mage/cards/s/Sunscour.java +++ b/Mage.Sets/src/mage/cards/s/Sunscour.java @@ -20,7 +20,7 @@ import mage.target.common.TargetCardInHand; */ public final class Sunscour extends CardImpl { - private static final FilterCard filter = new FilterCard("two white cards"); + private static final FilterCard filter = new FilterCard("white cards"); static { filter.add(new ColorPredicate(ObjectColor.WHITE)); diff --git a/Mage.Sets/src/mage/cards/t/TorpidMoloch.java b/Mage.Sets/src/mage/cards/t/TorpidMoloch.java index 1dea8f92ad..fdd28b5171 100644 --- a/Mage.Sets/src/mage/cards/t/TorpidMoloch.java +++ b/Mage.Sets/src/mage/cards/t/TorpidMoloch.java @@ -35,7 +35,7 @@ public final class TorpidMoloch extends CardImpl { this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.EndOfTurn), - new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("three lands"), true)))); + new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true)))); } private TorpidMoloch(final TorpidMoloch card) { diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfStone.java b/Mage.Sets/src/mage/cards/t/TorrentOfStone.java index 5580152f32..2cf4bc8322 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentOfStone.java +++ b/Mage.Sets/src/mage/cards/t/TorrentOfStone.java @@ -17,7 +17,7 @@ import mage.target.common.TargetCreaturePermanent; * @author LevelX2 */ public final class TorrentOfStone extends CardImpl { - private static final FilterControlledLandPermanent filterSacrifice = new FilterControlledLandPermanent("two Mountains"); + private static final FilterControlledLandPermanent filterSacrifice = new FilterControlledLandPermanent("Mountains"); static { filterSacrifice.add(SubType.MOUNTAIN.getPredicate()); diff --git a/Mage.Sets/src/mage/cards/v/VoldarenPariah.java b/Mage.Sets/src/mage/cards/v/VoldarenPariah.java index d48b00e527..8fd00e0beb 100644 --- a/Mage.Sets/src/mage/cards/v/VoldarenPariah.java +++ b/Mage.Sets/src/mage/cards/v/VoldarenPariah.java @@ -25,7 +25,7 @@ import mage.target.common.TargetControlledPermanent; */ public final class VoldarenPariah extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("three other creatures"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creatures"); static { filter.add(AnotherPredicate.instance); diff --git a/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java b/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java index 260085264f..e028e74b0a 100644 --- a/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java +++ b/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java @@ -129,7 +129,7 @@ class WormsOfTheEarthDestroyEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (controller != null && sourcePermanent != null) { - Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), false)); + Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("lands"), false)); for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { diff --git a/Mage.Sets/src/mage/cards/z/ZombieInfestation.java b/Mage.Sets/src/mage/cards/z/ZombieInfestation.java index 386647f553..c9a010ebbe 100644 --- a/Mage.Sets/src/mage/cards/z/ZombieInfestation.java +++ b/Mage.Sets/src/mage/cards/z/ZombieInfestation.java @@ -10,6 +10,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.permanent.token.ZombieToken; import mage.target.common.TargetCardInHand; @@ -25,7 +26,7 @@ public final class ZombieInfestation extends CardImpl { // Discard two cards: Create a 2/2 black Zombie creature token. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken()), - new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards")))); + new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD_CARDS))); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java index 4ff17c8dbb..dddc024a75 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/DiscardTargetCost.java @@ -30,7 +30,7 @@ public class DiscardTargetCost extends CostImpl { public DiscardTargetCost(TargetCardInHand target, boolean randomDiscard) { this.addTarget(target); this.randomDiscard = randomDiscard; - this.text = "discard " + target.getTargetName(); + this.text = "discard " + target.getDescription(); } public DiscardTargetCost(DiscardTargetCost cost) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java index f8e810dc11..72bcff2730 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromGraveCost.java @@ -60,7 +60,7 @@ public class ExileFromGraveCost extends CostImpl { public ExileFromGraveCost(TargetCardInASingleGraveyard target) { target.setNotTarget(true); this.addTarget(target); - this.text = "exile " + target.getTargetName(); + this.text = "exile " + target.getDescription(); } public ExileFromGraveCost(TargetCardInYourGraveyard target, boolean setTargetPointer) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java index 5e88fdfcd6..c68faa3c7b 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java @@ -37,7 +37,7 @@ public class ExileFromHandCost extends CostImpl { */ public ExileFromHandCost(TargetCardInHand target, boolean setXFromCMC) { this.addTarget(target); - this.text = "exile " + target.getTargetName(); + this.text = "exile " + target.getDescription(); this.setXFromCMC = setXFromCMC; } diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java index 8e7bb9b4e2..4f977dde7e 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileTargetCost.java @@ -28,7 +28,7 @@ public class ExileTargetCost extends CostImpl { public ExileTargetCost(TargetControlledPermanent target) { target.setNotTarget(true); this.addTarget(target); - this.text = "exile " + target.getTargetName(); + this.text = "exile " + target.getDescription(); } public ExileTargetCost(TargetControlledPermanent target, boolean noText) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java index 3a3e3adfe7..da3dc7f9d6 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ReturnToHandFromGraveyardCost.java @@ -22,11 +22,7 @@ public class ReturnToHandFromGraveyardCost extends CostImpl { public ReturnToHandFromGraveyardCost(TargetCardInYourGraveyard target) { this.addTarget(target); - if (target.getMaxNumberOfTargets() > 1 && target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { - this.text = new StringBuilder("return ").append(target.getMaxNumberOfTargets()).append(' ').append(target.getTargetName()).append(" from graveyard to it's owner's hand").toString(); - } else { - this.text = new StringBuilder("return ").append(target.getTargetName()).append(" from graveyard to it's owner's hand").toString(); - } + this.text = "return " + target.getDescription() + " from graveyard to it's owner's hand"; } public ReturnToHandFromGraveyardCost(ReturnToHandFromGraveyardCost cost) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java index 88b8df8416..ea700cd697 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/RevealTargetFromHandCost.java @@ -27,7 +27,7 @@ public class RevealTargetFromHandCost extends CostImpl { public RevealTargetFromHandCost(TargetCardInHand target) { this.addTarget(target); - this.text = (target.getNumberOfTargets() == 0 ? "you may reveal " : "reveal ") + target.getTargetName(); + this.text = (target.getNumberOfTargets() == 0 ? "you may reveal " : "reveal ") + target.getDescription(); this.revealedCards = new ArrayList<>(); } diff --git a/Mage/src/main/java/mage/target/Target.java b/Mage/src/main/java/mage/target/Target.java index 0404e7f278..89e27831e2 100644 --- a/Mage/src/main/java/mage/target/Target.java +++ b/Mage/src/main/java/mage/target/Target.java @@ -88,10 +88,16 @@ public interface Target extends Serializable { void updateTarget(UUID targetId, Game game); + /** + * @return full description with target name, amount, etc (uses in abilities/rules/cost) + */ String getDescription(); String getMessage(); + /** + * @return single target name + */ String getTargetName(); void setTargetName(String name);