forked from External/mage
remove some more unnecessary filter arguments from target constructors
This commit is contained in:
parent
15ba1c84ec
commit
9e364e027e
27 changed files with 140 additions and 209 deletions
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.CantBeCounteredSourceAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -10,10 +8,11 @@ import mage.constants.CardType;
|
|||
import mage.constants.ComparisonType;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class AbruptDecay extends CardImpl {
|
||||
|
|
@ -25,14 +24,14 @@ public final class AbruptDecay extends CardImpl {
|
|||
}
|
||||
|
||||
public AbruptDecay(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{G}");
|
||||
|
||||
// This spell can't be countered.
|
||||
this.addAbility(new CantBeCounteredSourceAbility().setRuleAtTheTop(true));
|
||||
|
||||
// Destroy target nonland permanent with converted mana cost 3 or less.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private AbruptDecay(final AbruptDecay card) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.*;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -18,11 +17,12 @@ import mage.game.Game;
|
|||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AdmiralBeckettBrass extends CardImpl {
|
||||
|
|
@ -33,7 +33,7 @@ public final class AdmiralBeckettBrass extends CardImpl {
|
|||
static {
|
||||
filter.add(SubType.PIRATE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter2.add(new ControllerDealtDamageByPiratesPredicate());
|
||||
filter2.add(ControllerDealtDamageByPiratesPredicate.instance);
|
||||
}
|
||||
|
||||
public AdmiralBeckettBrass(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -50,7 +50,7 @@ public final class AdmiralBeckettBrass extends CardImpl {
|
|||
|
||||
// At the beginning of your end step, gain control of target nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(new GainControlTargetEffect(Duration.Custom, true));
|
||||
ability.addTarget(new TargetNonlandPermanent(filter2));
|
||||
ability.addTarget(new TargetPermanent(filter2));
|
||||
this.addAbility(ability, new DamagedByPiratesWatcher());
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,8 @@ class DamagedByPiratesWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class ControllerDealtDamageByPiratesPredicate implements Predicate<Permanent> {
|
||||
enum ControllerDealtDamageByPiratesPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
|
|
|
|||
|
|
@ -14,12 +14,11 @@ import mage.constants.SubType;
|
|||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class AetherChanneler extends CardImpl {
|
||||
|
|
@ -44,7 +43,7 @@ public final class AetherChanneler extends CardImpl {
|
|||
// * Draw a card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BirdToken()));
|
||||
Mode mode = new Mode(new ReturnToHandTargetEffect());
|
||||
mode.addTarget(new TargetNonlandPermanent(filter));
|
||||
mode.addTarget(new TargetPermanent(filter));
|
||||
ability.addMode(mode);
|
||||
ability.addMode(new Mode(new DrawCardSourceControllerEffect(1)));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class AetherGale extends CardImpl {
|
||||
|
||||
public AetherGale(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}{U}");
|
||||
|
||||
// Return six target nonland permanents to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(6,6, StaticFilters.FILTER_PERMANENTS_NON_LAND, false));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(6, StaticFilters.FILTER_PERMANENTS_NON_LAND));
|
||||
}
|
||||
|
||||
private AetherGale(final AetherGale card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
|
|
@ -13,22 +12,23 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ArchonOfTheTriumvirate extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanents your opponents control");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
|
||||
public ArchonOfTheTriumvirate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{U}");
|
||||
this.subtype.add(SubType.ARCHON);
|
||||
|
||||
this.power = new MageInt(4);
|
||||
|
|
@ -36,11 +36,11 @@ public final class ArchonOfTheTriumvirate extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
|
||||
// Whenever Archon of the Triumvirate attacks, detain up to two target nonland permanents your opponents control.
|
||||
// (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.)
|
||||
Ability ability = new AttacksTriggeredAbility(new DetainTargetEffect(), false);
|
||||
ability.addTarget(new TargetNonlandPermanent(0,2,filter, false));
|
||||
ability.addTarget(new TargetPermanent(0, 2, filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import mage.filter.common.FilterNonlandPermanent;
|
|||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ public final class ArgentDais extends CardImpl {
|
|||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.OIL.createInstance(2)));
|
||||
ability.addTarget(new TargetNonlandPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addEffect(new DrawCardTargetControllerEffect(2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import mage.abilities.keyword.CyclingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,8 +21,9 @@ public final class BarrierBreach extends CardImpl {
|
|||
|
||||
// Exile up to three target enchantments.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent(0, 3,
|
||||
new FilterEnchantmentPermanent("enchantments"), false));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(
|
||||
0, 3, StaticFilters.FILTER_PERMANENT_ENCHANTMENTS
|
||||
));
|
||||
|
||||
// Cycling {2}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}")));
|
||||
|
|
|
|||
|
|
@ -1,35 +1,30 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SagaChapter;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterBySubtypeCard;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class BindingTheOldGods extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filter
|
||||
= new FilterNonlandPermanent("nonland permanent an opponent controls");
|
||||
private static final FilterBySubtypeCard filter2
|
||||
= new FilterBySubtypeCard(SubType.FOREST);
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
private static final FilterCard filter = new FilterBySubtypeCard(SubType.FOREST);
|
||||
|
||||
public BindingTheOldGods(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{G}");
|
||||
|
|
@ -41,11 +36,11 @@ public final class BindingTheOldGods extends CardImpl {
|
|||
// I — Destroy target nonland permanent an opponent controls.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_I,
|
||||
new DestroyTargetEffect(), new TargetNonlandPermanent(filter)
|
||||
new DestroyTargetEffect(), new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND)
|
||||
);
|
||||
// II — Search your library for a Forest card, put it onto the battlefield tapped, then shuffle your library.
|
||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II,
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter2), true)
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true)
|
||||
);
|
||||
// III — Creatures you control gain deathtouch until end of turn.
|
||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import mage.filter.FilterPlayer;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -38,7 +37,6 @@ public final class CollectiveEffort extends CardImpl {
|
|||
|
||||
private static final FilterControlledCreaturePermanent filterUntapped = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
private static final FilterCreaturePermanent filterDestroyCreature = new FilterCreaturePermanent("creature with power 4 or greater");
|
||||
private static final FilterEnchantmentPermanent filterDestroyEnchantment = new FilterEnchantmentPermanent("enchantment to destroy");
|
||||
private static final FilterPlayer filterPlayer = new FilterPlayer("player whose creatures get +1/+1 counters");
|
||||
|
||||
static {
|
||||
|
|
@ -66,7 +64,7 @@ public final class CollectiveEffort extends CardImpl {
|
|||
Effect effect = new DestroyTargetEffect();
|
||||
effect.setText("Destroy target enchantment");
|
||||
Mode mode = new Mode(effect);
|
||||
mode.addTarget(new TargetEnchantmentPermanent(filterDestroyEnchantment).withChooseHint("destroy"));
|
||||
mode.addTarget(new TargetEnchantmentPermanent().withChooseHint("destroy"));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// Put a +1/+1 counter on each creature target player controls.
|
||||
|
|
|
|||
|
|
@ -8,25 +8,25 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetPlaneswalkerPermanent;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author htrajan
|
||||
*/
|
||||
public final class ConfrontThePast extends CardImpl {
|
||||
|
||||
public static final FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent();
|
||||
public static final FilterPermanent filter = new FilterPlaneswalkerPermanent();
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
|
|
@ -34,18 +34,18 @@ public final class ConfrontThePast extends CardImpl {
|
|||
|
||||
public ConfrontThePast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}");
|
||||
|
||||
|
||||
this.subtype.add(SubType.LESSON);
|
||||
|
||||
// Choose one —
|
||||
// • Return target planeswalker card with mana value X or less from your graveyard to the battlefield.
|
||||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()
|
||||
.setText("return target planeswalker card with mana value X or less from your graveyard to the battlefield"));
|
||||
.setText("return target planeswalker card with mana value X or less from your graveyard to the battlefield"));
|
||||
this.getSpellAbility().setTargetAdjuster(ConfrontThePastAdjuster.instance);
|
||||
|
||||
// • Remove twice X loyalty counters from target planeswalker an opponent controls.
|
||||
Mode mode = new Mode(new ConfrontThePastLoyaltyEffect());
|
||||
mode.addTarget(new TargetPlaneswalkerPermanent(filter));
|
||||
mode.addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ enum ConfrontThePastAdjuster implements TargetAdjuster {
|
|||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability.getEffects().size() == 1
|
||||
&& ability.getEffects().get(0) instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
|
||||
&& ability.getEffects().get(0) instanceof ReturnFromGraveyardToBattlefieldTargetEffect) {
|
||||
int xValue = CardUtil.getSourceCostsTag(game, ability, "X", 0);
|
||||
ability.getTargets().clear();
|
||||
FilterPermanentCard filter = new FilterPermanentCard("planeswalker card with mana value X or less");
|
||||
|
|
@ -99,4 +99,4 @@ class ConfrontThePastLoyaltyEffect extends OneShotEffect {
|
|||
target.removeCounters(CounterType.LOYALTY.createInstance(xValue * 2), source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
|
||||
|
|
@ -12,10 +10,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class CyclonicRift extends CardImpl {
|
||||
|
|
@ -30,7 +29,7 @@ public final class CyclonicRift extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Return target nonland permanent you don't control to its owner's hand.
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
|
||||
// Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
|
|
@ -12,26 +10,27 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class EmeraldCharm extends CardImpl {
|
||||
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("non-Aura enchantment");
|
||||
|
||||
|
||||
private static final FilterPermanent filter = new FilterEnchantmentPermanent("non-Aura enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SubType.AURA.getPredicate()));
|
||||
}
|
||||
|
||||
public EmeraldCharm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
|
||||
// Choose one - Untap target permanent;
|
||||
this.getSpellAbility().addEffect(new UntapTargetEffect());
|
||||
|
|
@ -39,7 +38,7 @@ public final class EmeraldCharm extends CardImpl {
|
|||
|
||||
// or destroy target non-Aura enchantment;
|
||||
Mode mode = new Mode(new DestroyTargetEffect());
|
||||
mode.addTarget(new TargetEnchantmentPermanent(filter));
|
||||
mode.addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// or target creature loses flying until end of turn.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.CopyTargetStackObjectEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
|
|
@ -13,12 +11,13 @@ import mage.constants.ComparisonType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class FerocityOfTheUnderworld extends CardImpl {
|
||||
|
|
@ -30,11 +29,11 @@ public final class FerocityOfTheUnderworld extends CardImpl {
|
|||
}
|
||||
|
||||
public FerocityOfTheUnderworld(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{R}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{R}{G}");
|
||||
|
||||
// Choose one - Destroy target nonland permanent with converted mana cost 3 or less.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterMode1));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filterMode1));
|
||||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
Mode mode = new Mode(new CopyTargetStackObjectEffect());
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -18,10 +15,13 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class FortunateFew extends CardImpl {
|
||||
|
|
@ -73,7 +73,7 @@ class FortunateFewEffect extends OneShotEffect {
|
|||
filter.add(Predicates.not(new PermanentIdPredicate(chosenPerm.getId())));
|
||||
}
|
||||
|
||||
Target target = new TargetNonlandPermanent(filter);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.withNotTarget(true);
|
||||
if (player.choose(Outcome.Exile, target, source, game)) {
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -12,15 +11,15 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GalecasterColossus extends CardImpl {
|
||||
|
|
@ -44,7 +43,7 @@ public final class GalecasterColossus extends CardImpl {
|
|||
|
||||
// Tap an untapped Wizard you control: Return target nonland permanent you don't control to its owner's hand.
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnToHandTargetEffect(), new TapTargetCost(new TargetControlledPermanent(1, 1, filter2, true)));
|
||||
ability.addTarget(new TargetNonlandPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
|
|
@ -14,10 +12,11 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class JediKnight extends CardImpl {
|
||||
|
|
@ -38,7 +37,7 @@ public final class JediKnight extends CardImpl {
|
|||
|
||||
// When Jedi Knight leaves the battlefield, return target nonland permanent you don't control to its owner's hands.
|
||||
Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
|
||||
ability.addTarget(new TargetNonlandPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Meditate {1}{U}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -18,10 +15,12 @@ import mage.filter.predicate.permanent.TokenPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class LegionsToAshes extends CardImpl {
|
||||
|
|
@ -31,7 +30,7 @@ public final class LegionsToAshes extends CardImpl {
|
|||
|
||||
// Exile target nonland permanent an opponent controls and all tokens that player controls with the same name as that permanent.
|
||||
this.getSpellAbility().addEffect(new LegionsToAshesEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND));
|
||||
}
|
||||
|
||||
private LegionsToAshes(final LegionsToAshes card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.CanBeYourCommanderAbility;
|
||||
|
|
@ -11,21 +10,18 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.CatWarriorToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LordWindgrace extends CardImpl {
|
||||
|
|
@ -60,7 +56,7 @@ public final class LordWindgrace extends CardImpl {
|
|||
.setText(", then create six 2/2 green Cat Warrior "
|
||||
+ "creature tokens with forestwalk")
|
||||
);
|
||||
ability.addTarget(new TargetNonlandPermanent(0, 6, StaticFilters.FILTER_PERMANENTS_NON_LAND, false));
|
||||
ability.addTarget(new TargetPermanent(0, 6, StaticFilters.FILTER_PERMANENTS_NON_LAND));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Lord Windgrace can be your commander.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
|
@ -11,40 +10,31 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class LyevSkyknight extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public LyevSkyknight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.KNIGHT);
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
|
||||
// When Lyev Skyknight enters the battlefield, detain target nonland permanent an opponent controls.
|
||||
// (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.)
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DetainTargetEffect(), false);
|
||||
TargetNonlandPermanent target = new TargetNonlandPermanent(filter);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -12,32 +10,23 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class NewPrahvGuildmage extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
}
|
||||
|
||||
public NewPrahvGuildmage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
|
@ -46,12 +35,11 @@ public final class NewPrahvGuildmage extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{W}{U}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
// {3}{W}{U}: Detain target nonland permanent an opponent controls.
|
||||
// (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.)
|
||||
ability = new SimpleActivatedAbility(new DetainTargetEffect(), new ManaCostsImpl<>("{3}{W}{U}"));
|
||||
TargetNonlandPermanent target = new TargetNonlandPermanent(filter);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@ import mage.abilities.keyword.VigilanceAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.PreventDamageEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetPlaneswalkerPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetadjustment.DamagedPlayerControlsTargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -28,7 +29,7 @@ import java.util.UUID;
|
|||
* @author TheElk801, notgreat
|
||||
*/
|
||||
public final class QuestingBeast extends CardImpl {
|
||||
private static final FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent("planeswalker that player controls");
|
||||
private static final FilterPermanent filter = new FilterPlaneswalkerPermanent("planeswalker that player controls");
|
||||
|
||||
public QuestingBeast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
|
|
@ -55,7 +56,7 @@ public final class QuestingBeast extends CardImpl {
|
|||
|
||||
// Whenever Questing Beast deals combat damage to an opponent, it deals that much damage to target planeswalker that player controls.
|
||||
Ability ability = new DealsDamageToOpponentTriggeredAbility(new DamageTargetEffect(SavedDamageValue.MUCH), false, true, true);
|
||||
ability.addTarget(new TargetPlaneswalkerPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.setTargetAdjuster(new DamagedPlayerControlsTargetAdjuster());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,25 @@
|
|||
|
||||
package mage.cards.q;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
*/
|
||||
public final class QuicksilverGeyser extends CardImpl {
|
||||
|
||||
public QuicksilverGeyser(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{U}");
|
||||
|
||||
// Return up to two target nonland permanents to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(0, 2, StaticFilters.FILTER_PERMANENTS_NON_LAND, false));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(0, 2, StaticFilters.FILTER_PERMANENTS_NON_LAND));
|
||||
}
|
||||
|
||||
private QuicksilverGeyser(final QuicksilverGeyser card) {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.EachTargetPointer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -17,12 +18,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class RiteOfUndoing extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filterControlled = new FilterNonlandPermanent("nonland permanent you control");
|
||||
private static final FilterNonlandPermanent filterNotControlled = new FilterNonlandPermanent("nonland permanent you don't control");
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control");
|
||||
|
||||
static {
|
||||
filterControlled.add(TargetController.YOU.getControllerPredicate());
|
||||
filterNotControlled.add(TargetController.NOT_YOU.getControllerPredicate());
|
||||
filter.add(TargetController.NOT_YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public RiteOfUndoing(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -33,8 +32,8 @@ public final class RiteOfUndoing extends CardImpl {
|
|||
|
||||
// Return target nonland permanent you control and target nonland permanent you don't control to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setTargetPointer(new EachTargetPointer()));
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterControlled));
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterNotControlled));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private RiteOfUndoing(final RiteOfUndoing card) {
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenControllerTargetEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.ExileThenReturnTargetEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PutCards;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.keyword.DisguiseAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PutCards;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.DetectiveToken;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Cguy7777
|
||||
*/
|
||||
public final class UnyieldingGatekeeper extends CardImpl {
|
||||
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
|
||||
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("another target nonland permanent");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
@ -50,7 +50,7 @@ public final class UnyieldingGatekeeper extends CardImpl {
|
|||
// If you controlled it, return it to the battlefield tapped.
|
||||
// Otherwise, its controller creates a 2/2 white and blue Detective creature token.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new UnyieldingGatekeeperEffect());
|
||||
ability.addTarget(new TargetNonlandPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -13,20 +12,12 @@ public class TargetEnchantmentPermanent extends TargetPermanent {
|
|||
this(1);
|
||||
}
|
||||
|
||||
public TargetEnchantmentPermanent(FilterEnchantmentPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetEnchantmentPermanent(int numTargets) {
|
||||
this(numTargets, numTargets);
|
||||
}
|
||||
|
||||
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_ENCHANTMENT, false);
|
||||
}
|
||||
|
||||
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets, FilterEnchantmentPermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
super(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_ENCHANTMENT, false);
|
||||
}
|
||||
|
||||
protected TargetEnchantmentPermanent(final TargetEnchantmentPermanent target) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -13,10 +12,6 @@ public class TargetNonlandPermanent extends TargetPermanent {
|
|||
this(1);
|
||||
}
|
||||
|
||||
public TargetNonlandPermanent(FilterNonlandPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetNonlandPermanent(int numTargets) {
|
||||
this(numTargets, numTargets);
|
||||
}
|
||||
|
|
@ -26,11 +21,7 @@ public class TargetNonlandPermanent extends TargetPermanent {
|
|||
}
|
||||
|
||||
public TargetNonlandPermanent(int minNumTargets, int maxNumTargets, boolean notTarget) {
|
||||
this(minNumTargets, maxNumTargets, (maxNumTargets > 1 ? StaticFilters.FILTER_PERMANENTS_NON_LAND : StaticFilters.FILTER_PERMANENT_NON_LAND), notTarget);
|
||||
}
|
||||
|
||||
public TargetNonlandPermanent(int minNumTargets, int maxNumTargets, FilterNonlandPermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
super(minNumTargets, maxNumTargets, maxNumTargets > 1 ? StaticFilters.FILTER_PERMANENTS_NON_LAND : StaticFilters.FILTER_PERMANENT_NON_LAND, notTarget);
|
||||
}
|
||||
|
||||
protected TargetNonlandPermanent(final TargetNonlandPermanent target) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -10,23 +9,15 @@ import mage.target.TargetPermanent;
|
|||
public class TargetPlaneswalkerPermanent extends TargetPermanent {
|
||||
|
||||
public TargetPlaneswalkerPermanent() {
|
||||
this(1, 1, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(FilterPlaneswalkerPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
this(1);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int numTargets) {
|
||||
this(numTargets, numTargets, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
this(numTargets, numTargets);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int minNumTargets, int maxNumTargets, FilterPlaneswalkerPermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
super(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
private TargetPlaneswalkerPermanent(final TargetPlaneswalkerPermanent target) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue