Merge pull request #1 from magefree/master

Update fork?
This commit is contained in:
theelk801 2017-07-24 12:37:09 -04:00 committed by GitHub
commit 7acd8559dc
147 changed files with 701 additions and 512 deletions

View file

@ -352,7 +352,8 @@ public class ComputerPlayer extends PlayerImpl implements Player {
return target.isChosen(); return target.isChosen();
} }
if (target.getOriginalTarget() instanceof TargetCardInYourGraveyard) { if (target.getOriginalTarget() instanceof TargetCardInYourGraveyard
|| target.getOriginalTarget() instanceof TargetCardInASingleGraveyard) {
List<UUID> alreadyTargetted = target.getTargets(); List<UUID> alreadyTargetted = target.getTargets();
List<Card> cards = new ArrayList<>(game.getPlayer(abilityControllerId).getGraveyard().getCards(game)); List<Card> cards = new ArrayList<>(game.getPlayer(abilityControllerId).getGraveyard().getCards(game));
while (!cards.isEmpty()) { while (!cards.isEmpty()) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,11 +35,13 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
import java.util.UUID;
/** /**
* *
* @author Backfir3 * @author Backfir3
@ -62,7 +63,7 @@ public class Abolish extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public Abolish(final Abolish card) { public Abolish(final Abolish card) {

View file

@ -27,15 +27,16 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.keyword.BolsterEffect; import mage.abilities.effects.keyword.BolsterEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -46,7 +47,7 @@ public class AbzanAdvantage extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
// Target player sacrifices an enchantment. Bolster 1. // Target player sacrifices an enchantment. Bolster 1.
this.getSpellAbility().addEffect(new SacrificeEffect(new FilterEnchantmentPermanent(), 1, "Target player")); this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, "Target player"));
this.getSpellAbility().addEffect(new BolsterEffect(1)); this.getSpellAbility().addEffect(new BolsterEffect(1));
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -39,12 +38,14 @@ import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -57,11 +58,11 @@ public class ActOfAuthority extends CardImpl {
// When Act of Authority enters the battlefield, you may exile target artifact or enchantment. // When Act of Authority enters the battlefield, you may exile target artifact or enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); 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. // 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 = new BeginningOfUpkeepTriggeredAbility(new ActOfAuthorityEffect(), TargetController.YOU, true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -46,7 +47,7 @@ public class AltarsLight extends CardImpl {
// Exile target artifact or enchantment. // Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public AltarsLight(final AltarsLight card) { public AltarsLight(final AltarsLight card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -38,12 +37,13 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
@ -70,7 +70,7 @@ public class ApothecaryGeist extends CardImpl {
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3));
this.addAbility(new ConditionalTriggeredAbility( this.addAbility(new ConditionalTriggeredAbility(
triggeredAbility, triggeredAbility,
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"When {this} enters the battlefield, if you control another Spirit, you gain 3 life.")); "When {this} enters the battlefield, if you control another Spirit, you gain 3 life."));
} }

View file

@ -27,28 +27,28 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public class AppetiteForTheUnnatural extends CardImpl { public class AppetiteForTheUnnatural extends CardImpl {
public AppetiteForTheUnnatural(UUID ownerId, CardSetInfo setInfo) { public AppetiteForTheUnnatural(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Destroy target artifact or enchantment. You gain 2 life. // Destroy target artifact or enchantment. You gain 2 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new GainLifeEffect(2)); this.getSpellAbility().addEffect(new GainLifeEffect(2));
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public AppetiteForTheUnnatural(final AppetiteForTheUnnatural card) { public AppetiteForTheUnnatural(final AppetiteForTheUnnatural card) {

View file

@ -27,15 +27,16 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -46,7 +47,7 @@ public class ArtisansSorrow extends CardImpl {
// Destroy target artifact or enchantment. Scry 2. // Destroy target artifact or enchantment. Scry 2.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new ScryEffect(2)); this.getSpellAbility().addEffect(new ScryEffect(2));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -37,11 +36,16 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* @author jeffwadsworth * @author jeffwadsworth
*/ */
@ -65,7 +69,7 @@ public class AshenmoorCohort extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Ashenmoor Cohort gets +1/+1 as long as you control another black creature. // Ashenmoor Cohort gets +1/+1 as long as you control another black creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -39,11 +38,13 @@ import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -57,7 +58,7 @@ public class AuraOfSilence extends CardImpl {
// Sacrifice Aura of Silence: Destroy target artifact or enchantment. // Sacrifice Aura of Silence: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,9 +35,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -50,7 +50,7 @@ public class AuraShards extends CardImpl {
// Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment. // Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment"); Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment");
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -5,7 +5,6 @@
*/ */
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
@ -19,11 +18,13 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
* *
* @author nick.myers * @author nick.myers
@ -75,7 +76,7 @@ class AuraThiefDiesTriggeredEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
boolean ret = false; boolean ret = false;
for(Permanent enchantment : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getControllerId(), game)) { for(Permanent enchantment : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getControllerId(), game)) {
ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame); ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame);
gainControl.setTargetPointer(new FixedTarget(enchantment.getId())); gainControl.setTargetPointer(new FixedTarget(enchantment.getId()));
game.addEffect(gainControl, source); game.addEffect(gainControl, source);

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
@ -71,7 +75,7 @@ public class BallynockCohort extends CardImpl {
this.addAbility(FirstStrikeAbility.getInstance()); this.addAbility(FirstStrikeAbility.getInstance());
// Ballynock Cohort gets +1/+1 as long as you control another white creature. // Ballynock Cohort gets +1/+1 as long as you control another white creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -27,16 +27,17 @@
*/ */
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Jgod * @author Jgod
@ -48,7 +49,7 @@ public class BreakAsunder extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Cycling {2} // Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
@ -71,7 +75,7 @@ public class BriarberryCohort extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Briarberry Cohort gets +1/+1 as long as you control another blue creature. // Briarberry Cohort gets +1/+1 as long as you control another blue creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DefendingPlayerControlsCondition; import mage.abilities.condition.common.DefendingPlayerControlsCondition;
@ -39,7 +38,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
* *
@ -57,7 +58,7 @@ public class BubblingBeebles extends CardImpl {
// Bubbling Beebles can't be blocked as long as defending player controls an enchantment. // Bubbling Beebles can't be blocked as long as defending player controls an enchantment.
Effect effect = new ConditionalRestrictionEffect( Effect effect = new ConditionalRestrictionEffect(
new CantBeBlockedSourceEffect(), new CantBeBlockedSourceEffect(),
new DefendingPlayerControlsCondition(new FilterEnchantmentPermanent())); new DefendingPlayerControlsCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
effect.setText("{this} can't be blocked as long as defending player controls an enchantment"); effect.setText("{this} can't be blocked as long as defending player controls an enchantment");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -39,9 +38,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author anonymous * @author anonymous
@ -58,7 +59,7 @@ public class CapashenUnicorn extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -38,9 +37,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -56,7 +57,7 @@ public class CausticCaterpillar extends CardImpl {
// {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment. // {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}"));
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -36,7 +35,6 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.counters.CounterType; import mage.counters.CounterType;
@ -46,6 +44,8 @@ import mage.filter.predicate.permanent.CounterPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -100,7 +100,7 @@ class ChroniclerOfHeroesEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
if (new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0).apply(game, source)) { if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) {
controller.drawCards(1, game); controller.drawCards(1, game);
} }
return true; return true;

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
@ -39,11 +38,13 @@ import mage.cards.CardsImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
* *
* @author spjspj * @author spjspj
@ -97,7 +98,7 @@ class CleansingMeditationEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent != null && permanent.destroy(source.getSourceId(), game, false)) { if (permanent != null && permanent.destroy(source.getSourceId(), game, false)) {
if (threshold && controller != null && permanent.getOwnerId().equals(controller.getId())) { if (threshold && controller != null && permanent.getOwnerId().equals(controller.getId())) {
cardsToBattlefield.add(permanent); cardsToBattlefield.add(permanent);

View file

@ -28,7 +28,6 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
@ -60,7 +60,7 @@ public class ClifftopRetreat extends CardImpl {
public ClifftopRetreat(UUID ownerId, CardSetInfo setInfo) { public ClifftopRetreat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Mountain or a Plains"; String abilityText = "tap it unless you control a Mountain or a Plains";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.common.FilterPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -71,7 +71,7 @@ public class CompanionOfTheTrials extends CardImpl {
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new UntapTargetEffect(), new UntapTargetEffect(),
new ManaCostsImpl("{1}{W}"), new ManaCostsImpl("{1}{W}"),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); new PermanentsOnTheBattlefieldCondition(filter));
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -52,7 +53,7 @@ public class ConclaveNaturalists extends CardImpl {
// When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment. // When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -39,13 +38,14 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -71,7 +71,7 @@ public class CrabappleCohort extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Crabapple Cohort gets +1/+1 as long as you control another green creature. // Crabapple Cohort gets +1/+1 as long as you control another green creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.condition.common.RevoltCondition; import mage.abilities.condition.common.RevoltCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -35,10 +34,12 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.watchers.common.RevoltWatcher; import mage.watchers.common.RevoltWatcher;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -50,7 +51,7 @@ public class Decommission extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// <i>Revolt</i> &mdash; If a permanent you controlled left the battlefield this turn, you gain 3 life. // <i>Revolt</i> &mdash; If a permanent you controlled left the battlefield this turn, you gain 3 life.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(3), RevoltCondition.instance, "<br><i>Revolt</i> &mdash; If a permanent you controlled left the battlefield this turn, you gain 3 life.")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(3), RevoltCondition.instance, "<br><i>Revolt</i> &mdash; If a permanent you controlled left the battlefield this turn, you gain 3 life."));

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -46,7 +47,7 @@ public class Deglamer extends CardImpl {
// Choose target artifact or enchantment. Its owner shuffles it into his or her library. // Choose target artifact or enchantment. Its owner shuffles it into his or her library.
this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public Deglamer(final Deglamer card) { public Deglamer(final Deglamer card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -39,13 +38,14 @@ import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.common.FilterPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -70,7 +70,7 @@ public class DesiccatedNaga extends CardImpl {
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new LoseLifeTargetEffect(2), new LoseLifeTargetEffect(2),
new ManaCostsImpl("{3}{B}"), new ManaCostsImpl("{3}{B}"),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); new PermanentsOnTheBattlefieldCondition(filter));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
Effect effect = new GainLifeEffect(2); Effect effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life"); effect.setText("and you gain 2 life");

View file

@ -27,20 +27,21 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -52,7 +53,7 @@ public class DestructiveRevelry extends CardImpl {
// Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller. // Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller.
this.getSpellAbility().addEffect(new DestructiveRevelryEffect()); this.getSpellAbility().addEffect(new DestructiveRevelryEffect());
Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT);
this.getSpellAbility().addTarget(target); this.getSpellAbility().addTarget(target);
} }

View file

@ -48,8 +48,8 @@ import mage.target.common.TargetControlledPermanent;
*/ */
public class DevourFlesh extends CardImpl { public class DevourFlesh extends CardImpl {
public DevourFlesh (UUID ownerId, CardSetInfo setInfo) { public DevourFlesh(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Target player sacrifices a creature, then gains life equal to that creature's toughness. // Target player sacrifices a creature, then gains life equal to that creature's toughness.
this.getSpellAbility().addEffect(new DevourFleshSacrificeEffect()); this.getSpellAbility().addEffect(new DevourFleshSacrificeEffect());
@ -99,8 +99,9 @@ class DevourFleshSacrificeEffect extends OneShotEffect {
if (permanent != null) { if (permanent != null) {
int gainLife = permanent.getToughness().getValue(); int gainLife = permanent.getToughness().getValue();
permanent.sacrifice(source.getSourceId(), game); permanent.sacrifice(source.getSourceId(), game);
game.applyEffects();
player.gainLife(gainLife, game); player.gainLife(gainLife, game);
} else{ } else {
return false; return false;
} }
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -39,7 +38,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
@ -47,6 +46,8 @@ import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/** /**
* @author noxx * @author noxx
@ -71,7 +72,7 @@ public class DevoutChaplain extends CardImpl {
// {T}, Tap two untapped Humans you control: Exile target artifact or enchantment. // {T}, Tap two untapped Humans you control: Exile target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost());
ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false))); ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false)));
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -39,9 +38,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -60,7 +61,7 @@ public class DevoutWitness extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -46,7 +47,7 @@ public class Disenchant extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public Disenchant(final Disenchant card) { public Disenchant(final Disenchant card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.condition.common.KickedCondition; import mage.abilities.condition.common.KickedCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -36,9 +35,11 @@ import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -52,7 +53,7 @@ public class DismantlingBlow extends CardImpl {
this.addAbility(new KickerAbility("{2}{U}")); this.addAbility(new KickerAbility("{2}{U}"));
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// If Dismantling Blow was kicked, draw two cards. // If Dismantling Blow was kicked, draw two cards.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(2), new DrawCardSourceControllerEffect(2),

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
@ -37,9 +36,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -51,7 +52,7 @@ public class DispellersCapsule extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}"));
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -95,7 +95,7 @@ public class DjeruWithEyesOpen extends CardImpl {
class DjeruWithEyesOpenPreventEffect extends PreventionEffectImpl { class DjeruWithEyesOpenPreventEffect extends PreventionEffectImpl {
public DjeruWithEyesOpenPreventEffect() { public DjeruWithEyesOpenPreventEffect() {
super(Duration.EndOfGame, 1, false, false); super(Duration.WhileOnBattlefield, 1, false, false);
this.staticText = "If a source would deal damage to a planeswalker you control, prevent 1 of that damage"; this.staticText = "If a source would deal damage to a planeswalker you control, prevent 1 of that damage";
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -39,11 +38,12 @@ import mage.abilities.keyword.IngestAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.mageobject.ColorlessPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -74,7 +74,7 @@ public class DominatorDrone extends CardImpl {
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2)); TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2));
this.addAbility(new ConditionalTriggeredAbility( this.addAbility(new ConditionalTriggeredAbility(
triggeredAbility, triggeredAbility,
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"When {this} enters the battlefield, if you control another colorless creature, each opponent loses 2 life.")); "When {this} enters the battlefield, if you control another colorless creature, each opponent loses 2 life."));
} }

View file

@ -28,7 +28,6 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* *
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
@ -61,7 +61,7 @@ public class DragonskullSummit extends CardImpl {
public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) { public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tapped unless you control a Swamp or a Mountain"; String abilityText = "tapped unless you control a Swamp or a Mountain";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -39,20 +38,20 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/ */
public class DrakeFamiliar extends CardImpl { public class DrakeFamiliar extends CardImpl {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
public DrakeFamiliar(UUID ownerId, CardSetInfo setInfo) { public DrakeFamiliar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
this.subtype.add("Drake"); this.subtype.add("Drake");
@ -78,7 +77,6 @@ public class DrakeFamiliar extends CardImpl {
class DrakeFamiliarEffect extends OneShotEffect { class DrakeFamiliarEffect extends OneShotEffect {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent();
private static final String effectText = "sacrifice it unless you return an enchantment to its owner's hand."; private static final String effectText = "sacrifice it unless you return an enchantment to its owner's hand.";
DrakeFamiliarEffect () { DrakeFamiliarEffect () {
@ -95,7 +93,7 @@ class DrakeFamiliarEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
boolean targetChosen = false; boolean targetChosen = false;
TargetPermanent target = new TargetPermanent(1, 1, filter, true); TargetPermanent target = new TargetPermanent(1, 1, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, true);
if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an enchantment to its owner's hand?", source, game)) { if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an enchantment to its owner's hand?", source, game)) {
controller.chooseTarget(Outcome.Sacrifice, target, source, game); controller.chooseTarget(Outcome.Sacrifice, target, source, game);
Permanent permanent = game.getPermanent(target.getFirstTarget()); Permanent permanent = game.getPermanent(target.getFirstTarget());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
@ -39,13 +38,14 @@ import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author wetterlicht * @author wetterlicht
@ -68,7 +68,7 @@ public class DrillSkimmer extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Drill-Skimmer has shroud as long as you control another artifact creature. // Drill-Skimmer has shroud as long as you control another artifact creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield), new ConditionalContinuousEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield),
condition, "{this} has shroud as long as you control another artifact creature."))); condition, "{this} has shroud as long as you control another artifact creature.")));

View file

@ -28,7 +28,6 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* *
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
@ -61,7 +61,7 @@ public class DrownedCatacomb extends CardImpl {
public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Island or a Swamp"; String abilityText = "tap it unless you control a Island or a Swamp";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -37,13 +36,14 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfToken;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -68,7 +68,7 @@ public class DwynensElite extends CardImpl {
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken())); TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken()));
this.addAbility(new ConditionalTriggeredAbility( this.addAbility(new ConditionalTriggeredAbility(
triggeredAbility, triggeredAbility,
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"When {this} enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token.")); "When {this} enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -38,6 +37,8 @@ import mage.constants.ComparisonType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate; import mage.filter.predicate.mageobject.ToughnessPredicate;
import java.util.UUID;
/** /**
* *
* @author emerald000 * @author emerald000
@ -58,7 +59,7 @@ public class EndangeredArmodon extends CardImpl {
// When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
filter, ComparisonType.MORE_THAN, 0, filter,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -47,7 +48,7 @@ public class FadeIntoAntiquity extends CardImpl {
// Exile target artifact or enchantment. // Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public FadeIntoAntiquity(final FadeIntoAntiquity card) { public FadeIntoAntiquity(final FadeIntoAntiquity card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -72,7 +72,7 @@ public class FaerieMiscreant extends CardImpl {
// When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card. // When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card.
Ability ability = new ConditionalTriggeredAbility( Ability ability = new ConditionalTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false), new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card"); "When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card");
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -46,7 +47,7 @@ public class FateForgotten extends CardImpl {
// Exile target artifact or enchantment. // Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public FateForgotten(final FateForgotten card) { public FateForgotten(final FateForgotten card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.ZoneChangeAllTriggeredAbility; import mage.abilities.common.ZoneChangeAllTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -35,7 +34,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
* *
@ -53,7 +54,7 @@ public class FemerefEnchantress extends CardImpl {
// Whenever an enchantment is put into a graveyard from the battlefield, draw a card. // Whenever an enchantment is put into a graveyard from the battlefield, draw a card.
this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD, this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
new DrawCardSourceControllerEffect(1), new FilterEnchantmentPermanent(), new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_ENCHANTMENT_PERMANENT,
"Whenever an enchantment is put into a graveyard from the battlefield, ", false)); "Whenever an enchantment is put into a graveyard from the battlefield, ", false));
} }

View file

@ -27,19 +27,20 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -50,7 +51,7 @@ public class FiligreeFracture extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Destroy target artifact or enchantment. If that permanent was blue or black, draw a card. // Destroy target artifact or enchantment. If that permanent was blue or black, draw a card.
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new FiligreeFractureEffect()); this.getSpellAbility().addEffect(new FiligreeFractureEffect());
} }

View file

@ -27,16 +27,17 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -48,7 +49,7 @@ public class ForsakeTheWorldly extends CardImpl {
// Exile target artifact or enchantment. // Exile target artifact or enchantment.
getSpellAbility().addEffect(new ExileTargetEffect()); getSpellAbility().addEffect(new ExileTargetEffect());
getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Cycling {2} // Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.CanBeYourCommanderAbility; import mage.abilities.common.CanBeYourCommanderAbility;
@ -39,12 +38,14 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.permanent.token.FreyaliseLlanowarsFuryToken; import mage.game.permanent.token.FreyaliseLlanowarsFuryToken;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -67,7 +68,7 @@ public class FreyaliseLlanowarsFury extends CardImpl {
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2)); this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2));
// -2: Destroy target artifact or enchantment. // -2: Destroy target artifact or enchantment.
LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DestroyTargetEffect(), -2); LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DestroyTargetEffect(), -2);
loyaltyAbility.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); loyaltyAbility.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(loyaltyAbility); this.addAbility(loyaltyAbility);
// -6: Draw a card for each green creature you control. // -6: Draw a card for each green creature you control.
this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6)); this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -38,11 +37,16 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.effects.common.DamageEverythingEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -67,7 +71,7 @@ public class GangrenousZombies extends CardImpl {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect(
new DamageEverythingEffect(2), new DamageEverythingEffect(2),
new DamageEverythingEffect(1), new DamageEverythingEffect(1),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"{this} deals 1 damage to each creature and each player. If you control a snow Swamp, {this} deals 2 damage to each creature and each player instead"), "{this} deals 1 damage to each creature and each player. If you control a snow Swamp, {this} deals 2 damage to each creature and each player instead"),
new TapSourceCost()); new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());

View file

@ -28,7 +28,6 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* *
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
@ -61,7 +61,7 @@ public class GlacialFortress extends CardImpl {
public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { public GlacialFortress(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Plains or an Island"; String abilityText = "tap it unless you control a Plains or an Island";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());

View file

@ -27,15 +27,16 @@
*/ */
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.ConspireAbility; import mage.abilities.keyword.ConspireAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
@ -47,7 +48,7 @@ public class GleefulSabotage extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Conspire // Conspire
this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE)); this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -35,11 +34,12 @@ import mage.abilities.keyword.MountainwalkAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* @author fireshoes * @author fireshoes
*/ */
@ -63,7 +63,7 @@ public class GoblinsOfTheFlarg extends CardImpl {
// When you control a Dwarf, sacrifice Goblins of the Flarg. // When you control a Dwarf, sacrifice Goblins of the Flarg.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility( this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
filter, ComparisonType.MORE_THAN, 0, filter,
new SacrificeSourceEffect())); new SacrificeSourceEffect()));
} }

View file

@ -27,10 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -40,12 +36,17 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetCard; import mage.target.TargetCard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -88,7 +89,7 @@ class HarmonicConvergenceEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
List<Permanent> enchantments = game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), List<Permanent> enchantments = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT,
source.getControllerId(), source.getControllerId(),
source.getSourceId(), source.getSourceId(),
game); game);

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -40,11 +39,13 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -65,7 +66,7 @@ public class HarmonicSliver extends CardImpl {
// All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment." // All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
TargetPermanent target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT);
ability.addTarget(target); ability.addTarget(target);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(
ability, Duration.WhileOnBattlefield, ability, Duration.WhileOnBattlefield,

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -39,10 +38,12 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -62,7 +63,7 @@ public class HiddenAncients extends CardImpl {
// When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature. // When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true, false),
filter, false); filter, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -39,10 +38,12 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -62,7 +63,7 @@ public class HiddenGibbons extends CardImpl {
// When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. // When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false),
filter, false); filter, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature.")); "When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -39,10 +38,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactSpell; import mage.filter.common.FilterArtifactSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -56,7 +57,7 @@ public class HiddenGuerrillas extends CardImpl {
// When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample. // When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false),
new FilterArtifactSpell(), false); new FilterArtifactSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample.")); "When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -40,11 +39,13 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -64,7 +65,7 @@ public class HiddenSpider extends CardImpl {
// When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach. // When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false); filter, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach.")); "When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.abilities.effects.common.PutOnLibraryTargetEffect;
@ -38,13 +37,15 @@ import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SpellAbilityType; import mage.constants.SpellAbilityType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -57,7 +58,7 @@ public class HideSeek extends SplitCard {
// Hide // Hide
// Put target artifact or enchantment on the bottom of its owner's library. // Put target artifact or enchantment on the bottom of its owner's library.
getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false)); getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false));
getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Seek // 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.. // 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..

View file

@ -28,7 +28,6 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
@ -60,7 +60,7 @@ public class HinterlandHarbor extends CardImpl {
public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tapped unless you control a Forest or an Island"; String abilityText = "tapped unless you control a Forest or an Island";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* @author Loki * @author Loki
*/ */
@ -50,7 +51,7 @@ public class IndrikStomphowler extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -46,7 +47,7 @@ public class IronwrightsCleansing extends CardImpl {
// Exile target artifact or enchantment. // Exile target artifact or enchantment.
this.getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }

View file

@ -28,7 +28,6 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition; import mage.abilities.condition.InvertCondition;
@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
@ -60,7 +60,7 @@ public class IsolatedChapel extends CardImpl {
public IsolatedChapel(UUID ownerId, CardSetInfo setInfo) { public IsolatedChapel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Plains or a Swamp"; String abilityText = "tap it unless you control a Plains or a Swamp";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -27,16 +27,17 @@
*/ */
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.abilities.abilityword.StriveAbility; import mage.abilities.abilityword.StriveAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -50,7 +51,7 @@ public class KiorasDismissal extends CardImpl {
// Strive - Kiora's Dismissal costs U more to cast for each target beyond the first. // Strive - Kiora's Dismissal costs U more to cast for each target beyond the first.
this.addAbility(new StriveAbility("{U}")); this.addAbility(new StriveAbility("{U}"));
// Return any number of target enchantments to their owners' hands. // Return any number of target enchantments to their owners' hands.
this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, new FilterEnchantmentPermanent(), false)); this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, false));
Effect effect = new ReturnToHandTargetEffect(); Effect effect = new ReturnToHandTargetEffect();
effect.setText("Return any number of target enchantments to their owners' hands"); effect.setText("Return any number of target enchantments to their owners' hands");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.KickedCondition; import mage.abilities.condition.common.KickedCondition;
@ -37,9 +36,11 @@ import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -59,7 +60,7 @@ public class KorSanctifiers extends CardImpl {
// When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment. // When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment.")); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment."));
} }

View file

@ -27,15 +27,16 @@
*/ */
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.SplitSecondAbility; import mage.abilities.keyword.SplitSecondAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author jonubuu * @author jonubuu
@ -48,7 +49,7 @@ public class KrosanGrip extends CardImpl {
// Split second // Split second
this.addAbility(new SplitSecondAbility()); this.addAbility(new SplitSecondAbility());
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -37,8 +36,9 @@ import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType; import mage.filter.StaticFilters;
import mage.filter.common.FilterEnchantmentPermanent;
import java.util.UUID;
/** /**
* @author LevelX2 * @author LevelX2
@ -56,7 +56,7 @@ public class LagonnaBandElder extends CardImpl {
// When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life. // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life.
Ability ability = new ConditionalTriggeredAbility( Ability ability = new ConditionalTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false), new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false),
new PermanentsOnTheBattlefieldCondition(new FilterEnchantmentPermanent(), ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life"); "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life");
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -37,12 +36,13 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -67,7 +67,7 @@ public class LamplighterOfSelhoff extends CardImpl {
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1,1,true)); TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1,1,true));
this.addAbility(new ConditionalTriggeredAbility( this.addAbility(new ConditionalTriggeredAbility(
triggeredAbility, triggeredAbility,
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"When {this} enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card.")); "When {this} enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card."));
} }

View file

@ -28,7 +28,6 @@
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -39,9 +38,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -57,7 +58,7 @@ public class LeoninRelicWarder extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false);

View file

@ -48,7 +48,7 @@ import mage.target.TargetPermanent;
public class MangaraOfCorondor extends CardImpl { public class MangaraOfCorondor extends CardImpl {
public MangaraOfCorondor(UUID ownerId, CardSetInfo setInfo) { public MangaraOfCorondor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human"); this.subtype.add("Human");
this.subtype.add("Wizard"); this.subtype.add("Wizard");
@ -56,7 +56,7 @@ public class MangaraOfCorondor extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {tap}: Exile Mangara of Corondor and target permanent. // {T}: Exile Mangara of Corondor and target permanent.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new TapSourceCost());
ability.addEffect(new ExileTargetEffect()); ability.addEffect(new ExileTargetEffect());
ability.addTarget(new TargetPermanent()); ability.addTarget(new TargetPermanent());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -40,12 +39,13 @@ import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -74,12 +74,12 @@ public class MinotaurTactician extends CardImpl {
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// Minotaur Tactician gets +1/+1 as long as you control a white creature. // Minotaur Tactician gets +1/+1 as long as you control a white creature.
Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite, ComparisonType.MORE_THAN, 0); Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite);
Effect effectWhite = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionWhite, ruleWhite); Effect effectWhite = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionWhite, ruleWhite);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite));
// Minotaur Tactician gets +1/+1 as long as you control a blue creature. // Minotaur Tactician gets +1/+1 as long as you control a blue creature.
Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue, ComparisonType.MORE_THAN, 0); Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue);
Effect effectBlue = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionBlue, ruleBlue); Effect effectBlue = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionBlue, ruleBlue);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlue)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlue));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -37,9 +36,11 @@ import mage.abilities.keyword.EmergeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
@ -58,7 +59,7 @@ public class MockeryOfNature extends CardImpl {
// When you cast Mockery of Nature, you may destroy target artifact or enchantment. // When you cast Mockery of Nature, you may destroy target artifact or enchantment.
Ability ability = new CastSourceTriggeredAbility(new DestroyTargetEffect(), true); Ability ability = new CastSourceTriggeredAbility(new DestroyTargetEffect(), true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -40,13 +39,14 @@ import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -74,7 +74,7 @@ public class MudbrawlerCohort extends CardImpl {
// Haste // Haste
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// Mudbrawler Cohort gets +1/+1 as long as you control another red creature. // Mudbrawler Cohort gets +1/+1 as long as you control another red creature.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule); Effect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }

View file

@ -27,18 +27,19 @@
*/ */
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
* *
* @author Backfir3 * @author Backfir3
@ -82,7 +83,7 @@ class MultanisDecreeDestroyEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
int enchantmentsDestoyed = 0; int enchantmentsDestoyed = 0;
for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent.destroy(source.getSourceId(), game, false)) { if (permanent.destroy(source.getSourceId(), game, false)) {
enchantmentsDestoyed++; enchantmentsDestoyed++;
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -35,9 +34,11 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -49,7 +50,7 @@ public class MysticMelting extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Draw a card at the beginning of the next turn's upkeep. // Draw a card at the beginning of the next turn's upkeep.
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
@ -37,9 +36,11 @@ import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -59,7 +60,7 @@ public class NantukoVigilante extends CardImpl {
this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}"))); this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}")));
// When Nantuko Vigilante is turned face up, destroy target artifact or enchantment. // When Nantuko Vigilante is turned face up, destroy target artifact or enchantment.
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect()); Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect());
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,15 +27,16 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -48,7 +49,7 @@ public class NaturalEnd extends CardImpl {
// Destroy target artifact or enchantment. You gain 3 life. // Destroy target artifact or enchantment. You gain 3 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new GainLifeEffect(3)); this.getSpellAbility().addEffect(new GainLifeEffect(3));
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public NaturalEnd(final NaturalEnd card) { public NaturalEnd(final NaturalEnd card) {

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LokiX * @author LokiX
@ -45,7 +46,7 @@ public class Naturalize extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}");
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
@ -35,12 +34,14 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -53,7 +54,7 @@ public class NaturesClaim extends CardImpl {
// Destroy target artifact or enchantment. Its controller gains 4 life. // Destroy target artifact or enchantment. Its controller gains 4 life.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new NaturesClaimEffect()); this.getSpellAbility().addEffect(new NaturesClaimEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public NaturesClaim(final NaturesClaim card) { public NaturesClaim(final NaturesClaim card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -40,11 +39,13 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCardInOpponentsGraveyard; import mage.target.common.TargetCardInOpponentsGraveyard;
import mage.target.targetpointer.SecondTargetPointer; import mage.target.targetpointer.SecondTargetPointer;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -67,7 +68,7 @@ public class NullmageAdvocate extends CardImpl {
effect.setTargetPointer(new SecondTargetPointer()); effect.setTargetPointer(new SecondTargetPointer());
ability.addEffect(effect); ability.addEffect(effect);
ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true)); ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true));
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -37,13 +36,15 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.TappedPredicate; import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
* *
* @author Loki * @author Loki
@ -65,7 +66,7 @@ public class NullmageShepherd extends CardImpl {
// Tap four untapped creatures you control: Destroy target artifact or enchantment. // Tap four untapped creatures you control: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true))); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true)));
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -40,10 +39,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -57,7 +58,7 @@ public class OpalArchangel extends CardImpl {
// When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance. // When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -38,10 +37,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -55,7 +56,7 @@ public class OpalCaryatid extends CardImpl {
// When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature. // When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -39,10 +38,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -56,7 +57,7 @@ public class OpalChampion extends CardImpl {
// When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike. // When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
@ -39,10 +38,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -56,7 +57,7 @@ public class OpalGargoyle extends CardImpl {
// When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying. // When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbility;
@ -41,10 +40,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -58,7 +59,7 @@ public class OpalGuardian extends CardImpl {
// When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red. // When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false), TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false); new FilterCreatureSpell(), false);
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(new FilterEnchantmentPermanent()), this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red.")); "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red."));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
@ -40,12 +39,14 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
@ -60,7 +61,7 @@ public class OrimsThunder extends CardImpl {
// Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature. // Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature.
this.getSpellAbility().addEffect(new OrimsThunderEffect()); this.getSpellAbility().addEffect(new OrimsThunderEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new OrimsThunderEffect2(), new OrimsThunderEffect2(),
KickedCondition.instance, KickedCondition.instance,

View file

@ -27,18 +27,19 @@
*/ */
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
@ -76,7 +77,7 @@ class ParaseleneEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
int count = 0; int count = 0;
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), source.getControllerId(), source.getSourceId(), game)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent.destroy(source.getSourceId(), game, false)) { if (permanent.destroy(source.getSourceId(), game, false)) {
count++; count++;
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
@ -38,7 +37,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.WatcherScope; import mage.constants.WatcherScope;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -46,6 +45,8 @@ import mage.game.events.GameEvent.EventType;
import mage.game.stack.Spell; import mage.game.stack.Spell;
import mage.watchers.Watcher; import mage.watchers.Watcher;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -59,7 +60,7 @@ public class PatriciansScorn extends CardImpl {
// If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost. // If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher()); this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher());
// Destroy all enchantments. // Destroy all enchantments.
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent())); this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
} }
public PatriciansScorn(final PatriciansScorn card) { public PatriciansScorn(final PatriciansScorn card) {

View file

@ -27,14 +27,15 @@
*/ */
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author Plopman * @author Plopman
@ -47,7 +48,7 @@ public class PeaceAndQuiet extends CardImpl {
// Destroy two target enchantments. // Destroy two target enchantments.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(2, new FilterEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
} }
public PeaceAndQuiet(final PeaceAndQuiet card) { public PeaceAndQuiet(final PeaceAndQuiet card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -35,13 +34,14 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -62,7 +62,7 @@ public class Peppersmoke extends CardImpl {
this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), new PermanentsOnTheBattlefieldCondition(filter),
"If you control a Faerie, draw a card")); "If you control a Faerie, draw a card"));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.q; package mage.cards.q;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -39,10 +38,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.Target; import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author North * @author North
@ -62,7 +63,7 @@ public class QasaliPridemage extends CardImpl {
// {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment. // {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT);
ability.addTarget(target); ability.addTarget(target);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.q; package mage.cards.q;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -40,9 +39,11 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -55,7 +56,7 @@ public class QuietDisrepair extends CardImpl {
// Enchant artifact or enchantment // Enchant artifact or enchantment
TargetPermanent auraTarget = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); TargetPermanent auraTarget = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT);
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
Ability ability = new EnchantAbility(auraTarget.getTargetName()); Ability ability = new EnchantAbility(auraTarget.getTargetName());

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.AttacksEachTurnStaticAbility; import mage.abilities.common.AttacksEachTurnStaticAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -38,12 +37,13 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
* @author LoneFox * @author LoneFox
*/ */
@ -64,7 +64,7 @@ public class Ramroller extends CardImpl {
// Ramroller attacks each turn if able. // Ramroller attacks each turn if able.
this.addAbility(new AttacksEachTurnStaticAbility()); this.addAbility(new AttacksEachTurnStaticAbility());
// Ramroller gets +2/+0 as long as you control another artifact. // Ramroller gets +2/+0 as long as you control another artifact.
Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0); Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(2, 0, ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(2, 0,
Duration.WhileOnBattlefield), condition, "{this} gets +2/+0 as long as you control another artifact."); Duration.WhileOnBattlefield), condition, "{this} gets +2/+0 as long as you control another artifact.");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.FlashbackAbility; import mage.abilities.keyword.FlashbackAbility;
@ -35,9 +34,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author cbt33 * @author cbt33
@ -49,7 +50,7 @@ public class RayOfDistortion extends CardImpl {
// Destroy target artifact or enchantment. // Destroy target artifact or enchantment.
this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
// Flashback {4}{W}{W} // Flashback {4}{W}{W}
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT)); this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT));
} }

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LevelX2 * @author LevelX2
@ -54,7 +55,7 @@ public class ReclamationSage extends CardImpl {
// When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment. // When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -27,12 +27,13 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
* *
@ -44,7 +45,7 @@ public class ReduceToDreams extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}"); super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}");
// Return all artifacts and enchantments to their owners' hands. // Return all artifacts and enchantments to their owners' hands.
this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(new FilterArtifactOrEnchantmentPermanent())); this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
} }
public ReduceToDreams(final ReduceToDreams card) { public ReduceToDreams(final ReduceToDreams card) {

View file

@ -27,16 +27,16 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.FilterPermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author jeffwadsworth * @author jeffwadsworth
@ -47,12 +47,11 @@ public class RelicCrush extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}");
// Destroy target artifact or enchantment and up to one other target artifact or enchantment. // Destroy target artifact or enchantment and up to one other target artifact or enchantment.
FilterPermanent filter = new FilterArtifactOrEnchantmentPermanent();
Effect effect = new DestroyTargetEffect(false, true); Effect effect = new DestroyTargetEffect(false, true);
effect.setText("Destroy target artifact or enchantment and up to one other target artifact or enchantment"); effect.setText("Destroy target artifact or enchantment and up to one other target artifact or enchantment");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addTarget(new TargetPermanent(0, 1, filter, false)); this.getSpellAbility().addTarget(new TargetPermanent(0, 1, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false));
} }
public RelicCrush(final RelicCrush card) { public RelicCrush(final RelicCrush card) {

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author LoneFox * @author LoneFox
@ -54,7 +55,7 @@ public class ReliquaryMonk extends CardImpl {
// When Reliquary Monk dies, destroy target artifact or enchantment. // When Reliquary Monk dies, destroy target artifact or enchantment.
Ability ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false); Ability ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false);
ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT));
this.addAbility(ability); this.addAbility(ability);
} }

Some files were not shown because too many files have changed in this diff Show more