forked from External/mage
Merge pull request #2536 from nigelzor/shortcut-filters
use TargetArtifactPermanent, etc.
This commit is contained in:
commit
0ad74e8a9b
159 changed files with 256 additions and 1037 deletions
|
|
@ -35,9 +35,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.HauntAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -56,8 +54,7 @@ public class AbsolverThrull extends CardImpl {
|
|||
// Haunt (When this creature dies, exile it haunting target creature.)
|
||||
// When Absolver Thrull enters the battlefield or the creature it haunts dies, destroy target enchantment.
|
||||
Ability ability = new HauntAbility(this, new DestroyTargetEffect());
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@ import mage.constants.Layer;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -58,22 +56,17 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class ActOfAuthority extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public ActOfAuthority(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}");
|
||||
|
||||
|
||||
// When Act of Authority enters the battlefield, you may exile target artifact or enchantment.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
// At the beginning of your upkeep, you may exile target artifact or enchantment. If you do, its controller gains control of Act of Authority.
|
||||
ability = new BeginningOfUpkeepTriggeredAbility(new ActOfAuthorityEffect(), TargetController.YOU, true);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ public class AjaniCallerOfThePride extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{W}{W}");
|
||||
this.subtype.add("Ajani");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4));
|
||||
// +1: Put a +1/+1 counter on up to one target creature.
|
||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||
|
|
|
|||
|
|
@ -59,10 +59,7 @@ public class AkromasMemorial extends CardImpl {
|
|||
public AkromasMemorial(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{7}");
|
||||
this.supertype.add("Legendary");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Creatures you control have flying, first strike, vigilance, trample, haste, and protection from black and from red.
|
||||
CompoundAbility compoundAbilities = new CompoundAbility(FlyingAbility.getInstance(), FirstStrikeAbility.getInstance(), VigilanceAbility.getInstance(), TrampleAbility.getInstance(), HasteAbility.getInstance(), new ProtectionAbility(protectionFilter));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(compoundAbilities, Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))));
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ import mage.abilities.keyword.BuybackAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,7 +48,7 @@ public class Allay extends CardImpl {
|
|||
this.addAbility(new BuybackAbility("{3}"));
|
||||
|
||||
// Destroy target enchantment.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,20 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class AltarsLight extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public AltarsLight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{W}");
|
||||
|
||||
// Exile target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public AltarsLight(final AltarsLight card) {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.abilities.keyword.FlashbackAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -48,7 +47,7 @@ public class AncientGrudge extends CardImpl {
|
|||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import mage.abilities.effects.common.UntapTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -48,11 +47,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class ArborElf extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public ArborElf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -50,7 +49,7 @@ public class ArtifactMutation extends CardImpl {
|
|||
|
||||
// Destroy target artifact. It can't be regenerated.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
// create X 1/1 green Saproling creature tokens, where X is that artifact's converted mana cost.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ public class AttendedKnight extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// First strike
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
// When Attended Knight enters the battlefield, create a 1/1 white Soldier creature token.
|
||||
|
|
|
|||
|
|
@ -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,23 +36,15 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 +54,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -50,7 +49,7 @@ public class AuraMutation extends CardImpl {
|
|||
|
||||
// Destroy target enchantment.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
|
||||
// create X 1/1 green Saproling creature tokens, where X is that enchantment's converted mana cost.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,12 +44,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 +53,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -53,11 +52,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class AwakenTheAncient extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain");
|
||||
|
||||
public AwakenTheAncient(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}{R}");
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.Layer;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
|
@ -53,11 +52,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class AwakenerDruid extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public AwakenerDruid(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,18 +44,12 @@ import mage.filter.predicate.mageobject.SupertypePredicate;
|
|||
*/
|
||||
public class BackToBasics extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Nonbasic lands");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
|
||||
public BackToBasics(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
||||
|
||||
|
||||
// Nonbasic lands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FilterLandPermanent.nonbasicLands())));
|
||||
}
|
||||
|
||||
public BackToBasics(final BackToBasics card) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -53,10 +53,7 @@ public class BattleflightEagle extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Battleflight Eagle enters the battlefield, target creature gets +2/+2 and gains flying until end of turn.
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ class TargetCreaturePermanentSameController extends TargetCreaturePermanent {
|
|||
|
||||
public TargetCreaturePermanentSameController(int minNumTargets, int maxNumTargets, FilterCreaturePermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
this.targetName = filter.getMessage();
|
||||
}
|
||||
|
||||
public TargetCreaturePermanentSameController(final TargetCreaturePermanentSameController target) {
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -50,12 +48,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class CapashenUnicorn extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public CapashenUnicorn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add("Unicorn");
|
||||
|
|
@ -66,7 +58,7 @@ public class CapashenUnicorn extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,10 +43,6 @@ public class CaptainsCall extends CardImpl {
|
|||
public CaptainsCall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Create three 1/1 white Soldier creature tokens.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SoldierToken(), 3));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ import mage.filter.predicate.permanent.TokenPredicate;
|
|||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -74,7 +73,7 @@ public class CaribouRange extends CardImpl {
|
|||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant land you control
|
||||
TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledLandPermanent("land you control"));
|
||||
TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent());
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -38,9 +38,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -49,13 +47,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class CausticCaterpillar extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public CausticCaterpillar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
this.subtype.add("Insect");
|
||||
|
|
@ -65,7 +56,7 @@ public class CausticCaterpillar extends CardImpl {
|
|||
// {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment.
|
||||
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 FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -102,8 +101,7 @@ class CausticWaspsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Player player = game.getPlayer(event.getTargetId());
|
||||
if (player != null) {
|
||||
FilterPermanent filter = new FilterPermanent("an artifact controlled by " + player.getLogName());
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT)));
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filter.add(new ControllerIdPredicate(event.getTargetId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
|
|
|
|||
|
|
@ -53,10 +53,7 @@ public class Chronomaton extends CardImpl {
|
|||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// {1}, {tap}: Put a +1/+1 counter on Chronomaton.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -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,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -45,17 +43,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,12 +44,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 +52,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,10 +53,7 @@ public class CrusaderOfOdric extends CardImpl {
|
|||
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Crusader of Odric's power and toughness are each equal to the number of creatures you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), Duration.EndOfGame)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -43,18 +41,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 TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,10 +35,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -47,10 +46,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 +63,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 TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,17 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Deglamer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
public Deglamer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
|
||||
|
||||
// Choose target artifact or enchantment. Its owner shuffles it into his or her library.
|
||||
this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(1, 1, filter, true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public Deglamer(final Deglamer card) {
|
||||
|
|
|
|||
|
|
@ -33,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -43,17 +41,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 TargetEnchantmentPermanent());
|
||||
}
|
||||
|
||||
public Demystify (final Demystify card) {
|
||||
|
|
@ -64,5 +56,4 @@ public class Demystify extends CardImpl {
|
|||
public Demystify copy() {
|
||||
return new Demystify(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -44,17 +42,11 @@ import mage.filter.predicate.mageobject.SupertypePredicate;
|
|||
*/
|
||||
public class DestructiveFlow extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
|
||||
public DestructiveFlow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{R}{G}");
|
||||
|
||||
// At the beginning of each player's upkeep, that player sacrifices a nonbasic land.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(filter, 1, "that player"),
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(FilterLandPermanent.nonbasicLand(), 1, "that player"),
|
||||
TargetController.ANY, false));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,9 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -52,15 +51,6 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author noxx
|
||||
*/
|
||||
public class DevoutChaplain extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
private static final FilterControlledPermanent humanFilter = new FilterControlledPermanent("untapped Human you control");
|
||||
|
||||
static {
|
||||
|
|
@ -80,7 +70,7 @@ public class DevoutChaplain extends CardImpl {
|
|||
// {T}, Tap two untapped Humans you control: Exile target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false)));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -61,8 +59,7 @@ public class DruidLyrist extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -51,7 +49,7 @@ public class DryadSophisticate extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Nonbasic landwalk
|
||||
this.addAbility(new NonbasicLandwalkAbility());
|
||||
this.addAbility(new LandwalkAbility(FilterLandPermanent.nonbasicLand()));
|
||||
}
|
||||
|
||||
public DryadSophisticate(final DryadSophisticate card) {
|
||||
|
|
@ -63,25 +61,3 @@ public class DryadSophisticate extends CardImpl {
|
|||
return new DryadSophisticate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NonbasicLandwalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
|
||||
public NonbasicLandwalkAbility() {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
public NonbasicLandwalkAbility(final NonbasicLandwalkAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonbasicLandwalkAbility copy() {
|
||||
return new NonbasicLandwalkAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,12 +38,10 @@ 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.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -53,15 +51,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 +74,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,29 +34,22 @@ 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.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
* @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 TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new EchoingCalmEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,11 +37,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,18 +47,12 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class ElementalUprising extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ElementalUprising(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
|
||||
|
||||
// Target land you control becomes a 4/4 Elemental creature with haste until end of turn. It's still a land. It must be blocked this turn if able.
|
||||
getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new ElementalUprisingToken(), false, true, Duration.EndOfTurn));
|
||||
getSpellAbility().addTarget(new TargetLandPermanent(filter));
|
||||
getSpellAbility().addTarget(new TargetPermanent(new FilterControlledLandPermanent()));
|
||||
Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn);
|
||||
effect.setText("It must be blocked this turn if able");
|
||||
getSpellAbility().addEffect(effect);
|
||||
|
|
|
|||
|
|
@ -39,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,12 +47,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 +54,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,12 +47,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 +59,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -60,7 +59,7 @@ public class ElvishLyrist extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -60,7 +59,7 @@ public class ElvishScrapper extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,10 +43,12 @@ import mage.constants.Duration;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -56,13 +58,10 @@ import mage.target.common.TargetLandPermanent;
|
|||
public class EmbodimentOfFury extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filterLandCreatures = new FilterPermanent("Land creatures");
|
||||
private static final FilterLandPermanent filterLand = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filterLandCreatures.add(new CardTypePredicate(CardType.LAND));
|
||||
filterLandCreatures.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filterLand.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
}
|
||||
|
||||
public EmbodimentOfFury(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -80,7 +79,7 @@ public class EmbodimentOfFury extends CardImpl {
|
|||
// <i>Landfall</i> - Whenever a land enters the battlefield under your control, you may have target land you control
|
||||
// become a 3/3 Elemental creature with haste until end of turn. It's still a land.
|
||||
Ability ability = new LandfallAbility(new BecomesCreatureTargetEffect(new EmbodimentOfFuryToken(), false, true, Duration.EndOfTurn), true);
|
||||
ability.addTarget(new TargetLandPermanent(filterLand));
|
||||
ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,14 +40,12 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -56,13 +54,10 @@ import mage.target.common.TargetLandPermanent;
|
|||
public class EmbodimentOfInsight extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filterLandCreatures = new FilterPermanent("Land creatures");
|
||||
private static final FilterLandPermanent filterLand = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filterLandCreatures.add(new CardTypePredicate(CardType.LAND));
|
||||
filterLandCreatures.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filterLand.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
}
|
||||
|
||||
public EmbodimentOfInsight(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -80,7 +75,7 @@ public class EmbodimentOfInsight extends CardImpl {
|
|||
// <i>Landfall</i> - Whenever a land enters the battlefield under you control, you may have target land you control
|
||||
// become a 3/3 Elemental creature with haste until end of turn. It's still a land.
|
||||
Ability ability = new LandfallAbility(new BecomesCreatureTargetEffect(new EmbodimentOfInsightToken(), false, true, Duration.EndOfTurn), true);
|
||||
ability.addTarget(new TargetLandPermanent(filterLand));
|
||||
ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ 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;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,12 +46,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,8 +55,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);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,31 +32,20 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 TargetEnchantmentPermanent());
|
||||
}
|
||||
|
||||
public Erase(final Erase card) {
|
||||
|
|
|
|||
|
|
@ -35,10 +35,8 @@ 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.target.TargetPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,19 +44,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 TargetEnchantmentPermanent());
|
||||
// or draw two cards;
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DrawCardSourceControllerEffect(2));
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ManaEvent;
|
||||
|
|
@ -80,11 +79,7 @@ public class ExtraplanarLens extends CardImpl {
|
|||
|
||||
class ExtraplanarLensImprintEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public ExtraplanarLensImprintEffect() {
|
||||
super(Outcome.Neutral);
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -44,19 +41,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class FadeIntoAntiquity extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public FadeIntoAntiquity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
|
||||
|
||||
|
||||
// Exile target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
Target target = new TargetPermanent(filter);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public FadeIntoAntiquity(final FadeIntoAntiquity card) {
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -42,21 +40,13 @@ import mage.target.TargetPermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public class FateForgotten extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public FateForgotten(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}");
|
||||
|
||||
// Exile target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public FateForgotten(final FateForgotten card) {
|
||||
|
|
|
|||
|
|
@ -33,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -45,19 +43,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 TargetEnchantmentPermanent());
|
||||
|
||||
// Madness {W}
|
||||
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{W}")));
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterBasicLandCard;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -74,11 +71,7 @@ public class FromTheAshes extends CardImpl {
|
|||
|
||||
class FromTheAshesEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic lands");
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
private static final FilterLandPermanent filter = FilterLandPermanent.nonbasicLands();
|
||||
|
||||
public FromTheAshesEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -56,11 +55,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheCedars extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest", "Forest");
|
||||
|
||||
public GenjuOfTheCedars(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -56,11 +55,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFalls extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Island");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Island"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Island", "Island");
|
||||
|
||||
public GenjuOfTheFalls(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}");
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -57,11 +56,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFens extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Swamp");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Swamp"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Swamp", "Swamp");
|
||||
|
||||
public GenjuOfTheFens(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -59,11 +58,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheFields extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Plains");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Plains"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Plains", "Plains");
|
||||
|
||||
public GenjuOfTheFields(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -55,15 +54,13 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheRealm extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent();
|
||||
|
||||
public GenjuOfTheRealm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}{U}{B}{R}{G}");
|
||||
this.subtype.add("Aura");
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
// Enchant Land
|
||||
TargetPermanent auraTarget = new TargetLandPermanent(FILTER);
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
|
@ -55,11 +54,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GenjuOfTheSpires extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Mountain");
|
||||
|
||||
static {
|
||||
FILTER.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
private static final FilterLandPermanent FILTER = new FilterLandPermanent("Mountain", "Mountain");
|
||||
|
||||
public GenjuOfTheSpires(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -41,7 +40,7 @@ public class GoblinArchaeologist extends CardImpl {
|
|||
// {R}, {T]: Flip a coin. If you win the flip, destroy target artifact and untap Goblin Archaeologist. If you lose the flip, sacrifice Goblin Archaeologist.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinArchaeologistEffect(),new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -57,7 +56,7 @@ public class GolgariCharm extends CardImpl {
|
|||
// or destroy target enchantment;
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DestroyTargetEffect());
|
||||
mode.getTargets().add(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
mode.getTargets().add(new TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// or regenerate each creature you control.
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ public class GriffinProtector extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever another creature enters the battlefield under your control, Griffin Protector gets +1/+1 until end of turn.
|
||||
|
|
|
|||
|
|
@ -37,12 +37,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -50,12 +47,6 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class GrixisIllusionist extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public GrixisIllusionist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
|
||||
this.subtype.add("Human");
|
||||
|
|
@ -66,8 +57,7 @@ public class GrixisIllusionist extends CardImpl {
|
|||
|
||||
// {tap}: Target land you control becomes the basic land type of your choice until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost());
|
||||
Target target = new TargetLandPermanent(filter);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ public class HealerOfThePride extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Whenever another creature enters the battlefield under your control, you gain 2 life.
|
||||
this.addAbility(new EntersAnotherCreatureYourControlTriggeredAbility(new GainLifeEffect(2)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,7 @@ import mage.cards.SplitCard;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -53,21 +51,13 @@ import mage.target.common.TargetOpponent;
|
|||
*/
|
||||
public class HideSeek extends SplitCard {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public HideSeek(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}","{W}{B}",false);
|
||||
|
||||
|
||||
// Hide
|
||||
// Put target artifact or enchantment on the bottom of its owner's library.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false));
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
|
||||
// Seek
|
||||
// Search target opponent's library for a card and exile it. You gain life equal to its converted mana cost. Then that player shuffles his or her library..
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
|
@ -60,7 +59,7 @@ public class HotSprings extends CardImpl {
|
|||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant land you control
|
||||
TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledLandPermanent("land you control"));
|
||||
TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent());
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
|
|
@ -56,7 +54,7 @@ public class HullBreach extends CardImpl {
|
|||
// or destroy target enchantment;
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DestroyTargetEffect());
|
||||
target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
target = new TargetEnchantmentPermanent();
|
||||
mode.getTargets().add(target);
|
||||
this.getSpellAbility().addMode(mode);
|
||||
// or destroy target artifact and target enchantment.
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,20 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class IronwrightsCleansing extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public IronwrightsCleansing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}");
|
||||
|
||||
// Exile target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,20 +39,13 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 +54,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,21 +37,13 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
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 +53,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,20 +41,13 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 +61,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 TargetEnchantmentPermanent());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
// Persist
|
||||
|
|
|
|||
|
|
@ -68,12 +68,10 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class KothOfTheHammer extends CardImpl {
|
||||
|
||||
static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
|
||||
static final FilterLandPermanent filter = new FilterLandPermanent("Mountain", "Mountain");
|
||||
static final FilterLandPermanent filterCount = new FilterLandPermanent("Mountain you control");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
|
||||
filterCount.add(new SubtypePredicate("Mountain"));
|
||||
filterCount.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,7 @@ import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -51,13 +48,6 @@ import mage.target.TargetPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class LeoninRelicWarder extends CardImpl {
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public LeoninRelicWarder (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}");
|
||||
|
|
@ -68,8 +58,7 @@ public class LeoninRelicWarder extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true);
|
||||
Target target = new TargetPermanent(filter);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
|
||||
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class LivingTerrain extends CardImpl {
|
|||
|
||||
// Enchant land
|
||||
|
||||
TargetPermanent auraTarget = new TargetLandPermanent(new FilterLandPermanent());
|
||||
TargetPermanent auraTarget = new TargetLandPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ class LoamingShamanTargetCardsInGraveyard extends TargetCardInGraveyard {
|
|||
|
||||
public LoamingShamanTargetCardsInGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) {
|
||||
super(minNumTargets, maxNumTargets, filter);
|
||||
this.targetName = filter.getMessage();
|
||||
}
|
||||
|
||||
public LoamingShamanTargetCardsInGraveyard(final LoamingShamanTargetCardsInGraveyard target) {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -54,8 +52,7 @@ public class ManicVandal extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
Target target = new TargetPermanent(new FilterArtifactPermanent());
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -67,7 +66,7 @@ public class MoggSalvage extends CardImpl {
|
|||
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
}
|
||||
|
||||
public MoggSalvage(final MoggSalvage card) {
|
||||
|
|
|
|||
|
|
@ -35,22 +35,13 @@ 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.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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,8 +53,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);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
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++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -61,7 +60,7 @@ public class MysticMight extends CardImpl {
|
|||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant land you control
|
||||
TargetPermanent auraTarget = new TargetControlledPermanent(new FilterControlledLandPermanent("land you control"));
|
||||
TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent());
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@ import mage.abilities.keyword.MorphAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -48,14 +46,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class NantukoVigilante extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NantukoVigilante(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
||||
this.subtype.add("Insect");
|
||||
|
|
@ -69,7 +59,7 @@ public class NantukoVigilante extends CardImpl {
|
|||
this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}")));
|
||||
// When Nantuko Vigilante is turned face up, destroy target artifact or enchantment.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,8 @@ import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -56,7 +55,7 @@ public class NikkoOnna extends CardImpl {
|
|||
|
||||
// When Nikko-Onna enters the battlefield, destroy target enchantment.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
|
||||
ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever you cast a Spirit or Arcane spell, you may return Nikko-Onna to its owner's hand.
|
||||
|
|
|
|||
|
|
@ -43,20 +43,16 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterBasicLandCard;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
|
@ -65,13 +61,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class NissaWorldwaker extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
|
||||
private static final FilterPermanent filterForest = new FilterPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filterForest.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
private static final FilterPermanent filterForest = new FilterPermanent("Forest", "Forest");
|
||||
|
||||
public NissaWorldwaker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{G}{G}");
|
||||
|
|
@ -81,7 +71,7 @@ public class NissaWorldwaker extends CardImpl {
|
|||
|
||||
// +1: Target land you control becomes a 4/4 Elemental creature with trample. It's still a land.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new BecomesCreatureTargetEffect(new NissaWorldwakerToken(), false, true, Duration.Custom), 1);
|
||||
ability.addTarget(new TargetLandPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent()));
|
||||
this.addAbility(ability);
|
||||
|
||||
// +1: Untap up to four target Forests.
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
|
@ -44,7 +43,7 @@ public class Oxidize extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
|
||||
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
}
|
||||
|
||||
public Oxidize(final Oxidize card) {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -51,7 +50,7 @@ public class PhyrexianTribute extends CardImpl {
|
|||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(2)));
|
||||
// Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactPermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
}
|
||||
|
||||
public PhyrexianTribute(final PhyrexianTribute card) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
@ -66,11 +64,7 @@ public class PriceOfProgress extends CardImpl {
|
|||
|
||||
class PriceOfProgressEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic lands");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
private static final FilterLandPermanent filter = FilterLandPermanent.nonbasicLands();
|
||||
|
||||
public PriceOfProgressEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
|
|
|||
|
|
@ -38,9 +38,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -59,8 +57,7 @@ public class PriestOfIroas extends CardImpl {
|
|||
// {3}{W}, Sacrifice Priest of Iroas: Destroy target enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{3}{W}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
@ -69,11 +67,7 @@ public class PrimalOrder extends CardImpl {
|
|||
|
||||
class PrimalOrderDamageTargetEffect extends OneShotEffect{
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic lands");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
}
|
||||
private static final FilterLandPermanent filter = FilterLandPermanent.nonbasicLands();
|
||||
|
||||
public PrimalOrderDamageTargetEffect()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,10 +41,8 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -52,14 +50,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 +62,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 TargetEnchantmentPermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,9 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -52,20 +50,13 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class QuietDisrepair extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public QuietDisrepair(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
||||
this.subtype.add("Aura");
|
||||
|
||||
|
||||
// Enchant artifact or enchantment
|
||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||
TargetPermanent auraTarget = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent());
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -34,26 +34,18 @@ 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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
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 TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,9 @@ import mage.abilities.Mode;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -58,12 +57,12 @@ public class RainOfThorns extends CardImpl {
|
|||
|
||||
Mode mode1 = new Mode();
|
||||
mode1.getEffects().add(new DestroyTargetEffect());
|
||||
mode1.getTargets().add(new TargetPermanent(new FilterEnchantmentPermanent()));
|
||||
mode1.getTargets().add(new TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addMode(mode1);
|
||||
|
||||
Mode mode2 = new Mode();
|
||||
mode2.getEffects().add(new DestroyTargetEffect());
|
||||
mode2.getTargets().add(new TargetPermanent(new FilterLandPermanent()));
|
||||
mode2.getTargets().add(new TargetLandPermanent());
|
||||
this.getSpellAbility().addMode(mode2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ public class RavenousSkirge extends CardImpl {
|
|||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build() {
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever Ravenous Skirge attacks, it gets +2/+0 until end of turn.
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,8 +47,7 @@ public class RayOfDissolution extends CardImpl {
|
|||
|
||||
// Destroy target enchantment. You gain 3 life.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
Target target = new TargetPermanent(new FilterEnchantmentPermanent());
|
||||
this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +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.target.TargetPermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -45,18 +43,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 TargetEnchantmentPermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
|
@ -46,12 +44,6 @@ import mage.target.TargetPermanent;
|
|||
* @author emerald000
|
||||
*/
|
||||
public class ReturnToDust extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public ReturnToDust(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{W}");
|
||||
|
|
@ -71,10 +63,10 @@ public class ReturnToDust extends CardImpl {
|
|||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
if (game.getActivePlayerId().equals(ability.getControllerId()) && game.isMainPhase()) {
|
||||
ability.addTarget(new TargetPermanent(1, 2, filter, false));
|
||||
ability.addTarget(new TargetPermanent(1, 2, new FilterArtifactOrEnchantmentPermanent(), false));
|
||||
}
|
||||
else {
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,20 +41,12 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class RevokeExistence extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public RevokeExistence(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}");
|
||||
|
||||
// Exile target artifact or enchantment.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
|
||||
}
|
||||
|
||||
public RevokeExistence(final RevokeExistence card) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue