forked from External/mage
use FilterEnchantmentPermanent
This commit is contained in:
parent
43b0d4ef97
commit
82db9ada32
35 changed files with 71 additions and 297 deletions
|
|
@ -38,28 +38,20 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class AuraFlux extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantments");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public AuraFlux(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
||||
|
||||
|
||||
// Other enchantments have "At the beginning of your upkeep, sacrifice this enchantment unless you pay {2}."
|
||||
Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new GenericManaCost(2)), TargetController.YOU, false);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, true)));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, new FilterEnchantmentPermanent("enchantments"), true)));
|
||||
}
|
||||
|
||||
public AuraFlux(final AuraFlux card) {
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
|
@ -47,12 +46,6 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public class AuraFracture extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public AuraFracture(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
||||
|
|
@ -62,7 +55,7 @@ public class AuraFracture extends CardImpl {
|
|||
Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(),
|
||||
new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land"))));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -46,12 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class AvenCloudchaser extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public AvenCloudchaser(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
||||
this.subtype.add("Bird");
|
||||
|
|
@ -61,7 +54,7 @@ public class AvenCloudchaser extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -42,16 +41,10 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class BackToNature extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantments");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public BackToNature(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(filter));
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
|
||||
}
|
||||
|
||||
public BackToNature(final BackToNature card) {
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -47,11 +46,6 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class BubblingBeebles extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public BubblingBeebles(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
|
||||
this.subtype.add("Beeble");
|
||||
|
|
@ -62,7 +56,7 @@ public class BubblingBeebles extends CardImpl {
|
|||
// Bubbling Beebles can't be blocked as long as defending player controls an enchantment.
|
||||
Effect effect = new ConditionalRestrictionEffect(
|
||||
new CantBeBlockedSourceEffect(),
|
||||
new DefendingPlayerControlsCondition(filter));
|
||||
new DefendingPlayerControlsCondition(new FilterEnchantmentPermanent()));
|
||||
effect.setText("{this} can't be blocked as long as defending player controls an enchantment");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,25 +34,18 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class Cleanfall extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantments");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Cleanfall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}");
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(filter));
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
|
||||
}
|
||||
|
||||
public Cleanfall(final Cleanfall card) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -45,17 +44,11 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Clear extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Clear(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -46,12 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class CloudchaserEagle extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public CloudchaserEagle(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
||||
this.subtype.add("Bird");
|
||||
|
|
@ -60,7 +53,7 @@ public class CloudchaserEagle extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -43,18 +42,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public class Cursebreak extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Cursebreak(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
|
||||
// Destroy target enchantment. You gain 2 life.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
|
@ -47,10 +47,8 @@ import mage.target.common.TargetCardInYourGraveyard;
|
|||
public class DawnToDusk extends CardImpl {
|
||||
|
||||
private static final FilterCard filterCard = new FilterCard("enchantment card from your graveyard");
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
static {
|
||||
filterCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public DawnToDusk(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -66,7 +64,7 @@ public class DawnToDusk extends CardImpl {
|
|||
// and/or destroy target enchantment.
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DestroyTargetEffect());
|
||||
mode.getTargets().add(new TargetPermanent(filter));
|
||||
mode.getTargets().add(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,17 +42,11 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Demystify extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Demystify (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public Demystify (final Demystify card) {
|
||||
|
|
@ -64,5 +57,4 @@ public class Demystify extends CardImpl {
|
|||
public Demystify copy() {
|
||||
return new Demystify(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,8 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
|
@ -53,15 +52,13 @@ public class DuergarHedgeMage extends CardImpl {
|
|||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("a Mountain");
|
||||
private static final FilterLandPermanent filter2 = new FilterLandPermanent("a Plains");
|
||||
private static final FilterPermanent filter3 = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filter2.add(new SubtypePredicate("Plains"));
|
||||
filter3.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
private final String rule1 = "When {this} enters the battlefield, if you control two or more Mountains, you may destroy target artifact.";
|
||||
private final String rule2 = "When {this} enters the battlefield, if you control two or more Plains, you may destroy target enchantment.";
|
||||
private static final String rule1 = "When {this} enters the battlefield, if you control two or more Mountains, you may destroy target artifact.";
|
||||
private static final String rule2 = "When {this} enters the battlefield, if you control two or more Plains, you may destroy target enchantment.";
|
||||
|
||||
public DuergarHedgeMage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}");
|
||||
|
|
@ -78,7 +75,7 @@ public class DuergarHedgeMage extends CardImpl {
|
|||
|
||||
// When Duergar Hedge-Mage enters the battlefield, if you control two or more Plains, you may destroy target enchantment.
|
||||
Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, CountType.MORE_THAN, 1), rule2);
|
||||
ability2.addTarget(new TargetPermanent(filter3));
|
||||
ability2.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -45,18 +44,13 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class EchoingCalm extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public EchoingCalm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
|
||||
// Destroy target enchantment and all other enchantments with the same name as that enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new EchoingCalmEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -49,12 +48,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ElfReplica extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public ElfReplica(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}");
|
||||
this.subtype.add("Elf");
|
||||
|
|
@ -62,7 +55,7 @@ public class ElfReplica extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -49,12 +48,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ElvishHexhunter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public ElvishHexhunter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G/W}");
|
||||
this.subtype.add("Elf");
|
||||
|
|
@ -67,7 +60,7 @@ public class ElvishHexhunter extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G/W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -46,12 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class EnlightenedAscetic extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public EnlightenedAscetic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Cat");
|
||||
|
|
@ -61,7 +54,7 @@ public class EnlightenedAscetic extends CardImpl {
|
|||
|
||||
// When Enlightened Ascetic enters the battlefield, you may destroy target enchantment.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -41,22 +40,13 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class Erase extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Erase(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Exile target enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public Erase(final Erase card) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
|||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
|
|
@ -46,19 +45,13 @@ import mage.target.TargetPlayer;
|
|||
*/
|
||||
public class EsperCharm extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public EsperCharm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{B}");
|
||||
|
||||
|
||||
// Choose one - Destroy target enchantment;
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
// or draw two cards;
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DrawCardSourceControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -45,19 +44,13 @@ import java.util.UUID;
|
|||
*/
|
||||
public class FranticPurification extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public FranticPurification(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}");
|
||||
|
||||
|
||||
// Destroy target enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
|
||||
// Madness {W}
|
||||
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{W}")));
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -48,11 +47,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class KamiOfAncientLaw extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public KamiOfAncientLaw (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
|
|
@ -61,7 +55,7 @@ public class KamiOfAncientLaw extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -46,12 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class KeeningApparition extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public KeeningApparition(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Spirit");
|
||||
|
|
@ -61,7 +54,7 @@ public class KeeningApparition extends CardImpl {
|
|||
|
||||
// Sacrifice Keening Apparition: Destroy target enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(),new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ import mage.abilities.keyword.PersistAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -50,11 +49,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class KithkinSpellduster extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public KithkinSpellduster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
||||
|
|
@ -68,7 +62,7 @@ public class KithkinSpellduster extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {1}{W}, Sacrifice Kithkin Spellduster: Destroy target enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
// Persist
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -45,12 +44,6 @@ import mage.target.TargetPermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public class MonkRealist extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public MonkRealist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
|
|
@ -62,7 +55,7 @@ public class MonkRealist extends CardImpl {
|
|||
|
||||
// When Monk Realist enters the battlefield, destroy target enchantment.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -63,12 +62,8 @@ public class MultanisDecree extends CardImpl {
|
|||
return new MultanisDecree(this);
|
||||
}
|
||||
}
|
||||
class MultanisDecreeDestroyEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
class MultanisDecreeDestroyEffect extends OneShotEffect {
|
||||
public MultanisDecreeDestroyEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Destroy all enchantments. You gain 2 life for each enchantment destroyed this way";
|
||||
|
|
@ -87,7 +82,7 @@ class MultanisDecreeDestroyEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
int enchantmentsDestoyed = 0;
|
||||
for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
if (permanent.destroy(source.getSourceId(), game, false)) {
|
||||
enchantmentsDestoyed++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
|
@ -52,14 +51,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
*/
|
||||
public class QuagmireDruid extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public QuagmireDruid(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
this.subtype.add("Zombie");
|
||||
|
|
@ -72,7 +63,7 @@ public class QuagmireDruid extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(false), new ColoredManaCost(ColoredManaSymbol.G));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,17 +42,11 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class QuietPurity extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public QuietPurity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
||||
this.subtype.add("Arcane");
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -45,18 +44,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class RayOfRevelation extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public RayOfRevelation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
|
||||
// Destroy target enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.ExileTargetAndSearchGraveyardHandLibraryEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -41,11 +40,6 @@ import mage.target.TargetPermanent;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public class Scour extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Scour(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{W}");
|
||||
|
|
@ -53,7 +47,7 @@ public class Scour extends CardImpl {
|
|||
|
||||
// Exile target enchantment.
|
||||
// Search its controller's graveyard, hand, and library for all cards with the same name as that enchantment and exile them. Then that player shuffles his or her library.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new ExileTargetAndSearchGraveyardHandLibraryEffect(false, "its controller's","all cards with the same name as that enchantment"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -53,12 +52,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Shinewend extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Shinewend(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Elemental");
|
||||
|
|
@ -75,7 +68,7 @@ public class Shinewend extends CardImpl {
|
|||
// {1}{W}, Remove a +1/+1 counter from Shinewend: Destroy target enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -48,12 +47,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SilverchaseFox extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public SilverchaseFox(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Fox");
|
||||
|
|
@ -63,7 +56,7 @@ public class SilverchaseFox extends CardImpl {
|
|||
|
||||
// {1}{W}, Sacrifice Silverchase Fox: Exile target enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentCard;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
|
|
@ -52,24 +51,14 @@ import mage.target.common.TargetCardInLibrary;
|
|||
*/
|
||||
public class SterlingGrove extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filterPermanent = new FilterControlledPermanent("enchantments");
|
||||
private static final FilterCard filterCard = new FilterCard("enchantment card");
|
||||
static {
|
||||
filterPermanent.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
filterCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
|
||||
public SterlingGrove(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}{W}");
|
||||
|
||||
|
||||
// Other enchantments you control have shroud.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filterPermanent, true)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, new FilterEnchantmentPermanent("enchantments"), true)));
|
||||
|
||||
// {1}, Sacrifice Sterling Grove: Search your library for an enchantment card and reveal that card. Shuffle your library, then put the card on top of it.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filterCard), true, true), new GenericManaCost(1));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterEnchantmentCard("enchantment card")), true, true), new GenericManaCost(1));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,4 +56,3 @@ public class TempestOfLight extends CardImpl {
|
|||
return new TempestOfLight(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,4 +61,3 @@ public class TranquilPath extends CardImpl {
|
|||
return new TranquilPath(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -47,12 +46,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class WarPriestOfThune extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public WarPriestOfThune(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Human");
|
||||
|
|
@ -63,7 +56,7 @@ public class WarPriestOfThune extends CardImpl {
|
|||
|
||||
// When War Priest of Thune enters the battlefield, you may destroy target enchantment.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
|
||||
Target target = new TargetPermanent(filter);
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.abilities.keyword.CyclingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,16 +42,12 @@ import mage.target.TargetPermanent;
|
|||
* @author markedagain
|
||||
*/
|
||||
public class WipeClean extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
public WipeClean(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
// Exile target enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
// Cycling {3}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{3}")));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue