mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed wrong/miss numbers in card rules (see #10067 and prev commit)
This commit is contained in:
parent
99d1800214
commit
5c30467c48
75 changed files with 105 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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<>();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue