diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index d8b64f43a2..0f032461e1 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -352,7 +352,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { return target.isChosen(); } - if (target.getOriginalTarget() instanceof TargetCardInYourGraveyard) { + if (target.getOriginalTarget() instanceof TargetCardInYourGraveyard + || target.getOriginalTarget() instanceof TargetCardInASingleGraveyard) { List alreadyTargetted = target.getTargets(); List cards = new ArrayList<>(game.getPlayer(abilityControllerId).getGraveyard().getCards(game)); while (!cards.isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/a/Abolish.java b/Mage.Sets/src/mage/cards/a/Abolish.java index bbba820f90..90a814ecab 100644 --- a/Mage.Sets/src/mage/cards/a/Abolish.java +++ b/Mage.Sets/src/mage/cards/a/Abolish.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,11 +35,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterCard; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCardInHand; +import java.util.UUID; + /** * * @author Backfir3 @@ -62,7 +63,7 @@ public class Abolish extends CardImpl { // Destroy target artifact or enchantment. 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) { diff --git a/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java b/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java index 0428d851d3..e9afd1b79c 100644 --- a/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java +++ b/Mage.Sets/src/mage/cards/a/AbzanAdvantage.java @@ -27,15 +27,16 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author emerald000 @@ -46,7 +47,7 @@ public class AbzanAdvantage extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // 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().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java index c423e5c069..b950c130f7 100644 --- a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java +++ b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -39,12 +38,14 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @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. 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); // At the beginning of your upkeep, you may exile target artifact or enchantment. If you do, its controller gains control of Act of Authority. ability = new BeginningOfUpkeepTriggeredAbility(new ActOfAuthorityEffect(), TargetController.YOU, true); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AdornedPouncer.java b/Mage.Sets/src/mage/cards/a/AdornedPouncer.java index b0f970b281..b0de71f33e 100644 --- a/Mage.Sets/src/mage/cards/a/AdornedPouncer.java +++ b/Mage.Sets/src/mage/cards/a/AdornedPouncer.java @@ -47,17 +47,18 @@ public class AdornedPouncer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - //double strike + // Double strike addAbility(DoubleStrikeAbility.getInstance()); - //eternalize 3WW + // Eternalize 3WW addAbility(new EternalizeAbility(new ManaCostsImpl("{3}{W}{W}"), this)); } - public AdornedPouncer(AdornedPouncer adornedPouncer) { - super(adornedPouncer); + public AdornedPouncer(final AdornedPouncer card) { + super(card); } + @Override public AdornedPouncer copy() { return new AdornedPouncer(this); } diff --git a/Mage.Sets/src/mage/cards/a/AinokGuide.java b/Mage.Sets/src/mage/cards/a/AinokGuide.java index 0520f08d91..c10ee0eb52 100644 --- a/Mage.Sets/src/mage/cards/a/AinokGuide.java +++ b/Mage.Sets/src/mage/cards/a/AinokGuide.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.Mode; @@ -39,9 +38,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -61,7 +62,7 @@ public class AinokGuide extends CardImpl { // * Search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. Mode mode = new Mode(); - mode.getEffects().add(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true)); + mode.getEffects().add(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AltarsLight.java b/Mage.Sets/src/mage/cards/a/AltarsLight.java index fa57addaf6..1720890bfa 100644 --- a/Mage.Sets/src/mage/cards/a/AltarsLight.java +++ b/Mage.Sets/src/mage/cards/a/AltarsLight.java @@ -27,14 +27,15 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class AltarsLight extends CardImpl { // Exile target artifact or enchantment. 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) { diff --git a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java index e62862115a..9ae9220b36 100644 --- a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java +++ b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,12 +37,13 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @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)); this.addAbility(new ConditionalTriggeredAbility( 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.")); } diff --git a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java index a4ae37c7b1..6f723aa96c 100644 --- a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java +++ b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java @@ -27,28 +27,28 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** - * * @author spjspj */ public class AppetiteForTheUnnatural extends CardImpl { 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. this.getSpellAbility().addEffect(new DestroyTargetEffect()); 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) { diff --git a/Mage.Sets/src/mage/cards/a/ArmillarySphere.java b/Mage.Sets/src/mage/cards/a/ArmillarySphere.java index fd25264d25..eae283df7f 100644 --- a/Mage.Sets/src/mage/cards/a/ArmillarySphere.java +++ b/Mage.Sets/src/mage/cards/a/ArmillarySphere.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -52,7 +53,7 @@ public class ArmillarySphere extends CardImpl { // {2}, {tap}, Sacrifice Armillary Sphere: Search your library for up to two basic land cards, reveal them, and put them into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java index c531f3b2de..8e5a778172 100644 --- a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java +++ b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java @@ -27,15 +27,16 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class ArtisansSorrow extends CardImpl { // Destroy target artifact or enchantment. Scry 2. 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)); } diff --git a/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java b/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java index 70eb1e8786..f6cdce1207 100644 --- a/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java +++ b/Mage.Sets/src/mage/cards/a/AshenmoorCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -37,11 +36,16 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; 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.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -65,7 +69,7 @@ public class AshenmoorCohort extends CardImpl { this.toughness = new MageInt(3); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/a/AttuneWithAether.java b/Mage.Sets/src/mage/cards/a/AttuneWithAether.java index be4e985fc6..a3f254b1d2 100644 --- a/Mage.Sets/src/mage/cards/a/AttuneWithAether.java +++ b/Mage.Sets/src/mage/cards/a/AttuneWithAether.java @@ -27,16 +27,17 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -47,7 +48,7 @@ public class AttuneWithAether extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}"); // Search you library for a basic land card, reveal it, put it into your hand, then shuffle your library. You get {E}{E}. - Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, new FilterBasicLandCard()), true); + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true); effect.setText("Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new GetEnergyCountersControllerEffect(2)); diff --git a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java index 16614a595f..4fe523c1e2 100644 --- a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java +++ b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -39,11 +38,13 @@ import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.target.TargetPermanent; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author emerald000 @@ -57,7 +58,7 @@ public class AuraOfSilence extends CardImpl { // Sacrifice Aura of Silence: Destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/a/AuraShards.java b/Mage.Sets/src/mage/cards/a/AuraShards.java index dfa4b71325..ab6f562f02 100644 --- a/Mage.Sets/src/mage/cards/a/AuraShards.java +++ b/Mage.Sets/src/mage/cards/a/AuraShards.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,9 +35,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. 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); } diff --git a/Mage.Sets/src/mage/cards/a/AuraThief.java b/Mage.Sets/src/mage/cards/a/AuraThief.java index 67f91ef523..9e5bff2c14 100644 --- a/Mage.Sets/src/mage/cards/a/AuraThief.java +++ b/Mage.Sets/src/mage/cards/a/AuraThief.java @@ -5,7 +5,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -19,11 +18,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author nick.myers @@ -75,7 +76,7 @@ class AuraThiefDiesTriggeredEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { 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); gainControl.setTargetPointer(new FixedTarget(enchantment.getId())); game.addEffect(gainControl, source); diff --git a/Mage.Sets/src/mage/cards/b/BallynockCohort.java b/Mage.Sets/src/mage/cards/b/BallynockCohort.java index 30fd5d75b5..f8472cd363 100644 --- a/Mage.Sets/src/mage/cards/b/BallynockCohort.java +++ b/Mage.Sets/src/mage/cards/b/BallynockCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; 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.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -71,7 +75,7 @@ public class BallynockCohort extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/b/BalothCageTrap.java b/Mage.Sets/src/mage/cards/b/BalothCageTrap.java index a20d4350f1..e33adb64fc 100644 --- a/Mage.Sets/src/mage/cards/b/BalothCageTrap.java +++ b/Mage.Sets/src/mage/cards/b/BalothCageTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.b; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,11 +35,15 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.BeastToken2; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; +import java.util.List; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -49,7 +51,7 @@ public class BalothCageTrap extends CardImpl { public BalothCageTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{G}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent had an artifact enter the battlefield under his or her control this turn, you may pay {1}{G} rather than pay Baloth Cage Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{1}{G}"), BalothCageTrapCondition.instance), new PermanentsEnteredBattlefieldWatcher()); diff --git a/Mage.Sets/src/mage/cards/b/BeneathTheSands.java b/Mage.Sets/src/mage/cards/b/BeneathTheSands.java index f1f8bfa710..22a6c604ee 100644 --- a/Mage.Sets/src/mage/cards/b/BeneathTheSands.java +++ b/Mage.Sets/src/mage/cards/b/BeneathTheSands.java @@ -27,16 +27,17 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Archer262 @@ -47,7 +48,7 @@ public class BeneathTheSands extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/b/Bifurcate.java b/Mage.Sets/src/mage/cards/b/Bifurcate.java new file mode 100644 index 0000000000..2671043634 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Bifurcate.java @@ -0,0 +1,102 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public class Bifurcate extends CardImpl { + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creatures"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + + public Bifurcate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); + + // Search your library for a permanent card with the same name as target nontoken creature and put that card onto the battlefield. Then shuffle your library. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new BifurcateEffect()); + } + + public Bifurcate(final Bifurcate card) { + super(card); + } + + @Override + public Bifurcate copy() { + return new Bifurcate(this); + } +} + +class BifurcateEffect extends OneShotEffect { + + public BifurcateEffect() { + super(Outcome.Benefit); + this.staticText = "Search your library for a permanent card with the same name as target nontoken creature and put that card onto the battlefield. Then shuffle your library"; + } + + public BifurcateEffect(final BifurcateEffect effect) { + super(effect); + } + + @Override + public BifurcateEffect copy() { + return new BifurcateEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + FilterCard filter = new FilterPermanentCard(); + filter.add(new NamePredicate(permanent.getName())); + return new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BlightedWoodland.java b/Mage.Sets/src/mage/cards/b/BlightedWoodland.java index 3579049c40..6d9a0a3bcd 100644 --- a/Mage.Sets/src/mage/cards/b/BlightedWoodland.java +++ b/Mage.Sets/src/mage/cards/b/BlightedWoodland.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class BlightedWoodland extends CardImpl { // {3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl<>("{3}{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/b/BomatCourier.java b/Mage.Sets/src/mage/cards/b/BomatCourier.java index 4c122daabb..08219caa68 100644 --- a/Mage.Sets/src/mage/cards/b/BomatCourier.java +++ b/Mage.Sets/src/mage/cards/b/BomatCourier.java @@ -105,7 +105,7 @@ class BomatCourierExileEffect extends OneShotEffect { if (controller != null && sourceObject != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { - UUID exileZoneId = CardUtil.getCardExileZoneId(game, source); + UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), 0); card.setFaceDown(true, game); controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); card.setFaceDown(true, game); @@ -136,7 +136,7 @@ class BomatCourierReturnEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source.getSourceId(), true)); + ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), 0)); if (exileZone != null) { controller.moveCards(exileZone, Zone.HAND, source, game); } diff --git a/Mage.Sets/src/mage/cards/b/BorderlandExplorer.java b/Mage.Sets/src/mage/cards/b/BorderlandExplorer.java index 3d86897aad..c45fe1d49a 100644 --- a/Mage.Sets/src/mage/cards/b/BorderlandExplorer.java +++ b/Mage.Sets/src/mage/cards/b/BorderlandExplorer.java @@ -27,8 +27,6 @@ */ package mage.cards.b; -import java.util.HashMap; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,13 +36,16 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetDiscard; +import java.util.HashMap; +import java.util.UUID; + /** * * @author fireshoes @@ -130,7 +131,7 @@ class BorderlandExplorerEffect extends OneShotEffect { if (player != null) { Cards cardsPlayer = cardsToDiscard.get(playerId); if (cardsPlayer != null) { - TargetCardInLibrary target = new TargetCardInLibrary(0, 1, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { Cards cards = new CardsImpl(target.getTargets()); diff --git a/Mage.Sets/src/mage/cards/b/BorderlandRanger.java b/Mage.Sets/src/mage/cards/b/BorderlandRanger.java index 6554b81f98..acb1503878 100644 --- a/Mage.Sets/src/mage/cards/b/BorderlandRanger.java +++ b/Mage.Sets/src/mage/cards/b/BorderlandRanger.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -35,17 +34,17 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki */ public class BorderlandRanger extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public BorderlandRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.HUMAN, SubType.SCOUT); @@ -54,7 +53,7 @@ public class BorderlandRanger extends CardImpl { this.toughness = new MageInt(2); // When Borderland Ranger enters the battlefield, you may search your library for a basic land card, reveal it, and put it into your hand. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public BorderlandRanger(final BorderlandRanger card) { diff --git a/Mage.Sets/src/mage/cards/b/Bossk.java b/Mage.Sets/src/mage/cards/b/Bossk.java index 65b3b9a2b4..8874578dab 100644 --- a/Mage.Sets/src/mage/cards/b/Bossk.java +++ b/Mage.Sets/src/mage/cards/b/Bossk.java @@ -40,6 +40,7 @@ import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; @@ -69,7 +70,7 @@ public class Bossk extends CardImpl { this.addAbility(new BosskTriggeredAbility()); // Bounty — Whenever a creature an opponent controls with a bounty counter on it dies, you may search your library for a basic land card, reveal it, and put it in to your hand. If you do, shuffle your library. - this.addAbility(new BountyAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), true)); + this.addAbility(new BountyAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public Bossk(final Bossk card) { diff --git a/Mage.Sets/src/mage/cards/b/BoundDetermined.java b/Mage.Sets/src/mage/cards/b/BoundDetermined.java index f70f4127ac..2889105d90 100644 --- a/Mage.Sets/src/mage/cards/b/BoundDetermined.java +++ b/Mage.Sets/src/mage/cards/b/BoundDetermined.java @@ -120,6 +120,7 @@ class BoundEffect extends OneShotEffect { Permanent toSacrifice = game.getPermanent(target.getFirstTarget()); if (toSacrifice != null) { toSacrifice.sacrifice(source.getSourceId(), game); + game.applyEffects(); int colors = toSacrifice.getColor(game).getColorCount(); if (colors > 0) { TargetCardInYourGraveyard targetCard = new TargetCardInYourGraveyard(0, colors, diff --git a/Mage.Sets/src/mage/cards/b/BoundlessRealms.java b/Mage.Sets/src/mage/cards/b/BoundlessRealms.java index 8edb2bfa55..03f8188e68 100644 --- a/Mage.Sets/src/mage/cards/b/BoundlessRealms.java +++ b/Mage.Sets/src/mage/cards/b/BoundlessRealms.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.OneShotEffect; @@ -38,13 +37,15 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North @@ -94,7 +95,7 @@ class BoundlessRealmsEffect extends OneShotEffect { filter.add(new ControllerPredicate(TargetController.YOU)); int amount = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); - TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, amount, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null); } diff --git a/Mage.Sets/src/mage/cards/b/BraidwoodSextant.java b/Mage.Sets/src/mage/cards/b/BraidwoodSextant.java index dccfb31038..11ceac2232 100644 --- a/Mage.Sets/src/mage/cards/b/BraidwoodSextant.java +++ b/Mage.Sets/src/mage/cards/b/BraidwoodSextant.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -52,7 +53,7 @@ public class BraidwoodSextant extends CardImpl { // {2}, {tap}, Sacrifice Braidwood Sextant: Search your library for a basic land card, reveal that card, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl("{2}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/b/BreakAsunder.java b/Mage.Sets/src/mage/cards/b/BreakAsunder.java index 043e87d09b..08be9b9290 100644 --- a/Mage.Sets/src/mage/cards/b/BreakAsunder.java +++ b/Mage.Sets/src/mage/cards/b/BreakAsunder.java @@ -27,16 +27,17 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Jgod @@ -48,7 +49,7 @@ public class BreakAsunder extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/b/BreathOfFury.java b/Mage.Sets/src/mage/cards/b/BreathOfFury.java index 74c8da96e2..fe4e83d15f 100644 --- a/Mage.Sets/src/mage/cards/b/BreathOfFury.java +++ b/Mage.Sets/src/mage/cards/b/BreathOfFury.java @@ -52,12 +52,14 @@ import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; + /** * @author duncant */ public class BreathOfFury extends CardImpl { + public BreathOfFury(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); this.subtype.add("Aura"); // Enchant creature you control @@ -103,11 +105,11 @@ class BreathOfFuryAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event; Permanent enchantment = game.getPermanent(getSourceId()); - if (damageEvent.isCombatDamage() && - enchantment != null && - enchantment.getAttachedTo().equals(event.getSourceId())) { + if (damageEvent.isCombatDamage() + && enchantment != null + && enchantment.getAttachedTo().equals(event.getSourceId())) { Permanent creature = game.getPermanent(enchantment.getAttachedTo()); if (creature != null) { for (Effect effect : getEffects()) { @@ -129,7 +131,7 @@ class BreathOfFuryEffect extends OneShotEffect { public BreathOfFuryEffect() { super(Outcome.Benefit); - staticText = "sacrifice enchanted creature and attach {this} to a creature you control. If you do, untap all creatures you control and after this phase, there is an additional combat phase."; + staticText = "sacrifice enchanted creature and attach {this} to a creature you control. If you do, untap all creatures you control and after this phase, there is an additional combat phase"; } public BreathOfFuryEffect(final BreathOfFuryEffect effect) { @@ -142,7 +144,7 @@ class BreathOfFuryEffect extends OneShotEffect { } @Override - public boolean apply(Game game, Ability source){ + public boolean apply(Game game, Ability source) { Permanent enchantment = game.getPermanent(source.getSourceId()); if (enchantment == null) { return false; @@ -156,8 +158,8 @@ class BreathOfFuryEffect extends OneShotEffect { // It's important to check that the creature was successfully sacrificed here. Effects that prevent sacrifice will also prevent Breath of Fury's effect from working. // Commanders going to the command zone and Rest in Peace style replacement effects don't make Permanent.sacrifice return false. if (enchantedCreature != null && controller != null - && enchantedCreature.sacrifice(source.getSourceId(), game) - && target.canChoose(source.getSourceId(), controller.getId(), game)) { + && enchantedCreature.sacrifice(source.getSourceId(), game) + && target.canChoose(source.getSourceId(), controller.getId(), game)) { controller.choose(outcome, target, source.getSourceId(), game); Permanent newCreature = game.getPermanent(target.getFirstTarget()); boolean success = false; @@ -168,7 +170,7 @@ class BreathOfFuryEffect extends OneShotEffect { success = true; } else { if (oldCreature.removeAttachment(enchantment.getId(), game) - && newCreature.addAttachment(enchantment.getId(), game)) { + && newCreature.addAttachment(enchantment.getId(), game)) { game.informPlayers(enchantment.getLogName() + " was unattached from " + oldCreature.getLogName() + " and attached to " + newCreature.getLogName()); success = true; } diff --git a/Mage.Sets/src/mage/cards/b/BriarberryCohort.java b/Mage.Sets/src/mage/cards/b/BriarberryCohort.java index ee39f2e28a..f487fc4dff 100644 --- a/Mage.Sets/src/mage/cards/b/BriarberryCohort.java +++ b/Mage.Sets/src/mage/cards/b/BriarberryCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,11 +38,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; 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.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -71,7 +75,7 @@ public class BriarberryCohort extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/b/BronzeBombshell.java b/Mage.Sets/src/mage/cards/b/BronzeBombshell.java index 04fe4e1508..5bdd5d42ee 100644 --- a/Mage.Sets/src/mage/cards/b/BronzeBombshell.java +++ b/Mage.Sets/src/mage/cards/b/BronzeBombshell.java @@ -89,7 +89,8 @@ class LoseControlTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - return (event.getType() == GameEvent.EventType.LOST_CONTROL); + return event.getType() == GameEvent.EventType.LOST_CONTROL + || event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD; } @Override diff --git a/Mage.Sets/src/mage/cards/b/BubblingBeebles.java b/Mage.Sets/src/mage/cards/b/BubblingBeebles.java index 3c46ee6bec..cd0c641e7b 100644 --- a/Mage.Sets/src/mage/cards/b/BubblingBeebles.java +++ b/Mage.Sets/src/mage/cards/b/BubblingBeebles.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.DefendingPlayerControlsCondition; @@ -39,7 +38,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; 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. Effect effect = new ConditionalRestrictionEffect( 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"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/b/BurnishedHart.java b/Mage.Sets/src/mage/cards/b/BurnishedHart.java index e28fe537df..2b4bbe8910 100644 --- a/Mage.Sets/src/mage/cards/b/BurnishedHart.java +++ b/Mage.Sets/src/mage/cards/b/BurnishedHart.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class BurnishedHart extends CardImpl { // {3}, Sacrifice Burnished Hart: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2,new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new GenericManaCost(3)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/c/CallToTheGrave.java b/Mage.Sets/src/mage/cards/c/CallToTheGrave.java index 7a5f56eaf5..dec95a73ed 100644 --- a/Mage.Sets/src/mage/cards/c/CallToTheGrave.java +++ b/Mage.Sets/src/mage/cards/c/CallToTheGrave.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -46,6 +45,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.events.GameEvent; +import java.util.UUID; + /** * * @author nantuko diff --git a/Mage.Sets/src/mage/cards/c/CandlesGlow.java b/Mage.Sets/src/mage/cards/c/CandlesGlow.java index 108da9be7d..2142d20282 100644 --- a/Mage.Sets/src/mage/cards/c/CandlesGlow.java +++ b/Mage.Sets/src/mage/cards/c/CandlesGlow.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.PreventionEffectImpl; import mage.abilities.keyword.SpliceOntoArcaneAbility; @@ -35,11 +34,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +50,7 @@ public class CandlesGlow extends CardImpl { public CandlesGlow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Prevent the next 3 damage that would be dealt to target creature or player this turn. You gain life equal to the damage prevented this way. diff --git a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java index e5a479197a..7af92028e8 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author anonymous @@ -58,7 +59,7 @@ public class CapashenUnicorn extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CaravanVigil.java b/Mage.Sets/src/mage/cards/c/CaravanVigil.java index ffb4e0a55e..019d270320 100644 --- a/Mage.Sets/src/mage/cards/c/CaravanVigil.java +++ b/Mage.Sets/src/mage/cards/c/CaravanVigil.java @@ -36,6 +36,7 @@ import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.game.Game; import mage.players.Player; @@ -87,7 +88,7 @@ class CaravanVigilEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (sourceObject != null && controller != null) { - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/c/CartoucheOfAmbition.java b/Mage.Sets/src/mage/cards/c/CartoucheOfAmbition.java index 57cd01dfb9..459bf7a478 100644 --- a/Mage.Sets/src/mage/cards/c/CartoucheOfAmbition.java +++ b/Mage.Sets/src/mage/cards/c/CartoucheOfAmbition.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -40,16 +39,14 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.CounterType; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -59,8 +56,7 @@ public class CartoucheOfAmbition extends CardImpl { public CartoucheOfAmbition(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Cartouche"); + this.subtype.add(SubType.AURA, SubType.CARTOUCHE); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CartoucheOfKnowledge.java b/Mage.Sets/src/mage/cards/c/CartoucheOfKnowledge.java index c4b1fa9018..cf0373d6ca 100644 --- a/Mage.Sets/src/mage/cards/c/CartoucheOfKnowledge.java +++ b/Mage.Sets/src/mage/cards/c/CartoucheOfKnowledge.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -40,14 +39,12 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -57,8 +54,7 @@ public class CartoucheOfKnowledge extends CardImpl { public CartoucheOfKnowledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.subtype.add("Aura"); - this.subtype.add("Cartouche"); + this.subtype.add(SubType.AURA, SubType.CARTOUCHE); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CartoucheOfSolidarity.java b/Mage.Sets/src/mage/cards/c/CartoucheOfSolidarity.java index 93af370d16..2b1d1e3911 100644 --- a/Mage.Sets/src/mage/cards/c/CartoucheOfSolidarity.java +++ b/Mage.Sets/src/mage/cards/c/CartoucheOfSolidarity.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -40,15 +39,13 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.permanent.token.WarriorVigilantToken; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -58,8 +55,7 @@ public class CartoucheOfSolidarity extends CardImpl { public CartoucheOfSolidarity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); - this.subtype.add("Cartouche"); + this.subtype.add(SubType.AURA, SubType.CARTOUCHE); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CartoucheOfStrength.java b/Mage.Sets/src/mage/cards/c/CartoucheOfStrength.java index 9a263ff7d0..661797a871 100644 --- a/Mage.Sets/src/mage/cards/c/CartoucheOfStrength.java +++ b/Mage.Sets/src/mage/cards/c/CartoucheOfStrength.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -48,6 +47,8 @@ import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetOpponentsCreaturePermanent; +import java.util.UUID; + /** * * @author stravant @@ -57,8 +58,7 @@ public class CartoucheOfStrength extends CardImpl { public CartoucheOfStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); - this.subtype.add("Aura"); - this.subtype.add("Cartouche"); + this.subtype.add(SubType.AURA, SubType.CARTOUCHE); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CartoucheOfZeal.java b/Mage.Sets/src/mage/cards/c/CartoucheOfZeal.java index 086915d55b..79bdbbc4d0 100644 --- a/Mage.Sets/src/mage/cards/c/CartoucheOfZeal.java +++ b/Mage.Sets/src/mage/cards/c/CartoucheOfZeal.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -40,15 +39,13 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -58,8 +55,7 @@ public class CartoucheOfZeal extends CardImpl { public CartoucheOfZeal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); - this.subtype.add("Aura"); - this.subtype.add("Cartouche"); + this.subtype.add(SubType.AURA, SubType.CARTOUCHE); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java index d0658e0da4..e9a15e7099 100644 --- a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java +++ b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class CausticCaterpillar extends CardImpl { // {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java b/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java index 8f0bf87cd8..144a853e4a 100644 --- a/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java +++ b/Mage.Sets/src/mage/cards/c/CentaurRootcaster.java @@ -27,16 +27,17 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -52,7 +53,7 @@ public class CentaurRootcaster extends CardImpl { // Whenever Centaur Rootcaster deals combat damage to a player, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } diff --git a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java index 92cffdbd09..96461cb0fb 100644 --- a/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java +++ b/Mage.Sets/src/mage/cards/c/ChroniclerOfHeroes.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -36,7 +35,6 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.counters.CounterType; @@ -46,6 +44,8 @@ import mage.filter.predicate.permanent.CounterPredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -100,7 +100,7 @@ class ChroniclerOfHeroesEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); 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); } return true; diff --git a/Mage.Sets/src/mage/cards/c/CivicWayfinder.java b/Mage.Sets/src/mage/cards/c/CivicWayfinder.java index f11472832c..04ac60e0fd 100644 --- a/Mage.Sets/src/mage/cards/c/CivicWayfinder.java +++ b/Mage.Sets/src/mage/cards/c/CivicWayfinder.java @@ -27,16 +27,17 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -53,7 +54,7 @@ public class CivicWayfinder extends CardImpl { this.toughness = new MageInt(2); // When Civic Wayfinder enters the battlefield, you may search your library for a basic land card, reveal it, and put it into your hand. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public CivicWayfinder(final CivicWayfinder card) { diff --git a/Mage.Sets/src/mage/cards/c/CleansingMeditation.java b/Mage.Sets/src/mage/cards/c/CleansingMeditation.java index caa725cdbb..8efd70c13d 100644 --- a/Mage.Sets/src/mage/cards/c/CleansingMeditation.java +++ b/Mage.Sets/src/mage/cards/c/CleansingMeditation.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; @@ -39,11 +38,13 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author spjspj @@ -97,7 +98,7 @@ class CleansingMeditationEffect extends OneShotEffect { 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 (threshold && controller != null && permanent.getOwnerId().equals(controller.getId())) { cardsToBattlefield.add(permanent); diff --git a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java index 25a90ff19d..40e3a4be5e 100644 --- a/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java +++ b/Mage.Sets/src/mage/cards/c/ClifftopRetreat.java @@ -28,7 +28,6 @@ package mage.cards.c; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class ClifftopRetreat extends CardImpl { public ClifftopRetreat(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/c/Cloudpost.java b/Mage.Sets/src/mage/cards/c/Cloudpost.java index 6c86597bbd..6c3f6399ee 100644 --- a/Mage.Sets/src/mage/cards/c/Cloudpost.java +++ b/Mage.Sets/src/mage/cards/c/Cloudpost.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.Mana; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; @@ -39,6 +38,8 @@ import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author jonubuu @@ -53,7 +54,7 @@ public class Cloudpost extends CardImpl { public Cloudpost(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Locus"); + this.subtype.add(SubType.LOCUS); // Cloudpost enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/c/CobraTrap.java b/Mage.Sets/src/mage/cards/c/CobraTrap.java index e8f973fe1f..681dad5561 100644 --- a/Mage.Sets/src/mage/cards/c/CobraTrap.java +++ b/Mage.Sets/src/mage/cards/c/CobraTrap.java @@ -27,9 +27,6 @@ */ package mage.cards.c; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -38,6 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,6 +45,10 @@ import mage.game.permanent.token.SnakeToken; import mage.game.stack.StackObject; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * @author Rafbill */ @@ -54,7 +56,7 @@ public class CobraTrap extends CardImpl { public CobraTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{G}{G}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If a noncreature permanent under your control was destroyed this turn by a spell or ability an opponent controlled, you may pay {G} rather than pay Cobra Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{G}"), CobraTrapCondition.instance), new CobraTrapWatcher()); diff --git a/Mage.Sets/src/mage/cards/c/CollectiveVoyage.java b/Mage.Sets/src/mage/cards/c/CollectiveVoyage.java index 2b2e75acdd..7518e2b206 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveVoyage.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveVoyage.java @@ -27,8 +27,6 @@ */ package mage.cards.c; -import java.util.Objects; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; @@ -39,11 +37,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.Objects; +import java.util.UUID; + /** * * @author LevelX2 @@ -102,7 +103,7 @@ class CollectiveVoyageEffect extends OneShotEffect { for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - TargetCardInLibrary target = new TargetCardInLibrary(0, xSum, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, xSum, StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { for (UUID cardId : target.getTargets()) { Card card = player.getLibrary().getCard(cardId, game); diff --git a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java index d4f6b1c2e2..9c5060911a 100644 --- a/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java +++ b/Mage.Sets/src/mage/cards/c/CompanionOfTheTrials.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -71,7 +71,7 @@ public class CompanionOfTheTrials extends CardImpl { Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{1}{W}"), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + new PermanentsOnTheBattlefieldCondition(filter)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java index c6633b55c5..2b85bbf7b6 100644 --- a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java +++ b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -52,7 +53,7 @@ public class ConclaveNaturalists extends CardImpl { // When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/c/ConsulateDreadnought.java b/Mage.Sets/src/mage/cards/c/ConsulateDreadnought.java index 2fb443f7d9..606cc51eda 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulateDreadnought.java +++ b/Mage.Sets/src/mage/cards/c/ConsulateDreadnought.java @@ -27,12 +27,14 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.CrewAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class ConsulateDreadnought extends CardImpl { public ConsulateDreadnought(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(7); this.toughness = new MageInt(11); diff --git a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java index 676d4d6f7a..80bbcbdd87 100644 --- a/Mage.Sets/src/mage/cards/c/CrabappleCohort.java +++ b/Mage.Sets/src/mage/cards/c/CrabappleCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -39,13 +38,14 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author North @@ -71,7 +71,7 @@ public class CrabappleCohort extends CardImpl { this.toughness = new MageInt(4); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/c/CranialExtraction.java b/Mage.Sets/src/mage/cards/c/CranialExtraction.java index 8d871d7e39..7a214b77fd 100644 --- a/Mage.Sets/src/mage/cards/c/CranialExtraction.java +++ b/Mage.Sets/src/mage/cards/c/CranialExtraction.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.Mode; @@ -39,10 +38,13 @@ import mage.choices.Choice; import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -51,7 +53,7 @@ public class CranialExtraction extends CardImpl { public CranialExtraction(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); /* Name a nonland card. Search target player's graveyard, hand, and library for * all cards with that name and exile them. Then that player shuffles his or her library. */ diff --git a/Mage.Sets/src/mage/cards/c/CrosissCatacombs.java b/Mage.Sets/src/mage/cards/c/CrosissCatacombs.java index 5af8f49a0b..5df33a17ef 100644 --- a/Mage.Sets/src/mage/cards/c/CrosissCatacombs.java +++ b/Mage.Sets/src/mage/cards/c/CrosissCatacombs.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -56,7 +57,7 @@ public class CrosissCatacombs extends CardImpl { public CrosissCatacombs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Lair"); + this.subtype.add(SubType.LAIR); // When Crosis's Catacombs enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); diff --git a/Mage.Sets/src/mage/cards/c/CruelReality.java b/Mage.Sets/src/mage/cards/c/CruelReality.java index 8ca15afac9..5317bff8cd 100644 --- a/Mage.Sets/src/mage/cards/c/CruelReality.java +++ b/Mage.Sets/src/mage/cards/c/CruelReality.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.OneShotEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -50,6 +50,8 @@ import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -58,8 +60,7 @@ public class CruelReality extends CardImpl { public CruelReality(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{B}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); this.color.setBlack(true); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/Cultivate.java b/Mage.Sets/src/mage/cards/c/Cultivate.java index 7866ee3d95..0fd4bc30e5 100644 --- a/Mage.Sets/src/mage/cards/c/Cultivate.java +++ b/Mage.Sets/src/mage/cards/c/Cultivate.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -36,12 +35,14 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -92,7 +93,7 @@ class CultivateEffect extends OneShotEffect { if (controller == null || sourceObject == null) { return false; } - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/c/CultivatorsCaravan.java b/Mage.Sets/src/mage/cards/c/CultivatorsCaravan.java index d635e10a0e..88d3c54642 100644 --- a/Mage.Sets/src/mage/cards/c/CultivatorsCaravan.java +++ b/Mage.Sets/src/mage/cards/c/CultivatorsCaravan.java @@ -27,13 +27,15 @@ */ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.CrewAbility; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class CultivatorsCaravan extends CardImpl { public CultivatorsCaravan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfBloodletting.java b/Mage.Sets/src/mage/cards/c/CurseOfBloodletting.java index b2c1f194dc..941df4792e 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfBloodletting.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfBloodletting.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ReplacementEffectImpl; @@ -35,15 +34,14 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author BetaSteward @@ -52,8 +50,7 @@ public class CurseOfBloodletting extends CardImpl { public CurseOfBloodletting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfChaos.java b/Mage.Sets/src/mage/cards/c/CurseOfChaos.java index 3889b540bc..cc1f631ed2 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfChaos.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfChaos.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -38,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,6 +47,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,8 +57,7 @@ public class CurseOfChaos extends CardImpl { public CurseOfChaos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfDeathsHold.java b/Mage.Sets/src/mage/cards/c/CurseOfDeathsHold.java index 2183df7c30..b5a0da4df2 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfDeathsHold.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfDeathsHold.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; @@ -42,6 +41,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author BetaSteward @@ -50,8 +51,7 @@ public class CurseOfDeathsHold extends CardImpl { public CurseOfDeathsHold(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java index c85f813e85..b7f238deb8 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfEchoes.java @@ -38,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -58,8 +59,7 @@ public class CurseOfEchoes extends CardImpl { public CurseOfEchoes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfExhaustion.java b/Mage.Sets/src/mage/cards/c/CurseOfExhaustion.java index 3ea9f8fe8b..6d783e8ed1 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfExhaustion.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfExhaustion.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; @@ -35,10 +34,7 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -46,6 +42,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.watchers.common.CastSpellLastTurnWatcher; +import java.util.UUID; + /** * * @author BetaSteward @@ -54,8 +52,7 @@ public class CurseOfExhaustion extends CardImpl { public CurseOfExhaustion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfInertia.java b/Mage.Sets/src/mage/cards/c/CurseOfInertia.java index 5e02adfbf8..5a16eedf9c 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfInertia.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfInertia.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.OneShotEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +46,8 @@ import mage.players.Player; import mage.target.TargetPermanent; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,8 +56,7 @@ public class CurseOfInertia extends CardImpl { public CurseOfInertia(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java b/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java index 3cc524069a..05bb4b8fa4 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfMisfortunes.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -52,6 +51,8 @@ import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author BetaSteward @@ -60,8 +61,7 @@ public class CurseOfMisfortunes extends CardImpl { public CurseOfMisfortunes(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfOblivion.java b/Mage.Sets/src/mage/cards/c/CurseOfOblivion.java index 56c4060169..14fed6c861 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfOblivion.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfOblivion.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.AttachEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; @@ -47,6 +47,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author BetaSteward @@ -55,8 +57,7 @@ public class CurseOfOblivion extends CardImpl { public CurseOfOblivion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer target = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfPredation.java b/Mage.Sets/src/mage/cards/c/CurseOfPredation.java index e3023e3452..7f08c5dd06 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfPredation.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfPredation.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -55,8 +56,7 @@ public class CurseOfPredation extends CardImpl { public CurseOfPredation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java b/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java index 5e68c8edd3..7050428664 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfShallowGraves.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.dynamicvalue.common.StaticValue; @@ -40,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,6 +50,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,8 +60,7 @@ public class CurseOfShallowGraves extends CardImpl { public CurseOfShallowGraves(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java b/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java index e7e96aa837..45962e0e49 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfStalkedPrey.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -56,8 +57,7 @@ public class CurseOfStalkedPrey extends CardImpl { public CurseOfStalkedPrey(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheBloodyTome.java b/Mage.Sets/src/mage/cards/c/CurseOfTheBloodyTome.java index 7cc8dc4894..7b5a4d5027 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheBloodyTome.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheBloodyTome.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.AttachEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +46,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author Alvin @@ -54,8 +56,7 @@ public class CurseOfTheBloodyTome extends CardImpl { public CurseOfTheBloodyTome(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheForsaken.java b/Mage.Sets/src/mage/cards/c/CurseOfTheForsaken.java index 9f995b7e9c..31c9ee4413 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheForsaken.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheForsaken.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +46,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,8 +56,7 @@ public class CurseOfTheForsaken extends CardImpl { public CurseOfTheForsaken(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheNightlyHunt.java b/Mage.Sets/src/mage/cards/c/CurseOfTheNightlyHunt.java index de0d51fb46..c03dd3eb7e 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheNightlyHunt.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheNightlyHunt.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.RequirementEffect; @@ -35,14 +34,13 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author BetaSteward @@ -51,8 +49,7 @@ public class CurseOfTheNightlyHunt extends CardImpl { public CurseOfTheNightlyHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java b/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java index f47cc7c8fc..5bf4973eb3 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.AttachEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +46,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author BetaSteward @@ -54,8 +56,7 @@ public class CurseOfThePiercedHeart extends CardImpl { public CurseOfThePiercedHeart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer target = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfThirst.java b/Mage.Sets/src/mage/cards/c/CurseOfThirst.java index 90def2e24c..81f1c82467 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfThirst.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfThirst.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.dynamicvalue.DynamicValue; @@ -39,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,6 +48,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author BetaSteward @@ -56,8 +58,7 @@ public class CurseOfThirst extends CardImpl { public CurseOfThirst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player diff --git a/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java b/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java index 89bf77e96e..0182b81d45 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfVengeance.java @@ -27,7 +27,6 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -39,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; @@ -50,6 +50,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * @author spjspj */ @@ -58,8 +60,7 @@ public class CurseOfVengeance extends CardImpl { public CurseOfVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/c/CutTheEarthlyBond.java b/Mage.Sets/src/mage/cards/c/CutTheEarthlyBond.java index 9eba7f7a86..da11de3663 100644 --- a/Mage.Sets/src/mage/cards/c/CutTheEarthlyBond.java +++ b/Mage.Sets/src/mage/cards/c/CutTheEarthlyBond.java @@ -27,16 +27,18 @@ */ package mage.cards.c; -import java.util.UUID; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.permanent.EnchantedPredicate; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +52,7 @@ public class CutTheEarthlyBond extends CardImpl { public CutTheEarthlyBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target enchanted permanent to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/d/DanceOfShadows.java b/Mage.Sets/src/mage/cards/d/DanceOfShadows.java index 9280cab953..b30f135d69 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfShadows.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfShadows.java @@ -28,7 +28,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -37,8 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** * * @author Loki @@ -47,7 +49,7 @@ public class DanceOfShadows extends CardImpl { public DanceOfShadows (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Creatures you control get +1/+0 and gain fear until end of turn. (They can't be blocked except by artifact creatures and/or black creatures.) diff --git a/Mage.Sets/src/mage/cards/d/DaredevilDragster.java b/Mage.Sets/src/mage/cards/d/DaredevilDragster.java index f6cc4f5d96..d07b56a9f6 100644 --- a/Mage.Sets/src/mage/cards/d/DaredevilDragster.java +++ b/Mage.Sets/src/mage/cards/d/DaredevilDragster.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; @@ -39,12 +38,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.watchers.common.AttackedOrBlockedThisCombatWatcher; +import java.util.UUID; + /** * * @author spjspj @@ -54,7 +56,7 @@ public class DaredevilDragster extends CardImpl { public DaredevilDragster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/d/DarigaazsCaldera.java b/Mage.Sets/src/mage/cards/d/DarigaazsCaldera.java index e8e03fca03..1039edaf37 100644 --- a/Mage.Sets/src/mage/cards/d/DarigaazsCaldera.java +++ b/Mage.Sets/src/mage/cards/d/DarigaazsCaldera.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -56,7 +57,7 @@ public class DarigaazsCaldera extends CardImpl { public DarigaazsCaldera(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Lair"); + this.subtype.add(SubType.LAIR); // When Darigaaz's Caldera enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); diff --git a/Mage.Sets/src/mage/cards/d/DarkPrivilege.java b/Mage.Sets/src/mage/cards/d/DarkPrivilege.java new file mode 100644 index 0000000000..52cfbfb973 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DarkPrivilege.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.d; + +import java.util.UUID; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.RegenerateAttachedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class DarkPrivilege extends CardImpl { + + public DarkPrivilege(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); + + // Sacrifice a creature: Regenerate enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateAttachedEffect(AttachmentType.AURA), + new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))))); + + } + + public DarkPrivilege(final DarkPrivilege card) { + super(card); + } + + @Override + public DarkPrivilege copy() { + return new DarkPrivilege(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java b/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java index 70069012f9..6b1617086d 100644 --- a/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java +++ b/Mage.Sets/src/mage/cards/d/DaruSpiritualist.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.d; import java.util.UUID; @@ -47,7 +46,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; - /** * * @author L_J @@ -55,7 +53,7 @@ import mage.target.targetpointer.FixedTarget; public class DaruSpiritualist extends CardImpl { public DaruSpiritualist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add("Human"); this.subtype.add("Cleric"); @@ -104,12 +102,9 @@ class DaruSpiritualistTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - UUID targetId = event.getTargetId(); Permanent creature = game.getPermanent(event.getTargetId()); if (creature != null && filter.match(creature, getSourceId(), getControllerId(), game)) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - } + this.getEffects().setTargetPointer(new FixedTarget(creature, game)); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/d/DawntreaderElk.java b/Mage.Sets/src/mage/cards/d/DawntreaderElk.java index 9d8ffcb568..85229f4337 100644 --- a/Mage.Sets/src/mage/cards/d/DawntreaderElk.java +++ b/Mage.Sets/src/mage/cards/d/DawntreaderElk.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North @@ -56,7 +57,7 @@ public class DawntreaderElk extends CardImpl { // {G}, Sacrifice Dawntreader Elk: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ColoredManaCost(ColoredManaSymbol.G)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/d/DeathDenied.java b/Mage.Sets/src/mage/cards/d/DeathDenied.java index b23b94dd45..1912453105 100644 --- a/Mage.Sets/src/mage/cards/d/DeathDenied.java +++ b/Mage.Sets/src/mage/cards/d/DeathDenied.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.effects.Effect; @@ -35,11 +34,14 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.target.Target; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +50,7 @@ public class DeathDenied extends CardImpl { public DeathDenied(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return X target creature cards from your graveyard to your hand. Effect effect = new ReturnFromGraveyardToHandTargetEffect(); diff --git a/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java b/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java index ca57119270..f6ff16a3e9 100644 --- a/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java +++ b/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; @@ -39,10 +38,13 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -51,7 +53,7 @@ public class DeathOfAThousandStings extends CardImpl { public DeathOfAThousandStings(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target player loses 1 life and you gain 1 life. this.getSpellAbility().addEffect(new LoseLifeTargetEffect(1)); diff --git a/Mage.Sets/src/mage/cards/d/Decommission.java b/Mage.Sets/src/mage/cards/d/Decommission.java index 0c5542bd12..8f0d2a60cf 100644 --- a/Mage.Sets/src/mage/cards/d/Decommission.java +++ b/Mage.Sets/src/mage/cards/d/Decommission.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.condition.common.RevoltCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,10 +34,12 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.watchers.common.RevoltWatcher; +import java.util.UUID; + /** * * @author emerald000 @@ -50,7 +51,7 @@ public class Decommission extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(3), RevoltCondition.instance, "
Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life.")); diff --git a/Mage.Sets/src/mage/cards/d/DeepReconnaissance.java b/Mage.Sets/src/mage/cards/d/DeepReconnaissance.java index 595649e31b..63077883d9 100644 --- a/Mage.Sets/src/mage/cards/d/DeepReconnaissance.java +++ b/Mage.Sets/src/mage/cards/d/DeepReconnaissance.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FlashbackAbility; @@ -35,9 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class DeepReconnaissance extends CardImpl { // Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); // Flashback {4}{G} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{G}"), TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/d/Deglamer.java b/Mage.Sets/src/mage/cards/d/Deglamer.java index cc1785534a..1cf77a6f05 100644 --- a/Mage.Sets/src/mage/cards/d/Deglamer.java +++ b/Mage.Sets/src/mage/cards/d/Deglamer.java @@ -27,14 +27,15 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. 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) { diff --git a/Mage.Sets/src/mage/cards/d/DemolitionStomper.java b/Mage.Sets/src/mage/cards/d/DemolitionStomper.java index 4bc7ea26cf..669f883896 100644 --- a/Mage.Sets/src/mage/cards/d/DemolitionStomper.java +++ b/Mage.Sets/src/mage/cards/d/DemolitionStomper.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleEvasionAbility; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; @@ -37,9 +36,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; +import java.util.UUID; + /** * * @author emerald000 @@ -53,7 +55,7 @@ public class DemolitionStomper extends CardImpl { public DemolitionStomper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); - this.subtype.add("Vehicle"); + this.subtype.add( SubType.VEHICLE); this.power = new MageInt(10); this.toughness = new MageInt(7); diff --git a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java index 34a5f5ec7d..6fa7b811da 100644 --- a/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java +++ b/Mage.Sets/src/mage/cards/d/DesiccatedNaga.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; @@ -39,13 +38,14 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author fireshoes @@ -70,7 +70,7 @@ public class DesiccatedNaga extends CardImpl { Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{3}{B}"), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0)); + new PermanentsOnTheBattlefieldCondition(filter)); ability.addTarget(new TargetOpponent()); Effect effect = new GainLifeEffect(2); effect.setText("and you gain 2 life"); diff --git a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java index 8cad2a2da9..67b69f3529 100644 --- a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java +++ b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java @@ -27,20 +27,21 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. this.getSpellAbility().addEffect(new DestructiveRevelryEffect()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); this.getSpellAbility().addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/d/DestructiveUrge.java b/Mage.Sets/src/mage/cards/d/DestructiveUrge.java new file mode 100644 index 0000000000..d51474b4ea --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DestructiveUrge.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.d; + +import java.util.UUID; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author TheElk801 + */ +public class DestructiveUrge extends CardImpl { + + public DestructiveUrge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); + + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever enchanted creature deals combat damage to a player, that player sacrifices a land. + ability = new DealsDamageToAPlayerAttachedTriggeredAbility(new SacrificeEffect(new FilterLandPermanent(), 1, "that player"), "enchanted", false, true); + this.addAbility(ability); + } + + public DestructiveUrge(final DestructiveUrge card) { + super(card); + } + + @Override + public DestructiveUrge copy() { + return new DestructiveUrge(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DevourFlesh.java b/Mage.Sets/src/mage/cards/d/DevourFlesh.java index 60519b2ae9..804367bb58 100644 --- a/Mage.Sets/src/mage/cards/d/DevourFlesh.java +++ b/Mage.Sets/src/mage/cards/d/DevourFlesh.java @@ -48,8 +48,8 @@ import mage.target.common.TargetControlledPermanent; */ public class DevourFlesh extends CardImpl { - public DevourFlesh (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); + public DevourFlesh(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // Target player sacrifices a creature, then gains life equal to that creature's toughness. this.getSpellAbility().addEffect(new DevourFleshSacrificeEffect()); @@ -61,7 +61,7 @@ public class DevourFlesh extends CardImpl { } @Override - public DevourFlesh copy() { + public DevourFlesh copy() { return new DevourFlesh(this); } } @@ -99,8 +99,9 @@ class DevourFleshSacrificeEffect extends OneShotEffect { if (permanent != null) { int gainLife = permanent.getToughness().getValue(); permanent.sacrifice(source.getSourceId(), game); + game.applyEffects(); player.gainLife(gainLife, game); - } else{ + } else { return false; } } diff --git a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java index b3df20e715..67ab966e72 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java +++ b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,6 +46,8 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * @author noxx @@ -71,7 +72,7 @@ public class DevoutChaplain extends CardImpl { // {T}, Tap two untapped Humans you control: Exile target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false))); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DevoutWitness.java b/Mage.Sets/src/mage/cards/d/DevoutWitness.java index ce8a70d3fd..00a183c887 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutWitness.java +++ b/Mage.Sets/src/mage/cards/d/DevoutWitness.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,7 +61,7 @@ public class DevoutWitness extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java b/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java index f845de8799..8cdc4e4d41 100644 --- a/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java +++ b/Mage.Sets/src/mage/cards/d/DiligentFarmhand.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardSetInfo; import mage.cards.m.MuscleBurst; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Plopman @@ -57,7 +58,7 @@ public class DiligentFarmhand extends CardImpl { this.toughness = new MageInt(1); // {1}{G}, Sacrifice Diligent Farmhand: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), new ManaCostsImpl("{1}{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); // If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst. diff --git a/Mage.Sets/src/mage/cards/d/DimirGuildgate.java b/Mage.Sets/src/mage/cards/d/DimirGuildgate.java index 6be45aacc1..be2a38b196 100644 --- a/Mage.Sets/src/mage/cards/d/DimirGuildgate.java +++ b/Mage.Sets/src/mage/cards/d/DimirGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class DimirGuildgate extends CardImpl { public DimirGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Dimir Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/d/Disenchant.java b/Mage.Sets/src/mage/cards/d/Disenchant.java index ab421fa7a4..de0bae89d1 100644 --- a/Mage.Sets/src/mage/cards/d/Disenchant.java +++ b/Mage.Sets/src/mage/cards/d/Disenchant.java @@ -27,14 +27,15 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class Disenchant extends CardImpl { // Destroy target artifact or enchantment. 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) { diff --git a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java index c6c820e46f..8ffc9aced3 100644 --- a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java +++ b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.condition.common.KickedCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,9 +35,11 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class DismantlingBlow extends CardImpl { this.addAbility(new KickerAbility("{2}{U}")); // Destroy target artifact or enchantment. 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. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DrawCardSourceControllerEffect(2), diff --git a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java index 0e85bafc00..3ccf3a72cb 100644 --- a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java +++ b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -51,7 +52,7 @@ public class DispellersCapsule extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DisruptingShoal.java b/Mage.Sets/src/mage/cards/d/DisruptingShoal.java index 135d930f68..bf8e24914e 100644 --- a/Mage.Sets/src/mage/cards/d/DisruptingShoal.java +++ b/Mage.Sets/src/mage/cards/d/DisruptingShoal.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.Mode; @@ -41,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.common.FilterOwnedCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; @@ -50,6 +50,8 @@ import mage.game.stack.Spell; import mage.target.TargetSpell; import mage.target.common.TargetCardInHand; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +60,7 @@ public class DisruptingShoal extends CardImpl { public DisruptingShoal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may exile a blue card with converted mana cost X from your hand rather than pay Disrupting Shoal's mana cost. FilterOwnedCard filter = new FilterOwnedCard("a blue card with converted mana cost X from your hand"); diff --git a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java index a481f280c4..3b37cf5b2f 100644 --- a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java +++ b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java @@ -95,7 +95,7 @@ public class DjeruWithEyesOpen extends CardImpl { class DjeruWithEyesOpenPreventEffect extends PreventionEffectImpl { 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"; } diff --git a/Mage.Sets/src/mage/cards/d/DominatorDrone.java b/Mage.Sets/src/mage/cards/d/DominatorDrone.java index 3828c8adbd..732ca25bf7 100644 --- a/Mage.Sets/src/mage/cards/d/DominatorDrone.java +++ b/Mage.Sets/src/mage/cards/d/DominatorDrone.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,11 +38,12 @@ import mage.abilities.keyword.IngestAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -74,7 +74,7 @@ public class DominatorDrone extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2)); this.addAbility(new ConditionalTriggeredAbility( 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.")); } diff --git a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java index 64bbdae8ef..0f15208f99 100644 --- a/Mage.Sets/src/mage/cards/d/DragonskullSummit.java +++ b/Mage.Sets/src/mage/cards/d/DragonskullSummit.java @@ -28,7 +28,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class DragonskullSummit extends CardImpl { public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java index 91e28e4931..e59471db2f 100644 --- a/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java +++ b/Mage.Sets/src/mage/cards/d/DrakeFamiliar.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,19 +38,19 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) */ public class DrakeFamiliar extends CardImpl { - - private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); public DrakeFamiliar(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); @@ -78,7 +77,6 @@ public class DrakeFamiliar extends CardImpl { 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."; DrakeFamiliarEffect () { @@ -95,7 +93,7 @@ class DrakeFamiliarEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { 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)) { controller.chooseTarget(Outcome.Sacrifice, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java b/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java index fb93bb2771..c99334604f 100644 --- a/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java +++ b/Mage.Sets/src/mage/cards/d/DreamscapeArtist.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -41,11 +40,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -60,7 +61,7 @@ public class DreamscapeArtist extends CardImpl { this.toughness = new MageInt(1); // {2}{U}, {tap}, Discard a card, Sacrifice a land: Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), diff --git a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java index d2506488f8..812130150f 100644 --- a/Mage.Sets/src/mage/cards/d/DrillSkimmer.java +++ b/Mage.Sets/src/mage/cards/d/DrillSkimmer.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; @@ -39,13 +38,14 @@ import mage.abilities.keyword.ShroudAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author wetterlicht @@ -68,7 +68,7 @@ public class DrillSkimmer extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // 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, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield), condition, "{this} has shroud as long as you control another artifact creature."))); diff --git a/Mage.Sets/src/mage/cards/d/DromarsCavern.java b/Mage.Sets/src/mage/cards/d/DromarsCavern.java index 922e340c5b..d364a13551 100644 --- a/Mage.Sets/src/mage/cards/d/DromarsCavern.java +++ b/Mage.Sets/src/mage/cards/d/DromarsCavern.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -55,7 +56,7 @@ public class DromarsCavern extends CardImpl { } public DromarsCavern(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Lair"); + this.subtype.add(SubType.LAIR); // When Dromar's Cavern enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); diff --git a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java index 5201dad779..353f91b5b3 100644 --- a/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java +++ b/Mage.Sets/src/mage/cards/d/DrownedCatacomb.java @@ -28,7 +28,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class DrownedCatacomb extends CardImpl { public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DwynensElite.java b/Mage.Sets/src/mage/cards/d/DwynensElite.java index 859a62b07f..8af06b2a0c 100644 --- a/Mage.Sets/src/mage/cards/d/DwynensElite.java +++ b/Mage.Sets/src/mage/cards/d/DwynensElite.java @@ -27,7 +27,6 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,13 +36,14 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.permanent.token.ElfToken; +import java.util.UUID; + /** * * @author fireshoes @@ -68,7 +68,7 @@ public class DwynensElite extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken())); this.addAbility(new ConditionalTriggeredAbility( 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.")); } diff --git a/Mage.Sets/src/mage/cards/e/EdgeOfAutumn.java b/Mage.Sets/src/mage/cards/e/EdgeOfAutumn.java index 1c177e6c10..659752daf1 100644 --- a/Mage.Sets/src/mage/cards/e/EdgeOfAutumn.java +++ b/Mage.Sets/src/mage/cards/e/EdgeOfAutumn.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -37,12 +36,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author FenrisulfrX @@ -55,7 +57,7 @@ public class EdgeOfAutumn extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); // If you control four or fewer lands, search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 5), "If you control four or fewer lands, search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.")); diff --git a/Mage.Sets/src/mage/cards/e/EerieProcession.java b/Mage.Sets/src/mage/cards/e/EerieProcession.java index 249d184d18..b753f93e6b 100644 --- a/Mage.Sets/src/mage/cards/e/EerieProcession.java +++ b/Mage.Sets/src/mage/cards/e/EerieProcession.java @@ -28,7 +28,6 @@ package mage.cards.e; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,6 +37,8 @@ import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * @author Loki */ @@ -51,7 +52,7 @@ public class EerieProcession extends CardImpl { public EerieProcession(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Search your library for an Arcane card, reveal that card, and put it into your hand. Then shuffle your library. diff --git a/Mage.Sets/src/mage/cards/e/ElfhameSanctuary.java b/Mage.Sets/src/mage/cards/e/ElfhameSanctuary.java index 5759660efc..300c6b5625 100644 --- a/Mage.Sets/src/mage/cards/e/ElfhameSanctuary.java +++ b/Mage.Sets/src/mage/cards/e/ElfhameSanctuary.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.ReplacementEffectImpl; @@ -38,11 +37,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Markedagain @@ -53,7 +54,7 @@ public class ElfhameSanctuary extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); // At the beginning of your upkeep, you may search your library for a basic land card, reveal that card, and put it into your hand. If you do, you skip your draw step this turn and shuffle your library. - Ability ability = new BeginningOfUpkeepTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard())), TargetController.YOU, true); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD)), TargetController.YOU, true); ability.addEffect(new SkipDrawStepThisTurn()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java b/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java index 9c086cc8fa..5186e4b1f2 100644 --- a/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java +++ b/Mage.Sets/src/mage/cards/e/EmbodimentOfSpring.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,7 @@ public class EmbodimentOfSpring extends CardImpl { // {1}{G}, {T}, Sacrifice Embodiment of Spring: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ManaCostsImpl("{1}{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java index 3ce72616a6..0153f93578 100644 --- a/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java +++ b/Mage.Sets/src/mage/cards/e/EndangeredArmodon.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -38,6 +37,8 @@ import mage.constants.ComparisonType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ToughnessPredicate; +import java.util.UUID; + /** * * @author emerald000 @@ -58,7 +59,7 @@ public class EndangeredArmodon extends CardImpl { // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - filter, ComparisonType.MORE_THAN, 0, + filter, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/e/EtherealHaze.java b/Mage.Sets/src/mage/cards/e/EtherealHaze.java index ba90d35600..e6175ceeba 100644 --- a/Mage.Sets/src/mage/cards/e/EtherealHaze.java +++ b/Mage.Sets/src/mage/cards/e/EtherealHaze.java @@ -27,12 +27,15 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; /** @@ -43,7 +46,7 @@ public class EtherealHaze extends CardImpl { public EtherealHaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Prevent all damage that would be dealt by creatures this turn. this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(FILTER_PERMANENT_CREATURES, Duration.EndOfTurn, false)); diff --git a/Mage.Sets/src/mage/cards/e/Evermind.java b/Mage.Sets/src/mage/cards/e/Evermind.java index 3db9e4015b..d6a084dc2c 100644 --- a/Mage.Sets/src/mage/cards/e/Evermind.java +++ b/Mage.Sets/src/mage/cards/e/Evermind.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -36,8 +35,11 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +48,7 @@ public class Evermind extends CardImpl { public Evermind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},""); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/e/EvolutionCharm.java b/Mage.Sets/src/mage/cards/e/EvolutionCharm.java index 9f825e71cb..b3b4890d46 100644 --- a/Mage.Sets/src/mage/cards/e/EvolutionCharm.java +++ b/Mage.Sets/src/mage/cards/e/EvolutionCharm.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -37,12 +36,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -55,7 +56,7 @@ public class EvolutionCharm extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Choose one - Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library; - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); // or return target creature card from your graveyard to your hand; Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/e/EvolvingWilds.java b/Mage.Sets/src/mage/cards/e/EvolvingWilds.java index c729ad3533..69211f6845 100644 --- a/Mage.Sets/src/mage/cards/e/EvolvingWilds.java +++ b/Mage.Sets/src/mage/cards/e/EvolvingWilds.java @@ -27,7 +27,6 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -37,9 +36,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -70,7 +71,7 @@ class EvolvingWildsAbility extends ActivatedAbilityImpl { super(Zone.BATTLEFIELD, null); addCost(new TapSourceCost()); addCost(new SacrificeSourceCost()); - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay)); } diff --git a/Mage.Sets/src/mage/cards/e/ExplodingBorders.java b/Mage.Sets/src/mage/cards/e/ExplodingBorders.java index 8618351538..e6bc6cd6d6 100644 --- a/Mage.Sets/src/mage/cards/e/ExplodingBorders.java +++ b/Mage.Sets/src/mage/cards/e/ExplodingBorders.java @@ -27,17 +27,18 @@ */ package mage.cards.e; -import java.util.UUID; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -49,7 +50,7 @@ public class ExplodingBorders extends CardImpl { // Domain - Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Exploding Borders deals X damage to target player, where X is the number of basic land types among lands you control. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); this.getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/cards/e/EyeOfNowhere.java b/Mage.Sets/src/mage/cards/e/EyeOfNowhere.java index ced17f2471..0ccc9084bf 100644 --- a/Mage.Sets/src/mage/cards/e/EyeOfNowhere.java +++ b/Mage.Sets/src/mage/cards/e/EyeOfNowhere.java @@ -28,13 +28,15 @@ package mage.cards.e; -import java.util.UUID; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -43,7 +45,7 @@ public class EyeOfNowhere extends CardImpl { public EyeOfNowhere (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target permanent to its owner's hand. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java index 8675238f6b..75128d052c 100644 --- a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java +++ b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java @@ -27,14 +27,15 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -47,7 +48,7 @@ public class FadeIntoAntiquity extends CardImpl { // Exile target artifact or enchantment. 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) { diff --git a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java index aa3afde27e..9a33c53459 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,13 +37,14 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** * * @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. Ability ability = new ConditionalTriggeredAbility( 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"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FarWanderings.java b/Mage.Sets/src/mage/cards/f/FarWanderings.java index 8689db28f1..82c859e722 100644 --- a/Mage.Sets/src/mage/cards/f/FarWanderings.java +++ b/Mage.Sets/src/mage/cards/f/FarWanderings.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.Effect; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -51,8 +52,8 @@ public class FarWanderings extends CardImpl { // Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. // Threshold - If seven or more cards are in your graveyard, instead search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. Effect effect = new ConditionalOneShotEffect( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 3, new FilterBasicLandCard()), true, true), - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new CardsInControllerGraveCondition(7), "Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library.

Threshold - If seven or more cards are in your graveyard, instead search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library."); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/f/FarhavenElf.java b/Mage.Sets/src/mage/cards/f/FarhavenElf.java index 15d7d3fd93..f3d2322d3a 100644 --- a/Mage.Sets/src/mage/cards/f/FarhavenElf.java +++ b/Mage.Sets/src/mage/cards/f/FarhavenElf.java @@ -27,16 +27,17 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North @@ -52,7 +53,7 @@ public class FarhavenElf extends CardImpl { this.toughness = new MageInt(1); // When Farhaven Elf enters the battlefield, you may search your library for a basic land card and put it onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, false), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, false), true)); } public FarhavenElf(final FarhavenElf card) { diff --git a/Mage.Sets/src/mage/cards/f/FateForgotten.java b/Mage.Sets/src/mage/cards/f/FateForgotten.java index 88fec4d8c5..3bf8ebc94c 100644 --- a/Mage.Sets/src/mage/cards/f/FateForgotten.java +++ b/Mage.Sets/src/mage/cards/f/FateForgotten.java @@ -27,14 +27,15 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class FateForgotten extends CardImpl { // Exile target artifact or enchantment. 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) { diff --git a/Mage.Sets/src/mage/cards/f/FeastOfWorms.java b/Mage.Sets/src/mage/cards/f/FeastOfWorms.java index 15447d052b..abf445dd84 100644 --- a/Mage.Sets/src/mage/cards/f/FeastOfWorms.java +++ b/Mage.Sets/src/mage/cards/f/FeastOfWorms.java @@ -28,7 +28,6 @@ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -36,6 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; @@ -45,6 +45,8 @@ import mage.players.Player; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author LevelX @@ -53,7 +55,7 @@ public class FeastOfWorms extends CardImpl { public FeastOfWorms (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Destroy target land. If that land was legendary, its controller sacrifices another land. diff --git a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java index 8ce9e8ae83..7960891b5f 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java +++ b/Mage.Sets/src/mage/cards/f/FemerefEnchantress.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ZoneChangeAllTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,7 +34,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; 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. 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)); } diff --git a/Mage.Sets/src/mage/cards/f/FertileThicket.java b/Mage.Sets/src/mage/cards/f/FertileThicket.java index dbd373c4be..ca1df2dd45 100644 --- a/Mage.Sets/src/mage/cards/f/FertileThicket.java +++ b/Mage.Sets/src/mage/cards/f/FertileThicket.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; @@ -41,11 +40,13 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; +import java.util.UUID; + /** * * @author LevelX2 @@ -99,7 +100,7 @@ class FertileThicketEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.addAll(controller.getLibrary().getTopCards(game, 5)); controller.lookAtCards(sourceObject.getIdName(), cards, game); - TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, new FilterBasicLandCard()); + TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, StaticFilters.FILTER_BASIC_LAND_CARD); controller.chooseTarget(outcome, cards, target, source, game); Cards cardsRevealed = new CardsImpl(target.getTargets()); if (!cardsRevealed.isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/f/Fertilid.java b/Mage.Sets/src/mage/cards/f/Fertilid.java index c75de9ace9..b7eb0bb7d1 100644 --- a/Mage.Sets/src/mage/cards/f/Fertilid.java +++ b/Mage.Sets/src/mage/cards/f/Fertilid.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; @@ -41,10 +40,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author ilcartographer @@ -62,7 +63,7 @@ public class Fertilid extends CardImpl { // {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), new ManaCostsImpl("{1}{G}")); + new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl("{1}{G}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/f/FesteringWound.java b/Mage.Sets/src/mage/cards/f/FesteringWound.java new file mode 100644 index 0000000000..0317ee9255 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FesteringWound.java @@ -0,0 +1,118 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseOpponentEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.Card; +import mage.constants.*; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.effects.common.AttachEffect; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; + +/** + * + * @author ciaccona007 + */ +public class FesteringWound extends CardImpl { + + public FesteringWound(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // At the beginning of your upkeep, you may put an infection counter on Festering Wound. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.INFECTION.createInstance(), true), TargetController.YOU, true)); + // At the beginning of the upkeep of enchanted creature's controller, Festering Wound deals X damage to that player, where X is the number of infection counters on Festering Wound. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new FesteringWoundEffect(), TargetController.CONTROLLER_ATTACHED_TO, false, true)); + } + + public FesteringWound(final FesteringWound card) { + super(card); + } + + @Override + public FesteringWound copy() { + return new FesteringWound(this); + } +} +class FesteringWoundEffect extends OneShotEffect { + + public FesteringWoundEffect() { + super(Outcome.Detriment); + this.staticText = "{this} deals X damage to that player, where X is the number of infection counters on {this}"; + } + + public FesteringWoundEffect(final FesteringWoundEffect effect) { + super(effect); + } + + @Override + public FesteringWoundEffect copy() { + return new FesteringWoundEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID sourceId = source.getSourceId(); + int amount = game.getPermanent(sourceId).getCounters(game).getCount(CounterType.INFECTION); + UUID id = this.getTargetPointer().getFirst(game, source); + Player player = game.getPlayer(id); + if(player != null) { + player.damage(amount, source.getSourceId(), game, false, true); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java index 6b3033faf9..9506339dae 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java @@ -27,19 +27,20 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -50,7 +51,7 @@ public class FiligreeFracture extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // 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()); } diff --git a/Mage.Sets/src/mage/cards/f/FirstVolley.java b/Mage.Sets/src/mage/cards/f/FirstVolley.java index b18caa5de1..070de50402 100644 --- a/Mage.Sets/src/mage/cards/f/FirstVolley.java +++ b/Mage.Sets/src/mage/cards/f/FirstVolley.java @@ -27,15 +27,17 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetControllerEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -44,7 +46,7 @@ public class FirstVolley extends CardImpl { public FirstVolley(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // First Volley deals 1 damage to target creature and 1 damage to that creature's controller. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); diff --git a/Mage.Sets/src/mage/cards/f/FleetwheelCruiser.java b/Mage.Sets/src/mage/cards/f/FleetwheelCruiser.java index b00b16b57f..e2e32e699b 100644 --- a/Mage.Sets/src/mage/cards/f/FleetwheelCruiser.java +++ b/Mage.Sets/src/mage/cards/f/FleetwheelCruiser.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -40,6 +39,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -49,7 +51,7 @@ public class FleetwheelCruiser extends CardImpl { public FleetwheelCruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(5); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java b/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java new file mode 100644 index 0000000000..7e5a16edd1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FloodedWoodlands.java @@ -0,0 +1,98 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class FloodedWoodlands extends CardImpl { + + public FloodedWoodlands(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); + + + // Green creatures can't attack unless their controller sacrifices a land for each green creature he or she controls that's attacking. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FloodedWoodlandsCostToAttackBlockEffect())); + + } + + public FloodedWoodlands(final FloodedWoodlands card) { + super(card); + } + + @Override + public FloodedWoodlands copy() { + return new FloodedWoodlands(this); + } +} + +class FloodedWoodlandsCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { + + FloodedWoodlandsCostToAttackBlockEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, + new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + staticText = "Green creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; + } + + FloodedWoodlandsCostToAttackBlockEffect(FloodedWoodlandsCostToAttackBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + return (permanent != null + && permanent.isCreature() + && permanent.getColor(game).isGreen()); + } + + @Override + public FloodedWoodlandsCostToAttackBlockEffect copy() { + return new FloodedWoodlandsCostToAttackBlockEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/f/FontOfFertility.java b/Mage.Sets/src/mage/cards/f/FontOfFertility.java index 02c3e19333..2087d7ef02 100644 --- a/Mage.Sets/src/mage/cards/f/FontOfFertility.java +++ b/Mage.Sets/src/mage/cards/f/FontOfFertility.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class FontOfFertility extends CardImpl { // {1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true, true, Outcome.PutLandInPlay), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/f/FootstepsOfTheGoryo.java b/Mage.Sets/src/mage/cards/f/FootstepsOfTheGoryo.java index 725bb2c793..124fd7b28f 100644 --- a/Mage.Sets/src/mage/cards/f/FootstepsOfTheGoryo.java +++ b/Mage.Sets/src/mage/cards/f/FootstepsOfTheGoryo.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -39,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -47,6 +47,8 @@ import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author dustinconrad @@ -55,7 +57,7 @@ public class FootstepsOfTheGoryo extends CardImpl { public FootstepsOfTheGoryo(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step. this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect()); diff --git a/Mage.Sets/src/mage/cards/f/ForkInTheRoad.java b/Mage.Sets/src/mage/cards/f/ForkInTheRoad.java index 944019c065..e0f73b462b 100644 --- a/Mage.Sets/src/mage/cards/f/ForkInTheRoad.java +++ b/Mage.Sets/src/mage/cards/f/ForkInTheRoad.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -36,12 +35,14 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -90,7 +91,7 @@ class ForkInTheRoadEffect extends OneShotEffect { if (controller == null || sourceObject == null) { return false; } - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java index d204524620..580572e466 100644 --- a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java +++ b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java @@ -27,16 +27,17 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -48,7 +49,7 @@ public class ForsakeTheWorldly extends CardImpl { // Exile target artifact or enchantment. getSpellAbility().addEffect(new ExileTargetEffect()); - getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/f/FrayingSanity.java b/Mage.Sets/src/mage/cards/f/FrayingSanity.java index f8a3223199..1cfcad7dac 100644 --- a/Mage.Sets/src/mage/cards/f/FrayingSanity.java +++ b/Mage.Sets/src/mage/cards/f/FrayingSanity.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -57,8 +58,7 @@ public class FrayingSanity extends CardImpl { public FrayingSanity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/f/FrenziedTilling.java b/Mage.Sets/src/mage/cards/f/FrenziedTilling.java index a4ca56e393..5cc63a5d5c 100644 --- a/Mage.Sets/src/mage/cards/f/FrenziedTilling.java +++ b/Mage.Sets/src/mage/cards/f/FrenziedTilling.java @@ -27,16 +27,17 @@ */ package mage.cards.f; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class FrenziedTilling extends CardImpl { // Destroy target land. Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetLandPermanent()); - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); } public FrenziedTilling(final FrenziedTilling card) { diff --git a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java index a8f2eb3ac1..602d0b3c1d 100644 --- a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java +++ b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java @@ -27,7 +27,6 @@ */ package mage.cards.f; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.LoyaltyAbility; import mage.abilities.common.CanBeYourCommanderAbility; @@ -39,12 +38,14 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.permanent.token.FreyaliseLlanowarsFuryToken; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +68,7 @@ public class FreyaliseLlanowarsFury extends CardImpl { this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2)); // -2: Destroy target artifact or enchantment. 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); // -6: Draw a card for each green creature you control. this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6)); diff --git a/Mage.Sets/src/mage/cards/f/FromTheAshes.java b/Mage.Sets/src/mage/cards/f/FromTheAshes.java index 397d6c1fa2..c0dc644a3c 100644 --- a/Mage.Sets/src/mage/cards/f/FromTheAshes.java +++ b/Mage.Sets/src/mage/cards/f/FromTheAshes.java @@ -38,6 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterLandPermanent; import mage.game.Game; @@ -106,7 +107,7 @@ class FromTheAshesEffect extends OneShotEffect { for(Map.Entry entry : playerAmount.entrySet()) { Player player = game.getPlayer(entry.getKey()); if (player != null) { - TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue(), new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue(), StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { for (UUID cardId: target.getTargets()) { diff --git a/Mage.Sets/src/mage/cards/f/FrontierGuide.java b/Mage.Sets/src/mage/cards/f/FrontierGuide.java index 8374c23306..49e247b2a6 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierGuide.java +++ b/Mage.Sets/src/mage/cards/f/FrontierGuide.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -56,7 +57,7 @@ public class FrontierGuide extends CardImpl { //{3}{G}, {T}: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ManaCostsImpl("{3}{G}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java index 603322b2cb..d6c3c6a9d2 100644 --- a/Mage.Sets/src/mage/cards/g/GangrenousZombies.java +++ b/Mage.Sets/src/mage/cards/g/GangrenousZombies.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,11 +37,16 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DamageEverythingEffect; import mage.cards.CardImpl; 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.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +71,7 @@ public class GangrenousZombies extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect( new DamageEverythingEffect(2), 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"), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/g/GhostQuarter.java b/Mage.Sets/src/mage/cards/g/GhostQuarter.java index 5b3b734921..8265a15ee6 100644 --- a/Mage.Sets/src/mage/cards/g/GhostQuarter.java +++ b/Mage.Sets/src/mage/cards/g/GhostQuarter.java @@ -41,6 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.game.Game; import mage.game.permanent.Permanent; @@ -99,7 +100,7 @@ class GhostQuarterEffect extends OneShotEffect { if (permanent != null) { Player controller = game.getPlayer(permanent.getControllerId()); if (controller.chooseUse(Outcome.PutLandInPlay, "Do you wish to search for a basic land, put it onto the battlefield and then shuffle your library?", source, game)) { - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { Card card = controller.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java b/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java new file mode 100644 index 0000000000..4c89ccb329 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantTrapDoorSpider.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class GiantTrapDoorSpider extends CardImpl { + + private static final HuntingKavuFilter filter = new HuntingKavuFilter(); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public GiantTrapDoorSpider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.subtype.add("Spider"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{R}{G}, {tap}: Exile Giant Trap Door Spider and target creature without flying that's attacking you. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl("{1}{R}{G}")); + ability.addCost(new TapSourceCost()); + ability.addEffect(new ExileTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GiantTrapDoorSpider(final GiantTrapDoorSpider card) { + super(card); + } + + @Override + public GiantTrapDoorSpider copy() { + return new GiantTrapDoorSpider(this); + } +} + +class HuntingKavuFilter extends FilterAttackingCreature { + + public HuntingKavuFilter() { + super("creature without flying that's attacking you"); + } + + public HuntingKavuFilter(final HuntingKavuFilter filter) { + super(filter); + } + + @Override + public HuntingKavuFilter copy() { + return new HuntingKavuFilter(this); + } + + @Override + public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { + return super.match(permanent, sourceId, playerId, game) + && permanent.isAttacking() // to prevent unneccessary combat checking if not attacking + && playerId.equals(game.getCombat().getDefenderId(permanent.getId())); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GlacialFortress.java b/Mage.Sets/src/mage/cards/g/GlacialFortress.java index 6e79a7e697..10cd5ec9de 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialFortress.java +++ b/Mage.Sets/src/mage/cards/g/GlacialFortress.java @@ -28,7 +28,6 @@ package mage.cards.g; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class GlacialFortress extends CardImpl { public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GlacialRay.java b/Mage.Sets/src/mage/cards/g/GlacialRay.java index 0084b8ea0e..52054e74b4 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialRay.java +++ b/Mage.Sets/src/mage/cards/g/GlacialRay.java @@ -27,14 +27,16 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -43,7 +45,7 @@ public class GlacialRay extends CardImpl { public GlacialRay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Glacial Ray deals 2 damage to target creature or player. diff --git a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java index ffb579e63b..176d08a772 100644 --- a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java +++ b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java @@ -27,15 +27,16 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.ConspireAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -47,7 +48,7 @@ public class GleefulSabotage extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Conspire this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE)); diff --git a/Mage.Sets/src/mage/cards/g/Glimmerpost.java b/Mage.Sets/src/mage/cards/g/Glimmerpost.java index ce5679e8ff..4fe3f4235f 100644 --- a/Mage.Sets/src/mage/cards/g/Glimmerpost.java +++ b/Mage.Sets/src/mage/cards/g/Glimmerpost.java @@ -28,7 +28,6 @@ package mage.cards.g; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author Loki @@ -51,7 +52,7 @@ public class Glimmerpost extends CardImpl { public Glimmerpost (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Locus"); + this.subtype.add(SubType.LOCUS); // When Glimmerpost enters the battlefield, you gain 1 life for each Locus on the battlefield. this.addAbility(new EntersBattlefieldTriggeredAbility(new GlimmerpostEffect())); diff --git a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java index afe5f0c883..38033ea0e9 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinsOfTheFlarg.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -35,11 +34,12 @@ import mage.abilities.keyword.MountainwalkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author fireshoes */ @@ -63,7 +63,7 @@ public class GoblinsOfTheFlarg extends CardImpl { // When you control a Dwarf, sacrifice Goblins of the Flarg. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - filter, ComparisonType.MORE_THAN, 0, + filter, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/g/GolgariGuildgate.java b/Mage.Sets/src/mage/cards/g/GolgariGuildgate.java index 6ba1e862ec..4702f6568f 100644 --- a/Mage.Sets/src/mage/cards/g/GolgariGuildgate.java +++ b/Mage.Sets/src/mage/cards/g/GolgariGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @author LevelX2 @@ -42,7 +44,7 @@ public class GolgariGuildgate extends CardImpl { public GolgariGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Golgari Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GoryosVengeance.java b/Mage.Sets/src/mage/cards/g/GoryosVengeance.java index 442321764a..8f962662d7 100644 --- a/Mage.Sets/src/mage/cards/g/GoryosVengeance.java +++ b/Mage.Sets/src/mage/cards/g/GoryosVengeance.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -50,6 +49,8 @@ import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -64,7 +65,7 @@ public class GoryosVengeance extends CardImpl { public GoryosVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target legendary creature card from your graveyard to the battlefield. That creature gains haste. Exile it at the beginning of the next end step. this.getSpellAbility().addEffect(new GoryosVengeanceEffect()); diff --git a/Mage.Sets/src/mage/cards/g/Greenseeker.java b/Mage.Sets/src/mage/cards/g/Greenseeker.java index 2153953fd2..b95ea6b023 100644 --- a/Mage.Sets/src/mage/cards/g/Greenseeker.java +++ b/Mage.Sets/src/mage/cards/g/Greenseeker.java @@ -27,7 +27,6 @@ */ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -57,7 +58,7 @@ public class Greenseeker extends CardImpl { // {G}, {tap}, Discard a card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); diff --git a/Mage.Sets/src/mage/cards/g/GrowthSpasm.java b/Mage.Sets/src/mage/cards/g/GrowthSpasm.java index 5d2bf8ff59..9dec125ecd 100644 --- a/Mage.Sets/src/mage/cards/g/GrowthSpasm.java +++ b/Mage.Sets/src/mage/cards/g/GrowthSpasm.java @@ -27,29 +27,28 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.permanent.token.EldraziSpawnToken; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North */ public class GrowthSpasm extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public GrowthSpasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); this.getSpellAbility().addEffect(new CreateTokenEffect(new EldraziSpawnToken())); } diff --git a/Mage.Sets/src/mage/cards/g/GruulGuildgate.java b/Mage.Sets/src/mage/cards/g/GruulGuildgate.java index 2faf13325c..71fecec224 100644 --- a/Mage.Sets/src/mage/cards/g/GruulGuildgate.java +++ b/Mage.Sets/src/mage/cards/g/GruulGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.g; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class GruulGuildgate extends CardImpl { public GruulGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Gruul Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java b/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java index a9f25def98..d62687d836 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicConvergence.java @@ -27,10 +27,6 @@ */ 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.effects.OneShotEffect; import mage.cards.CardImpl; @@ -40,12 +36,17 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + /** * * @author North @@ -88,7 +89,7 @@ class HarmonicConvergenceEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - List enchantments = game.getBattlefield().getActivePermanents(new FilterEnchantmentPermanent(), + List enchantments = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java index 66c25749c3..393353e2b2 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -40,11 +39,13 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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." 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( ability, Duration.WhileOnBattlefield, diff --git a/Mage.Sets/src/mage/cards/h/Harrow.java b/Mage.Sets/src/mage/cards/h/Harrow.java index e1acbc8cf5..84b94e7e8b 100644 --- a/Mage.Sets/src/mage/cards/h/Harrow.java +++ b/Mage.Sets/src/mage/cards/h/Harrow.java @@ -35,6 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetCardInLibrary; @@ -54,7 +55,7 @@ public class Harrow extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); // Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay)); } diff --git a/Mage.Sets/src/mage/cards/h/HarvestSeason.java b/Mage.Sets/src/mage/cards/h/HarvestSeason.java index aeaf10646f..696bc1b356 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestSeason.java +++ b/Mage.Sets/src/mage/cards/h/HarvestSeason.java @@ -38,6 +38,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -97,7 +98,7 @@ class HarvestSeasonEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - TargetCardInLibrary target = new TargetCardInLibrary(0, new PermanentsOnBattlefieldCount(filter).calculate(game, source, this), new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, new PermanentsOnBattlefieldCount(filter).calculate(game, source, this), StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null); } diff --git a/Mage.Sets/src/mage/cards/h/HarvestWurm.java b/Mage.Sets/src/mage/cards/h/HarvestWurm.java index ebf6a25460..feeb1087a6 100644 --- a/Mage.Sets/src/mage/cards/h/HarvestWurm.java +++ b/Mage.Sets/src/mage/cards/h/HarvestWurm.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandFromGraveyardCost; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author markedagain @@ -51,7 +52,7 @@ public class HarvestWurm extends CardImpl { this.toughness = new MageInt(2); // When Harvest Wurm enters the battlefield, sacrifice it unless you return a basic land card from your graveyard to your hand. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandFromGraveyardCost(new TargetCardInYourGraveyard(new FilterBasicLandCard()))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandFromGraveyardCost(new TargetCardInYourGraveyard(StaticFilters.FILTER_BASIC_LAND_CARD))))); } public HarvestWurm(final HarvestWurm card) { diff --git a/Mage.Sets/src/mage/cards/h/HauntingEchoes.java b/Mage.Sets/src/mage/cards/h/HauntingEchoes.java index 3514fecbda..6f0a21e7bb 100644 --- a/Mage.Sets/src/mage/cards/h/HauntingEchoes.java +++ b/Mage.Sets/src/mage/cards/h/HauntingEchoes.java @@ -27,8 +27,6 @@ */ package mage.cards.h; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -38,13 +36,16 @@ import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.Outcome; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; +import java.util.List; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -70,8 +71,6 @@ public class HauntingEchoes extends CardImpl { class HauntingEchoesEffect extends OneShotEffect { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public HauntingEchoesEffect() { super(Outcome.Detriment); staticText = "Exile all cards from target player's graveyard other than basic land cards. For each card exiled this way, search that player's library for all cards with the same name as that card and exile them. Then that player shuffles his or her library"; @@ -87,7 +86,7 @@ class HauntingEchoesEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(source.getFirstTarget()); if (targetPlayer != null) { for (Card card : targetPlayer.getGraveyard().getCards(game)) { - if (!filter.match(card, game)) { + if (!StaticFilters.FILTER_BASIC_LAND_CARD.match(card, game)) { card.moveToExile(null, "", source.getSourceId(), game); FilterCard filterCard = new FilterCard("cards named " + card.getName()); diff --git a/Mage.Sets/src/mage/cards/h/HeartOfKiran.java b/Mage.Sets/src/mage/cards/h/HeartOfKiran.java index 6adcd3b0a0..6ef4ab322a 100644 --- a/Mage.Sets/src/mage/cards/h/HeartOfKiran.java +++ b/Mage.Sets/src/mage/cards/h/HeartOfKiran.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -49,6 +48,8 @@ import mage.game.permanent.Permanent; import mage.target.Target; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * @author JRHerlehy */ @@ -58,7 +59,7 @@ public class HeartOfKiran extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/h/HermitDruid.java b/Mage.Sets/src/mage/cards/h/HermitDruid.java index bdb677cd1e..87cd74a24f 100644 --- a/Mage.Sets/src/mage/cards/h/HermitDruid.java +++ b/Mage.Sets/src/mage/cards/h/HermitDruid.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,7 +37,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -55,7 +56,7 @@ public class HermitDruid extends CardImpl { this.toughness = new MageInt(1); // {G}, {tap}: Reveal cards from the top of your library until you reveal a basic land card. Put that card into your hand and all other cards revealed this way into your graveyard. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(new FilterBasicLandCard(), Zone.HAND, Zone.GRAVEYARD), new ManaCostsImpl("{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(StaticFilters.FILTER_BASIC_LAND_CARD, Zone.HAND, Zone.GRAVEYARD), new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index 3b5f26966c..c06782ef74 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenAncients.java +++ b/Mage.Sets/src/mage/cards/h/HiddenAncients.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolk(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java index aebeda35af..3f22244325 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java index 1a94b6a9e0..dcf74336f2 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenSpider.java b/Mage.Sets/src/mage/cards/h/HiddenSpider.java index e0145007c5..e63dce9233 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenSpider.java +++ b/Mage.Sets/src/mage/cards/h/HiddenSpider.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -40,11 +39,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/h/HideSeek.java b/Mage.Sets/src/mage/cards/h/HideSeek.java index 5a7a79386e..6e7f88e0b2 100644 --- a/Mage.Sets/src/mage/cards/h/HideSeek.java +++ b/Mage.Sets/src/mage/cards/h/HideSeek.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.PutOnLibraryTargetEffect; @@ -38,13 +37,15 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SpellAbilityType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,7 +58,7 @@ public class HideSeek extends SplitCard { // Hide // Put target artifact or enchantment on the bottom of its owner's library. getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false)); - getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // 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.. diff --git a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java index d91a653ea9..ab412ebbad 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandHarbor.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class HinterlandHarbor extends CardImpl { public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java b/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java new file mode 100644 index 0000000000..ce04f521de --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HivisOfTheScale.java @@ -0,0 +1,100 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SkipUntapOptionalAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author jeffwadsworth + */ +public class HivisOfTheScale extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterPermanent filterDragon = new FilterPermanent(); + private static final String rule = "Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped."; + + static { + filter.add(new TappedPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + filterDragon.add(new SubtypePredicate(SubType.DRAGON)); + } + + public HivisOfTheScale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add("Viashino"); + this.subtype.add("Shaman"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // You may choose not to untap Hivis of the Scale during your untap step. + this.addAbility(new SkipUntapOptionalAbility()); + + // {tap}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped. + Condition condition = new SourceMatchesFilterCondition(filter); + Effect effect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom), condition, rule); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetPermanent(filterDragon)); + this.addAbility(ability); + + } + + public HivisOfTheScale(final HivisOfTheScale card) { + super(card); + } + + @Override + public HivisOfTheScale copy() { + return new HivisOfTheScale(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HondenOfCleansingFire.java b/Mage.Sets/src/mage/cards/h/HondenOfCleansingFire.java index 72353e7636..47a46958b5 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfCleansingFire.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfCleansingFire.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.GainLifeEffect; @@ -41,6 +40,8 @@ import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author Loki */ @@ -55,7 +56,7 @@ public class HondenOfCleansingFire extends CardImpl { public HondenOfCleansingFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shrine"); + this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, you gain 2 life for each Shrine you control. diff --git a/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java b/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java index 4c0ce5aa1c..6f80ac46bc 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; @@ -43,6 +42,8 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author Loki @@ -58,7 +59,7 @@ public class HondenOfInfiniteRage extends CardImpl { public HondenOfInfiniteRage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shrine"); + this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, Honden of Infinite Rage deals damage to target creature or player equal to the number of Shrines you control. diff --git a/Mage.Sets/src/mage/cards/h/HondenOfLifesWeb.java b/Mage.Sets/src/mage/cards/h/HondenOfLifesWeb.java index 326d70dc21..f063eb05ef 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfLifesWeb.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfLifesWeb.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.CreateTokenEffect; @@ -42,6 +41,8 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.SpiritToken; +import java.util.UUID; + /** * @author Loki */ @@ -56,7 +57,7 @@ public class HondenOfLifesWeb extends CardImpl { public HondenOfLifesWeb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shrine"); + this.subtype.add(SubType.SHRINE); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new SpiritToken(), new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/h/HondenOfNightsReach.java b/Mage.Sets/src/mage/cards/h/HondenOfNightsReach.java index e3c4cbffb4..aa614f163a 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfNightsReach.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfNightsReach.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; @@ -43,6 +42,8 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * @author Loki */ @@ -57,7 +58,7 @@ public class HondenOfNightsReach extends CardImpl { public HondenOfNightsReach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shrine"); + this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, target opponent discards a card for each Shrine you control. diff --git a/Mage.Sets/src/mage/cards/h/HondenOfSeeingWinds.java b/Mage.Sets/src/mage/cards/h/HondenOfSeeingWinds.java index d18f152ea3..36d0e07dde 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfSeeingWinds.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfSeeingWinds.java @@ -28,7 +28,6 @@ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -41,6 +40,8 @@ import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author Loki */ @@ -55,7 +56,7 @@ public class HondenOfSeeingWinds extends CardImpl { public HondenOfSeeingWinds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Shrine"); + this.subtype.add(SubType.SHRINE); // At the beginning of your upkeep, draw a card for each Shrine you control. diff --git a/Mage.Sets/src/mage/cards/h/HorizonSpellbomb.java b/Mage.Sets/src/mage/cards/h/HorizonSpellbomb.java index 9ea57c700c..641053abec 100644 --- a/Mage.Sets/src/mage/cards/h/HorizonSpellbomb.java +++ b/Mage.Sets/src/mage/cards/h/HorizonSpellbomb.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -40,23 +39,23 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North */ public class HorizonSpellbomb extends CardImpl { - private static FilterBasicLandCard filter = new FilterBasicLandCard(); - public HorizonSpellbomb(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); // {2}, {tap}, Sacrifice Horizon Spellbomb: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ManaCostsImpl("{2}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/h/HorobisWhisper.java b/Mage.Sets/src/mage/cards/h/HorobisWhisper.java index b190d7cf19..e1f03f0c3b 100644 --- a/Mage.Sets/src/mage/cards/h/HorobisWhisper.java +++ b/Mage.Sets/src/mage/cards/h/HorobisWhisper.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.ExileFromGraveCost; @@ -47,6 +46,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -63,7 +64,7 @@ public class HorobisWhisper extends CardImpl { public HorobisWhisper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); diff --git a/Mage.Sets/src/mage/cards/h/HundredTalonStrike.java b/Mage.Sets/src/mage/cards/h/HundredTalonStrike.java index c652a72acd..6848d7cf91 100644 --- a/Mage.Sets/src/mage/cards/h/HundredTalonStrike.java +++ b/Mage.Sets/src/mage/cards/h/HundredTalonStrike.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.effects.Effect; @@ -39,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -46,6 +46,8 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,7 +62,7 @@ public class HundredTalonStrike extends CardImpl { public HundredTalonStrike(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gets +1/+0 and gains first strike until end of turn. diff --git a/Mage.Sets/src/mage/cards/h/HuntingKavu.java b/Mage.Sets/src/mage/cards/h/HuntingKavu.java new file mode 100644 index 0000000000..441bc89658 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuntingKavu.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class HuntingKavu extends CardImpl { + + private static final HuntingKavuFilter filter = new HuntingKavuFilter(); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public HuntingKavu(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.subtype.add("Kavu"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {1}{R}{G}, {tap}: Exile Hunting Kavu and target creature without flying that's attacking you. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new ManaCostsImpl("{1}{R}{G}")); + ability.addCost(new TapSourceCost()); + ability.addEffect(new ExileTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public HuntingKavu(final HuntingKavu card) { + super(card); + } + + @Override + public HuntingKavu copy() { + return new HuntingKavu(this); + } +} + +class HuntingKavuFilter extends FilterAttackingCreature { + + public HuntingKavuFilter() { + super("creature without flying that's attacking you"); + } + + public HuntingKavuFilter(final HuntingKavuFilter filter) { + super(filter); + } + + @Override + public HuntingKavuFilter copy() { + return new HuntingKavuFilter(this); + } + + @Override + public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { + return super.match(permanent, sourceId, playerId, game) + && permanent.isAttacking() // to prevent unneccessary combat checking if not attacking + && playerId.equals(game.getCombat().getDefenderId(permanent.getId())); + } +} diff --git a/Mage.Sets/src/mage/cards/i/Iceberg.java b/Mage.Sets/src/mage/cards/i/Iceberg.java new file mode 100644 index 0000000000..fe3c10b6de --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/Iceberg.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.i; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author TheElk801 + */ +public class Iceberg extends CardImpl { + + public Iceberg(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{X}{U}{U}"); + + // Iceberg enters the battlefield with X ice counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.ICE.createInstance()))); + + // {3}: Put an ice counter on Iceberg. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.ICE.createInstance(1)), new ManaCostsImpl("{3}"))); + + // Remove an ice counter from Iceberg: Add {C} to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new RemoveCountersSourceCost(CounterType.ICE.createInstance(1)))); + } + + public Iceberg(final Iceberg card) { + super(card); + } + + @Override + public Iceberg copy() { + return new Iceberg(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IdeasUnbound.java b/Mage.Sets/src/mage/cards/i/IdeasUnbound.java index 17f3345928..ee9a850f7f 100644 --- a/Mage.Sets/src/mage/cards/i/IdeasUnbound.java +++ b/Mage.Sets/src/mage/cards/i/IdeasUnbound.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,6 +34,9 @@ import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -44,7 +46,7 @@ public class IdeasUnbound extends CardImpl { public IdeasUnbound(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Draw three cards. Discard three cards at the beginning of the next end step. diff --git a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java index 56ae9c86b9..4ba730da6e 100644 --- a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java +++ b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -50,7 +51,7 @@ public class IndrikStomphowler extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); 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); } diff --git a/Mage.Sets/src/mage/cards/i/InfectiousCurse.java b/Mage.Sets/src/mage/cards/i/InfectiousCurse.java index b2d663e27b..05c6e5d74e 100644 --- a/Mage.Sets/src/mage/cards/i/InfectiousCurse.java +++ b/Mage.Sets/src/mage/cards/i/InfectiousCurse.java @@ -40,11 +40,7 @@ import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -62,8 +58,7 @@ public class InfectiousCurse extends CardImpl { public InfectiousCurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},""); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); this.color.setBlack(true); this.nightCard = true; diff --git a/Mage.Sets/src/mage/cards/i/InfernoTrap.java b/Mage.Sets/src/mage/cards/i/InfernoTrap.java index 81df505473..cb03166b81 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTrap.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTrap.java @@ -27,11 +27,6 @@ */ package mage.cards.i; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.UUID; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.condition.Condition; @@ -41,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; @@ -48,6 +44,8 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.watchers.Watcher; +import java.util.*; + /** * @author jeffwadsworth */ @@ -55,7 +53,7 @@ public class InfernoTrap extends CardImpl { public InfernoTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If you've been dealt damage by two or more creatures this turn, you may pay {R} rather than pay Inferno Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{R}"), InfernoTrapCondition.instance), new InfernoTrapWatcher()); diff --git a/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java b/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java index 70d9dff185..b2c649e1a9 100644 --- a/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java +++ b/Mage.Sets/src/mage/cards/i/InnerCalmOuterStrength.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.effects.Effect; @@ -36,8 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +48,7 @@ public class InnerCalmOuterStrength extends CardImpl { public InnerCalmOuterStrength(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gets +X/+X until end of turn, where X is the number of cards in your hand. DynamicValue xValue= new CardsInControllerHandCount(); diff --git a/Mage.Sets/src/mage/cards/i/IntoTheFray.java b/Mage.Sets/src/mage/cards/i/IntoTheFray.java index 32a177f380..c4dc730acd 100644 --- a/Mage.Sets/src/mage/cards/i/IntoTheFray.java +++ b/Mage.Sets/src/mage/cards/i/IntoTheFray.java @@ -27,15 +27,17 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -44,7 +46,7 @@ public class IntoTheFray extends CardImpl { public IntoTheFray(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature attacks this turn if able. diff --git a/Mage.Sets/src/mage/cards/i/IreOfKaminari.java b/Mage.Sets/src/mage/cards/i/IreOfKaminari.java index 26eee8953a..655f06afbd 100644 --- a/Mage.Sets/src/mage/cards/i/IreOfKaminari.java +++ b/Mage.Sets/src/mage/cards/i/IreOfKaminari.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -38,6 +37,8 @@ import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author Loki @@ -52,7 +53,7 @@ public class IreOfKaminari extends CardImpl { public IreOfKaminari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Ire of Kaminari deals damage to target creature or player equal to the number of Arcane cards in your graveyard. this.getSpellAbility().addEffect(new DamageTargetEffect(new CardsInControllerGraveyardCount(filter))); diff --git a/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java b/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java index 68c6eab10b..1b3cd4fdd5 100644 --- a/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java +++ b/Mage.Sets/src/mage/cards/i/IrontreadCrusher.java @@ -27,12 +27,14 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.CrewAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class IrontreadCrusher extends CardImpl { public IrontreadCrusher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java index 0f3aaa3771..20a597b9f6 100644 --- a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java +++ b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java @@ -27,14 +27,15 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class IronwrightsCleansing extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } diff --git a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java index 325ecb4c9e..761a102a52 100644 --- a/Mage.Sets/src/mage/cards/i/IsolatedChapel.java +++ b/Mage.Sets/src/mage/cards/i/IsolatedChapel.java @@ -28,7 +28,6 @@ package mage.cards.i; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class IsolatedChapel extends CardImpl { public IsolatedChapel(UUID ownerId, CardSetInfo setInfo) { 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"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new WhiteManaAbility()); diff --git a/Mage.Sets/src/mage/cards/i/IthorianInitiate.java b/Mage.Sets/src/mage/cards/i/IthorianInitiate.java index 85a6b7193d..e2f964bd2e 100644 --- a/Mage.Sets/src/mage/cards/i/IthorianInitiate.java +++ b/Mage.Sets/src/mage/cards/i/IthorianInitiate.java @@ -27,7 +27,6 @@ */ package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,9 +35,11 @@ import mage.abilities.keyword.MeditateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Styxo @@ -53,7 +54,7 @@ public class IthorianInitiate extends CardImpl { this.toughness = new MageInt(1); // When Ithorian Initiate enters the battlefield, you may search your library for a basic land, reveal it, and put it into your hand. If you do shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); // Meditate {1}{G} this.addAbility(new MeditateAbility(new ManaCostsImpl("{1}{G}"))); diff --git a/Mage.Sets/src/mage/cards/i/IzzetGuildgate.java b/Mage.Sets/src/mage/cards/i/IzzetGuildgate.java index 9c811da171..02c75bca7e 100644 --- a/Mage.Sets/src/mage/cards/i/IzzetGuildgate.java +++ b/Mage.Sets/src/mage/cards/i/IzzetGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.i; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @author LevelX2 @@ -42,7 +44,7 @@ public class IzzetGuildgate extends CardImpl { public IzzetGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Izzet Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/j/JourneyOfDiscovery.java b/Mage.Sets/src/mage/cards/j/JourneyOfDiscovery.java index 878093e56c..cc59dbc579 100644 --- a/Mage.Sets/src/mage/cards/j/JourneyOfDiscovery.java +++ b/Mage.Sets/src/mage/cards/j/JourneyOfDiscovery.java @@ -27,7 +27,6 @@ */ package mage.cards.j; -import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -36,9 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -49,7 +50,7 @@ public class JourneyOfDiscovery extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); // Choose one - Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()))); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD))); // or you may play up to two additional lands this turn. Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/j/JourneyersKite.java b/Mage.Sets/src/mage/cards/j/JourneyersKite.java index fc940241ec..9da9498574 100644 --- a/Mage.Sets/src/mage/cards/j/JourneyersKite.java +++ b/Mage.Sets/src/mage/cards/j/JourneyersKite.java @@ -28,7 +28,6 @@ package mage.cards.j; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -38,23 +37,24 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki */ public class JourneyersKite extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); public JourneyersKite (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // {3}, {tap}: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/j/JoyousRespite.java b/Mage.Sets/src/mage/cards/j/JoyousRespite.java index 3cc12b5a30..579de04d24 100644 --- a/Mage.Sets/src/mage/cards/j/JoyousRespite.java +++ b/Mage.Sets/src/mage/cards/j/JoyousRespite.java @@ -28,15 +28,17 @@ package mage.cards.j; -import java.util.UUID; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; +import java.util.UUID; + /** * * @author Loki @@ -47,7 +49,7 @@ public class JoyousRespite extends CardImpl { public JoyousRespite (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You gain 1 life for each land you control. diff --git a/Mage.Sets/src/mage/cards/k/KatabaticWinds.java b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java new file mode 100644 index 0000000000..f61aeda5c3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KatabaticWinds.java @@ -0,0 +1,165 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.Optional; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.PhasingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author jeffwadsworth + */ +public class KatabaticWinds extends CardImpl { + + public KatabaticWinds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + // Phasing + this.addAbility(PhasingAbility.getInstance()); + + // Creatures with flying can't attack or block, and their activated abilities with {tap} in their costs can't be activated. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new KatabaticWindsRestrictionEffect()); + ability.addEffect(new KatabaticWindsRuleModifyingEffect()); + this.addAbility(ability); + + } + + public KatabaticWinds(final KatabaticWinds card) { + super(card); + } + + @Override + public KatabaticWinds copy() { + return new KatabaticWinds(this); + } +} + +class KatabaticWindsRestrictionEffect extends RestrictionEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public KatabaticWindsRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures with flying can't attack or block"; + } + + public KatabaticWindsRestrictionEffect(final KatabaticWindsRestrictionEffect effect) { + super(effect); + } + + @Override + public KatabaticWindsRestrictionEffect copy() { + return new KatabaticWindsRestrictionEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + } +} + +class KatabaticWindsRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { + + public KatabaticWindsRuleModifyingEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = ", and their activated abilities with {tap} in their costs can't be activated"; + } + + public KatabaticWindsRuleModifyingEffect(final KatabaticWindsRuleModifyingEffect effect) { + super(effect); + } + + @Override + public KatabaticWindsRuleModifyingEffect copy() { + return new KatabaticWindsRuleModifyingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + MageObject object = game.getObject(event.getSourceId()); + Optional ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability.isPresent() + && object != null + && object.isCreature() + && object.getAbilities().contains(FlyingAbility.getInstance()) + && game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId())) { + if (ability.get().getCosts().stream().anyMatch((cost) -> (cost instanceof TapSourceCost))) { + return true; + } + } + return false; + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + return "Creatures with flying can't use their activated abilities that use {tap} in their costs."; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KhalniHeartExpedition.java b/Mage.Sets/src/mage/cards/k/KhalniHeartExpedition.java index f85722d74b..304dc4661b 100644 --- a/Mage.Sets/src/mage/cards/k/KhalniHeartExpedition.java +++ b/Mage.Sets/src/mage/cards/k/KhalniHeartExpedition.java @@ -28,7 +28,6 @@ package mage.cards.k; -import java.util.UUID; import mage.abilities.common.LandfallAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; @@ -41,9 +40,11 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Viserion @@ -55,7 +56,7 @@ public class KhalniHeartExpedition extends CardImpl { this.addAbility(new LandfallAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true)); - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(3))); diff --git a/Mage.Sets/src/mage/cards/k/KindleTheCarnage.java b/Mage.Sets/src/mage/cards/k/KindleTheCarnage.java new file mode 100644 index 0000000000..463e641889 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KindleTheCarnage.java @@ -0,0 +1,102 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class KindleTheCarnage extends CardImpl { + + public KindleTheCarnage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + + // Discard a card at random. If you do, Kindle the Carnage deals damage equal to that card's converted mana cost to each creature. You may repeat this process any number of times. + this.getSpellAbility().addEffect(new KindleTheCarnageEffect()); + + } + + public KindleTheCarnage(final KindleTheCarnage card) { + super(card); + } + + @Override + public KindleTheCarnage copy() { + return new KindleTheCarnage(this); + } +} + +class KindleTheCarnageEffect extends OneShotEffect { + + public KindleTheCarnageEffect() { + super(Outcome.AIDontUseIt); + this.staticText = "Discard a card at random. If you do, {this} deals damage equal to that card's converted mana cost to each creature. You may repeat this process any number of times"; + } + + public KindleTheCarnageEffect(final KindleTheCarnageEffect effect) { + super(effect); + } + + @Override + public KindleTheCarnageEffect copy() { + return new KindleTheCarnageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Cards hand = controller.getHand(); + while (hand != null + && hand.size() > 0 + && controller.isInGame() + && controller.chooseUse(Outcome.AIDontUseIt, "Discard a card randomly from your hand?", source, game)) { + Card discardedCard = controller.discardOne(true, source, game); + if (discardedCard != null) { + new DamageAllEffect(discardedCard.getConvertedManaCost(), new FilterCreaturePermanent()).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/k/KiorasDismissal.java b/Mage.Sets/src/mage/cards/k/KiorasDismissal.java index 1fb3a82a0d..1a6b0ee38d 100644 --- a/Mage.Sets/src/mage/cards/k/KiorasDismissal.java +++ b/Mage.Sets/src/mage/cards/k/KiorasDismissal.java @@ -27,16 +27,17 @@ */ package mage.cards.k; -import java.util.UUID; import mage.abilities.abilityword.StriveAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. this.addAbility(new StriveAbility("{U}")); // 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.setText("Return any number of target enchantments to their owners' hands"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/k/KirtarsDesire.java b/Mage.Sets/src/mage/cards/k/KirtarsDesire.java new file mode 100644 index 0000000000..6e0055b507 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KirtarsDesire.java @@ -0,0 +1,87 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.UUID; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.combat.CantAttackAttachedEffect; +import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author TheElk801 + */ +public class KirtarsDesire extends CardImpl { + + public KirtarsDesire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature can't attack. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackAttachedEffect(AttachmentType.AURA))); + + // Threshold - Enchanted creature can't block as long as seven or more cards are in your graveyard. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new CantAttackBlockAttachedEffect(AttachmentType.AURA), new CardsInControllerGraveCondition(7), + "Enchanted creature can't block as long as seven or more cards are in your graveyard")); + ability.setAbilityWord(AbilityWord.THRESHOLD); + this.addAbility(ability); + + } + + public KirtarsDesire(final KirtarsDesire card) { + super(card); + } + + @Override + public KirtarsDesire copy() { + return new KirtarsDesire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KodamasReach.java b/Mage.Sets/src/mage/cards/k/KodamasReach.java index 3a5563c709..ae900512f9 100644 --- a/Mage.Sets/src/mage/cards/k/KodamasReach.java +++ b/Mage.Sets/src/mage/cards/k/KodamasReach.java @@ -27,25 +27,23 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +52,7 @@ public class KodamasReach extends CardImpl { public KodamasReach(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Search your library for up to two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new KodamasReachEffect()); @@ -95,7 +93,7 @@ class KodamasReachEffect extends OneShotEffect { if (controller == null || sourceObject == null) { return false; } - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java index d296685289..c137f0f7ef 100644 --- a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java +++ b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java @@ -27,7 +27,6 @@ */ package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; @@ -37,9 +36,11 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. 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.")); } diff --git a/Mage.Sets/src/mage/cards/k/KrosanGrip.java b/Mage.Sets/src/mage/cards/k/KrosanGrip.java index 308b44a08a..9d5c27f353 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanGrip.java +++ b/Mage.Sets/src/mage/cards/k/KrosanGrip.java @@ -27,15 +27,16 @@ */ package mage.cards.k; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jonubuu @@ -48,7 +49,7 @@ public class KrosanGrip extends CardImpl { // Split second this.addAbility(new SplitSecondAbility()); // 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()); } diff --git a/Mage.Sets/src/mage/cards/k/KrosanTusker.java b/Mage.Sets/src/mage/cards/k/KrosanTusker.java index fb73ab3701..ab6605f75b 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanTusker.java +++ b/Mage.Sets/src/mage/cards/k/KrosanTusker.java @@ -36,6 +36,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -57,7 +58,7 @@ public class KrosanTusker extends CardImpl { this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{G}"))); // When you cycle Krosan Tusker, you may search your library for a basic land card, reveal that card, put it into your hand, then shuffle your library. this.addAbility(new CycleTriggeredAbility( - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java index 62764079b8..cdb9b425e3 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,8 +36,9 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @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. Ability ability = new ConditionalTriggeredAbility( 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"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java index 597cad942e..5a572855b2 100644 --- a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java +++ b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,12 +36,13 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -67,7 +67,7 @@ public class LamplighterOfSelhoff extends CardImpl { TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1,1,true)); this.addAbility(new ConditionalTriggeredAbility( 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.")); } diff --git a/Mage.Sets/src/mage/cards/l/LandTax.java b/Mage.Sets/src/mage/cards/l/LandTax.java index 4b403f1dbc..f89e94e6b2 100644 --- a/Mage.Sets/src/mage/cards/l/LandTax.java +++ b/Mage.Sets/src/mage/cards/l/LandTax.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.OpponentControlsMoreCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -37,9 +36,10 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.filter.StaticFilters; -import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -51,7 +51,7 @@ public class LandTax extends CardImpl { // At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library. this.addAbility(new ConditionalTriggeredAbility( - new BeginningOfUpkeepTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, new FilterBasicLandCard()), true), TargetController.YOU, true), + new BeginningOfUpkeepTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_BASIC_LAND_CARD), true), TargetController.YOU, true), new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS), "At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library" )); diff --git a/Mage.Sets/src/mage/cards/l/LavaballTrap.java b/Mage.Sets/src/mage/cards/l/LavaballTrap.java index 1662f57eca..9b480e1572 100644 --- a/Mage.Sets/src/mage/cards/l/LavaballTrap.java +++ b/Mage.Sets/src/mage/cards/l/LavaballTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.l; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -38,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -45,6 +44,9 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetLandPermanent; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; +import java.util.List; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -53,7 +55,7 @@ public class LavaballTrap extends CardImpl { public LavaballTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{6}{R}{R}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent had two or more lands enter the battlefield under his or her control this turn, you may pay {3}{R}{R} rather than pay Lavaball Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{3}{R}{R}"), LavaballTrapCondition.instance), new PermanentsEnteredBattlefieldWatcher()); diff --git a/Mage.Sets/src/mage/cards/l/LayOfTheLand.java b/Mage.Sets/src/mage/cards/l/LayOfTheLand.java index c5a8cab327..deb608fa06 100644 --- a/Mage.Sets/src/mage/cards/l/LayOfTheLand.java +++ b/Mage.Sets/src/mage/cards/l/LayOfTheLand.java @@ -27,27 +27,27 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * @author Loki */ public class LayOfTheLand extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); public LayOfTheLand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}"); // Search your library for a basic land card, reveal that card, and put it into your hand. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, filter), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true)); } public LayOfTheLand(final LayOfTheLand card) { diff --git a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java index f4aab133d5..5edadb5827 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java +++ b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java @@ -28,7 +28,6 @@ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -57,7 +58,7 @@ public class LeoninRelicWarder extends CardImpl { this.toughness = new MageInt(2); 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); Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); diff --git a/Mage.Sets/src/mage/cards/l/LethargyTrap.java b/Mage.Sets/src/mage/cards/l/LethargyTrap.java index 3fa4519c18..6b927be011 100644 --- a/Mage.Sets/src/mage/cards/l/LethargyTrap.java +++ b/Mage.Sets/src/mage/cards/l/LethargyTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,10 +36,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.game.Game; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -55,7 +57,7 @@ public class LethargyTrap extends CardImpl { public LethargyTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If three or more creatures are attacking, you may pay {U} rather than pay Lethargy Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{U}"), LethargyTrapCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/l/LiftedByClouds.java b/Mage.Sets/src/mage/cards/l/LiftedByClouds.java index 02832ff006..cca5bc435f 100644 --- a/Mage.Sets/src/mage/cards/l/LiftedByClouds.java +++ b/Mage.Sets/src/mage/cards/l/LiftedByClouds.java @@ -27,7 +27,6 @@ */ package mage.cards.l; -import java.util.UUID; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.SpliceOntoArcaneAbility; @@ -35,8 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -45,7 +47,7 @@ public class LiftedByClouds extends CardImpl { public LiftedByClouds(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gains flying until end of turn. diff --git a/Mage.Sets/src/mage/cards/l/LoamLarva.java b/Mage.Sets/src/mage/cards/l/LoamLarva.java index 5fc1dc738f..a832a0352c 100644 --- a/Mage.Sets/src/mage/cards/l/LoamLarva.java +++ b/Mage.Sets/src/mage/cards/l/LoamLarva.java @@ -27,16 +27,17 @@ */ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutOnLibraryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +51,7 @@ public class LoamLarva extends CardImpl { this.toughness = new MageInt(3); // When Loam Larva enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), true)); } diff --git a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java index 88ea8e319c..0cd2ede443 100644 --- a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java +++ b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java @@ -48,7 +48,7 @@ import mage.target.TargetPermanent; public class MangaraOfCorondor extends CardImpl { 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); this.subtype.add("Human"); this.subtype.add("Wizard"); @@ -56,7 +56,7 @@ public class MangaraOfCorondor extends CardImpl { this.power = 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.addEffect(new ExileTargetEffect()); ability.addTarget(new TargetPermanent()); diff --git a/Mage.Sets/src/mage/cards/m/MapTheWastes.java b/Mage.Sets/src/mage/cards/m/MapTheWastes.java index 2d843bb6be..463fdb0b46 100644 --- a/Mage.Sets/src/mage/cards/m/MapTheWastes.java +++ b/Mage.Sets/src/mage/cards/m/MapTheWastes.java @@ -27,15 +27,16 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.effects.keyword.BolsterEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class MapTheWastes extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true)); // Bolster 1. diff --git a/Mage.Sets/src/mage/cards/m/MindbreakTrap.java b/Mage.Sets/src/mage/cards/m/MindbreakTrap.java index 754be9b87a..73421b6995 100644 --- a/Mage.Sets/src/mage/cards/m/MindbreakTrap.java +++ b/Mage.Sets/src/mage/cards/m/MindbreakTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -36,11 +35,14 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.game.Game; import mage.target.TargetSpell; import mage.watchers.common.CastSpellLastTurnWatcher; +import java.util.UUID; + /** * @author Rafbill */ @@ -50,7 +52,7 @@ public class MindbreakTrap extends CardImpl { public MindbreakTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent cast three or more spells this turn, you may pay {0} rather than pay Mindbreak Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new GenericManaCost(0), MindbreakTrapCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java index 105b62761a..6be422b211 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -40,12 +39,13 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -74,12 +74,12 @@ public class MinotaurTactician extends CardImpl { this.addAbility(HasteAbility.getInstance()); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite)); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectBlue)); } diff --git a/Mage.Sets/src/mage/cards/m/MobileGarrison.java b/Mage.Sets/src/mage/cards/m/MobileGarrison.java index b58ccf2482..d8f41d6fca 100644 --- a/Mage.Sets/src/mage/cards/m/MobileGarrison.java +++ b/Mage.Sets/src/mage/cards/m/MobileGarrison.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -36,12 +35,15 @@ import mage.abilities.keyword.CrewAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Styxo @@ -61,7 +63,7 @@ public class MobileGarrison extends CardImpl { public MobileGarrison(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java index b1366b71ee..2816ee6dbc 100644 --- a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java +++ b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; @@ -37,9 +36,11 @@ import mage.abilities.keyword.EmergeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @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. 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); } diff --git a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java index 9f2f8c3153..c04d95d41f 100644 --- a/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java +++ b/Mage.Sets/src/mage/cards/m/MudbrawlerCohort.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; @@ -40,13 +39,14 @@ import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * * @author North @@ -74,7 +74,7 @@ public class MudbrawlerCohort extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // 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); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/m/MultanisDecree.java b/Mage.Sets/src/mage/cards/m/MultanisDecree.java index a9dcab5fb6..aee4e041e5 100644 --- a/Mage.Sets/src/mage/cards/m/MultanisDecree.java +++ b/Mage.Sets/src/mage/cards/m/MultanisDecree.java @@ -27,18 +27,19 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author Backfir3 @@ -82,7 +83,7 @@ class MultanisDecreeDestroyEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); int enchantmentsDestoyed = 0; - for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(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)) { enchantmentsDestoyed++; } diff --git a/Mage.Sets/src/mage/cards/m/MurmursFromBeyond.java b/Mage.Sets/src/mage/cards/m/MurmursFromBeyond.java index ab6589da90..1b8f7f59e6 100644 --- a/Mage.Sets/src/mage/cards/m/MurmursFromBeyond.java +++ b/Mage.Sets/src/mage/cards/m/MurmursFromBeyond.java @@ -27,18 +27,13 @@ */ package mage.cards.m; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; @@ -47,6 +42,9 @@ import mage.target.Target; import mage.target.TargetCard; import mage.target.common.TargetOpponent; +import java.util.Set; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +53,7 @@ public class MurmursFromBeyond extends CardImpl { public MurmursFromBeyond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Reveal the top three cards of your library. An opponent chooses one of them. Put that card into your graveyard and the rest into your hand. this.getSpellAbility().addEffect(new MurmursFromBeyondEffect()); diff --git a/Mage.Sets/src/mage/cards/m/MycosynthWellspring.java b/Mage.Sets/src/mage/cards/m/MycosynthWellspring.java index ca5a096583..ea6f5545a5 100644 --- a/Mage.Sets/src/mage/cards/m/MycosynthWellspring.java +++ b/Mage.Sets/src/mage/cards/m/MycosynthWellspring.java @@ -27,31 +27,30 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author North */ public class MycosynthWellspring extends CardImpl { - private static FilterBasicLandCard filter = new FilterBasicLandCard(); - public MycosynthWellspring(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // When Mycosynth Wellspring enters the battlefield or is put into a graveyard from the battlefield, // you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), true)); - this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); + this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public MycosynthWellspring(final MycosynthWellspring card) { diff --git a/Mage.Sets/src/mage/cards/m/MyriadLandscape.java b/Mage.Sets/src/mage/cards/m/MyriadLandscape.java index 5f662048ac..84f26a0a74 100644 --- a/Mage.Sets/src/mage/cards/m/MyriadLandscape.java +++ b/Mage.Sets/src/mage/cards/m/MyriadLandscape.java @@ -27,8 +27,6 @@ */ package mage.cards.m; -import java.util.Iterator; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -46,19 +44,20 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.target.common.TargetCardInLibrary; import mage.util.SubTypeList; +import java.util.Iterator; +import java.util.UUID; + /** * * @author LevelX2 */ public class MyriadLandscape extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public MyriadLandscape(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); @@ -69,7 +68,7 @@ public class MyriadLandscape extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {2}, {tap}, Sacrifice Myriad Landscape: Search your library for up to two basic land cards that share a land type, put them onto the battlefield tapped, then shuffle your library. - Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrarySharingLandType(0, 2, filter), true); + Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrarySharingLandType(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), true); effect.setText("Search your library for up to two basic land cards that share a land type, put them onto the battlefield tapped, then shuffle your library"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2)); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/m/MysticMelting.java b/Mage.Sets/src/mage/cards/m/MysticMelting.java index 8b159d8c3b..3c4690c0cd 100644 --- a/Mage.Sets/src/mage/cards/m/MysticMelting.java +++ b/Mage.Sets/src/mage/cards/m/MysticMelting.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -49,7 +50,7 @@ public class MysticMelting extends CardImpl { // Destroy target artifact or enchantment. 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. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( diff --git a/Mage.Sets/src/mage/cards/m/MystifyingMaze.java b/Mage.Sets/src/mage/cards/m/MystifyingMaze.java index b6bd0b3ac4..0d2a42ccae 100644 --- a/Mage.Sets/src/mage/cards/m/MystifyingMaze.java +++ b/Mage.Sets/src/mage/cards/m/MystifyingMaze.java @@ -104,7 +104,7 @@ class MystifyingMazeEffect extends OneShotEffect { if (permanent != null && sourceObject != null) { if (permanent.moveToExile(source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game)) { //create delayed triggered ability - Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(); + Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(true); effect.setText("At the beginning of the next end step, return it to the battlefield tapped under its owner's control"); effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source); diff --git a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java index c072f3e01a..3c69a0d2db 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java +++ b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; @@ -37,9 +36,11 @@ import mage.abilities.keyword.MorphAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class NantukoVigilante extends CardImpl { this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}"))); // When Nantuko Vigilante is turned face up, destroy target artifact or enchantment. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NaturalBalance.java b/Mage.Sets/src/mage/cards/n/NaturalBalance.java index fbe0074819..5d487519bb 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalBalance.java +++ b/Mage.Sets/src/mage/cards/n/NaturalBalance.java @@ -27,9 +27,6 @@ */ package mage.cards.n; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -38,7 +35,7 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterLandPermanent; import mage.game.Game; @@ -48,6 +45,10 @@ import mage.players.PlayerList; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** * * @author Rene - bugisemail at gmail dot com @@ -116,7 +117,7 @@ public class NaturalBalance extends CardImpl { int amount = 5 - landCount; if (landCount < 5 && player.chooseUse(outcome, "Search your library for up to " + amount + " basic land cards and put them onto the battlefield?", source, game)) { // Select lands and put them onto battlefield - TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, amount, StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { player.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game); } diff --git a/Mage.Sets/src/mage/cards/n/NaturalConnection.java b/Mage.Sets/src/mage/cards/n/NaturalConnection.java index d2f07968a4..8ab4262067 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalConnection.java +++ b/Mage.Sets/src/mage/cards/n/NaturalConnection.java @@ -27,14 +27,15 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -45,7 +46,7 @@ public class NaturalConnection extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true)); } diff --git a/Mage.Sets/src/mage/cards/n/NaturalEnd.java b/Mage.Sets/src/mage/cards/n/NaturalEnd.java index f7ad7e2752..b243906ef7 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalEnd.java +++ b/Mage.Sets/src/mage/cards/n/NaturalEnd.java @@ -27,15 +27,16 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -48,7 +49,7 @@ public class NaturalEnd extends CardImpl { // Destroy target artifact or enchantment. You gain 3 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); 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) { diff --git a/Mage.Sets/src/mage/cards/n/Naturalize.java b/Mage.Sets/src/mage/cards/n/Naturalize.java index afcc179b6c..680a33ad02 100644 --- a/Mage.Sets/src/mage/cards/n/Naturalize.java +++ b/Mage.Sets/src/mage/cards/n/Naturalize.java @@ -27,14 +27,15 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LokiX @@ -45,7 +46,7 @@ public class Naturalize extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // 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()); } diff --git a/Mage.Sets/src/mage/cards/n/NaturesClaim.java b/Mage.Sets/src/mage/cards/n/NaturesClaim.java index 17c14e2472..4e93552176 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesClaim.java +++ b/Mage.Sets/src/mage/cards/n/NaturesClaim.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,12 +34,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -53,7 +54,7 @@ public class NaturesClaim extends CardImpl { // Destroy target artifact or enchantment. Its controller gains 4 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); 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) { diff --git a/Mage.Sets/src/mage/cards/n/NeedlebiteTrap.java b/Mage.Sets/src/mage/cards/n/NeedlebiteTrap.java index 6f4242676a..a192a0e5c7 100644 --- a/Mage.Sets/src/mage/cards/n/NeedlebiteTrap.java +++ b/Mage.Sets/src/mage/cards/n/NeedlebiteTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,10 +36,13 @@ import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.target.TargetPlayer; import mage.watchers.common.PlayerGainedLifeWatcher; +import java.util.UUID; + /** * @author LevelX2 */ @@ -48,7 +50,7 @@ public class NeedlebiteTrap extends CardImpl { public NeedlebiteTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{B}{B}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent gained life this turn, you may pay {B} rather than pay Needlebite Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{B}"), NeedlebiteTrapCondition.instance), new PlayerGainedLifeWatcher()); diff --git a/Mage.Sets/src/mage/cards/n/NemesisTrap.java b/Mage.Sets/src/mage/cards/n/NemesisTrap.java index 4e9c160181..af5f67aafd 100644 --- a/Mage.Sets/src/mage/cards/n/NemesisTrap.java +++ b/Mage.Sets/src/mage/cards/n/NemesisTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; @@ -41,10 +40,7 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AttackingPredicate; @@ -54,6 +50,8 @@ import mage.players.Player; import mage.target.common.TargetAttackingCreature; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -69,7 +67,7 @@ public class NemesisTrap extends CardImpl { public NemesisTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{B}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If a white creature is attacking, you may pay {B}{B} rather than pay Nemesis Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{B}{B}"), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0, false))); diff --git a/Mage.Sets/src/mage/cards/n/NewFrontiers.java b/Mage.Sets/src/mage/cards/n/NewFrontiers.java index d8f370b0d9..0f82486a84 100644 --- a/Mage.Sets/src/mage/cards/n/NewFrontiers.java +++ b/Mage.Sets/src/mage/cards/n/NewFrontiers.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -36,11 +35,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author spjspj @@ -89,7 +90,7 @@ class NewFrontiersEffect extends OneShotEffect { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, amount, StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { for (UUID cardId : target.getTargets()) { Card card = player.getLibrary().getCard(cardId, game); diff --git a/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java b/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java index 6e6d81e379..4e425d8d30 100644 --- a/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java +++ b/Mage.Sets/src/mage/cards/n/NissaWorldwaker.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; @@ -42,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPermanent; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -52,6 +51,8 @@ import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -112,7 +113,7 @@ class NissaWorldwakerSearchEffect extends OneShotEffect { if (controller == null) { return false; } - TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, Integer.MAX_VALUE, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { for (UUID cardId : target.getTargets()) { diff --git a/Mage.Sets/src/mage/cards/n/NissasExpedition.java b/Mage.Sets/src/mage/cards/n/NissasExpedition.java index ef4178bdd8..c37b21c72a 100644 --- a/Mage.Sets/src/mage/cards/n/NissasExpedition.java +++ b/Mage.Sets/src/mage/cards/n/NissasExpedition.java @@ -33,6 +33,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -49,7 +50,7 @@ public class NissasExpedition extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); // Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2,new FilterBasicLandCard()), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); } public NissasExpedition(final NissasExpedition card) { diff --git a/Mage.Sets/src/mage/cards/n/NissasRenewal.java b/Mage.Sets/src/mage/cards/n/NissasRenewal.java index 536b31c28a..1d03a039ae 100644 --- a/Mage.Sets/src/mage/cards/n/NissasRenewal.java +++ b/Mage.Sets/src/mage/cards/n/NissasRenewal.java @@ -27,15 +27,16 @@ */ package mage.cards.n; -import java.util.UUID; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +47,7 @@ public class NissasRenewal extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{G}"); // Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 3, new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_BASIC_LAND_CARD), true)); this.getSpellAbility().addEffect(new GainLifeEffect(7)); } diff --git a/Mage.Sets/src/mage/cards/n/NobleBenefactor.java b/Mage.Sets/src/mage/cards/n/NobleBenefactor.java new file mode 100644 index 0000000000..0892b9b3a4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NobleBenefactor.java @@ -0,0 +1,116 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.n; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public class NobleBenefactor extends CardImpl { + + public NobleBenefactor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Noble Benefactor dies, each player may search his or her library for a card and put that card into his or her hand. Then each player who searched his or her library this way shuffles it. + this.addAbility(new DiesTriggeredAbility(new NobleBenefactorEffect())); + } + + public NobleBenefactor(final NobleBenefactor card) { + super(card); + } + + @Override + public NobleBenefactor copy() { + return new NobleBenefactor(this); + } +} + +class NobleBenefactorEffect extends OneShotEffect { + + public NobleBenefactorEffect() { + super(Outcome.Benefit); + this.staticText = "each player may search his or her library for a card and put that card into his or her hand. Then each player who searched his or her library this way shuffles it"; + } + + public NobleBenefactorEffect(final NobleBenefactorEffect effect) { + super(effect); + } + + @Override + public NobleBenefactorEffect copy() { + return new NobleBenefactorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + TargetCardInLibrary target = new TargetCardInLibrary(); + if (player.chooseUse(Outcome.Benefit, "Search your library for a card to put into your hand?", source, game)) { + player.searchLibrary(target, game); + for (UUID cardId : target.getTargets()) { + Card card = player.getLibrary().getCard(cardId, game); + if (card != null) { + player.moveCards(card, Zone.HAND, source, game); + } + } + player.shuffleLibrary(source, game); + } + } + } + // prevent undo + controller.resetStoredBookmark(game); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/n/NourishingShoal.java b/Mage.Sets/src/mage/cards/n/NourishingShoal.java index bdee25ccf6..32c5d6b2d8 100644 --- a/Mage.Sets/src/mage/cards/n/NourishingShoal.java +++ b/Mage.Sets/src/mage/cards/n/NourishingShoal.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; @@ -36,12 +35,15 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterOwnedCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +52,7 @@ public class NourishingShoal extends CardImpl { public NourishingShoal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may exile a green card with converted mana cost X from your hand rather than pay Nourishing Shoal's mana cost. diff --git a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java index 21a069ac67..66ea79d1f5 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -40,11 +39,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.target.common.TargetCardInOpponentsGraveyard; import mage.target.targetpointer.SecondTargetPointer; +import java.util.UUID; + /** * * @author LevelX2 @@ -67,7 +68,7 @@ public class NullmageAdvocate extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); 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); } diff --git a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java index f206b5b602..4a6bf2d529 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java +++ b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -37,13 +36,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author Loki @@ -65,7 +66,7 @@ public class NullmageShepherd extends CardImpl { // 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.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OashraCultivator.java b/Mage.Sets/src/mage/cards/o/OashraCultivator.java index 886602ac54..b469afa785 100644 --- a/Mage.Sets/src/mage/cards/o/OashraCultivator.java +++ b/Mage.Sets/src/mage/cards/o/OashraCultivator.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -58,7 +60,7 @@ public class OashraCultivator extends CardImpl { // {2}{G}, {T}, Sacrifice Oashra Cultivator: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new ManaCostsImpl("{2}{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/o/OathOfLieges.java b/Mage.Sets/src/mage/cards/o/OathOfLieges.java index cc0e4dcbbe..0a075b444d 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfLieges.java +++ b/Mage.Sets/src/mage/cards/o/OathOfLieges.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.effects.Effect; @@ -39,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; import mage.filter.FilterPlayer; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.ObjectSourcePlayer; import mage.filter.predicate.ObjectSourcePlayerPredicate; @@ -49,6 +48,8 @@ import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author emerald000 @@ -118,7 +119,7 @@ class OathOfLiegesEffect extends OneShotEffect { Player activePlayer = game.getPlayer(game.getActivePlayerId()); if (activePlayer != null) { if (activePlayer.chooseUse(outcome, "Search your library for a basic land card, put that card onto the battlefield, then shuffle your library?", source, game)) { - Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(new FilterBasicLandCard()), false, true, Outcome.PutLandInPlay, true); + Effect effect = new SearchLibraryPutInPlayTargetPlayerEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), false, true, Outcome.PutLandInPlay, true); effect.setTargetPointer(new FixedTarget(game.getActivePlayerId())); return effect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/o/OathOfScholars.java b/Mage.Sets/src/mage/cards/o/OathOfScholars.java new file mode 100644 index 0000000000..9dce28ca2d --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OathOfScholars.java @@ -0,0 +1,153 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.o; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.FilterPlayer; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author jeffwadsworth + */ +public class OathOfScholars extends CardImpl { + + private final UUID originalId; + private static final FilterPlayer filter = new FilterPlayer(); + + static { + filter.add(new OathOfScholarsPredicate()); + } + + public OathOfScholars(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + + // At the beginning of each player's upkeep, that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfScholarsEffect(), TargetController.ANY, false); + ability.addTarget(new TargetPlayer(1, 1, false, filter)); + this.addAbility(ability); + originalId = ability.getOriginalId(); + + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + Player activePlayer = game.getPlayer(game.getActivePlayerId()); + if (activePlayer != null) { + ability.setControllerId(activePlayer.getId()); + ability.getTargets().clear(); + TargetPlayer target = new TargetPlayer(1, 1, false, filter); + ability.getTargets().add(target); + } + } + } + + public OathOfScholars(final OathOfScholars card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public OathOfScholars copy() { + return new OathOfScholars(this); + } +} + +class OathOfScholarsPredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Player targetPlayer = input.getObject(); + Player firstPlayer = game.getPlayer(game.getActivePlayerId()); + if (targetPlayer == null + || firstPlayer == null + || targetPlayer.getId().equals(firstPlayer.getId()) + || !game.getOpponents(targetPlayer.getId()).contains(firstPlayer.getId())) { + return false; + } + int countHandTargetPlayer = targetPlayer.getHand().size(); + int countHandFirstPlayer = firstPlayer.getHand().size(); + + return countHandTargetPlayer > countHandFirstPlayer; + } + + @Override + public String toString() { + return "player who has more cards in hand than he or she does"; + } +} + +class OathOfScholarsEffect extends OneShotEffect { + + public OathOfScholarsEffect() { + super(Outcome.PutCardInPlay); + staticText = "that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards"; + } + + public OathOfScholarsEffect(OathOfScholarsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = game.getObject(source.getSourceId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + Player firstPlayer = game.getPlayer(game.getActivePlayerId()); + if (sourceObject == null + || targetPlayer == null + || firstPlayer == null) { + return false; + } + if (firstPlayer.getHand().size() < targetPlayer.getHand().size() // the condition must be checked again on resolution + && firstPlayer.chooseUse(Outcome.AIDontUseIt, "Do you wish to discard your hand and draw 3 cards?", source, game)) { + firstPlayer.discard(firstPlayer.getHand().size(), true, source, game); + firstPlayer.drawCards(3, game); + return true; + } + return false; + } + + @Override + public OathOfScholarsEffect copy() { + return new OathOfScholarsEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OnduGiant.java b/Mage.Sets/src/mage/cards/o/OnduGiant.java index 9b718283ad..30b714e4ac 100644 --- a/Mage.Sets/src/mage/cards/o/OnduGiant.java +++ b/Mage.Sets/src/mage/cards/o/OnduGiant.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -43,7 +44,6 @@ import mage.target.common.TargetCardInLibrary; */ public class OnduGiant extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); public OnduGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); @@ -53,7 +53,7 @@ public class OnduGiant extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(4); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); } public OnduGiant(final OnduGiant card) { diff --git a/Mage.Sets/src/mage/cards/o/OneWithNature.java b/Mage.Sets/src/mage/cards/o/OneWithNature.java index 79f6c21e07..97b8c45cba 100644 --- a/Mage.Sets/src/mage/cards/o/OneWithNature.java +++ b/Mage.Sets/src/mage/cards/o/OneWithNature.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; import mage.abilities.effects.common.AttachEffect; @@ -38,11 +37,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,7 +63,7 @@ public class OneWithNature extends CardImpl { // Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. ability = new DealsDamageToAPlayerAttachedTriggeredAbility( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, Outcome.PutLandInPlay), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay), "enchanted creature", true, false, true, TargetController.ANY); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OozeGarden.java b/Mage.Sets/src/mage/cards/o/OozeGarden.java index 6f22e12559..6968753340 100644 --- a/Mage.Sets/src/mage/cards/o/OozeGarden.java +++ b/Mage.Sets/src/mage/cards/o/OozeGarden.java @@ -32,6 +32,7 @@ import mage.ObjectColor; import mage.abilities.AbilitiesImpl; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; @@ -65,7 +66,7 @@ public class OozeGarden extends CardImpl { // {1}{G}, Sacrifice a non-Ooze creature: Create an X/X green Ooze creature token, where X is the sacrificed creature's power. Activate this ability only any time you could cast a sorcery. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OozeGardenCreateTokenEffect(), new ManaCostsImpl("{1}{G}")); + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new OozeGardenCreateTokenEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OpalArchangel.java b/Mage.Sets/src/mage/cards/o/OpalArchangel.java index b70c7d2b69..5502b6d3b0 100644 --- a/Mage.Sets/src/mage/cards/o/OpalArchangel.java +++ b/Mage.Sets/src/mage/cards/o/OpalArchangel.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -40,10 +39,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java index 05f5f9aae4..f8737bb273 100644 --- a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java +++ b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -38,10 +37,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldier(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalChampion.java b/Mage.Sets/src/mage/cards/o/OpalChampion.java index bb4cf98509..53b02a2212 100644 --- a/Mage.Sets/src/mage/cards/o/OpalChampion.java +++ b/Mage.Sets/src/mage/cards/o/OpalChampion.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java index 5f17535d90..fa0d7167f6 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java +++ b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGuardian.java b/Mage.Sets/src/mage/cards/o/OpalGuardian.java index c8da3a9283..7378045708 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGuardian.java +++ b/Mage.Sets/src/mage/cards/o/OpalGuardian.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.TriggeredAbility; @@ -41,10 +40,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; -import mage.filter.common.FilterEnchantmentPermanent; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * * @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. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, 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.")); } diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java b/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java index 905888a118..e77dc4958b 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfNylea.java @@ -44,6 +44,7 @@ import mage.constants.AttachmentType; import mage.constants.CardType; import mage.constants.Outcome; import mage.counters.CounterType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.TargetPermanent; import mage.target.common.TargetCardInLibrary; @@ -74,7 +75,7 @@ public class OrdealOfNylea extends CardImpl { this.addAbility(ability); // When you sacrifice Ordeal of Nylea, search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. ability = new SacrificeSourceTriggeredAbility( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, new FilterBasicLandCard()),true, true),false); + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, StaticFilters.FILTER_BASIC_LAND_CARD),true, true),false); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrimsThunder.java b/Mage.Sets/src/mage/cards/o/OrimsThunder.java index cb3e953781..fce6af284b 100644 --- a/Mage.Sets/src/mage/cards/o/OrimsThunder.java +++ b/Mage.Sets/src/mage/cards/o/OrimsThunder.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -40,12 +39,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @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. 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( new OrimsThunderEffect2(), KickedCondition.instance, diff --git a/Mage.Sets/src/mage/cards/o/OrzhovGuildgate.java b/Mage.Sets/src/mage/cards/o/OrzhovGuildgate.java index 4297368568..c1d5c1f5e9 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovGuildgate.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class OrzhovGuildgate extends CardImpl { public OrzhovGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Orzhov Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java b/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java index ba4fa006e8..cdaae482f9 100644 --- a/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java +++ b/Mage.Sets/src/mage/cards/o/OvalchaseDragster.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.CrewAbility; import mage.abilities.keyword.HasteAbility; @@ -35,6 +34,9 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -44,7 +46,7 @@ public class OvalchaseDragster extends CardImpl { public OvalchaseDragster(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(6); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/o/Overblaze.java b/Mage.Sets/src/mage/cards/o/Overblaze.java index 056099b752..c1092570c8 100644 --- a/Mage.Sets/src/mage/cards/o/Overblaze.java +++ b/Mage.Sets/src/mage/cards/o/Overblaze.java @@ -27,7 +27,6 @@ */ package mage.cards.o; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.keyword.SpliceOntoArcaneAbility; @@ -36,10 +35,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +50,7 @@ public class Overblaze extends CardImpl { public Overblaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Each time target permanent would deal damage to a creature or player this turn, it deals double that damage to that creature or player instead. diff --git a/Mage.Sets/src/mage/cards/o/OverwhelmingSplendor.java b/Mage.Sets/src/mage/cards/o/OverwhelmingSplendor.java index 833fbed676..218a32feca 100644 --- a/Mage.Sets/src/mage/cards/o/OverwhelmingSplendor.java +++ b/Mage.Sets/src/mage/cards/o/OverwhelmingSplendor.java @@ -27,8 +27,6 @@ */ package mage.cards.o; -import java.util.Optional; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; @@ -40,14 +38,7 @@ import mage.abilities.keyword.EnchantAbility; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Layer; -import static mage.constants.Layer.AbilityAddingRemovingEffects_6; -import static mage.constants.Layer.PTChangingEffects_7; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; @@ -55,6 +46,9 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPlayer; +import java.util.Optional; +import java.util.UUID; + /** * * @author LevelX2 @@ -64,8 +58,7 @@ public class OverwhelmingSplendor extends CardImpl { public OverwhelmingSplendor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{W}{W}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/p/PackHunt.java b/Mage.Sets/src/mage/cards/p/PackHunt.java new file mode 100644 index 0000000000..5425daadfb --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PackHunt.java @@ -0,0 +1,93 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public class PackHunt extends CardImpl { + + public PackHunt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); + + // Search your library for up to three cards with the same name as target creature, reveal them, and put them into your hand. Then shuffle your library. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new PackHuntEffect()); + } + + public PackHunt(final PackHunt card) { + super(card); + } + + @Override + public PackHunt copy() { + return new PackHunt(this); + } +} +class PackHuntEffect extends OneShotEffect { + + public PackHuntEffect() { + super(Outcome.Benefit); + this.staticText = "Search your library for up to three cards with the same name as target creature, reveal them, and put them into your hand. Then shuffle your library"; + } + + public PackHuntEffect(final PackHuntEffect effect) { + super(effect); + } + + @Override + public PackHuntEffect copy() { + return new PackHuntEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + FilterCard filter = new FilterPermanentCard(); + filter.add(new NamePredicate(permanent.getName())); + return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0,3, filter), true).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/p/Paraselene.java b/Mage.Sets/src/mage/cards/p/Paraselene.java index d78a756c44..e06f47bc91 100644 --- a/Mage.Sets/src/mage/cards/p/Paraselene.java +++ b/Mage.Sets/src/mage/cards/p/Paraselene.java @@ -27,18 +27,19 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * @author nantuko */ @@ -76,7 +77,7 @@ class ParaseleneEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { 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)) { count++; } diff --git a/Mage.Sets/src/mage/cards/p/PathToExile.java b/Mage.Sets/src/mage/cards/p/PathToExile.java index d3ec5b4565..dea0fdf431 100644 --- a/Mage.Sets/src/mage/cards/p/PathToExile.java +++ b/Mage.Sets/src/mage/cards/p/PathToExile.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -36,13 +35,15 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -93,7 +94,7 @@ class PathToExileEffect extends OneShotEffect { // if the zone change to exile gets replaced does not prevent the target controller to be able to search controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); if (player.chooseUse(Outcome.PutCardInPlay, "Search your library for a basic land card?", source, game)) { - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { Card card = player.getLibrary().getCard(target.getFirstTarget(), game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java index f5220339ed..7cd76978f5 100644 --- a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java +++ b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.condition.Condition; @@ -38,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.WatcherScope; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +45,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; import mage.watchers.Watcher; +import java.util.UUID; + /** * * @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. this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher()); // Destroy all enchantments. - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent())); + this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); } public PatriciansScorn(final PatriciansScorn card) { diff --git a/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java b/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java index a5b1dc565d..36a1f25e24 100644 --- a/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java +++ b/Mage.Sets/src/mage/cards/p/PeaceAndQuiet.java @@ -27,14 +27,15 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -47,7 +48,7 @@ public class PeaceAndQuiet extends CardImpl { // Destroy two target enchantments. 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) { diff --git a/Mage.Sets/src/mage/cards/p/PeacewalkerColossus.java b/Mage.Sets/src/mage/cards/p/PeacewalkerColossus.java index 76a6fcb812..2026de28a9 100644 --- a/Mage.Sets/src/mage/cards/p/PeacewalkerColossus.java +++ b/Mage.Sets/src/mage/cards/p/PeacewalkerColossus.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -46,6 +45,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * @author JRHerlehy */ @@ -61,7 +62,7 @@ public class PeacewalkerColossus extends CardImpl { public PeacewalkerColossus(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java b/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java index 7d787805f7..a928f47da2 100644 --- a/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java +++ b/Mage.Sets/src/mage/cards/p/PeerThroughDepths.java @@ -28,16 +28,18 @@ package mage.cards.p; -import java.util.UUID; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author LevelX @@ -54,7 +56,7 @@ public class PeerThroughDepths extends CardImpl { public PeerThroughDepths (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Look at the top five cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. diff --git a/Mage.Sets/src/mage/cards/p/Peppersmoke.java b/Mage.Sets/src/mage/cards/p/Peppersmoke.java index 1069fd53d8..6af9510448 100644 --- a/Mage.Sets/src/mage/cards/p/Peppersmoke.java +++ b/Mage.Sets/src/mage/cards/p/Peppersmoke.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,13 +34,14 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,7 +62,7 @@ public class Peppersmoke extends CardImpl { this.getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); 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")); } diff --git a/Mage.Sets/src/mage/cards/p/Peregrination.java b/Mage.Sets/src/mage/cards/p/Peregrination.java index 207b133d07..a11a67e2e0 100644 --- a/Mage.Sets/src/mage/cards/p/Peregrination.java +++ b/Mage.Sets/src/mage/cards/p/Peregrination.java @@ -27,27 +27,24 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.keyword.ScryEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -99,7 +96,7 @@ class PeregrinationEffect extends OneShotEffect { if (controller == null || sourceObject == null) { return false; } - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/p/PermafrostTrap.java b/Mage.Sets/src/mage/cards/p/PermafrostTrap.java index 9a84a65886..f5f22e90d3 100644 --- a/Mage.Sets/src/mage/cards/p/PermafrostTrap.java +++ b/Mage.Sets/src/mage/cards/p/PermafrostTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.p; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,12 +35,16 @@ import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEf import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; +import java.util.List; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -51,7 +53,7 @@ public class PermafrostTrap extends CardImpl { public PermafrostTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent had a green creature enter the battlefield under his or her control this turn, you may pay {U} rather than pay Permafrost Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{U}"), PermafrostTrapCondition.instance), new PermanentsEnteredBattlefieldWatcher()); diff --git a/Mage.Sets/src/mage/cards/p/PetalsOfInsight.java b/Mage.Sets/src/mage/cards/p/PetalsOfInsight.java index f195fecabb..f256922de2 100644 --- a/Mage.Sets/src/mage/cards/p/PetalsOfInsight.java +++ b/Mage.Sets/src/mage/cards/p/PetalsOfInsight.java @@ -27,21 +27,19 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -50,7 +48,7 @@ public class PetalsOfInsight extends CardImpl { public PetalsOfInsight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Look at the top three cards of your library. You may put those cards on the bottom of your library in any order. If you do, return Petals of Insight to its owner's hand. Otherwise, draw three cards. this.getSpellAbility().addEffect(new PetalsOfInsightEffect()); diff --git a/Mage.Sets/src/mage/cards/p/PilgrimsEye.java b/Mage.Sets/src/mage/cards/p/PilgrimsEye.java index 9c899b6b9c..354cb2c7e1 100644 --- a/Mage.Sets/src/mage/cards/p/PilgrimsEye.java +++ b/Mage.Sets/src/mage/cards/p/PilgrimsEye.java @@ -28,7 +28,6 @@ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; @@ -38,11 +37,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -64,7 +65,7 @@ public class PilgrimsEye extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Pilgrim's Eye enters the battlefield, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public PilgrimsEye (final PilgrimsEye card) { diff --git a/Mage.Sets/src/mage/cards/p/PipersMelody.java b/Mage.Sets/src/mage/cards/p/PipersMelody.java new file mode 100644 index 0000000000..89ead3a4cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PipersMelody.java @@ -0,0 +1,95 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author TheElk801 + */ +public class PipersMelody extends CardImpl { + + public PipersMelody(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + + // Shuffle any number of target creature cards from your graveyard into your library. + this.getSpellAbility().addEffect(new PipersMelodyShuffleEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + } + + public PipersMelody(final PipersMelody card) { + super(card); + } + + @Override + public PipersMelody copy() { + return new PipersMelody(this); + } +} +class PipersMelodyShuffleEffect extends OneShotEffect { + + PipersMelodyShuffleEffect() { + super(Outcome.Neutral); + this.staticText = "Shuffle any number of target cards from your graveyard into your library"; + } + + PipersMelodyShuffleEffect(final PipersMelodyShuffleEffect effect) { + super(effect); + } + + @Override + public PipersMelodyShuffleEffect copy() { + return new PipersMelodyShuffleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.moveCards(new CardsImpl(this.getTargetPointer().getTargets(game, source)), Zone.LIBRARY, source, game); + controller.shuffleLibrary(source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PitfallTrap.java b/Mage.Sets/src/mage/cards/p/PitfallTrap.java index e5942a0d41..854ab10f99 100644 --- a/Mage.Sets/src/mage/cards/p/PitfallTrap.java +++ b/Mage.Sets/src/mage/cards/p/PitfallTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,12 +36,15 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.Game; import mage.target.common.TargetAttackingCreature; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -57,7 +59,7 @@ public class PitfallTrap extends CardImpl { public PitfallTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If exactly one creature is attacking, you may pay {W} rather than pay Pitfall Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{W}"), PitfallTrapCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/p/PlanarBirth.java b/Mage.Sets/src/mage/cards/p/PlanarBirth.java index ef095d2f91..cefcddc2b5 100644 --- a/Mage.Sets/src/mage/cards/p/PlanarBirth.java +++ b/Mage.Sets/src/mage/cards/p/PlanarBirth.java @@ -37,6 +37,7 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.game.Game; import mage.players.Player; @@ -88,7 +89,7 @@ class PlanarBirthEffect extends OneShotEffect { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - toBattlefield.addAll(player.getGraveyard().getCards(new FilterBasicLandCard(), source.getSourceId(), controller.getId(), game)); + toBattlefield.addAll(player.getGraveyard().getCards(StaticFilters.FILTER_BASIC_LAND_CARD, source.getSourceId(), controller.getId(), game)); } } controller.moveCards(toBattlefield.getCards(game), Zone.BATTLEFIELD, source, game, true, false, true, null); diff --git a/Mage.Sets/src/mage/cards/p/PrimalDruid.java b/Mage.Sets/src/mage/cards/p/PrimalDruid.java index 3cc3d8cb93..93d22631d4 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalDruid.java +++ b/Mage.Sets/src/mage/cards/p/PrimalDruid.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.Effect; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class PrimalDruid extends CardImpl { this.toughness = new MageInt(3); // When Primal Druid dies, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true); + Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true); effect.setText("you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library"); this.addAbility(new DiesTriggeredAbility(effect, true)); diff --git a/Mage.Sets/src/mage/cards/p/PrimalGrowth.java b/Mage.Sets/src/mage/cards/p/PrimalGrowth.java index ecf2e7f2ab..4d2393857a 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalGrowth.java +++ b/Mage.Sets/src/mage/cards/p/PrimalGrowth.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.condition.common.KickedCondition; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -36,10 +35,12 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -54,8 +55,8 @@ public class PrimalGrowth extends CardImpl { // Search your library for a basic land card, put that card onto the battlefield, then shuffle your library. If Primal Growth was kicked, instead search your library for up to two basic land cards, put them onto the battlefield, then shuffle your library. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), false, true), - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), false, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), false, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), false, true), KickedCondition.instance, "Search your library for a basic land card, put that card onto the battlefield, then shuffle your library. If Primal Growth was kicked, instead search your library for up to two basic land cards, put them onto the battlefield, then shuffle your library")); } diff --git a/Mage.Sets/src/mage/cards/p/PsychicPuppetry.java b/Mage.Sets/src/mage/cards/p/PsychicPuppetry.java index 0085af6dec..fa1634f1fa 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicPuppetry.java +++ b/Mage.Sets/src/mage/cards/p/PsychicPuppetry.java @@ -27,14 +27,16 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -43,7 +45,7 @@ public class PsychicPuppetry extends CardImpl { public PsychicPuppetry(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may tap or untap target permanent. diff --git a/Mage.Sets/src/mage/cards/p/PullUnder.java b/Mage.Sets/src/mage/cards/p/PullUnder.java index e17396694e..4e9c296032 100644 --- a/Mage.Sets/src/mage/cards/p/PullUnder.java +++ b/Mage.Sets/src/mage/cards/p/PullUnder.java @@ -28,14 +28,16 @@ package mage.cards.p; -import java.util.UUID; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Loki @@ -44,7 +46,7 @@ public class PullUnder extends CardImpl { public PullUnder (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new BoostTargetEffect(-5, -5, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/p/PureIntentions.java b/Mage.Sets/src/mage/cards/p/PureIntentions.java index 6b934bc55c..1fd975a8bc 100644 --- a/Mage.Sets/src/mage/cards/p/PureIntentions.java +++ b/Mage.Sets/src/mage/cards/p/PureIntentions.java @@ -27,7 +27,6 @@ */ package mage.cards.p; -import java.util.UUID; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -40,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,6 +47,8 @@ import mage.game.events.GameEvent.EventType; import mage.game.stack.StackObject; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +57,7 @@ public class PureIntentions extends CardImpl { public PureIntentions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Whenever a spell or ability an opponent controls causes you to discard cards this turn, return those cards from your graveyard to your hand. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new PureIntentionsAllTriggeredAbility())); diff --git a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java index 75cd47cc87..173e05f26a 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java +++ b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,10 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author North @@ -62,7 +63,7 @@ public class QasaliPridemage extends CardImpl { // {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeSourceCost()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java index 95994a64ba..5b80f8a0a0 100644 --- a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java +++ b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java @@ -27,7 +27,6 @@ */ package mage.cards.q; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -40,9 +39,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -55,7 +56,7 @@ public class QuietDisrepair extends CardImpl { // 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().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); diff --git a/Mage.Sets/src/mage/cards/q/QuietPurity.java b/Mage.Sets/src/mage/cards/q/QuietPurity.java index b8e0472812..a5ae140add 100644 --- a/Mage.Sets/src/mage/cards/q/QuietPurity.java +++ b/Mage.Sets/src/mage/cards/q/QuietPurity.java @@ -28,13 +28,15 @@ package mage.cards.q; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetEnchantmentPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -42,7 +44,7 @@ public class QuietPurity extends CardImpl { public QuietPurity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addTarget(new TargetEnchantmentPermanent()); this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java index 93566639e9..d40ec25a92 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java +++ b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java @@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -51,7 +52,7 @@ public class QuirionTrailblazer extends CardImpl { this.toughness = new MageInt(2); // When Quirion Trailblazer enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true))); } public QuirionTrailblazer(final QuirionTrailblazer card) { diff --git a/Mage.Sets/src/mage/cards/r/RakdosGuildgate.java b/Mage.Sets/src/mage/cards/r/RakdosGuildgate.java index 6d1aee381f..ce7af88541 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosGuildgate.java +++ b/Mage.Sets/src/mage/cards/r/RakdosGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @author LevelX2 @@ -42,7 +44,7 @@ public class RakdosGuildgate extends CardImpl { public RakdosGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Rakdos Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RampantGrowth.java b/Mage.Sets/src/mage/cards/r/RampantGrowth.java index 715566adf6..820cc70aa0 100644 --- a/Mage.Sets/src/mage/cards/r/RampantGrowth.java +++ b/Mage.Sets/src/mage/cards/r/RampantGrowth.java @@ -28,14 +28,15 @@ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LokiX @@ -46,7 +47,7 @@ public class RampantGrowth extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); } public RampantGrowth(final RampantGrowth card) { diff --git a/Mage.Sets/src/mage/cards/r/Ramroller.java b/Mage.Sets/src/mage/cards/r/Ramroller.java index b232d5445d..fbd556af00 100644 --- a/Mage.Sets/src/mage/cards/r/Ramroller.java +++ b/Mage.Sets/src/mage/cards/r/Ramroller.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksEachTurnStaticAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,12 +37,13 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** * @author LoneFox */ @@ -64,7 +64,7 @@ public class Ramroller extends CardImpl { // Ramroller attacks each turn if able. this.addAbility(new AttacksEachTurnStaticAbility()); // 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, Duration.WhileOnBattlefield), condition, "{this} gets +2/+0 as long as you control another artifact."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/r/RavenousTrap.java b/Mage.Sets/src/mage/cards/r/RavenousTrap.java index 19c17083fc..1b0d5bb48a 100644 --- a/Mage.Sets/src/mage/cards/r/RavenousTrap.java +++ b/Mage.Sets/src/mage/cards/r/RavenousTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -36,10 +35,13 @@ import mage.abilities.effects.common.ExileGraveyardAllTargetPlayerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.target.TargetPlayer; import mage.watchers.common.CardsPutIntoGraveyardWatcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +50,7 @@ public class RavenousTrap extends CardImpl { public RavenousTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}{B}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent had three or more cards put into his or her graveyard from anywhere this turn, you may pay {0} rather than pay Ravenous Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{0}"), RavenousTrapCondition.instance), new CardsPutIntoGraveyardWatcher()); diff --git a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java index 476a4335b7..f673841dd3 100644 --- a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java +++ b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlashbackAbility; @@ -35,9 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author cbt33 @@ -49,7 +50,7 @@ public class RayOfDistortion extends CardImpl { // Destroy target artifact or enchantment. 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} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT)); } diff --git a/Mage.Sets/src/mage/cards/r/ReachThroughMists.java b/Mage.Sets/src/mage/cards/r/ReachThroughMists.java index 0461d3ca09..750eaa485a 100644 --- a/Mage.Sets/src/mage/cards/r/ReachThroughMists.java +++ b/Mage.Sets/src/mage/cards/r/ReachThroughMists.java @@ -28,11 +28,13 @@ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -42,7 +44,7 @@ public class ReachThroughMists extends CardImpl { public ReachThroughMists (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/r/Reclamation.java b/Mage.Sets/src/mage/cards/r/Reclamation.java new file mode 100644 index 0000000000..8e64a2fcd8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Reclamation.java @@ -0,0 +1,98 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl; +import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author jeffwadsworth + */ +public class Reclamation extends CardImpl { + + public Reclamation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}"); + + + // Black creatures can't attack unless their controller sacrifices a land for each black creature he or she controls that's attacking. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ReclamationCostToAttackBlockEffect())); + + } + + public Reclamation(final Reclamation card) { + super(card); + } + + @Override + public Reclamation copy() { + return new Reclamation(this); + } +} + +class ReclamationCostToAttackBlockEffect extends PayCostToAttackBlockEffectImpl { + + ReclamationCostToAttackBlockEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, + new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); + staticText = "Black creatures can't attack unless their controller sacrifices a land (This cost is paid as attackers are declared.)"; + } + + ReclamationCostToAttackBlockEffect(ReclamationCostToAttackBlockEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getPermanent(event.getSourceId()); + return (permanent != null + && permanent.isCreature() + && permanent.getColor(game).isBlack()); + } + + @Override + public ReclamationCostToAttackBlockEffect copy() { + return new ReclamationCostToAttackBlockEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/r/ReclamationSage.java b/Mage.Sets/src/mage/cards/r/ReclamationSage.java index 966d5ddde7..8b90d6cc31 100644 --- a/Mage.Sets/src/mage/cards/r/ReclamationSage.java +++ b/Mage.Sets/src/mage/cards/r/ReclamationSage.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,7 @@ public class ReclamationSage extends CardImpl { // When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java index 1d2e37fc41..8fb1942318 100644 --- a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java +++ b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java @@ -27,12 +27,13 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; 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}"); // 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) { diff --git a/Mage.Sets/src/mage/cards/r/RefractionTrap.java b/Mage.Sets/src/mage/cards/r/RefractionTrap.java index e25011b0db..1de57ac5a2 100644 --- a/Mage.Sets/src/mage/cards/r/RefractionTrap.java +++ b/Mage.Sets/src/mage/cards/r/RefractionTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.r; -import java.util.List; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.condition.Condition; @@ -41,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -51,6 +50,9 @@ import mage.target.TargetSource; import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.SpellsCastWatcher; +import java.util.List; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -58,7 +60,7 @@ public class RefractionTrap extends CardImpl { public RefractionTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent cast a red instant or sorcery spell this turn, you may pay {W} rather than pay Refraction Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{W}"), RefractionTrapCondition.instance), new SpellsCastWatcher()); diff --git a/Mage.Sets/src/mage/cards/r/RelicCrush.java b/Mage.Sets/src/mage/cards/r/RelicCrush.java index ca7aa3ec40..305c8e8b68 100644 --- a/Mage.Sets/src/mage/cards/r/RelicCrush.java +++ b/Mage.Sets/src/mage/cards/r/RelicCrush.java @@ -27,16 +27,16 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -47,12 +47,11 @@ public class RelicCrush extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}"); // 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.setText("Destroy target artifact or enchantment and up to one other target artifact or enchantment"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addTarget(new TargetPermanent(0, 1, filter, false)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(0, 1, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); } public RelicCrush(final RelicCrush card) { diff --git a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java index 79e96eb499..081276e98b 100644 --- a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java +++ b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -54,7 +55,7 @@ public class ReliquaryMonk extends CardImpl { // When Reliquary Monk dies, destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/r/RendFlesh.java b/Mage.Sets/src/mage/cards/r/RendFlesh.java index 8c86442de6..95f2f1a973 100644 --- a/Mage.Sets/src/mage/cards/r/RendFlesh.java +++ b/Mage.Sets/src/mage/cards/r/RendFlesh.java @@ -28,7 +28,6 @@ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,6 +39,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * @author Loki */ @@ -53,7 +54,7 @@ public class RendFlesh extends CardImpl { public RendFlesh(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); Target target = new TargetCreaturePermanent(filter); this.getSpellAbility().addTarget(target); diff --git a/Mage.Sets/src/mage/cards/r/RendingVines.java b/Mage.Sets/src/mage/cards/r/RendingVines.java index 8ae5d1da6f..3132e4d210 100644 --- a/Mage.Sets/src/mage/cards/r/RendingVines.java +++ b/Mage.Sets/src/mage/cards/r/RendingVines.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,12 +34,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.constants.SubType; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,11 +51,11 @@ public class RendingVines extends CardImpl { public RendingVines(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Destroy target artifact or enchantment if its converted mana cost is less than or equal to the number of cards in your hand. this.getSpellAbility().addEffect(new RendingVinesEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeFreighter.java b/Mage.Sets/src/mage/cards/r/RenegadeFreighter.java index 028fa67e50..2e865c72bd 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeFreighter.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeFreighter.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility; @@ -40,6 +39,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -49,7 +51,7 @@ public class RenegadeFreighter extends CardImpl { public RenegadeFreighter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RenegadeMap.java b/Mage.Sets/src/mage/cards/r/RenegadeMap.java index adec1866f8..c6ca3d2dc5 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeMap.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeMap.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -56,7 +57,7 @@ public class RenegadeMap extends CardImpl { // {T}, Sacrifice Renegade Map: Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new TapSourceCost() ); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/r/Renewal.java b/Mage.Sets/src/mage/cards/r/Renewal.java index 9ad90eed85..fd68f49fc8 100644 --- a/Mage.Sets/src/mage/cards/r/Renewal.java +++ b/Mage.Sets/src/mage/cards/r/Renewal.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -36,11 +35,13 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -54,7 +55,7 @@ public class Renewal extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); // Search your library for a basic land card and put that card onto the battlefield. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()))); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD))); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); diff --git a/Mage.Sets/src/mage/cards/r/Reparations.java b/Mage.Sets/src/mage/cards/r/Reparations.java new file mode 100644 index 0000000000..d819dc92f2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Reparations.java @@ -0,0 +1,115 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.game.stack.StackObject; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class Reparations extends CardImpl { + + public Reparations(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}"); + + + // Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card. + this.addAbility(new ReparationsTriggeredAbility()); + + } + + public Reparations(final Reparations card) { + super(card); + } + + @Override + public Reparations copy() { + return new Reparations(this); + } +} + +class ReparationsTriggeredAbility extends TriggeredAbilityImpl { + + public ReparationsTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true); + } + + public ReparationsTriggeredAbility(final ReparationsTriggeredAbility ability) { + super(ability); + } + + @Override + public ReparationsTriggeredAbility copy() { + return new ReparationsTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + UUID stackObjectId = event.getTargetId(); // spell cast + UUID casterId = event.getPlayerId(); // spell caster + StackObject stackObject = game.getStack().getStackObject(stackObjectId); + if (stackObject != null + && game.getOpponents(controllerId).contains(casterId)) { + Player targetPlayer = game.getPlayer(stackObject.getStackAbility().getFirstTarget()); + Permanent targetPermanent = game.getPermanent(stackObject.getStackAbility().getFirstTarget()); + if (targetPlayer != null + && targetPlayer.getId() == controllerId) { + return true; + } + if (targetPermanent != null + && targetPermanent.isCreature() + && targetPermanent.getControllerId() == controllerId) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card."; + } +} diff --git a/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java b/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java index cb82a891c0..cc0434d1d9 100644 --- a/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java +++ b/Mage.Sets/src/mage/cards/r/ResourcefulReturn.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -35,11 +34,12 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -53,7 +53,7 @@ public class ResourcefulReturn extends CardImpl { this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), "If you control an artifact, draw a card")); } diff --git a/Mage.Sets/src/mage/cards/r/ReturnToDust.java b/Mage.Sets/src/mage/cards/r/ReturnToDust.java index 76fb7d67f1..eb3fca9b21 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnToDust.java +++ b/Mage.Sets/src/mage/cards/r/ReturnToDust.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.effects.Effect; @@ -35,10 +34,12 @@ import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author emerald000 @@ -63,10 +64,10 @@ public class ReturnToDust extends CardImpl { public void adjustTargets(Ability ability, Game game) { if (ability instanceof SpellAbility) { if (game.getActivePlayerId().equals(ability.getControllerId()) && game.isMainPhase()) { - ability.addTarget(new TargetPermanent(1, 2, new FilterArtifactOrEnchantmentPermanent(), false)); + ability.addTarget(new TargetPermanent(1, 2, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); } else { - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } } } diff --git a/Mage.Sets/src/mage/cards/r/RevokeExistence.java b/Mage.Sets/src/mage/cards/r/RevokeExistence.java index a3a4ed51e0..19f167e71d 100644 --- a/Mage.Sets/src/mage/cards/r/RevokeExistence.java +++ b/Mage.Sets/src/mage/cards/r/RevokeExistence.java @@ -27,14 +27,15 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -46,7 +47,7 @@ public class RevokeExistence extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public RevokeExistence(final RevokeExistence card) { diff --git a/Mage.Sets/src/mage/cards/r/Reweave.java b/Mage.Sets/src/mage/cards/r/Reweave.java index 40d895a2e7..84c06feda3 100644 --- a/Mage.Sets/src/mage/cards/r/Reweave.java +++ b/Mage.Sets/src/mage/cards/r/Reweave.java @@ -27,18 +27,14 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterPermanentCard; import mage.game.Game; @@ -48,6 +44,8 @@ import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +54,7 @@ public class Reweave extends CardImpl { public Reweave(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target permanent's controller sacrifices it. If he or she does, that player reveals cards from the top of his or her library until he or she reveals a permanent card that shares a card type with the sacrificed permanent, puts that card onto the battlefield, then shuffles his or her library. this.getSpellAbility().addEffect(new ReweaveEffect()); diff --git a/Mage.Sets/src/mage/cards/r/RicochetTrap.java b/Mage.Sets/src/mage/cards/r/RicochetTrap.java index caf9b582c2..8831376ee0 100644 --- a/Mage.Sets/src/mage/cards/r/RicochetTrap.java +++ b/Mage.Sets/src/mage/cards/r/RicochetTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.r; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,6 +35,7 @@ import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.NumberOfTargetsPredicate; import mage.game.Game; @@ -44,6 +43,9 @@ import mage.game.stack.Spell; import mage.target.TargetSpell; import mage.watchers.common.SpellsCastWatcher; +import java.util.List; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -57,7 +59,7 @@ public class RicochetTrap extends CardImpl { public RicochetTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent cast a blue spell this turn, you may pay {R} rather than pay Ricochet Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{R}"), RicochetTrapCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/r/RitesOfRefusal.java b/Mage.Sets/src/mage/cards/r/RitesOfRefusal.java new file mode 100644 index 0000000000..ad84bcbc77 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RitesOfRefusal.java @@ -0,0 +1,108 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author jeffwadsworth + */ +public class RitesOfRefusal extends CardImpl { + + public RitesOfRefusal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Discard any number of cards. Counter target spell unless its controller pays {3} for each card discarded this way. + this.getSpellAbility().addEffect(new RitesOfRefusalEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + + } + + public RitesOfRefusal(final RitesOfRefusal card) { + super(card); + } + + @Override + public RitesOfRefusal copy() { + return new RitesOfRefusal(this); + } +} + +class RitesOfRefusalEffect extends OneShotEffect { + + RitesOfRefusalEffect() { + super(Outcome.AIDontUseIt); + this.staticText = "Discard any number of cards. Counter target spell unless its controller pays {3} for each card discarded this way"; + } + + RitesOfRefusalEffect(final RitesOfRefusalEffect effect) { + super(effect); + } + + @Override + public RitesOfRefusalEffect copy() { + return new RitesOfRefusalEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); + if (targetSpell != null) { + Player controllerOfTargetedSpell = game.getPlayer(targetSpell.getControllerId()); + if (controller != null + && controllerOfTargetedSpell != null) { + int numToDiscard = controller.getAmount(0, controller.getHand().size(), "How many cards do you want to discard?", game); + Cards discardedCards = controller.discard(numToDiscard, false, source, game); + int actualNumberDiscarded = discardedCards.size(); + GenericManaCost cost = new GenericManaCost(actualNumberDiscarded * 3); + if (controllerOfTargetedSpell.chooseUse(Outcome.AIDontUseIt, "Do you want to pay " + cost.convertedManaCost() + " to prevent " + targetSpell.getName() + " from gettting countered?", source, game) + && cost.pay(source, game, source.getSourceId(), controllerOfTargetedSpell.getId(), false)) { + return true; + } else { + targetSpell.counter(source.getSourceId(), game); + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RithsGrove.java b/Mage.Sets/src/mage/cards/r/RithsGrove.java index 91f62aadc0..47364d028f 100644 --- a/Mage.Sets/src/mage/cards/r/RithsGrove.java +++ b/Mage.Sets/src/mage/cards/r/RithsGrove.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -56,7 +57,7 @@ public class RithsGrove extends CardImpl { public RithsGrove(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Lair"); + this.subtype.add(SubType.LAIR); // When Rith's Grove enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); diff --git a/Mage.Sets/src/mage/cards/r/RoarOfJukai.java b/Mage.Sets/src/mage/cards/r/RoarOfJukai.java index acf9b5a691..7aa4ce05c0 100644 --- a/Mage.Sets/src/mage/cards/r/RoarOfJukai.java +++ b/Mage.Sets/src/mage/cards/r/RoarOfJukai.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.GainLifeOpponentCost; @@ -37,7 +36,10 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,6 +49,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * @author LevelX2 */ @@ -54,7 +58,7 @@ public class RoarOfJukai extends CardImpl { public RoarOfJukai(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // If you control a Forest, each blocked creature gets +2/+2 until end of turn. @@ -107,7 +111,7 @@ class RoarOfJukaiEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - if (new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0).apply(game, source)) { + if (new PermanentsOnTheBattlefieldCondition(filter).apply(game, source)) { for (Permanent permanent : game.getBattlefield().getActivePermanents(filterBlocked, source.getControllerId(), source.getSourceId(), game)) { ContinuousEffect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(permanent.getId())); diff --git a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java index d7c700f7be..2558993edc 100644 --- a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Jgod @@ -54,7 +55,7 @@ public class RonomUnicorn extends CardImpl { // Sacrifice Ronom Unicorn: Destroy target enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/r/RootOut.java b/Mage.Sets/src/mage/cards/r/RootOut.java index bb6f18008b..28603d1203 100644 --- a/Mage.Sets/src/mage/cards/r/RootOut.java +++ b/Mage.Sets/src/mage/cards/r/RootOut.java @@ -27,16 +27,17 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,7 @@ public class RootOut extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); // Investigate. Effect effect = new InvestigateEffect(); effect.setText("
Investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"); diff --git a/Mage.Sets/src/mage/cards/r/RootboundCrag.java b/Mage.Sets/src/mage/cards/r/RootboundCrag.java index 8a913c5ca6..11ce87713e 100644 --- a/Mage.Sets/src/mage/cards/r/RootboundCrag.java +++ b/Mage.Sets/src/mage/cards/r/RootboundCrag.java @@ -28,7 +28,6 @@ package mage.cards.r; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class RootboundCrag extends CardImpl { public RootboundCrag(UUID ownerId, CardSetInfo setInfo) { 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 Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/cards/r/Rootgrapple.java b/Mage.Sets/src/mage/cards/r/Rootgrapple.java index 079bba8379..74e058e74b 100644 --- a/Mage.Sets/src/mage/cards/r/Rootgrapple.java +++ b/Mage.Sets/src/mage/cards/r/Rootgrapple.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,7 +34,6 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -43,6 +41,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -67,7 +67,7 @@ public class Rootgrapple extends CardImpl { // If you control a Treefolk, draw a card. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(filterTreefolk, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filterTreefolk), "If you control a Treefolk, draw a card")); } diff --git a/Mage.Sets/src/mage/cards/r/RuinInTheirWake.java b/Mage.Sets/src/mage/cards/r/RuinInTheirWake.java index a381bb779c..8344776c74 100644 --- a/Mage.Sets/src/mage/cards/r/RuinInTheirWake.java +++ b/Mage.Sets/src/mage/cards/r/RuinInTheirWake.java @@ -27,26 +27,23 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.DevoidAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -99,7 +96,7 @@ class RuinInTheirWakeEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); if (controller.searchLibrary(target, game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/r/RuneflareTrap.java b/Mage.Sets/src/mage/cards/r/RuneflareTrap.java index f63a24676b..9fc75d3427 100644 --- a/Mage.Sets/src/mage/cards/r/RuneflareTrap.java +++ b/Mage.Sets/src/mage/cards/r/RuneflareTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.r; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -38,11 +37,14 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; import mage.watchers.common.CardsAmountDrawnThisTurnWatcher; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -51,7 +53,7 @@ public class RuneflareTrap extends CardImpl { public RuneflareTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}{R}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent drew three or more cards this turn, you may pay {R} rather than pay Runeflare Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{R}"), RuneflareTrapCondition.instance), new CardsAmountDrawnThisTurnWatcher()); diff --git a/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java b/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java index 28d6470d23..dc83ff1fc0 100644 --- a/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java +++ b/Mage.Sets/src/mage/cards/s/SakuraTribeElder.java @@ -28,7 +28,6 @@ package mage.cards.s; * or implied, of BetaSteward_at_googlemail.com. */ -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,16 +37,16 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * @author Loki */ public class SakuraTribeElder extends CardImpl { - final static FilterBasicLandCard filterLands = new FilterBasicLandCard(); - public SakuraTribeElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add("Snake"); @@ -55,7 +54,7 @@ public class SakuraTribeElder extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - TargetCardInLibrary target = new TargetCardInLibrary(filterLands); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay), new SacrificeSourceCost())); } diff --git a/Mage.Sets/src/mage/cards/s/Scrapheap.java b/Mage.Sets/src/mage/cards/s/Scrapheap.java index dc2292e70d..d92e8d8738 100644 --- a/Mage.Sets/src/mage/cards/s/Scrapheap.java +++ b/Mage.Sets/src/mage/cards/s/Scrapheap.java @@ -27,20 +27,21 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Plopman @@ -90,7 +91,7 @@ class ScrapheapTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (permanent != null && permanent.getOwnerId().equals(this.getControllerId())) { - if (new FilterArtifactOrEnchantmentPermanent().match(permanent, sourceId, controllerId, game)) { + if (StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT.match(permanent, sourceId, controllerId, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java index 5e8354265e..0ede3eeb00 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java +++ b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -36,9 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -50,7 +51,7 @@ public class SealOfCleansing extends CardImpl { // Sacrifice Seal of Cleansing: Destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java index 3794f09b09..de8062390d 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java +++ b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -36,9 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -50,7 +51,7 @@ public class SealOfPrimordium extends CardImpl { // Sacrifice Seal of Primordium: Destroy target artifact or enchantment. 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); } diff --git a/Mage.Sets/src/mage/cards/s/SearchForTomorrow.java b/Mage.Sets/src/mage/cards/s/SearchForTomorrow.java index e29e03f680..63d164834f 100644 --- a/Mage.Sets/src/mage/cards/s/SearchForTomorrow.java +++ b/Mage.Sets/src/mage/cards/s/SearchForTomorrow.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.SuspendAbility; @@ -35,9 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,7 @@ public class SearchForTomorrow extends CardImpl { // Search your library for a basic land card and put it onto the battlefield. Then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay)); // Suspend 2-{G} diff --git a/Mage.Sets/src/mage/cards/s/SeedSpark.java b/Mage.Sets/src/mage/cards/s/SeedSpark.java index cac607702c..a42b3b4a34 100644 --- a/Mage.Sets/src/mage/cards/s/SeedSpark.java +++ b/Mage.Sets/src/mage/cards/s/SeedSpark.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -36,10 +35,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.permanent.token.SaprolingToken; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Wehk @@ -50,7 +51,7 @@ public class SeedSpark extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); // 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()); //If {G} was spent to cast Seed Spark, create two 1/1 green Saproling creature tokens. diff --git a/Mage.Sets/src/mage/cards/s/Seedtime.java b/Mage.Sets/src/mage/cards/s/Seedtime.java index 992ba5f2ca..434ab9b3dd 100644 --- a/Mage.Sets/src/mage/cards/s/Seedtime.java +++ b/Mage.Sets/src/mage/cards/s/Seedtime.java @@ -1,100 +1,100 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.s; - -import java.util.List; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.MyTurnCondition; -import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.game.Game; -import mage.game.stack.Spell; -import mage.watchers.common.SpellsCastWatcher; - -/** - * - * @author jeffwadsworth - */ -public class Seedtime extends CardImpl { - - private final static String rule = "Cast {this} only during your turn."; - private final static String rule2 = "Take an extra turn after this one if an opponent cast a blue spell this turn."; - - public Seedtime(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); - - // Cast Seedtime only during your turn. - this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, null, MyTurnCondition.instance, rule)); - - // Take an extra turn after this one if an opponent cast a blue spell this turn. - this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new AddExtraTurnControllerEffect(), OpponentCastBlueSpellThisTurnCondition.instance, rule2)); - this.getSpellAbility().addWatcher(new SpellsCastWatcher()); - - } - - public Seedtime(final Seedtime card) { - super(card); - } - - @Override - public Seedtime copy() { - return new Seedtime(this); - } -} - -enum OpponentCastBlueSpellThisTurnCondition implements Condition { - - instance; - - @Override - public boolean apply(Game game, Ability source) { - SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); - if (watcher != null) { - for (UUID opponentId : game.getOpponents(source.getControllerId())) { - if (opponentId != null) { - List spells = watcher.getSpellsCastThisTurn(opponentId); - if (spells != null) { - for (Spell spell : spells) { - if (spell != null - && spell.getColor(game).isBlue()) { - return true; - } - } - } - } - } - } - return false; - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.watchers.common.SpellsCastWatcher; + +/** + * + * @author jeffwadsworth + */ +public class Seedtime extends CardImpl { + + private final static String rule = "Cast {this} only during your turn."; + private final static String rule2 = "Take an extra turn after this one if an opponent cast a blue spell this turn."; + + public Seedtime(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Cast Seedtime only during your turn. + this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(null, null, MyTurnCondition.instance, rule)); + + // Take an extra turn after this one if an opponent cast a blue spell this turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new AddExtraTurnControllerEffect(), OpponentCastBlueSpellThisTurnCondition.instance, rule2)); + this.getSpellAbility().addWatcher(new SpellsCastWatcher()); + + } + + public Seedtime(final Seedtime card) { + super(card); + } + + @Override + public Seedtime copy() { + return new Seedtime(this); + } +} + +enum OpponentCastBlueSpellThisTurnCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + SpellsCastWatcher watcher = (SpellsCastWatcher) game.getState().getWatchers().get(SpellsCastWatcher.class.getSimpleName()); + if (watcher != null) { + for (UUID opponentId : game.getOpponents(source.getControllerId())) { + if (opponentId != null) { + List spells = watcher.getSpellsCastThisTurn(opponentId); + if (spells != null) { + for (Spell spell : spells) { + if (spell != null + && spell.getColor(game).isBlue()) { + return true; + } + } + } + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeekTheHorizon.java b/Mage.Sets/src/mage/cards/s/SeekTheHorizon.java index 8fe509f534..94a9bdf8fb 100644 --- a/Mage.Sets/src/mage/cards/s/SeekTheHorizon.java +++ b/Mage.Sets/src/mage/cards/s/SeekTheHorizon.java @@ -27,14 +27,15 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -45,7 +46,7 @@ public class SeekTheHorizon extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); // Search your library for up to three basic land cards, reveal them, and put them into your hand. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_BASIC_LAND_CARD), true)); } public SeekTheHorizon(final SeekTheHorizon card) { diff --git a/Mage.Sets/src/mage/cards/s/SelesnyaGuildgate.java b/Mage.Sets/src/mage/cards/s/SelesnyaGuildgate.java index c3ad3cd860..27b5d2b3d5 100644 --- a/Mage.Sets/src/mage/cards/s/SelesnyaGuildgate.java +++ b/Mage.Sets/src/mage/cards/s/SelesnyaGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @author LevelX2 @@ -42,7 +44,7 @@ public class SelesnyaGuildgate extends CardImpl { public SelesnyaGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Selesnya Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/s/ShiftingBorders.java b/Mage.Sets/src/mage/cards/s/ShiftingBorders.java index 89dcd10cc7..c93c3cccd9 100644 --- a/Mage.Sets/src/mage/cards/s/ShiftingBorders.java +++ b/Mage.Sets/src/mage/cards/s/ShiftingBorders.java @@ -27,15 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.continuous.ExchangeControlTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -44,7 +46,7 @@ public class ShiftingBorders extends CardImpl { public ShiftingBorders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Exchange control of two target lands. this.getSpellAbility().addEffect(new ExchangeControlTargetEffect(Duration.EndOfGame, "Exchange control of two target lands")); diff --git a/Mage.Sets/src/mage/cards/s/ShiningShoal.java b/Mage.Sets/src/mage/cards/s/ShiningShoal.java index c9e2f63ed0..f7d2a1c6c3 100644 --- a/Mage.Sets/src/mage/cards/s/ShiningShoal.java +++ b/Mage.Sets/src/mage/cards/s/ShiningShoal.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageObject; import mage.ObjectColor; import mage.abilities.Ability; @@ -40,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterOwnedCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; @@ -53,6 +53,8 @@ import mage.target.TargetSource; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -61,7 +63,7 @@ public class ShiningShoal extends CardImpl { public ShiningShoal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may exile a white card with converted mana cost X from your hand rather than pay Shining Shoal's mana cost FilterOwnedCard filter = new FilterOwnedCard("a white card with converted mana cost X from your hand"); diff --git a/Mage.Sets/src/mage/cards/s/SickeningShoal.java b/Mage.Sets/src/mage/cards/s/SickeningShoal.java index b544b277d9..96bf88f462 100644 --- a/Mage.Sets/src/mage/cards/s/SickeningShoal.java +++ b/Mage.Sets/src/mage/cards/s/SickeningShoal.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.common.ExileFromHandCost; @@ -39,6 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterOwnedCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; @@ -46,6 +46,8 @@ import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +56,7 @@ public class SickeningShoal extends CardImpl { public SickeningShoal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may exile a black card with converted mana cost X from your hand rather than pay Sickening Shoal's mana cost. diff --git a/Mage.Sets/src/mage/cards/s/SiftThroughSands.java b/Mage.Sets/src/mage/cards/s/SiftThroughSands.java index 7b936ee4d2..af70494d98 100644 --- a/Mage.Sets/src/mage/cards/s/SiftThroughSands.java +++ b/Mage.Sets/src/mage/cards/s/SiftThroughSands.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -38,6 +37,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.WatcherScope; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.NamePredicate; @@ -48,6 +48,8 @@ import mage.game.stack.Spell; import mage.target.common.TargetCardInLibrary; import mage.watchers.Watcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -63,7 +65,7 @@ public class SiftThroughSands extends CardImpl { public SiftThroughSands(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Draw two cards, then discard a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); diff --git a/Mage.Sets/src/mage/cards/s/SilkwingScout.java b/Mage.Sets/src/mage/cards/s/SilkwingScout.java index d768db7323..d68c717caa 100644 --- a/Mage.Sets/src/mage/cards/s/SilkwingScout.java +++ b/Mage.Sets/src/mage/cards/s/SilkwingScout.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -60,7 +61,7 @@ public class SilkwingScout extends CardImpl { // {G}, Sacrifice Silkwing Scout: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl("{G}")); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java b/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java index 1d9eb303b8..56ca7c33d1 100644 --- a/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java +++ b/Mage.Sets/src/mage/cards/s/SilvergladePathfinder.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -57,7 +58,7 @@ public class SilvergladePathfinder extends CardImpl { // {1}{G}, {tap}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl("{1}{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); diff --git a/Mage.Sets/src/mage/cards/s/SimicGuildgate.java b/Mage.Sets/src/mage/cards/s/SimicGuildgate.java index abb2a98a57..4f230b7cb1 100644 --- a/Mage.Sets/src/mage/cards/s/SimicGuildgate.java +++ b/Mage.Sets/src/mage/cards/s/SimicGuildgate.java @@ -27,13 +27,15 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class SimicGuildgate extends CardImpl { public SimicGuildgate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Gate"); + this.subtype.add(SubType.GATE); // Simic Guildgate enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SkySkiff.java b/Mage.Sets/src/mage/cards/s/SkySkiff.java index b06feb3b3f..9310361a9e 100644 --- a/Mage.Sets/src/mage/cards/s/SkySkiff.java +++ b/Mage.Sets/src/mage/cards/s/SkySkiff.java @@ -27,13 +27,15 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.CrewAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,7 +45,7 @@ public class SkySkiff extends CardImpl { public SkySkiff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(2); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java b/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java index 1a00f40e9e..162e6326f8 100644 --- a/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java +++ b/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility; @@ -37,12 +36,15 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreatureOrPlaneswalker; +import java.util.UUID; + /** * @author emerald000 */ @@ -57,7 +59,7 @@ public class SkysovereignConsulFlagship extends CardImpl { public SkysovereignConsulFlagship(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/s/SliceinTwain.java b/Mage.Sets/src/mage/cards/s/SliceinTwain.java index 95e702609b..abb03b3116 100644 --- a/Mage.Sets/src/mage/cards/s/SliceinTwain.java +++ b/Mage.Sets/src/mage/cards/s/SliceinTwain.java @@ -28,15 +28,16 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -48,7 +49,7 @@ public class SliceinTwain extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public SliceinTwain (final SliceinTwain card) { diff --git a/Mage.Sets/src/mage/cards/s/SlingbowTrap.java b/Mage.Sets/src/mage/cards/s/SlingbowTrap.java index 5deda3707d..17df16b0e8 100644 --- a/Mage.Sets/src/mage/cards/s/SlingbowTrap.java +++ b/Mage.Sets/src/mage/cards/s/SlingbowTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,12 +36,15 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetAttackingCreature; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -56,7 +58,7 @@ public class SlingbowTrap extends CardImpl { public SlingbowTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If a black creature with flying is attacking, you may pay {G} rather than pay Slingbow Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{G}"), SlingbowTrapCondition.instance)); diff --git a/Mage.Sets/src/mage/cards/s/SmugglersCopter.java b/Mage.Sets/src/mage/cards/s/SmugglersCopter.java index e2f8029a2c..514748b1fc 100644 --- a/Mage.Sets/src/mage/cards/s/SmugglersCopter.java +++ b/Mage.Sets/src/mage/cards/s/SmugglersCopter.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksOrBlocksTriggeredAbility; import mage.abilities.effects.Effect; @@ -37,6 +36,9 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -46,7 +48,7 @@ public class SmugglersCopter extends CardImpl { public SmugglersCopter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/s/SnuffOut.java b/Mage.Sets/src/mage/cards/s/SnuffOut.java index 1057d04f2d..59b494ee37 100644 --- a/Mage.Sets/src/mage/cards/s/SnuffOut.java +++ b/Mage.Sets/src/mage/cards/s/SnuffOut.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -36,7 +35,6 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; @@ -45,6 +43,8 @@ import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -66,7 +66,7 @@ public class SnuffOut extends CardImpl { // If you control a Swamp, you may pay 4 life rather than pay Snuff Out's mana cost. this.addAbility(new AlternativeCostSourceAbility( new PayLifeCost(4), - new PermanentsOnTheBattlefieldCondition(filterSwamp, ComparisonType.MORE_THAN, 0), null)); + new PermanentsOnTheBattlefieldCondition(filterSwamp), null)); // // Destroy target nonblack creature. It can't be regenerated. this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); diff --git a/Mage.Sets/src/mage/cards/s/SolemnOffering.java b/Mage.Sets/src/mage/cards/s/SolemnOffering.java index 055dbea7d8..e936622b66 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnOffering.java +++ b/Mage.Sets/src/mage/cards/s/SolemnOffering.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -46,7 +47,7 @@ public class SolemnOffering extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); // Destroy target artifact or enchantment. You gain 4 life. - 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 GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java b/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java index b65daedc75..af53f3f635 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java +++ b/Mage.Sets/src/mage/cards/s/SolemnSimulacrum.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -36,23 +35,22 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki */ public class SolemnSimulacrum extends CardImpl { - - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public SolemnSimulacrum(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); this.subtype.add("Golem"); this.power = new MageInt(2); this.toughness = new MageInt(2); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); } diff --git a/Mage.Sets/src/mage/cards/s/SongOfSerenity.java b/Mage.Sets/src/mage/cards/s/SongOfSerenity.java new file mode 100644 index 0000000000..a2da2f7b82 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SongOfSerenity.java @@ -0,0 +1,104 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.EnchantedPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author jeffwadsworth + */ +public class SongOfSerenity extends CardImpl { + + public SongOfSerenity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + // Creatures that are enchanted can't attack or block. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SongOfSerenityRestrictionEffect())); + + } + + public SongOfSerenity(final SongOfSerenity card) { + super(card); + } + + @Override + public SongOfSerenity copy() { + return new SongOfSerenity(this); + } +} + +class SongOfSerenityRestrictionEffect extends RestrictionEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new EnchantedPredicate()); + } + + public SongOfSerenityRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Creatures that are enchanted can't attack or block"; + } + + public SongOfSerenityRestrictionEffect(final SongOfSerenityRestrictionEffect effect) { + super(effect); + } + + @Override + public SongOfSerenityRestrictionEffect copy() { + return new SongOfSerenityRestrictionEffect(this); + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return filter.match(permanent, source.getSourceId(), source.getControllerId(), game); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SoulSnare.java b/Mage.Sets/src/mage/cards/s/SoulSnare.java index fdd662434f..e68f31e8fa 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSnare.java +++ b/Mage.Sets/src/mage/cards/s/SoulSnare.java @@ -32,7 +32,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.ExileTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,24 +39,22 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.filter.common.FilterAttackingCreature; import mage.game.Game; -import mage.game.combat.CombatGroup; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class SoulSnare extends CardImpl { public SoulSnare(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); // {W}, Sacrifice Soul Snare: Exile target creature that's attacking you or a planeswalker you control. - Effect effect = new ExileTargetEffect(); - effect.setText("Exile target creature that's attacking you or a planeswalker you control."); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{W}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new ExileTargetEffect(), new ManaCostsImpl("{W}")); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCreaturePermanent(new SoulSnareFilter())); this.addAbility(ability); @@ -79,7 +76,6 @@ class SoulSnareFilter extends FilterAttackingCreature { super("creature that's attacking you or a planeswalker you control"); } - public SoulSnareFilter(final SoulSnareFilter filter) { super(filter); } @@ -91,28 +87,7 @@ class SoulSnareFilter extends FilterAttackingCreature { @Override public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) { - if(!super.match(permanent, sourceId, playerId, game)) { - return false; - } - - for(CombatGroup group : game.getCombat().getGroups()) { - for(UUID attacker : group.getAttackers()) { - if(attacker.equals(permanent.getId())) { - UUID defenderId = group.getDefenderId(); - if(defenderId.equals(playerId)) { - return true; - } - else { - Permanent planeswalker = game.getPermanent(defenderId); - if(planeswalker != null && planeswalker.isPlaneswalker() - && planeswalker.getControllerId().equals(playerId)) { - return true; - } - } - } - } - } - - return false; + return super.match(permanent, sourceId, playerId, game) + && playerId.equals(game.getCombat().getDefendingPlayerId(permanent.getId(), game)); } } diff --git a/Mage.Sets/src/mage/cards/s/SoullessRevival.java b/Mage.Sets/src/mage/cards/s/SoullessRevival.java index 11db4a5c2b..692f8c20e6 100644 --- a/Mage.Sets/src/mage/cards/s/SoullessRevival.java +++ b/Mage.Sets/src/mage/cards/s/SoullessRevival.java @@ -27,15 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 @@ -44,7 +46,7 @@ public class SoullessRevival extends CardImpl { public SoullessRevival(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Return target creature card from your graveyard to your hand. diff --git a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java index af2255a56f..c31778e3a1 100644 --- a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java +++ b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCosts; @@ -37,10 +36,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; +import java.util.UUID; + /** * * @author LevelX2 @@ -79,7 +80,7 @@ class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaA @Override public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) { - int enchantments = game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game); + int enchantments = game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game); if (enchantments > 0) { return new ManaCostsImpl<>("{" + enchantments + '}'); } diff --git a/Mage.Sets/src/mage/cards/s/SpiritualVisit.java b/Mage.Sets/src/mage/cards/s/SpiritualVisit.java index 85c234ba36..0876b83687 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritualVisit.java +++ b/Mage.Sets/src/mage/cards/s/SpiritualVisit.java @@ -27,14 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.permanent.token.SpiritToken; +import java.util.UUID; + /** * * @author LevelX2 @@ -43,7 +45,7 @@ public class SpiritualVisit extends CardImpl { public SpiritualVisit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Create a 1/1 colorless Spirit creature token. this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritToken())); diff --git a/Mage.Sets/src/mage/cards/s/SpringMind.java b/Mage.Sets/src/mage/cards/s/SpringMind.java index ae79efa890..7b14bbb9bb 100644 --- a/Mage.Sets/src/mage/cards/s/SpringMind.java +++ b/Mage.Sets/src/mage/cards/s/SpringMind.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.AftermathAbility; @@ -36,9 +35,11 @@ import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.SpellAbilityType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -50,7 +51,7 @@ public class SpringMind extends SplitCard { // Spring // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - getLeftHalfCard().getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true)); + getLeftHalfCard().getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); // Mind // Aftermath diff --git a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java index ee6b01354b..8968858461 100644 --- a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java +++ b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class SpringsageRitual extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}"); // Destroy target artifact or enchantment. You gain 4 life. - 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 GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SproutingVines.java b/Mage.Sets/src/mage/cards/s/SproutingVines.java index f7d81cd0c8..47008a8758 100644 --- a/Mage.Sets/src/mage/cards/s/SproutingVines.java +++ b/Mage.Sets/src/mage/cards/s/SproutingVines.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.keyword.StormAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Plopman @@ -47,7 +48,7 @@ public class SproutingVines extends CardImpl { // Search your library for a basic land card, reveal that card, and put it into your hand. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, new FilterBasicLandCard()), true)); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true)); // Storm this.addAbility(new StormAbility()); } diff --git a/Mage.Sets/src/mage/cards/s/SternProctor.java b/Mage.Sets/src/mage/cards/s/SternProctor.java index c2f54f2fe4..7003d55225 100644 --- a/Mage.Sets/src/mage/cards/s/SternProctor.java +++ b/Mage.Sets/src/mage/cards/s/SternProctor.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -35,9 +34,11 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -54,7 +55,7 @@ public class SternProctor extends CardImpl { // When Stern Proctor enters the battlefield, return target artifact or enchantment to its owner's hand. Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - TargetPermanent target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StoneIdolTrap.java b/Mage.Sets/src/mage/cards/s/StoneIdolTrap.java index 54a70db600..4201b5aae4 100644 --- a/Mage.Sets/src/mage/cards/s/StoneIdolTrap.java +++ b/Mage.Sets/src/mage/cards/s/StoneIdolTrap.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; @@ -36,17 +35,15 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.game.Game; import mage.game.permanent.token.StoneTrapIdolToken; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -55,7 +52,7 @@ public class StoneIdolTrap extends CardImpl { public StoneIdolTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{R}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // Stone Idol Trap costs {1} less to cast for each attacking creature. Ability ability = new SimpleStaticAbility(Zone.ALL, new StoneIdolTrapCostReductionEffect()); diff --git a/Mage.Sets/src/mage/cards/s/StrangeInversion.java b/Mage.Sets/src/mage/cards/s/StrangeInversion.java index 765d26f0af..3db9687d75 100644 --- a/Mage.Sets/src/mage/cards/s/StrangeInversion.java +++ b/Mage.Sets/src/mage/cards/s/StrangeInversion.java @@ -27,15 +27,17 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.continuous.SwitchPowerToughnessTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -44,7 +46,7 @@ public class StrangeInversion extends CardImpl { public StrangeInversion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Switch target creature's power and toughness until end of turn. diff --git a/Mage.Sets/src/mage/cards/s/StreamOfConsciousness.java b/Mage.Sets/src/mage/cards/s/StreamOfConsciousness.java index e11ab0569a..a229c01737 100644 --- a/Mage.Sets/src/mage/cards/s/StreamOfConsciousness.java +++ b/Mage.Sets/src/mage/cards/s/StreamOfConsciousness.java @@ -27,8 +27,6 @@ */ package mage.cards.s; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -36,6 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; @@ -43,6 +42,9 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetCardInGraveyard; +import java.util.List; +import java.util.UUID; + /** * * @author LevelX2 @@ -51,7 +53,7 @@ public class StreamOfConsciousness extends CardImpl { public StreamOfConsciousness(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target player shuffles up to four target cards from his or her graveyard into his or her library. this.getSpellAbility().addEffect(new StreamOfConsciousnessEffect()); diff --git a/Mage.Sets/src/mage/cards/s/StrengthOfArms.java b/Mage.Sets/src/mage/cards/s/StrengthOfArms.java index 495c2c4465..e172780f6a 100644 --- a/Mage.Sets/src/mage/cards/s/StrengthOfArms.java +++ b/Mage.Sets/src/mage/cards/s/StrengthOfArms.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -35,7 +34,6 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.Duration; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; @@ -43,6 +41,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.HumanSoldierToken; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) @@ -62,7 +62,7 @@ public class StrengthOfArms extends CardImpl { this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new HumanSoldierToken()), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "If you control an Equipment, create a 1/1 white Human Soldier creature token.")); } diff --git a/Mage.Sets/src/mage/cards/s/SulfurFalls.java b/Mage.Sets/src/mage/cards/s/SulfurFalls.java index d718a7506d..fbe5ff94f7 100644 --- a/Mage.Sets/src/mage/cards/s/SulfurFalls.java +++ b/Mage.Sets/src/mage/cards/s/SulfurFalls.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class SulfurFalls extends CardImpl { public SulfurFalls(UUID ownerId, CardSetInfo setInfo) { 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 Mountain"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlueManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SultaiCharm.java b/Mage.Sets/src/mage/cards/s/SultaiCharm.java index 5fe3e9ec13..a7a09b0b61 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiCharm.java +++ b/Mage.Sets/src/mage/cards/s/SultaiCharm.java @@ -27,19 +27,20 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.MonocoloredPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -64,7 +65,7 @@ public class SultaiCharm extends CardImpl { // * Destroy target artifact or enchantment. Mode mode = new Mode(); mode.getEffects().add(new DestroyTargetEffect()); - mode.getTargets().add(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + mode.getTargets().add(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.getSpellAbility().addMode(mode); // * Draw two cards, then discard a card. diff --git a/Mage.Sets/src/mage/cards/s/SummoningTrap.java b/Mage.Sets/src/mage/cards/s/SummoningTrap.java index 13f6c70749..a3a428b838 100644 --- a/Mage.Sets/src/mage/cards/s/SummoningTrap.java +++ b/Mage.Sets/src/mage/cards/s/SummoningTrap.java @@ -27,23 +27,13 @@ */ package mage.cards.s; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.WatcherScope; -import mage.constants.Zone; +import mage.cards.*; +import mage.constants.*; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,6 +44,10 @@ import mage.players.Player; import mage.target.TargetCard; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author Rafbill @@ -62,7 +56,7 @@ public class SummoningTrap extends CardImpl { public SummoningTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{G}{G}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If a creature spell you cast this turn was countered by a spell or ability an opponent controlled, you may pay {0} rather than pay Summoning Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{0}"), SummoningTrapCondition.instance), new SummoningTrapWatcher()); diff --git a/Mage.Sets/src/mage/cards/s/SunderFromWithin.java b/Mage.Sets/src/mage/cards/s/SunderFromWithin.java index 821c316890..e944eb7c24 100644 --- a/Mage.Sets/src/mage/cards/s/SunderFromWithin.java +++ b/Mage.Sets/src/mage/cards/s/SunderFromWithin.java @@ -27,16 +27,18 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -53,7 +55,7 @@ public class SunderFromWithin extends CardImpl { public SunderFromWithin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Destroy target artifact or land. this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java index eaa35753d3..acbf893398 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java +++ b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevleX2 @@ -48,7 +49,7 @@ public class SunderingGrowth extends CardImpl { // Destroy target artifact or enchantment, then populate. // (Create a token that's a copy of a creature token you control.) - 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 PopulateEffect("then")); } diff --git a/Mage.Sets/src/mage/cards/s/SunderingVitae.java b/Mage.Sets/src/mage/cards/s/SunderingVitae.java index df9c402f4f..42d29173b0 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingVitae.java +++ b/Mage.Sets/src/mage/cards/s/SunderingVitae.java @@ -27,15 +27,16 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author jonubuu @@ -48,7 +49,7 @@ public class SunderingVitae extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); // 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()); } diff --git a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java index cb21f3137a..6a7e81aed7 100644 --- a/Mage.Sets/src/mage/cards/s/SunpetalGrove.java +++ b/Mage.Sets/src/mage/cards/s/SunpetalGrove.java @@ -28,7 +28,6 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -61,7 +61,7 @@ public class SunpetalGrove extends CardImpl { public SunpetalGrove(UUID ownerId, CardSetInfo setInfo) { 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 Forest or a Plains"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java index 3488161ced..878cd37383 100644 --- a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java +++ b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; @@ -36,11 +35,12 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.permanent.token.WarriorVigilantToken; +import java.util.UUID; + /** * * @author fireshoes @@ -62,7 +62,7 @@ public class SupplyCaravan extends CardImpl { // When Supply Caravan enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance. this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorVigilantToken())), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0), + new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance.")); } diff --git a/Mage.Sets/src/mage/cards/s/SurveyorsScope.java b/Mage.Sets/src/mage/cards/s/SurveyorsScope.java index 2862a62dba..7621dce50b 100644 --- a/Mage.Sets/src/mage/cards/s/SurveyorsScope.java +++ b/Mage.Sets/src/mage/cards/s/SurveyorsScope.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.ExileSourceCost; @@ -39,12 +38,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -101,7 +102,7 @@ class SurveyorsScopeEffect extends OneShotEffect { } game.informPlayers(new StringBuilder("Surveyor's Scope: X = ").append(numberOfLands).toString()); if (numberOfLands > 0) { - return new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, numberOfLands, new FilterBasicLandCard())).apply(game, source); + return new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, numberOfLands, StaticFilters.FILTER_BASIC_LAND_CARD)).apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/s/SwallowingPlague.java b/Mage.Sets/src/mage/cards/s/SwallowingPlague.java index 0ef65ce96d..2fd92dd81c 100644 --- a/Mage.Sets/src/mage/cards/s/SwallowingPlague.java +++ b/Mage.Sets/src/mage/cards/s/SwallowingPlague.java @@ -28,15 +28,17 @@ package mage.cards.s; -import java.util.UUID; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Loki @@ -45,7 +47,7 @@ public class SwallowingPlague extends CardImpl { public SwallowingPlague (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue())); diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java b/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java index 78d855dca0..2d804887ef 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheAnimist.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -40,9 +39,11 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LoneFox @@ -58,7 +59,7 @@ public class SwordOfTheAnimist extends CardImpl { // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); // Whenever equipped creature attacks, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.addAbility(new AttacksAttachedTriggeredAbility(new SearchLibraryPutInPlayEffect(target, true), true)); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/s/SylvanRanger.java b/Mage.Sets/src/mage/cards/s/SylvanRanger.java index ba1b2b7f00..f3adf52350 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanRanger.java +++ b/Mage.Sets/src/mage/cards/s/SylvanRanger.java @@ -28,24 +28,23 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com */ public class SylvanRanger extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); - public SylvanRanger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add("Elf"); @@ -55,7 +54,7 @@ public class SylvanRanger extends CardImpl { this.toughness = new MageInt(1); // When Sylvan Ranger enters the battlefield, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(filter); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true))); } diff --git a/Mage.Sets/src/mage/cards/s/SylvokReplica.java b/Mage.Sets/src/mage/cards/s/SylvokReplica.java index 84f7ee5ba3..c67cd56009 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokReplica.java +++ b/Mage.Sets/src/mage/cards/s/SylvokReplica.java @@ -27,7 +27,6 @@ */ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -56,7 +57,7 @@ public class SylvokReplica extends CardImpl { // {G}, Sacrifice Sylvok Replica: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedField.java b/Mage.Sets/src/mage/cards/t/TaintedField.java index e0871830cf..59aa5012c8 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedField.java +++ b/Mage.Sets/src/mage/cards/t/TaintedField.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedField extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.WhiteMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } public TaintedField(final TaintedField card) { diff --git a/Mage.Sets/src/mage/cards/t/TaintedIsle.java b/Mage.Sets/src/mage/cards/t/TaintedIsle.java index 528ec18402..cbbe003e2e 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedIsle.java +++ b/Mage.Sets/src/mage/cards/t/TaintedIsle.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedIsle extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlueMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedPeak.java b/Mage.Sets/src/mage/cards/t/TaintedPeak.java index 0f0e22dd2d..db791d29fc 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedPeak.java +++ b/Mage.Sets/src/mage/cards/t/TaintedPeak.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedPeak extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } diff --git a/Mage.Sets/src/mage/cards/t/TaintedWood.java b/Mage.Sets/src/mage/cards/t/TaintedWood.java index 6452063cfb..cc3aeb2568 100644 --- a/Mage.Sets/src/mage/cards/t/TaintedWood.java +++ b/Mage.Sets/src/mage/cards/t/TaintedWood.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.Mana; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; @@ -37,12 +36,13 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -65,12 +65,12 @@ public class TaintedWood extends CardImpl { Zone.BATTLEFIELD, new BasicManaEffect(Mana.BlackMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); this.addAbility(new ActivateIfConditionManaAbility( Zone.BATTLEFIELD, new BasicManaEffect(Mana.GreenMana(1)), new TapSourceCost(), - new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 0))); + new PermanentsOnTheBattlefieldCondition(filter))); } public TaintedWood(final TaintedWood card) { diff --git a/Mage.Sets/src/mage/cards/t/TerashisCry.java b/Mage.Sets/src/mage/cards/t/TerashisCry.java index 06869d8f12..e208375043 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisCry.java +++ b/Mage.Sets/src/mage/cards/t/TerashisCry.java @@ -29,29 +29,30 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX */ public class TerashisCry extends CardImpl { public TerashisCry(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}"); - this.subtype.add("Arcane"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}"); + this.subtype.add(SubType.ARCANE); // Tap up to three target creatures. - Target target = new TargetCreaturePermanent(0,3); - target.setTargetName("up to three"); + Target target = new TargetCreaturePermanent(0, 3); + target.setTargetName("up to three"); this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java index 81e7983ce7..86684e5e56 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java +++ b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -35,12 +34,15 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.constants.SubType; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,10 +51,10 @@ public class TerashisGrasp extends CardImpl { public TerashisGrasp(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // 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()); // You gain life equal to its converted mana cost. this.getSpellAbility().addEffect(new TerashisGraspEffect()); diff --git a/Mage.Sets/src/mage/cards/t/TerminalMoraine.java b/Mage.Sets/src/mage/cards/t/TerminalMoraine.java index 966bb23e12..80917bac54 100644 --- a/Mage.Sets/src/mage/cards/t/TerminalMoraine.java +++ b/Mage.Sets/src/mage/cards/t/TerminalMoraine.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -39,16 +38,16 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author anonymous */ public class TerminalMoraine extends CardImpl { - - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); public TerminalMoraine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); @@ -56,7 +55,7 @@ public class TerminalMoraine extends CardImpl { // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {2}, {tap}, Sacrifice Terminal Moraine: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true, true), new ManaCostsImpl<>("{2}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new ManaCostsImpl<>("{2}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java b/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java index 765d4caee3..1038660daf 100644 --- a/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java +++ b/Mage.Sets/src/mage/cards/t/TerramorphicExpanse.java @@ -28,7 +28,6 @@ package mage.cards.t; -import java.util.UUID; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -69,7 +70,7 @@ class TerramorphicExpanseAbility extends ActivatedAbilityImpl { super(Zone.BATTLEFIELD, null); addCost(new TapSourceCost()); addCost(new SacrificeSourceCost()); - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); addEffect(new SearchLibraryPutInPlayEffect(target, true, Outcome.PutLandInPlay)); } diff --git a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java index 7d9f26c697..2c0fd8555e 100644 --- a/Mage.Sets/src/mage/cards/t/TetheredGriffin.java +++ b/Mage.Sets/src/mage/cards/t/TetheredGriffin.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -36,7 +35,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @@ -55,7 +56,7 @@ public class TetheredGriffin extends CardImpl { // When you control no enchantments, sacrifice Tethered Griffin. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( - new FilterEnchantmentPermanent(), ComparisonType.EQUAL_TO, 0, + StaticFilters.FILTER_ENCHANTMENT_PERMANENT, ComparisonType.EQUAL_TO, 0, new SacrificeSourceEffect())); } diff --git a/Mage.Sets/src/mage/cards/t/ThawingGlaciers.java b/Mage.Sets/src/mage/cards/t/ThawingGlaciers.java index 0b85c918e0..e955749cce 100644 --- a/Mage.Sets/src/mage/cards/t/ThawingGlaciers.java +++ b/Mage.Sets/src/mage/cards/t/ThawingGlaciers.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -42,9 +41,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class ThawingGlaciers extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // {1}, {tap}: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Return Thawing Glaciers to its owner's hand at the beginning of the next cleanup step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, Outcome.PutLandInPlay), new GenericManaCost(1)); + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new ReturnToHandSourceEffect(true)))); diff --git a/Mage.Sets/src/mage/cards/t/ThreeTragedies.java b/Mage.Sets/src/mage/cards/t/ThreeTragedies.java index 265c0dbf3c..0180cf5e5b 100644 --- a/Mage.Sets/src/mage/cards/t/ThreeTragedies.java +++ b/Mage.Sets/src/mage/cards/t/ThreeTragedies.java @@ -27,13 +27,15 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author Loki @@ -42,7 +44,7 @@ public class ThreeTragedies extends CardImpl { public ThreeTragedies(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target player discards three cards. this.getSpellAbility().addEffect(new DiscardTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/t/ToilsOfNightAndDay.java b/Mage.Sets/src/mage/cards/t/ToilsOfNightAndDay.java index 01d7fc4469..1134dfc788 100644 --- a/Mage.Sets/src/mage/cards/t/ToilsOfNightAndDay.java +++ b/Mage.Sets/src/mage/cards/t/ToilsOfNightAndDay.java @@ -27,19 +27,21 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +50,7 @@ public class ToilsOfNightAndDay extends CardImpl { public ToilsOfNightAndDay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You may tap or untap target permanent, then you may tap or untap another target permanent. this.getSpellAbility().addEffect(new ToilsOfNightAndDayEffect()); diff --git a/Mage.Sets/src/mage/cards/t/TormentOfScarabs.java b/Mage.Sets/src/mage/cards/t/TormentOfScarabs.java index c51c101df5..8b42587be8 100644 --- a/Mage.Sets/src/mage/cards/t/TormentOfScarabs.java +++ b/Mage.Sets/src/mage/cards/t/TormentOfScarabs.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.OneShotEffect; @@ -37,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -48,6 +48,8 @@ import mage.target.Target; import mage.target.TargetPermanent; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author LevelX2 @@ -57,8 +59,7 @@ public class TormentOfScarabs extends CardImpl { public TormentOfScarabs(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/t/TrailOfMystery.java b/Mage.Sets/src/mage/cards/t/TrailOfMystery.java index cc319d650e..3a9aac7773 100644 --- a/Mage.Sets/src/mage/cards/t/TrailOfMystery.java +++ b/Mage.Sets/src/mage/cards/t/TrailOfMystery.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; import mage.abilities.effects.Effect; @@ -38,11 +37,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.other.FaceDownPredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -59,7 +60,7 @@ public class TrailOfMystery extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); // Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. - Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0,1, new FilterBasicLandCard()), true, true); + Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0,1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, true)); // Whenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn. diff --git a/Mage.Sets/src/mage/cards/t/TravelersAmulet.java b/Mage.Sets/src/mage/cards/t/TravelersAmulet.java index 893cbc20f1..d0ec05f768 100644 --- a/Mage.Sets/src/mage/cards/t/TravelersAmulet.java +++ b/Mage.Sets/src/mage/cards/t/TravelersAmulet.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author nantuko @@ -50,7 +51,7 @@ public class TravelersAmulet extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); // {1}, Sacrifice Traveler's Amulet: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(target, true), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java b/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java index 24e682e8a6..ed2a85b152 100644 --- a/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java +++ b/Mage.Sets/src/mage/cards/t/TraverseTheUlvenwald.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.decorator.ConditionalOneShotEffect; @@ -36,11 +35,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -58,7 +59,7 @@ public class TraverseTheUlvenwald extends CardImpl { // Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, new FilterBasicLandCard()), true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true), new InvertCondition(DeliriumCondition.instance), "Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.")); diff --git a/Mage.Sets/src/mage/cards/t/TrespassersCurse.java b/Mage.Sets/src/mage/cards/t/TrespassersCurse.java index e742d937af..5caf389b6c 100644 --- a/Mage.Sets/src/mage/cards/t/TrespassersCurse.java +++ b/Mage.Sets/src/mage/cards/t/TrespassersCurse.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -38,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -46,6 +46,8 @@ import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author stravant @@ -55,8 +57,7 @@ public class TrespassersCurse extends CardImpl { public TrespassersCurse(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - this.subtype.add("Aura"); - this.subtype.add("Curse"); + this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player TargetPlayer auraTarget = new TargetPlayer(); diff --git a/Mage.Sets/src/mage/cards/t/TrevasRuins.java b/Mage.Sets/src/mage/cards/t/TrevasRuins.java index 61f0f71e47..1ed5cf4d01 100644 --- a/Mage.Sets/src/mage/cards/t/TrevasRuins.java +++ b/Mage.Sets/src/mage/cards/t/TrevasRuins.java @@ -27,7 +27,6 @@ */ package mage.cards.t; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; @@ -43,6 +42,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** * * @author Plopman @@ -56,7 +57,7 @@ public class TrevasRuins extends CardImpl { public TrevasRuins(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Lair"); + this.subtype.add(SubType.LAIR); // When Treva's Ruins enters the battlefield, sacrifice it unless you return a non-Lair land you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))))); diff --git a/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java b/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java index 948a850021..923227bddb 100644 --- a/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java +++ b/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.continuous.BoostTargetEffect; @@ -39,6 +38,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -47,7 +48,7 @@ public class UncheckedGrowth extends CardImpl { public UncheckedGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gets +4/+4 until end of turn. diff --git a/Mage.Sets/src/mage/cards/u/UnearthlyBlizzard.java b/Mage.Sets/src/mage/cards/u/UnearthlyBlizzard.java index c1b0a4c224..0ea7f840fe 100644 --- a/Mage.Sets/src/mage/cards/u/UnearthlyBlizzard.java +++ b/Mage.Sets/src/mage/cards/u/UnearthlyBlizzard.java @@ -29,14 +29,16 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * @author LevelX */ @@ -44,7 +46,7 @@ public class UnearthlyBlizzard extends CardImpl { public UnearthlyBlizzard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Up to three target creatures can't block this turn. diff --git a/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java b/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java index f93158d48b..d489e1ece5 100644 --- a/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java +++ b/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java @@ -28,15 +28,17 @@ package mage.cards.u; -import java.util.UUID; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Loki @@ -45,7 +47,7 @@ public class UnnaturalSpeed extends CardImpl { public UnnaturalSpeed (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java index a45c0d13ad..8780b61626 100644 --- a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java +++ b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java @@ -27,14 +27,15 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.effects.common.ShuffleIntoLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -46,7 +47,7 @@ public class UnravelTheAether extends CardImpl { // Choose target artifact or enchantment. Its owner shuffles it into his or her library. this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); } public UnravelTheAether(final UnravelTheAether card) { diff --git a/Mage.Sets/src/mage/cards/u/UntamedWilds.java b/Mage.Sets/src/mage/cards/u/UntamedWilds.java index 09fb046922..349fd36a89 100644 --- a/Mage.Sets/src/mage/cards/u/UntamedWilds.java +++ b/Mage.Sets/src/mage/cards/u/UntamedWilds.java @@ -32,6 +32,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -46,7 +47,7 @@ public class UntamedWilds extends CardImpl { // Search your library for a basic land card and put that card onto the battlefield. Then shuffle your library. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()))); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD))); } public UntamedWilds(final UntamedWilds card) { diff --git a/Mage.Sets/src/mage/cards/u/UntetheredExpress.java b/Mage.Sets/src/mage/cards/u/UntetheredExpress.java index fa80c867da..f931ad2422 100644 --- a/Mage.Sets/src/mage/cards/u/UntetheredExpress.java +++ b/Mage.Sets/src/mage/cards/u/UntetheredExpress.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -36,8 +35,11 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.counters.CounterType; +import java.util.UUID; + /** * @author JRHerlehy */ @@ -46,7 +48,7 @@ public class UntetheredExpress extends CardImpl { public UntetheredExpress(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - this.subtype.add("Vehicle"); + this.subtype.add(SubType.VEHICLE); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/u/Uproot.java b/Mage.Sets/src/mage/cards/u/Uproot.java index 2979c54a31..41014f8254 100644 --- a/Mage.Sets/src/mage/cards/u/Uproot.java +++ b/Mage.Sets/src/mage/cards/u/Uproot.java @@ -27,13 +27,15 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.common.TargetLandPermanent; +import java.util.UUID; + /** * * @author Loki @@ -42,7 +44,7 @@ public class Uproot extends CardImpl { public Uproot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Put target land on top of its owner's library. this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); diff --git a/Mage.Sets/src/mage/cards/u/UrzasFactory.java b/Mage.Sets/src/mage/cards/u/UrzasFactory.java index c0e88b5dbf..7c280658da 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasFactory.java +++ b/Mage.Sets/src/mage/cards/u/UrzasFactory.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -37,9 +36,12 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.AssemblyWorkerToken; +import java.util.UUID; + /** * * @author Loki @@ -48,7 +50,7 @@ public class UrzasFactory extends CardImpl { public UrzasFactory(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); - this.subtype.add("Urza's"); + this.subtype.add(SubType.URZAS); // {tap}: Add {C} to your mana pool. this.addAbility(new ColorlessManaAbility()); diff --git a/Mage.Sets/src/mage/cards/u/UrzasMine.java b/Mage.Sets/src/mage/cards/u/UrzasMine.java index 4e0922734a..839a112223 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasMine.java +++ b/Mage.Sets/src/mage/cards/u/UrzasMine.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.Mana; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.UrzaTerrainValue; @@ -35,6 +34,9 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,8 +45,7 @@ import mage.constants.CardType; public class UrzasMine extends CardImpl { public UrzasMine(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Urza's"); - this.subtype.add("Mine"); + this.subtype.add(SubType.URZAS, SubType.MINE); // {T}: Add {C} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {C}{C} to your mana pool instead. Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(2), diff --git a/Mage.Sets/src/mage/cards/u/UrzasPowerPlant.java b/Mage.Sets/src/mage/cards/u/UrzasPowerPlant.java index 8f00d813cc..950420f4bc 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasPowerPlant.java +++ b/Mage.Sets/src/mage/cards/u/UrzasPowerPlant.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.Mana; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.UrzaTerrainValue; @@ -35,6 +34,9 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,8 +45,7 @@ import mage.constants.CardType; public class UrzasPowerPlant extends CardImpl { public UrzasPowerPlant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Urza's"); - this.subtype.add("Power-Plant"); + this.subtype.add(SubType.URZAS, SubType.POWER_PLANT); // {T}: Add {C} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {C}{C} to your mana pool instead. Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(2), diff --git a/Mage.Sets/src/mage/cards/u/UrzasTower.java b/Mage.Sets/src/mage/cards/u/UrzasTower.java index d71f144589..c1a4596556 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasTower.java +++ b/Mage.Sets/src/mage/cards/u/UrzasTower.java @@ -27,7 +27,6 @@ */ package mage.cards.u; -import java.util.UUID; import mage.Mana; import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.UrzaTerrainValue; @@ -35,6 +34,9 @@ import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -43,8 +45,7 @@ import mage.constants.CardType; public class UrzasTower extends CardImpl { public UrzasTower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); - this.subtype.add("Urza's"); - this.subtype.add("Tower"); + this.subtype.add(SubType.URZAS, SubType.TOWER); // {T}: Add {C} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {C}{C}{C} to your mana pool instead. Ability urzaManaAbility = new DynamicManaAbility(Mana.ColorlessMana(1), new UrzaTerrainValue(3), diff --git a/Mage.Sets/src/mage/cards/v/VeilOfSecrecy.java b/Mage.Sets/src/mage/cards/v/VeilOfSecrecy.java index 7b24ab53c9..ce764f24c8 100644 --- a/Mage.Sets/src/mage/cards/v/VeilOfSecrecy.java +++ b/Mage.Sets/src/mage/cards/v/VeilOfSecrecy.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; import mage.abilities.effects.Effect; @@ -39,11 +38,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +60,7 @@ public class VeilOfSecrecy extends CardImpl { public VeilOfSecrecy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Target creature gains shroud until end of turn and is can't be blocked this turn. Effect effect = new GainAbilityTargetEffect(ShroudAbility.getInstance(), Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/v/VerdantConfluence.java b/Mage.Sets/src/mage/cards/v/VerdantConfluence.java index 1e8bd70bca..fcefaf301f 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantConfluence.java +++ b/Mage.Sets/src/mage/cards/v/VerdantConfluence.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; @@ -36,12 +35,14 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.counters.CounterType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.common.FilterPermanentCard; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -67,7 +68,7 @@ public class VerdantConfluence extends CardImpl { this.getSpellAbility().getModes().addMode(mode); // Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD); mode = new Mode(); mode.getEffects().add(new SearchLibraryPutInPlayEffect(target, true)); this.getSpellAbility().getModes().addMode(mode); diff --git a/Mage.Sets/src/mage/cards/v/VerdantCrescendo.java b/Mage.Sets/src/mage/cards/v/VerdantCrescendo.java index 2fe165a593..f5ef749dbe 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantCrescendo.java +++ b/Mage.Sets/src/mage/cards/v/VerdantCrescendo.java @@ -27,17 +27,18 @@ */ package mage.cards.v; -import java.util.UUID; import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,7 @@ public class VerdantCrescendo extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); // Search your library for a basic land card and put it onto the battlefield tapped. - this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, false)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, false)); // Search your library and graveyard for a card named Nissa, Nature's Artisan, reveal it, and put it into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect(filter, true)); diff --git a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java index 3c2104243c..4ea844a8ce 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java +++ b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java @@ -40,6 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.game.Game; import mage.players.Player; @@ -114,7 +115,7 @@ class VeteranExplorerEffect extends OneShotEffect { private void chooseAndSearchLibrary(List usingPlayers, Player player, Ability source, Game game) { if (player.chooseUse(Outcome.PutCardInPlay, "Search your library for up to two basic land cards and put them onto the battlefield?", source, game)) { usingPlayers.add(player); - TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD); if (player.searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { for (UUID cardId: (List)target.getTargets()) { diff --git a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java b/Mage.Sets/src/mage/cards/v/VigilantMartyr.java index edaab0462f..e6d6f3d5b0 100644 --- a/Mage.Sets/src/mage/cards/v/VigilantMartyr.java +++ b/Mage.Sets/src/mage/cards/v/VigilantMartyr.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -41,11 +40,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterSpell; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.other.TargetsPermanentPredicate; import mage.target.TargetSpell; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -55,7 +56,7 @@ public class VigilantMartyr extends CardImpl { private final static FilterSpell filter = new FilterSpell("spell that targets an enchantment"); static { - filter.add(new TargetsPermanentPredicate(new FilterEnchantmentPermanent())); + filter.add(new TargetsPermanentPredicate(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); } public VigilantMartyr(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/ViridianEmissary.java b/Mage.Sets/src/mage/cards/v/ViridianEmissary.java index 4eea4c13e6..5c62fc7ee7 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianEmissary.java +++ b/Mage.Sets/src/mage/cards/v/ViridianEmissary.java @@ -27,16 +27,17 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -52,7 +53,7 @@ public class ViridianEmissary extends CardImpl { this.toughness = new MageInt(1); // When Viridian Emissary dies, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), true)); + this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); } public ViridianEmissary(final ViridianEmissary card) { diff --git a/Mage.Sets/src/mage/cards/v/ViridianZealot.java b/Mage.Sets/src/mage/cards/v/ViridianZealot.java index 0b0271e581..ccd4f184ae 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianZealot.java +++ b/Mage.Sets/src/mage/cards/v/ViridianZealot.java @@ -27,7 +27,6 @@ */ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -57,7 +58,7 @@ public class ViridianZealot extends CardImpl { // {1}{G}, Sacrifice Viridian Zealot: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VitalSurge.java b/Mage.Sets/src/mage/cards/v/VitalSurge.java index 9ced03fbc5..36b6e7f960 100644 --- a/Mage.Sets/src/mage/cards/v/VitalSurge.java +++ b/Mage.Sets/src/mage/cards/v/VitalSurge.java @@ -27,12 +27,14 @@ */ package mage.cards.v; -import java.util.UUID; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -42,7 +44,7 @@ public class VitalSurge extends CardImpl { public VitalSurge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // You gain 3 life. diff --git a/Mage.Sets/src/mage/cards/w/WakingNightmare.java b/Mage.Sets/src/mage/cards/w/WakingNightmare.java index fb595f9953..7dcf4824fc 100644 --- a/Mage.Sets/src/mage/cards/w/WakingNightmare.java +++ b/Mage.Sets/src/mage/cards/w/WakingNightmare.java @@ -28,13 +28,15 @@ package mage.cards.w; -import java.util.UUID; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author Loki @@ -43,7 +45,7 @@ public class WakingNightmare extends CardImpl { public WakingNightmare (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); this.getSpellAbility().addTarget(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/cards/w/WanderersTwig.java b/Mage.Sets/src/mage/cards/w/WanderersTwig.java index 42a0d91224..f756f2884c 100644 --- a/Mage.Sets/src/mage/cards/w/WanderersTwig.java +++ b/Mage.Sets/src/mage/cards/w/WanderersTwig.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -37,9 +36,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Loki @@ -51,7 +52,7 @@ public class WanderersTwig extends CardImpl { // {1}, Sacrifice Wanderer's Twig: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 9433547b08..85058af51f 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -41,12 +40,13 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactPermanent; -import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -127,8 +127,8 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { return true; } if (card.isEnchantment() - && game.getBattlefield().countAll(new FilterEnchantmentPermanent(), opponent.getId(), game) - > game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game)) { + && game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, opponent.getId(), game) + > game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game)) { return true; } final int yourLands = game.getBattlefield().countAll(new FilterLandPermanent(), source.getControllerId(), game); diff --git a/Mage.Sets/src/mage/cards/w/WarpedLandscape.java b/Mage.Sets/src/mage/cards/w/WarpedLandscape.java index e56f37ffe1..bb65fadf34 100644 --- a/Mage.Sets/src/mage/cards/w/WarpedLandscape.java +++ b/Mage.Sets/src/mage/cards/w/WarpedLandscape.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -39,9 +38,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author fireshoes @@ -56,7 +57,7 @@ public class WarpedLandscape extends CardImpl { // {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java index 6cc580c70f..ea78d14de1 100644 --- a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java +++ b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.*; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -39,7 +38,7 @@ import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterPermanent; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -48,6 +47,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import java.util.*; + /** * * @author LevelX2 @@ -126,7 +127,7 @@ class WaveOfVitriolEffect extends OneShotEffect { for (Map.Entry entry : sacrificedLands.entrySet()) { if (entry.getKey().chooseUse(Outcome.PutLandInPlay, "Search your library for up to " + entry.getValue() + " basic lands?", source, game)) { - TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue(), new FilterBasicLandCard()); + TargetCardInLibrary target = new TargetCardInLibrary(0, entry.getValue(), StaticFilters.FILTER_BASIC_LAND_CARD); if (entry.getKey().searchLibrary(target, game)) { if (!target.getTargets().isEmpty()) { toBattlefield.addAll(target.getTargets()); diff --git a/Mage.Sets/src/mage/cards/w/WayfarersBauble.java b/Mage.Sets/src/mage/cards/w/WayfarersBauble.java index e29642b58d..1d219a10d0 100644 --- a/Mage.Sets/src/mage/cards/w/WayfarersBauble.java +++ b/Mage.Sets/src/mage/cards/w/WayfarersBauble.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,9 +37,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -52,7 +53,7 @@ public class WayfarersBauble extends CardImpl { // {2}, {tap}, Sacrifice Wayfarer's Bauble: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()),true, true, Outcome.PutLandInPlay), new GenericManaCost(2)); + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD),true, true, Outcome.PutLandInPlay), new GenericManaCost(2)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WearAway.java b/Mage.Sets/src/mage/cards/w/WearAway.java index c4a1b52fae..98580f7cde 100644 --- a/Mage.Sets/src/mage/cards/w/WearAway.java +++ b/Mage.Sets/src/mage/cards/w/WearAway.java @@ -27,16 +27,18 @@ */ package mage.cards.w; -import java.util.UUID; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.SpliceOntoArcaneAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.constants.SubType; +import mage.filter.StaticFilters; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -45,11 +47,11 @@ public class WearAway extends CardImpl { public WearAway(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{G}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - Target target = new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()); + Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); this.getSpellAbility().addTarget(target); // Splice onto Arcane {3}{G} this.addAbility(new SpliceOntoArcaneAbility("{3}{G}")); diff --git a/Mage.Sets/src/mage/cards/w/WhiplashTrap.java b/Mage.Sets/src/mage/cards/w/WhiplashTrap.java index ae532d3b2b..68b4d1ec36 100644 --- a/Mage.Sets/src/mage/cards/w/WhiplashTrap.java +++ b/Mage.Sets/src/mage/cards/w/WhiplashTrap.java @@ -27,8 +27,6 @@ */ package mage.cards.w; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.costs.AlternativeCostSourceAbility; @@ -37,11 +35,15 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; +import java.util.List; +import java.util.UUID; + /** * @author jeffwadsworth */ @@ -49,7 +51,7 @@ public class WhiplashTrap extends CardImpl { public WhiplashTrap(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); - this.subtype.add("Trap"); + this.subtype.add(SubType.TRAP); // If an opponent had two or more creatures enter the battlefield under his or her control this turn, you may pay {U} rather than pay Whiplash Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{U}"), WhiplashTrapCondition.instance), new PermanentsEnteredBattlefieldWatcher()); diff --git a/Mage.Sets/src/mage/cards/w/WickerboughElder.java b/Mage.Sets/src/mage/cards/w/WickerboughElder.java index a37ca0f2f6..ad74f13525 100644 --- a/Mage.Sets/src/mage/cards/w/WickerboughElder.java +++ b/Mage.Sets/src/mage/cards/w/WickerboughElder.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; @@ -42,9 +41,11 @@ import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.target.TargetPermanent; +import java.util.UUID; + /** * @author Loki */ @@ -63,7 +64,7 @@ public class WickerboughElder extends CardImpl { // {G}, Remove a -1/-1 counter from Wickerbough Elder: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.G)); ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(1))); - ability.addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java b/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java index 0a3581dfb4..474cab0b91 100644 --- a/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java +++ b/Mage.Sets/src/mage/cards/w/WildFieldScarecrow.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; @@ -59,7 +60,7 @@ public class WildFieldScarecrow extends CardImpl { // {2}, Sacrifice Wild-Field Scarecrow: Search your library for up to two basic land cards, reveal them, and put them into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), new GenericManaCost(2)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WildWanderer.java b/Mage.Sets/src/mage/cards/w/WildWanderer.java index 9e86e57e62..14ddaed187 100644 --- a/Mage.Sets/src/mage/cards/w/WildWanderer.java +++ b/Mage.Sets/src/mage/cards/w/WildWanderer.java @@ -27,16 +27,17 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author spjspj @@ -51,7 +52,7 @@ public class WildWanderer extends CardImpl { this.toughness = new MageInt(2); // When Wild Wanderer enters the battlefield, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true))); } public WildWanderer(final WildWanderer card) { diff --git a/Mage.Sets/src/mage/cards/w/Wirecat.java b/Mage.Sets/src/mage/cards/w/Wirecat.java index 8aa5840315..04280c5c5d 100644 --- a/Mage.Sets/src/mage/cards/w/Wirecat.java +++ b/Mage.Sets/src/mage/cards/w/Wirecat.java @@ -27,7 +27,6 @@ */ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -37,10 +36,12 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.filter.common.FilterEnchantmentPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Derpthemeus @@ -95,8 +96,7 @@ public class Wirecat extends CardImpl { @Override public boolean applies(Permanent permanent, Ability source, Game game) { if (permanent.getId().equals(source.getSourceId())) { - FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent(); - return game.getBattlefield().contains(filter, 1, game); + return game.getBattlefield().contains(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, game); } return false; } diff --git a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java index d6d6a40b57..7df123b93b 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandCemetery.java @@ -28,7 +28,6 @@ package mage.cards.w; -import java.util.UUID; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; @@ -40,12 +39,13 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; +import java.util.UUID; + /** * @author nantuko */ @@ -60,7 +60,7 @@ public class WoodlandCemetery extends CardImpl { public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) { 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 Swamp or a Forest"; this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java index 2568dac419..a2d7ed67f7 100644 --- a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java +++ b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java @@ -56,24 +56,22 @@ import mage.target.common.TargetArtifactPermanent; public class XenicPoltergeist extends CardImpl { private static final FilterArtifactPermanent filter = new FilterArtifactPermanent(); + static { filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); } - + public XenicPoltergeist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); this.subtype.add("Spirit"); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Until your next upkeep, target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost. - XenicPoltergeistEffect effect = new XenicPoltergeistEffect(Duration.Custom); - effect.setDurationToPhase(PhaseStep.UPKEEP); - - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new XenicPoltergeistEffect(), new TapSourceCost()); ability.addTarget(new TargetArtifactPermanent(filter)); this.addAbility(ability); - + } public XenicPoltergeist(final XenicPoltergeist card) { @@ -85,19 +83,18 @@ public class XenicPoltergeist extends CardImpl { return new XenicPoltergeist(this); } } + class XenicPoltergeistEffect extends ContinuousEffectImpl { - private PhaseStep durationPhaseStep = null; - private UUID durationPlayerId; - private boolean sameStep; - private static final FilterArtifactPermanent filter = new FilterArtifactPermanent(); + static { filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); } - public XenicPoltergeistEffect(Duration duration) { - super(duration, Outcome.BecomeCreature); - staticText = "Each noncreature artifact loses its abilities and is an artifact creature with power and toughness each equal to its converted mana cost"; + + public XenicPoltergeistEffect() { + super(Duration.Custom, Outcome.BecomeCreature); + staticText = "Until your next upkeep, target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost"; } public XenicPoltergeistEffect(final XenicPoltergeistEffect effect) { @@ -108,35 +105,17 @@ class XenicPoltergeistEffect extends ContinuousEffectImpl { public XenicPoltergeistEffect copy() { return new XenicPoltergeistEffect(this); } - - public void setDurationToPhase(PhaseStep phaseStep) { - durationPhaseStep = phaseStep; - } - @Override - public void init(Ability source, Game game) { - super.init(source, game); - if (durationPhaseStep != null) { - durationPlayerId = source.getControllerId(); - sameStep = true; - } - } - @Override public boolean isInactive(Ability source, Game game) { - if (super.isInactive(source, game)) { - return true; - } - if (durationPhaseStep != null && durationPhaseStep == game.getPhase().getStep().getType()) { - if (!sameStep && game.getActivePlayerId().equals(durationPlayerId) || game.getPlayer(durationPlayerId).hasReachedNextTurnAfterLeaving()) { + if (game.getPhase().getStep().getType() == PhaseStep.UPKEEP) { + if (game.getActivePlayerId().equals(source.getControllerId())) { return true; } - } else { - sameStep = false; } return false; } - + @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { switch (layer) { @@ -144,22 +123,22 @@ class XenicPoltergeistEffect extends ContinuousEffectImpl { if (sublayer == SubLayer.NA) { UUID permanentId = targetPointer.getFirst(game, source); Permanent permanent = game.getPermanentOrLKIBattlefield(permanentId); - if(permanent != null){ + if (permanent != null) { permanent.addCardType(CardType.CREATURE); - } + } } break; - + case PTChangingEffects_7: if (sublayer == SubLayer.SetPT_7b) { UUID permanentId = targetPointer.getFirst(game, source); Permanent permanent = game.getPermanentOrLKIBattlefield(permanentId); - if (permanent != null){ + if (permanent != null) { int manaCost = permanent.getConvertedManaCost(); permanent.getPower().setValue(manaCost); permanent.getToughness().setValue(manaCost); } - } + } } return true; } @@ -169,10 +148,10 @@ class XenicPoltergeistEffect extends ContinuousEffectImpl { return false; } - @Override public boolean hasLayer(Layer layer) { - return layer == Layer.PTChangingEffects_7 || layer == Layer.TypeChangingEffects_4; + return layer == Layer.PTChangingEffects_7 + || layer == Layer.TypeChangingEffects_4; } } diff --git a/Mage.Sets/src/mage/cards/y/YavimayaElder.java b/Mage.Sets/src/mage/cards/y/YavimayaElder.java index bbb764c76a..6ee9b4c864 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaElder.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaElder.java @@ -27,7 +27,6 @@ */ package mage.cards.y; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; @@ -40,9 +39,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -58,7 +59,7 @@ public class YavimayaElder extends CardImpl { this.toughness = new MageInt(1); // When Yavimaya Elder dies, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library. - this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterBasicLandCard()), true), true)); + this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); // {2}, Sacrifice Yavimaya Elder: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/y/YavimayaGranger.java b/Mage.Sets/src/mage/cards/y/YavimayaGranger.java index c3304ec43b..ebd5fba8b8 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaGranger.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaGranger.java @@ -27,7 +27,6 @@ */ package mage.cards.y; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; @@ -35,16 +34,17 @@ import mage.abilities.keyword.EchoAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author Backfir3 */ public class YavimayaGranger extends CardImpl { - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); public YavimayaGranger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); @@ -56,7 +56,7 @@ public class YavimayaGranger extends CardImpl { this.addAbility(new EchoAbility("{2}{G}")); //When Yavimaya Granger enters the battlefield, you may search your library for a basic land card, //put that card onto the battlefield tapped, then shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true), true)); } public YavimayaGranger(final YavimayaGranger card) { diff --git a/Mage.Sets/src/mage/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index eb5da37b7b..e336d78aed 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -115,6 +115,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Infernal Tutor", 46, Rarity.RARE, mage.cards.i.InfernalTutor.class)); cards.add(new SetCardInfo("Isperia the Inscrutable", 114, Rarity.RARE, mage.cards.i.IsperiaTheInscrutable.class)); cards.add(new SetCardInfo("Kill-Suit Cultist", 65, Rarity.COMMON, mage.cards.k.KillSuitCultist.class)); + cards.add(new SetCardInfo("Kindle the Carnage", 66, Rarity.UNCOMMON, mage.cards.k.KindleTheCarnage.class)); cards.add(new SetCardInfo("Leafdrake Roost", 116, Rarity.UNCOMMON, mage.cards.l.LeafdrakeRoost.class)); cards.add(new SetCardInfo("Loaming Shaman", 87, Rarity.RARE, mage.cards.l.LoamingShaman.class)); cards.add(new SetCardInfo("Lyzolda, the Blood Witch", 117, Rarity.RARE, mage.cards.l.LyzoldaTheBloodWitch.class)); diff --git a/Mage.Sets/src/mage/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index c084a0b82e..0c95c4789d 100644 --- a/Mage.Sets/src/mage/sets/Exodus.java +++ b/Mage.Sets/src/mage/sets/Exodus.java @@ -108,6 +108,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Null Brooch", 136, Rarity.RARE, mage.cards.n.NullBrooch.class)); cards.add(new SetCardInfo("Oath of Druids", 115, Rarity.RARE, mage.cards.o.OathOfDruids.class)); cards.add(new SetCardInfo("Oath of Lieges", 11, Rarity.RARE, mage.cards.o.OathOfLieges.class)); + cards.add(new SetCardInfo("Oath of Scholars", 42, Rarity.RARE, mage.cards.o.OathOfScholars.class)); cards.add(new SetCardInfo("Ogre Shaman", 91, Rarity.RARE, mage.cards.o.OgreShaman.class)); cards.add(new SetCardInfo("Onslaught", 92, Rarity.COMMON, mage.cards.o.Onslaught.class)); cards.add(new SetCardInfo("Paladin en-Vec", 12, Rarity.RARE, mage.cards.p.PaladinEnVec.class)); @@ -140,6 +141,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Skyshroud Elite", 123, Rarity.UNCOMMON, mage.cards.s.SkyshroudElite.class)); cards.add(new SetCardInfo("Slaughter", 74, Rarity.UNCOMMON, mage.cards.s.Slaughter.class)); cards.add(new SetCardInfo("Soltari Visionary", 20, Rarity.COMMON, mage.cards.s.SoltariVisionary.class)); + cards.add(new SetCardInfo("Song of Serenity", 125, Rarity.UNCOMMON, mage.cards.s.SongOfSerenity.class)); cards.add(new SetCardInfo("Sonic Burst", 103, Rarity.COMMON, mage.cards.s.SonicBurst.class)); cards.add(new SetCardInfo("Soul Warden", 21, Rarity.COMMON, mage.cards.s.SoulWarden.class)); cards.add(new SetCardInfo("Spellbook", 138, Rarity.UNCOMMON, mage.cards.s.Spellbook.class)); diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index 6b52e33f77..8ac03f6308 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -1,305 +1,309 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets; - -import mage.cards.CardGraphicInfo; -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author North - */ -public class IceAge extends ExpansionSet { - - private static final IceAge instance = new IceAge(); - - public static IceAge getInstance() { - return instance; - } - - private IceAge() { - super("Ice Age", "ICE", ExpansionSet.buildDate(1995, 5, 1), SetType.EXPANSION); - this.blockName = "Ice Age"; - this.hasBoosters = true; - this.numBoosterLands = 0; - this.numBoosterCommon = 11; - this.numBoosterUncommon = 3; - this.numBoosterRare = 1; - this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("Abyssal Specter", 1, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); - cards.add(new SetCardInfo("Adarkar Sentinel", 281, Rarity.UNCOMMON, mage.cards.a.AdarkarSentinel.class)); - cards.add(new SetCardInfo("Adarkar Wastes", 326, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); - cards.add(new SetCardInfo("Aegis of the Meek", 282, Rarity.RARE, mage.cards.a.AegisOfTheMeek.class)); - cards.add(new SetCardInfo("Altar of Bone", 359, Rarity.RARE, mage.cards.a.AltarOfBone.class)); - cards.add(new SetCardInfo("Anarchy", 170, Rarity.UNCOMMON, mage.cards.a.Anarchy.class)); - cards.add(new SetCardInfo("Arenson's Aura", 227, Rarity.COMMON, mage.cards.a.ArensonsAura.class)); - cards.add(new SetCardInfo("Armor of Faith", 228, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class)); - cards.add(new SetCardInfo("Arnjlot's Ascent", 57, Rarity.COMMON, mage.cards.a.ArnjlotsAscent.class)); - cards.add(new SetCardInfo("Aurochs", 113, Rarity.COMMON, mage.cards.a.Aurochs.class)); - cards.add(new SetCardInfo("Balduvian Barbarians", 172, Rarity.COMMON, mage.cards.b.BalduvianBarbarians.class)); - cards.add(new SetCardInfo("Balduvian Bears", 114, Rarity.COMMON, mage.cards.b.BalduvianBears.class)); - cards.add(new SetCardInfo("Barbed Sextant", 287, Rarity.COMMON, mage.cards.b.BarbedSextant.class)); - cards.add(new SetCardInfo("Battle Frenzy", 175, Rarity.COMMON, mage.cards.b.BattleFrenzy.class)); - cards.add(new SetCardInfo("Binding Grasp", 60, Rarity.UNCOMMON, mage.cards.b.BindingGrasp.class)); - cards.add(new SetCardInfo("Black Scarab", 230, Rarity.UNCOMMON, mage.cards.b.BlackScarab.class)); - cards.add(new SetCardInfo("Blessed Wine", 231, Rarity.COMMON, mage.cards.b.BlessedWine.class)); - cards.add(new SetCardInfo("Blinking Spirit", 232, Rarity.RARE, mage.cards.b.BlinkingSpirit.class)); - cards.add(new SetCardInfo("Blue Scarab", 233, Rarity.UNCOMMON, mage.cards.b.BlueScarab.class)); - cards.add(new SetCardInfo("Brainstorm", 61, Rarity.COMMON, mage.cards.b.Brainstorm.class)); - cards.add(new SetCardInfo("Brushland", 327, Rarity.RARE, mage.cards.b.Brushland.class)); - cards.add(new SetCardInfo("Burnt Offering", 4, Rarity.COMMON, mage.cards.b.BurntOffering.class)); - cards.add(new SetCardInfo("Caribou Range", 235, Rarity.RARE, mage.cards.c.CaribouRange.class)); - cards.add(new SetCardInfo("Celestial Sword", 289, Rarity.RARE, mage.cards.c.CelestialSword.class)); - cards.add(new SetCardInfo("Centaur Archer", 360, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); - cards.add(new SetCardInfo("Chub Toad", 117, Rarity.COMMON, mage.cards.c.ChubToad.class)); - cards.add(new SetCardInfo("Circle of Protection: Black", 236, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlack.class)); - cards.add(new SetCardInfo("Circle of Protection: Blue", 237, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlue.class)); - cards.add(new SetCardInfo("Circle of Protection: Green", 238, Rarity.COMMON, mage.cards.c.CircleOfProtectionGreen.class)); - cards.add(new SetCardInfo("Circle of Protection: Red", 239, Rarity.COMMON, mage.cards.c.CircleOfProtectionRed.class)); - cards.add(new SetCardInfo("Circle of Protection: White", 240, Rarity.COMMON, mage.cards.c.CircleOfProtectionWhite.class)); - cards.add(new SetCardInfo("Clairvoyance", 63, Rarity.COMMON, mage.cards.c.Clairvoyance.class)); - cards.add(new SetCardInfo("Cold Snap", 241, Rarity.UNCOMMON, mage.cards.c.ColdSnap.class)); - cards.add(new SetCardInfo("Conquer", 180, Rarity.UNCOMMON, mage.cards.c.Conquer.class)); - cards.add(new SetCardInfo("Counterspell", 64, Rarity.COMMON, mage.cards.c.Counterspell.class)); - cards.add(new SetCardInfo("Crown of the Ages", 290, Rarity.RARE, mage.cards.c.CrownOfTheAges.class)); - cards.add(new SetCardInfo("Curse of Marit Lage", 181, Rarity.RARE, mage.cards.c.CurseOfMaritLage.class)); - cards.add(new SetCardInfo("Dance of the Dead", 6, Rarity.UNCOMMON, mage.cards.d.DanceOfTheDead.class)); - cards.add(new SetCardInfo("Dark Banishing", 7, Rarity.COMMON, mage.cards.d.DarkBanishing.class)); - cards.add(new SetCardInfo("Dark Ritual", 8, Rarity.COMMON, mage.cards.d.DarkRitual.class)); - cards.add(new SetCardInfo("Death Ward", 243, Rarity.COMMON, mage.cards.d.DeathWard.class)); - cards.add(new SetCardInfo("Deflection", 65, Rarity.RARE, mage.cards.d.Deflection.class)); - cards.add(new SetCardInfo("Demonic Consultation", 9, Rarity.UNCOMMON, mage.cards.d.DemonicConsultation.class)); - cards.add(new SetCardInfo("Despotic Scepter", 291, Rarity.RARE, mage.cards.d.DespoticScepter.class)); - cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class)); - cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class)); - cards.add(new SetCardInfo("Elder Druid", 120, Rarity.RARE, mage.cards.e.ElderDruid.class)); - cards.add(new SetCardInfo("Elemental Augury", 364, Rarity.RARE, mage.cards.e.ElementalAugury.class)); - cards.add(new SetCardInfo("Enduring Renewal", 247, Rarity.RARE, mage.cards.e.EnduringRenewal.class)); - cards.add(new SetCardInfo("Enervate", 67, Rarity.COMMON, mage.cards.e.Enervate.class)); - cards.add(new SetCardInfo("Errantry", 183, Rarity.COMMON, mage.cards.e.Errantry.class)); - cards.add(new SetCardInfo("Fanatical Fever", 122, Rarity.UNCOMMON, mage.cards.f.FanaticalFever.class)); - cards.add(new SetCardInfo("Fear", 12, Rarity.COMMON, mage.cards.f.Fear.class)); - cards.add(new SetCardInfo("Fiery Justice", 366, Rarity.RARE, mage.cards.f.FieryJustice.class)); - cards.add(new SetCardInfo("Fire Covenant", 367, Rarity.UNCOMMON, mage.cards.f.FireCovenant.class)); - cards.add(new SetCardInfo("Flame Spirit", 184, Rarity.UNCOMMON, mage.cards.f.FlameSpirit.class)); - cards.add(new SetCardInfo("Flare", 185, Rarity.COMMON, mage.cards.f.Flare.class)); - cards.add(new SetCardInfo("Flow of Maggots", 13, Rarity.RARE, mage.cards.f.FlowOfMaggots.class)); - cards.add(new SetCardInfo("Folk of the Pines", 123, Rarity.COMMON, mage.cards.f.FolkOfThePines.class)); - cards.add(new SetCardInfo("Forbidden Lore", 124, Rarity.RARE, mage.cards.f.ForbiddenLore.class)); - cards.add(new SetCardInfo("Force Void", 70, Rarity.UNCOMMON, mage.cards.f.ForceVoid.class)); - cards.add(new SetCardInfo("Forest", 328, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forest", 329, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forest", 330, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forgotten Lore", 125, Rarity.UNCOMMON, mage.cards.f.ForgottenLore.class)); - cards.add(new SetCardInfo("Foul Familiar", 14, Rarity.COMMON, mage.cards.f.FoulFamiliar.class)); - cards.add(new SetCardInfo("Fumarole", 369, Rarity.UNCOMMON, mage.cards.f.Fumarole.class)); - cards.add(new SetCardInfo("Fyndhorn Bow", 293, Rarity.UNCOMMON, mage.cards.f.FyndhornBow.class)); - cards.add(new SetCardInfo("Fyndhorn Brownie", 130, Rarity.COMMON, mage.cards.f.FyndhornBrownie.class)); - cards.add(new SetCardInfo("Fyndhorn Elder", 131, Rarity.UNCOMMON, mage.cards.f.FyndhornElder.class)); - cards.add(new SetCardInfo("Fyndhorn Elves", 132, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); - cards.add(new SetCardInfo("Game of Chaos", 186, Rarity.RARE, mage.cards.g.GameOfChaos.class)); - cards.add(new SetCardInfo("Gangrenous Zombies", 15, Rarity.COMMON, mage.cards.g.GangrenousZombies.class)); - cards.add(new SetCardInfo("Giant Growth", 134, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); - cards.add(new SetCardInfo("Glacial Chasm", 331, Rarity.UNCOMMON, mage.cards.g.GlacialChasm.class)); - cards.add(new SetCardInfo("Glacial Crevasses", 187, Rarity.RARE, mage.cards.g.GlacialCrevasses.class)); - cards.add(new SetCardInfo("Glacial Wall", 71, Rarity.UNCOMMON, mage.cards.g.GlacialWall.class)); - cards.add(new SetCardInfo("Goblin Mutant", 188, Rarity.UNCOMMON, mage.cards.g.GoblinMutant.class)); - cards.add(new SetCardInfo("Goblin Snowman", 191, Rarity.UNCOMMON, mage.cards.g.GoblinSnowman.class)); - cards.add(new SetCardInfo("Gorilla Pack", 135, Rarity.COMMON, mage.cards.g.GorillaPack.class)); - cards.add(new SetCardInfo("Gravebind", 17, Rarity.RARE, mage.cards.g.Gravebind.class)); - cards.add(new SetCardInfo("Green Scarab", 252, Rarity.UNCOMMON, mage.cards.g.GreenScarab.class)); - cards.add(new SetCardInfo("Hallowed Ground", 253, Rarity.UNCOMMON, mage.cards.h.HallowedGround.class)); - cards.add(new SetCardInfo("Heal", 254, Rarity.COMMON, mage.cards.h.Heal.class)); - cards.add(new SetCardInfo("Hecatomb", 18, Rarity.RARE, mage.cards.h.Hecatomb.class)); - cards.add(new SetCardInfo("Hematite Talisman", 295, Rarity.UNCOMMON, mage.cards.h.HematiteTalisman.class)); - cards.add(new SetCardInfo("Hoar Shade", 19, Rarity.COMMON, mage.cards.h.HoarShade.class)); - cards.add(new SetCardInfo("Hot Springs", 136, Rarity.RARE, mage.cards.h.HotSprings.class)); - cards.add(new SetCardInfo("Howl from Beyond", 20, Rarity.COMMON, mage.cards.h.HowlFromBeyond.class)); - cards.add(new SetCardInfo("Hurricane", 137, Rarity.UNCOMMON, mage.cards.h.Hurricane.class)); - cards.add(new SetCardInfo("Hyalopterous Lemure", 21, Rarity.UNCOMMON, mage.cards.h.HyalopterousLemure.class)); - cards.add(new SetCardInfo("Hydroblast", 72, Rarity.COMMON, mage.cards.h.Hydroblast.class)); - cards.add(new SetCardInfo("Hymn of Rebirth", 373, Rarity.UNCOMMON, mage.cards.h.HymnOfRebirth.class)); - cards.add(new SetCardInfo("Icequake", 22, Rarity.UNCOMMON, mage.cards.i.Icequake.class)); - cards.add(new SetCardInfo("Icy Manipulator", 297, Rarity.UNCOMMON, mage.cards.i.IcyManipulator.class)); - cards.add(new SetCardInfo("Icy Prison", 74, Rarity.RARE, mage.cards.i.IcyPrison.class)); - cards.add(new SetCardInfo("Illusionary Forces", 75, Rarity.COMMON, mage.cards.i.IllusionaryForces.class)); - cards.add(new SetCardInfo("Illusionary Wall", 78, Rarity.COMMON, mage.cards.i.IllusionaryWall.class)); - cards.add(new SetCardInfo("Illusions of Grandeur", 79, Rarity.RARE, mage.cards.i.IllusionsOfGrandeur.class)); - cards.add(new SetCardInfo("Imposing Visage", 193, Rarity.COMMON, mage.cards.i.ImposingVisage.class)); - cards.add(new SetCardInfo("Incinerate", 194, Rarity.COMMON, mage.cards.i.Incinerate.class)); - cards.add(new SetCardInfo("Infernal Darkness", 23, Rarity.RARE, mage.cards.i.InfernalDarkness.class)); - cards.add(new SetCardInfo("Infuse", 80, Rarity.COMMON, mage.cards.i.Infuse.class)); - cards.add(new SetCardInfo("Island", 334, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Island", 336, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Jester's Cap", 299, Rarity.RARE, mage.cards.j.JestersCap.class)); - cards.add(new SetCardInfo("Jester's Mask", 300, Rarity.RARE, mage.cards.j.JestersMask.class)); - cards.add(new SetCardInfo("Jeweled Amulet", 301, Rarity.UNCOMMON, mage.cards.j.JeweledAmulet.class)); - cards.add(new SetCardInfo("Johtull Wurm", 138, Rarity.UNCOMMON, mage.cards.j.JohtullWurm.class)); - cards.add(new SetCardInfo("Jokulhaups", 195, Rarity.RARE, mage.cards.j.Jokulhaups.class)); - cards.add(new SetCardInfo("Juniper Order Druid", 139, Rarity.COMMON, mage.cards.j.JuniperOrderDruid.class)); - cards.add(new SetCardInfo("Justice", 256, Rarity.UNCOMMON, mage.cards.j.Justice.class)); - cards.add(new SetCardInfo("Karplusan Forest", 337, Rarity.RARE, mage.cards.k.KarplusanForest.class)); - cards.add(new SetCardInfo("Karplusan Yeti", 197, Rarity.RARE, mage.cards.k.KarplusanYeti.class)); - cards.add(new SetCardInfo("Kjeldoran Dead", 25, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); - cards.add(new SetCardInfo("Kjeldoran Royal Guard", 262, Rarity.RARE, mage.cards.k.KjeldoranRoyalGuard.class)); - cards.add(new SetCardInfo("Knight of Stromgald", 26, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); - cards.add(new SetCardInfo("Krovikan Fetish", 28, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); - cards.add(new SetCardInfo("Krovikan Sorcerer", 81, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); - cards.add(new SetCardInfo("Land Cap", 338, Rarity.RARE, mage.cards.l.LandCap.class)); - cards.add(new SetCardInfo("Lapis Lazuli Talisman", 302, Rarity.UNCOMMON, mage.cards.l.LapisLazuliTalisman.class)); - cards.add(new SetCardInfo("Lava Tubes", 339, Rarity.RARE, mage.cards.l.LavaTubes.class)); - cards.add(new SetCardInfo("Legions of Lim-Dul", 30, Rarity.COMMON, mage.cards.l.LegionsOfLimDul.class)); - cards.add(new SetCardInfo("Leshrac's Rite", 31, Rarity.UNCOMMON, mage.cards.l.LeshracsRite.class)); - cards.add(new SetCardInfo("Lhurgoyf", 140, Rarity.RARE, mage.cards.l.Lhurgoyf.class)); - cards.add(new SetCardInfo("Lightning Blow", 266, Rarity.RARE, mage.cards.l.LightningBlow.class)); - cards.add(new SetCardInfo("Lure", 141, Rarity.UNCOMMON, mage.cards.l.Lure.class)); - cards.add(new SetCardInfo("Magus of the Unseen", 82, Rarity.RARE, mage.cards.m.MagusOfTheUnseen.class)); - cards.add(new SetCardInfo("Malachite Talisman", 303, Rarity.UNCOMMON, mage.cards.m.MalachiteTalisman.class)); - cards.add(new SetCardInfo("Marton Stromgald", 199, Rarity.RARE, mage.cards.m.MartonStromgald.class)); - cards.add(new SetCardInfo("Merieke Ri Berit", 375, Rarity.RARE, mage.cards.m.MeriekeRiBerit.class)); - cards.add(new SetCardInfo("Mesmeric Trance", 83, Rarity.RARE, mage.cards.m.MesmericTrance.class)); - cards.add(new SetCardInfo("Mind Ravel", 35, Rarity.COMMON, mage.cards.m.MindRavel.class)); - cards.add(new SetCardInfo("Mind Warp", 36, Rarity.UNCOMMON, mage.cards.m.MindWarp.class)); - cards.add(new SetCardInfo("Mole Worms", 40, Rarity.UNCOMMON, mage.cards.m.MoleWorms.class)); - cards.add(new SetCardInfo("Moor Fiend", 41, Rarity.COMMON, mage.cards.m.MoorFiend.class)); - cards.add(new SetCardInfo("Mountain", 340, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain", 341, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain", 342, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain Goat", 203, Rarity.COMMON, mage.cards.m.MountainGoat.class)); - cards.add(new SetCardInfo("Mudslide", 204, Rarity.RARE, mage.cards.m.Mudslide.class)); - cards.add(new SetCardInfo("Mystic Might", 86, Rarity.RARE, mage.cards.m.MysticMight.class)); - cards.add(new SetCardInfo("Mystic Remora", 87, Rarity.COMMON, mage.cards.m.MysticRemora.class)); - cards.add(new SetCardInfo("Nacre Talisman", 304, Rarity.UNCOMMON, mage.cards.n.NacreTalisman.class)); - cards.add(new SetCardInfo("Naked Singularity", 305, Rarity.RARE, mage.cards.n.NakedSingularity.class)); - cards.add(new SetCardInfo("Nature's Lore", 143, Rarity.UNCOMMON, mage.cards.n.NaturesLore.class)); - cards.add(new SetCardInfo("Necropotence", 42, Rarity.RARE, mage.cards.n.Necropotence.class)); - cards.add(new SetCardInfo("Onyx Talisman", 306, Rarity.UNCOMMON, mage.cards.o.OnyxTalisman.class)); - cards.add(new SetCardInfo("Orcish Cannoneers", 205, Rarity.UNCOMMON, mage.cards.o.OrcishCannoneers.class)); - cards.add(new SetCardInfo("Orcish Healer", 208, Rarity.UNCOMMON, mage.cards.o.OrcishHealer.class)); - cards.add(new SetCardInfo("Orcish Librarian", 209, Rarity.RARE, mage.cards.o.OrcishLibrarian.class)); - cards.add(new SetCardInfo("Orcish Lumberjack", 210, Rarity.COMMON, mage.cards.o.OrcishLumberjack.class)); - cards.add(new SetCardInfo("Order of the Sacred Torch", 269, Rarity.RARE, mage.cards.o.OrderOfTheSacredTorch.class)); - cards.add(new SetCardInfo("Order of the White Shield", 270, Rarity.UNCOMMON, mage.cards.o.OrderOfTheWhiteShield.class)); - cards.add(new SetCardInfo("Pale Bears", 144, Rarity.RARE, mage.cards.p.PaleBears.class)); - cards.add(new SetCardInfo("Panic", 212, Rarity.COMMON, mage.cards.p.Panic.class)); - cards.add(new SetCardInfo("Pentagram of the Ages", 307, Rarity.RARE, mage.cards.p.PentagramOfTheAges.class)); - cards.add(new SetCardInfo("Pestilence Rats", 45, Rarity.COMMON, mage.cards.p.PestilenceRats.class)); - cards.add(new SetCardInfo("Pit Trap", 308, Rarity.UNCOMMON, mage.cards.p.PitTrap.class)); - cards.add(new SetCardInfo("Plains", 343, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Plains", 344, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Plains", 345, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Polar Kraken", 89, Rarity.RARE, mage.cards.p.PolarKraken.class)); - cards.add(new SetCardInfo("Portent", 90, Rarity.COMMON, mage.cards.p.Portent.class)); - cards.add(new SetCardInfo("Power Sink", 91, Rarity.COMMON, mage.cards.p.PowerSink.class)); - cards.add(new SetCardInfo("Pox", 46, Rarity.RARE, mage.cards.p.Pox.class)); - cards.add(new SetCardInfo("Pygmy Allosaurus", 145, Rarity.RARE, mage.cards.p.PygmyAllosaurus.class)); - cards.add(new SetCardInfo("Pyknite", 146, Rarity.COMMON, mage.cards.p.Pyknite.class)); - cards.add(new SetCardInfo("Pyroblast", 213, Rarity.COMMON, mage.cards.p.Pyroblast.class)); - cards.add(new SetCardInfo("Pyroclasm", 214, Rarity.UNCOMMON, mage.cards.p.Pyroclasm.class)); - cards.add(new SetCardInfo("Rally", 272, Rarity.COMMON, mage.cards.r.Rally.class)); - cards.add(new SetCardInfo("Ray of Command", 92, Rarity.COMMON, mage.cards.r.RayOfCommand.class)); - cards.add(new SetCardInfo("Ray of Erasure", 93, Rarity.COMMON, mage.cards.r.RayOfErasure.class)); - cards.add(new SetCardInfo("Red Scarab", 273, Rarity.UNCOMMON, mage.cards.r.RedScarab.class)); - cards.add(new SetCardInfo("Regeneration", 147, Rarity.COMMON, mage.cards.r.Regeneration.class)); - cards.add(new SetCardInfo("Rime Dryad", 148, Rarity.COMMON, mage.cards.r.RimeDryad.class)); - cards.add(new SetCardInfo("Ritual of Subdual", 149, Rarity.RARE, mage.cards.r.RitualOfSubdual.class)); - cards.add(new SetCardInfo("River Delta", 346, Rarity.RARE, mage.cards.r.RiverDelta.class)); - cards.add(new SetCardInfo("Sabretooth Tiger", 215, Rarity.COMMON, mage.cards.s.SabretoothTiger.class)); - cards.add(new SetCardInfo("Scaled Wurm", 150, Rarity.COMMON, mage.cards.s.ScaledWurm.class)); - cards.add(new SetCardInfo("Sea Spirit", 95, Rarity.UNCOMMON, mage.cards.s.SeaSpirit.class)); - cards.add(new SetCardInfo("Seizures", 47, Rarity.COMMON, mage.cards.s.Seizures.class)); - cards.add(new SetCardInfo("Shambling Strider", 151, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); - cards.add(new SetCardInfo("Shatter", 216, Rarity.COMMON, mage.cards.s.Shatter.class)); - cards.add(new SetCardInfo("Shield of the Ages", 310, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class)); - cards.add(new SetCardInfo("Sibilant Spirit", 97, Rarity.RARE, mage.cards.s.SibilantSpirit.class)); - cards.add(new SetCardInfo("Silver Erne", 98, Rarity.UNCOMMON, mage.cards.s.SilverErne.class)); - cards.add(new SetCardInfo("Skeleton Ship", 379, Rarity.RARE, mage.cards.s.SkeletonShip.class)); - cards.add(new SetCardInfo("Skull Catapult", 311, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class)); - cards.add(new SetCardInfo("Snow-Covered Forest", 347, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class)); - cards.add(new SetCardInfo("Snow-Covered Island", 348, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class)); - cards.add(new SetCardInfo("Snow-Covered Mountain", 349, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class)); - cards.add(new SetCardInfo("Snow-Covered Plains", 350, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class)); - cards.add(new SetCardInfo("Snow-Covered Swamp", 351, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class)); - cards.add(new SetCardInfo("Snow Hound", 277, Rarity.UNCOMMON, mage.cards.s.SnowHound.class)); - cards.add(new SetCardInfo("Soldevi Machinist", 102, Rarity.UNCOMMON, mage.cards.s.SoldeviMachinist.class)); - cards.add(new SetCardInfo("Soldevi Simulacrum", 314, Rarity.UNCOMMON, mage.cards.s.SoldeviSimulacrum.class)); - cards.add(new SetCardInfo("Songs of the Damned", 48, Rarity.COMMON, mage.cards.s.SongsOfTheDamned.class)); - cards.add(new SetCardInfo("Soul Barrier", 103, Rarity.UNCOMMON, mage.cards.s.SoulBarrier.class)); - cards.add(new SetCardInfo("Soul Burn", 361, Rarity.COMMON, mage.cards.s.SoulBurn.class)); - cards.add(new SetCardInfo("Soul Kiss", 50, Rarity.COMMON, mage.cards.s.SoulKiss.class)); - cards.add(new SetCardInfo("Spoils of Evil", 51, Rarity.RARE, mage.cards.s.SpoilsOfEvil.class)); - cards.add(new SetCardInfo("Stampede", 153, Rarity.RARE, mage.cards.s.Stampede.class)); - cards.add(new SetCardInfo("Stonehands", 219, Rarity.COMMON, mage.cards.s.Stonehands.class)); - cards.add(new SetCardInfo("Stone Rain", 217, Rarity.COMMON, mage.cards.s.StoneRain.class)); - cards.add(new SetCardInfo("Stone Spirit", 218, Rarity.UNCOMMON, mage.cards.s.StoneSpirit.class)); - cards.add(new SetCardInfo("Stormbind", 382, Rarity.RARE, mage.cards.s.Stormbind.class)); - cards.add(new SetCardInfo("Storm Spirit", 381, Rarity.RARE, mage.cards.s.StormSpirit.class)); - cards.add(new SetCardInfo("Stromgald Cabal", 54, Rarity.RARE, mage.cards.s.StromgaldCabal.class)); - cards.add(new SetCardInfo("Stunted Growth", 154, Rarity.RARE, mage.cards.s.StuntedGrowth.class)); - cards.add(new SetCardInfo("Sulfurous Springs", 352, Rarity.RARE, mage.cards.s.SulfurousSprings.class)); - cards.add(new SetCardInfo("Sunstone", 316, Rarity.UNCOMMON, mage.cards.s.Sunstone.class)); - cards.add(new SetCardInfo("Swamp", 353, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swamp", 354, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swamp", 355, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swords to Plowshares", 278, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class)); - cards.add(new SetCardInfo("Tarpan", 155, Rarity.COMMON, mage.cards.t.Tarpan.class)); - cards.add(new SetCardInfo("Thermokarst", 156, Rarity.UNCOMMON, mage.cards.t.Thermokarst.class)); - cards.add(new SetCardInfo("Thoughtleech", 157, Rarity.UNCOMMON, mage.cards.t.Thoughtleech.class)); - cards.add(new SetCardInfo("Thunder Wall", 104, Rarity.UNCOMMON, mage.cards.t.ThunderWall.class)); - cards.add(new SetCardInfo("Timberline Ridge", 356, Rarity.RARE, mage.cards.t.TimberlineRidge.class)); - cards.add(new SetCardInfo("Time Bomb", 317, Rarity.RARE, mage.cards.t.TimeBomb.class)); - cards.add(new SetCardInfo("Tinder Wall", 158, Rarity.COMMON, mage.cards.t.TinderWall.class)); - cards.add(new SetCardInfo("Tor Giant", 220, Rarity.COMMON, mage.cards.t.TorGiant.class)); - cards.add(new SetCardInfo("Touch of Death", 55, Rarity.COMMON, mage.cards.t.TouchOfDeath.class)); - cards.add(new SetCardInfo("Underground River", 357, Rarity.RARE, mage.cards.u.UndergroundRiver.class)); - cards.add(new SetCardInfo("Updraft", 105, Rarity.UNCOMMON, mage.cards.u.Updraft.class)); - cards.add(new SetCardInfo("Urza's Bauble", 318, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); - cards.add(new SetCardInfo("Veldt", 358, Rarity.RARE, mage.cards.v.Veldt.class)); - cards.add(new SetCardInfo("Vertigo", 222, Rarity.UNCOMMON, mage.cards.v.Vertigo.class)); - cards.add(new SetCardInfo("Walking Wall", 321, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); - cards.add(new SetCardInfo("Wall of Lava", 223, Rarity.UNCOMMON, mage.cards.w.WallOfLava.class)); - cards.add(new SetCardInfo("Wall of Pine Needles", 162, Rarity.UNCOMMON, mage.cards.w.WallOfPineNeedles.class)); - cards.add(new SetCardInfo("War Chariot", 323, Rarity.UNCOMMON, mage.cards.w.WarChariot.class)); - cards.add(new SetCardInfo("Warning", 279, Rarity.COMMON, mage.cards.w.Warning.class)); - cards.add(new SetCardInfo("Whiteout", 163, Rarity.UNCOMMON, mage.cards.w.Whiteout.class)); - cards.add(new SetCardInfo("White Scarab", 280, Rarity.UNCOMMON, mage.cards.w.WhiteScarab.class)); - cards.add(new SetCardInfo("Wild Growth", 165, Rarity.COMMON, mage.cards.w.WildGrowth.class)); - cards.add(new SetCardInfo("Wind Spirit", 106, Rarity.UNCOMMON, mage.cards.w.WindSpirit.class)); - cards.add(new SetCardInfo("Wings of Aesthir", 383, Rarity.UNCOMMON, mage.cards.w.WingsOfAesthir.class)); - cards.add(new SetCardInfo("Word of Blasting", 224, Rarity.UNCOMMON, mage.cards.w.WordOfBlasting.class)); - cards.add(new SetCardInfo("Wrath of Marit Lage", 109, Rarity.RARE, mage.cards.w.WrathOfMaritLage.class)); - cards.add(new SetCardInfo("Yavimaya Gnats", 168, Rarity.UNCOMMON, mage.cards.y.YavimayaGnats.class)); - cards.add(new SetCardInfo("Zuran Enchanter", 110, Rarity.COMMON, mage.cards.z.ZuranEnchanter.class)); - cards.add(new SetCardInfo("Zuran Orb", 325, Rarity.UNCOMMON, mage.cards.z.ZuranOrb.class)); - cards.add(new SetCardInfo("Zuran Spellcaster", 111, Rarity.COMMON, mage.cards.z.ZuranSpellcaster.class)); - cards.add(new SetCardInfo("Zur's Weirding", 112, Rarity.RARE, mage.cards.z.ZursWeirding.class)); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import mage.cards.CardGraphicInfo; +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author North + */ +public class IceAge extends ExpansionSet { + + private static final IceAge instance = new IceAge(); + + public static IceAge getInstance() { + return instance; + } + + private IceAge() { + super("Ice Age", "ICE", ExpansionSet.buildDate(1995, 5, 1), SetType.EXPANSION); + this.blockName = "Ice Age"; + this.hasBoosters = true; + this.numBoosterLands = 0; + this.numBoosterCommon = 11; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Abyssal Specter", 1, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); + cards.add(new SetCardInfo("Adarkar Sentinel", 281, Rarity.UNCOMMON, mage.cards.a.AdarkarSentinel.class)); + cards.add(new SetCardInfo("Adarkar Wastes", 326, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); + cards.add(new SetCardInfo("Aegis of the Meek", 282, Rarity.RARE, mage.cards.a.AegisOfTheMeek.class)); + cards.add(new SetCardInfo("Altar of Bone", 359, Rarity.RARE, mage.cards.a.AltarOfBone.class)); + cards.add(new SetCardInfo("Anarchy", 170, Rarity.UNCOMMON, mage.cards.a.Anarchy.class)); + cards.add(new SetCardInfo("Arenson's Aura", 227, Rarity.COMMON, mage.cards.a.ArensonsAura.class)); + cards.add(new SetCardInfo("Armor of Faith", 228, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class)); + cards.add(new SetCardInfo("Arnjlot's Ascent", 57, Rarity.COMMON, mage.cards.a.ArnjlotsAscent.class)); + cards.add(new SetCardInfo("Aurochs", 113, Rarity.COMMON, mage.cards.a.Aurochs.class)); + cards.add(new SetCardInfo("Balduvian Barbarians", 172, Rarity.COMMON, mage.cards.b.BalduvianBarbarians.class)); + cards.add(new SetCardInfo("Balduvian Bears", 114, Rarity.COMMON, mage.cards.b.BalduvianBears.class)); + cards.add(new SetCardInfo("Barbed Sextant", 287, Rarity.COMMON, mage.cards.b.BarbedSextant.class)); + cards.add(new SetCardInfo("Battle Frenzy", 175, Rarity.COMMON, mage.cards.b.BattleFrenzy.class)); + cards.add(new SetCardInfo("Binding Grasp", 60, Rarity.UNCOMMON, mage.cards.b.BindingGrasp.class)); + cards.add(new SetCardInfo("Black Scarab", 230, Rarity.UNCOMMON, mage.cards.b.BlackScarab.class)); + cards.add(new SetCardInfo("Blessed Wine", 231, Rarity.COMMON, mage.cards.b.BlessedWine.class)); + cards.add(new SetCardInfo("Blinking Spirit", 232, Rarity.RARE, mage.cards.b.BlinkingSpirit.class)); + cards.add(new SetCardInfo("Blue Scarab", 233, Rarity.UNCOMMON, mage.cards.b.BlueScarab.class)); + cards.add(new SetCardInfo("Brainstorm", 61, Rarity.COMMON, mage.cards.b.Brainstorm.class)); + cards.add(new SetCardInfo("Brushland", 327, Rarity.RARE, mage.cards.b.Brushland.class)); + cards.add(new SetCardInfo("Burnt Offering", 4, Rarity.COMMON, mage.cards.b.BurntOffering.class)); + cards.add(new SetCardInfo("Caribou Range", 235, Rarity.RARE, mage.cards.c.CaribouRange.class)); + cards.add(new SetCardInfo("Celestial Sword", 289, Rarity.RARE, mage.cards.c.CelestialSword.class)); + cards.add(new SetCardInfo("Centaur Archer", 360, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); + cards.add(new SetCardInfo("Chub Toad", 117, Rarity.COMMON, mage.cards.c.ChubToad.class)); + cards.add(new SetCardInfo("Circle of Protection: Black", 236, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlack.class)); + cards.add(new SetCardInfo("Circle of Protection: Blue", 237, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlue.class)); + cards.add(new SetCardInfo("Circle of Protection: Green", 238, Rarity.COMMON, mage.cards.c.CircleOfProtectionGreen.class)); + cards.add(new SetCardInfo("Circle of Protection: Red", 239, Rarity.COMMON, mage.cards.c.CircleOfProtectionRed.class)); + cards.add(new SetCardInfo("Circle of Protection: White", 240, Rarity.COMMON, mage.cards.c.CircleOfProtectionWhite.class)); + cards.add(new SetCardInfo("Clairvoyance", 63, Rarity.COMMON, mage.cards.c.Clairvoyance.class)); + cards.add(new SetCardInfo("Cold Snap", 241, Rarity.UNCOMMON, mage.cards.c.ColdSnap.class)); + cards.add(new SetCardInfo("Conquer", 180, Rarity.UNCOMMON, mage.cards.c.Conquer.class)); + cards.add(new SetCardInfo("Counterspell", 64, Rarity.COMMON, mage.cards.c.Counterspell.class)); + cards.add(new SetCardInfo("Crown of the Ages", 290, Rarity.RARE, mage.cards.c.CrownOfTheAges.class)); + cards.add(new SetCardInfo("Curse of Marit Lage", 181, Rarity.RARE, mage.cards.c.CurseOfMaritLage.class)); + cards.add(new SetCardInfo("Dance of the Dead", 6, Rarity.UNCOMMON, mage.cards.d.DanceOfTheDead.class)); + cards.add(new SetCardInfo("Dark Banishing", 7, Rarity.COMMON, mage.cards.d.DarkBanishing.class)); + cards.add(new SetCardInfo("Dark Ritual", 8, Rarity.COMMON, mage.cards.d.DarkRitual.class)); + cards.add(new SetCardInfo("Death Ward", 243, Rarity.COMMON, mage.cards.d.DeathWard.class)); + cards.add(new SetCardInfo("Deflection", 65, Rarity.RARE, mage.cards.d.Deflection.class)); + cards.add(new SetCardInfo("Demonic Consultation", 9, Rarity.UNCOMMON, mage.cards.d.DemonicConsultation.class)); + cards.add(new SetCardInfo("Despotic Scepter", 291, Rarity.RARE, mage.cards.d.DespoticScepter.class)); + cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class)); + cards.add(new SetCardInfo("Elder Druid", 120, Rarity.RARE, mage.cards.e.ElderDruid.class)); + cards.add(new SetCardInfo("Elemental Augury", 364, Rarity.RARE, mage.cards.e.ElementalAugury.class)); + cards.add(new SetCardInfo("Enduring Renewal", 247, Rarity.RARE, mage.cards.e.EnduringRenewal.class)); + cards.add(new SetCardInfo("Enervate", 67, Rarity.COMMON, mage.cards.e.Enervate.class)); + cards.add(new SetCardInfo("Errantry", 183, Rarity.COMMON, mage.cards.e.Errantry.class)); + cards.add(new SetCardInfo("Fanatical Fever", 122, Rarity.UNCOMMON, mage.cards.f.FanaticalFever.class)); + cards.add(new SetCardInfo("Fear", 12, Rarity.COMMON, mage.cards.f.Fear.class)); + cards.add(new SetCardInfo("Fiery Justice", 366, Rarity.RARE, mage.cards.f.FieryJustice.class)); + cards.add(new SetCardInfo("Fire Covenant", 367, Rarity.UNCOMMON, mage.cards.f.FireCovenant.class)); + cards.add(new SetCardInfo("Flame Spirit", 184, Rarity.UNCOMMON, mage.cards.f.FlameSpirit.class)); + cards.add(new SetCardInfo("Flare", 185, Rarity.COMMON, mage.cards.f.Flare.class)); + cards.add(new SetCardInfo("Flooded Woodlands", 368, Rarity.RARE, mage.cards.f.FloodedWoodlands.class)); + cards.add(new SetCardInfo("Flow of Maggots", 13, Rarity.RARE, mage.cards.f.FlowOfMaggots.class)); + cards.add(new SetCardInfo("Folk of the Pines", 123, Rarity.COMMON, mage.cards.f.FolkOfThePines.class)); + cards.add(new SetCardInfo("Forbidden Lore", 124, Rarity.RARE, mage.cards.f.ForbiddenLore.class)); + cards.add(new SetCardInfo("Force Void", 70, Rarity.UNCOMMON, mage.cards.f.ForceVoid.class)); + cards.add(new SetCardInfo("Forest", 328, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forest", 329, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forest", 330, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forgotten Lore", 125, Rarity.UNCOMMON, mage.cards.f.ForgottenLore.class)); + cards.add(new SetCardInfo("Foul Familiar", 14, Rarity.COMMON, mage.cards.f.FoulFamiliar.class)); + cards.add(new SetCardInfo("Fumarole", 369, Rarity.UNCOMMON, mage.cards.f.Fumarole.class)); + cards.add(new SetCardInfo("Fyndhorn Bow", 293, Rarity.UNCOMMON, mage.cards.f.FyndhornBow.class)); + cards.add(new SetCardInfo("Fyndhorn Brownie", 130, Rarity.COMMON, mage.cards.f.FyndhornBrownie.class)); + cards.add(new SetCardInfo("Fyndhorn Elder", 131, Rarity.UNCOMMON, mage.cards.f.FyndhornElder.class)); + cards.add(new SetCardInfo("Fyndhorn Elves", 132, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); + cards.add(new SetCardInfo("Game of Chaos", 186, Rarity.RARE, mage.cards.g.GameOfChaos.class)); + cards.add(new SetCardInfo("Gangrenous Zombies", 15, Rarity.COMMON, mage.cards.g.GangrenousZombies.class)); + cards.add(new SetCardInfo("Giant Growth", 134, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); + cards.add(new SetCardInfo("Giant Trap Door Spider", 371, Rarity.UNCOMMON, mage.cards.g.GiantTrapDoorSpider.class)); + cards.add(new SetCardInfo("Glacial Chasm", 331, Rarity.UNCOMMON, mage.cards.g.GlacialChasm.class)); + cards.add(new SetCardInfo("Glacial Crevasses", 187, Rarity.RARE, mage.cards.g.GlacialCrevasses.class)); + cards.add(new SetCardInfo("Glacial Wall", 71, Rarity.UNCOMMON, mage.cards.g.GlacialWall.class)); + cards.add(new SetCardInfo("Goblin Mutant", 188, Rarity.UNCOMMON, mage.cards.g.GoblinMutant.class)); + cards.add(new SetCardInfo("Goblin Snowman", 191, Rarity.UNCOMMON, mage.cards.g.GoblinSnowman.class)); + cards.add(new SetCardInfo("Gorilla Pack", 135, Rarity.COMMON, mage.cards.g.GorillaPack.class)); + cards.add(new SetCardInfo("Gravebind", 17, Rarity.RARE, mage.cards.g.Gravebind.class)); + cards.add(new SetCardInfo("Green Scarab", 252, Rarity.UNCOMMON, mage.cards.g.GreenScarab.class)); + cards.add(new SetCardInfo("Hallowed Ground", 253, Rarity.UNCOMMON, mage.cards.h.HallowedGround.class)); + cards.add(new SetCardInfo("Heal", 254, Rarity.COMMON, mage.cards.h.Heal.class)); + cards.add(new SetCardInfo("Hecatomb", 18, Rarity.RARE, mage.cards.h.Hecatomb.class)); + cards.add(new SetCardInfo("Hematite Talisman", 295, Rarity.UNCOMMON, mage.cards.h.HematiteTalisman.class)); + cards.add(new SetCardInfo("Hoar Shade", 19, Rarity.COMMON, mage.cards.h.HoarShade.class)); + cards.add(new SetCardInfo("Hot Springs", 136, Rarity.RARE, mage.cards.h.HotSprings.class)); + cards.add(new SetCardInfo("Howl from Beyond", 20, Rarity.COMMON, mage.cards.h.HowlFromBeyond.class)); + cards.add(new SetCardInfo("Hurricane", 137, Rarity.UNCOMMON, mage.cards.h.Hurricane.class)); + cards.add(new SetCardInfo("Hyalopterous Lemure", 21, Rarity.UNCOMMON, mage.cards.h.HyalopterousLemure.class)); + cards.add(new SetCardInfo("Hydroblast", 72, Rarity.COMMON, mage.cards.h.Hydroblast.class)); + cards.add(new SetCardInfo("Hymn of Rebirth", 373, Rarity.UNCOMMON, mage.cards.h.HymnOfRebirth.class)); + cards.add(new SetCardInfo("Iceberg", 73, Rarity.UNCOMMON, mage.cards.i.Iceberg.class)); + cards.add(new SetCardInfo("Icequake", 22, Rarity.UNCOMMON, mage.cards.i.Icequake.class)); + cards.add(new SetCardInfo("Icy Manipulator", 297, Rarity.UNCOMMON, mage.cards.i.IcyManipulator.class)); + cards.add(new SetCardInfo("Icy Prison", 74, Rarity.RARE, mage.cards.i.IcyPrison.class)); + cards.add(new SetCardInfo("Illusionary Forces", 75, Rarity.COMMON, mage.cards.i.IllusionaryForces.class)); + cards.add(new SetCardInfo("Illusionary Wall", 78, Rarity.COMMON, mage.cards.i.IllusionaryWall.class)); + cards.add(new SetCardInfo("Illusions of Grandeur", 79, Rarity.RARE, mage.cards.i.IllusionsOfGrandeur.class)); + cards.add(new SetCardInfo("Imposing Visage", 193, Rarity.COMMON, mage.cards.i.ImposingVisage.class)); + cards.add(new SetCardInfo("Incinerate", 194, Rarity.COMMON, mage.cards.i.Incinerate.class)); + cards.add(new SetCardInfo("Infernal Darkness", 23, Rarity.RARE, mage.cards.i.InfernalDarkness.class)); + cards.add(new SetCardInfo("Infuse", 80, Rarity.COMMON, mage.cards.i.Infuse.class)); + cards.add(new SetCardInfo("Island", 334, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Island", 336, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Jester's Cap", 299, Rarity.RARE, mage.cards.j.JestersCap.class)); + cards.add(new SetCardInfo("Jester's Mask", 300, Rarity.RARE, mage.cards.j.JestersMask.class)); + cards.add(new SetCardInfo("Jeweled Amulet", 301, Rarity.UNCOMMON, mage.cards.j.JeweledAmulet.class)); + cards.add(new SetCardInfo("Johtull Wurm", 138, Rarity.UNCOMMON, mage.cards.j.JohtullWurm.class)); + cards.add(new SetCardInfo("Jokulhaups", 195, Rarity.RARE, mage.cards.j.Jokulhaups.class)); + cards.add(new SetCardInfo("Juniper Order Druid", 139, Rarity.COMMON, mage.cards.j.JuniperOrderDruid.class)); + cards.add(new SetCardInfo("Justice", 256, Rarity.UNCOMMON, mage.cards.j.Justice.class)); + cards.add(new SetCardInfo("Karplusan Forest", 337, Rarity.RARE, mage.cards.k.KarplusanForest.class)); + cards.add(new SetCardInfo("Karplusan Yeti", 197, Rarity.RARE, mage.cards.k.KarplusanYeti.class)); + cards.add(new SetCardInfo("Kjeldoran Dead", 25, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); + cards.add(new SetCardInfo("Kjeldoran Royal Guard", 262, Rarity.RARE, mage.cards.k.KjeldoranRoyalGuard.class)); + cards.add(new SetCardInfo("Knight of Stromgald", 26, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); + cards.add(new SetCardInfo("Krovikan Fetish", 28, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); + cards.add(new SetCardInfo("Krovikan Sorcerer", 81, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); + cards.add(new SetCardInfo("Land Cap", 338, Rarity.RARE, mage.cards.l.LandCap.class)); + cards.add(new SetCardInfo("Lapis Lazuli Talisman", 302, Rarity.UNCOMMON, mage.cards.l.LapisLazuliTalisman.class)); + cards.add(new SetCardInfo("Lava Tubes", 339, Rarity.RARE, mage.cards.l.LavaTubes.class)); + cards.add(new SetCardInfo("Legions of Lim-Dul", 30, Rarity.COMMON, mage.cards.l.LegionsOfLimDul.class)); + cards.add(new SetCardInfo("Leshrac's Rite", 31, Rarity.UNCOMMON, mage.cards.l.LeshracsRite.class)); + cards.add(new SetCardInfo("Lhurgoyf", 140, Rarity.RARE, mage.cards.l.Lhurgoyf.class)); + cards.add(new SetCardInfo("Lightning Blow", 266, Rarity.RARE, mage.cards.l.LightningBlow.class)); + cards.add(new SetCardInfo("Lure", 141, Rarity.UNCOMMON, mage.cards.l.Lure.class)); + cards.add(new SetCardInfo("Magus of the Unseen", 82, Rarity.RARE, mage.cards.m.MagusOfTheUnseen.class)); + cards.add(new SetCardInfo("Malachite Talisman", 303, Rarity.UNCOMMON, mage.cards.m.MalachiteTalisman.class)); + cards.add(new SetCardInfo("Marton Stromgald", 199, Rarity.RARE, mage.cards.m.MartonStromgald.class)); + cards.add(new SetCardInfo("Merieke Ri Berit", 375, Rarity.RARE, mage.cards.m.MeriekeRiBerit.class)); + cards.add(new SetCardInfo("Mesmeric Trance", 83, Rarity.RARE, mage.cards.m.MesmericTrance.class)); + cards.add(new SetCardInfo("Mind Ravel", 35, Rarity.COMMON, mage.cards.m.MindRavel.class)); + cards.add(new SetCardInfo("Mind Warp", 36, Rarity.UNCOMMON, mage.cards.m.MindWarp.class)); + cards.add(new SetCardInfo("Mole Worms", 40, Rarity.UNCOMMON, mage.cards.m.MoleWorms.class)); + cards.add(new SetCardInfo("Moor Fiend", 41, Rarity.COMMON, mage.cards.m.MoorFiend.class)); + cards.add(new SetCardInfo("Mountain", 340, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain", 341, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain", 342, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain Goat", 203, Rarity.COMMON, mage.cards.m.MountainGoat.class)); + cards.add(new SetCardInfo("Mudslide", 204, Rarity.RARE, mage.cards.m.Mudslide.class)); + cards.add(new SetCardInfo("Mystic Might", 86, Rarity.RARE, mage.cards.m.MysticMight.class)); + cards.add(new SetCardInfo("Mystic Remora", 87, Rarity.COMMON, mage.cards.m.MysticRemora.class)); + cards.add(new SetCardInfo("Nacre Talisman", 304, Rarity.UNCOMMON, mage.cards.n.NacreTalisman.class)); + cards.add(new SetCardInfo("Naked Singularity", 305, Rarity.RARE, mage.cards.n.NakedSingularity.class)); + cards.add(new SetCardInfo("Nature's Lore", 143, Rarity.UNCOMMON, mage.cards.n.NaturesLore.class)); + cards.add(new SetCardInfo("Necropotence", 42, Rarity.RARE, mage.cards.n.Necropotence.class)); + cards.add(new SetCardInfo("Onyx Talisman", 306, Rarity.UNCOMMON, mage.cards.o.OnyxTalisman.class)); + cards.add(new SetCardInfo("Orcish Cannoneers", 205, Rarity.UNCOMMON, mage.cards.o.OrcishCannoneers.class)); + cards.add(new SetCardInfo("Orcish Healer", 208, Rarity.UNCOMMON, mage.cards.o.OrcishHealer.class)); + cards.add(new SetCardInfo("Orcish Librarian", 209, Rarity.RARE, mage.cards.o.OrcishLibrarian.class)); + cards.add(new SetCardInfo("Orcish Lumberjack", 210, Rarity.COMMON, mage.cards.o.OrcishLumberjack.class)); + cards.add(new SetCardInfo("Order of the Sacred Torch", 269, Rarity.RARE, mage.cards.o.OrderOfTheSacredTorch.class)); + cards.add(new SetCardInfo("Order of the White Shield", 270, Rarity.UNCOMMON, mage.cards.o.OrderOfTheWhiteShield.class)); + cards.add(new SetCardInfo("Pale Bears", 144, Rarity.RARE, mage.cards.p.PaleBears.class)); + cards.add(new SetCardInfo("Panic", 212, Rarity.COMMON, mage.cards.p.Panic.class)); + cards.add(new SetCardInfo("Pentagram of the Ages", 307, Rarity.RARE, mage.cards.p.PentagramOfTheAges.class)); + cards.add(new SetCardInfo("Pestilence Rats", 45, Rarity.COMMON, mage.cards.p.PestilenceRats.class)); + cards.add(new SetCardInfo("Pit Trap", 308, Rarity.UNCOMMON, mage.cards.p.PitTrap.class)); + cards.add(new SetCardInfo("Plains", 343, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Plains", 344, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Plains", 345, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Polar Kraken", 89, Rarity.RARE, mage.cards.p.PolarKraken.class)); + cards.add(new SetCardInfo("Portent", 90, Rarity.COMMON, mage.cards.p.Portent.class)); + cards.add(new SetCardInfo("Power Sink", 91, Rarity.COMMON, mage.cards.p.PowerSink.class)); + cards.add(new SetCardInfo("Pox", 46, Rarity.RARE, mage.cards.p.Pox.class)); + cards.add(new SetCardInfo("Pygmy Allosaurus", 145, Rarity.RARE, mage.cards.p.PygmyAllosaurus.class)); + cards.add(new SetCardInfo("Pyknite", 146, Rarity.COMMON, mage.cards.p.Pyknite.class)); + cards.add(new SetCardInfo("Pyroblast", 213, Rarity.COMMON, mage.cards.p.Pyroblast.class)); + cards.add(new SetCardInfo("Pyroclasm", 214, Rarity.UNCOMMON, mage.cards.p.Pyroclasm.class)); + cards.add(new SetCardInfo("Rally", 272, Rarity.COMMON, mage.cards.r.Rally.class)); + cards.add(new SetCardInfo("Ray of Command", 92, Rarity.COMMON, mage.cards.r.RayOfCommand.class)); + cards.add(new SetCardInfo("Ray of Erasure", 93, Rarity.COMMON, mage.cards.r.RayOfErasure.class)); + cards.add(new SetCardInfo("Reclamation", 378, Rarity.RARE, mage.cards.r.Reclamation.class)); + cards.add(new SetCardInfo("Red Scarab", 273, Rarity.UNCOMMON, mage.cards.r.RedScarab.class)); + cards.add(new SetCardInfo("Regeneration", 147, Rarity.COMMON, mage.cards.r.Regeneration.class)); + cards.add(new SetCardInfo("Rime Dryad", 148, Rarity.COMMON, mage.cards.r.RimeDryad.class)); + cards.add(new SetCardInfo("Ritual of Subdual", 149, Rarity.RARE, mage.cards.r.RitualOfSubdual.class)); + cards.add(new SetCardInfo("River Delta", 346, Rarity.RARE, mage.cards.r.RiverDelta.class)); + cards.add(new SetCardInfo("Sabretooth Tiger", 215, Rarity.COMMON, mage.cards.s.SabretoothTiger.class)); + cards.add(new SetCardInfo("Scaled Wurm", 150, Rarity.COMMON, mage.cards.s.ScaledWurm.class)); + cards.add(new SetCardInfo("Sea Spirit", 95, Rarity.UNCOMMON, mage.cards.s.SeaSpirit.class)); + cards.add(new SetCardInfo("Seizures", 47, Rarity.COMMON, mage.cards.s.Seizures.class)); + cards.add(new SetCardInfo("Shambling Strider", 151, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); + cards.add(new SetCardInfo("Shatter", 216, Rarity.COMMON, mage.cards.s.Shatter.class)); + cards.add(new SetCardInfo("Shield of the Ages", 310, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class)); + cards.add(new SetCardInfo("Sibilant Spirit", 97, Rarity.RARE, mage.cards.s.SibilantSpirit.class)); + cards.add(new SetCardInfo("Silver Erne", 98, Rarity.UNCOMMON, mage.cards.s.SilverErne.class)); + cards.add(new SetCardInfo("Skeleton Ship", 379, Rarity.RARE, mage.cards.s.SkeletonShip.class)); + cards.add(new SetCardInfo("Skull Catapult", 311, Rarity.UNCOMMON, mage.cards.s.SkullCatapult.class)); + cards.add(new SetCardInfo("Snow-Covered Forest", 347, Rarity.COMMON, mage.cards.s.SnowCoveredForest.class)); + cards.add(new SetCardInfo("Snow-Covered Island", 348, Rarity.COMMON, mage.cards.s.SnowCoveredIsland.class)); + cards.add(new SetCardInfo("Snow-Covered Mountain", 349, Rarity.COMMON, mage.cards.s.SnowCoveredMountain.class)); + cards.add(new SetCardInfo("Snow-Covered Plains", 350, Rarity.COMMON, mage.cards.s.SnowCoveredPlains.class)); + cards.add(new SetCardInfo("Snow-Covered Swamp", 351, Rarity.COMMON, mage.cards.s.SnowCoveredSwamp.class)); + cards.add(new SetCardInfo("Snow Hound", 277, Rarity.UNCOMMON, mage.cards.s.SnowHound.class)); + cards.add(new SetCardInfo("Soldevi Machinist", 102, Rarity.UNCOMMON, mage.cards.s.SoldeviMachinist.class)); + cards.add(new SetCardInfo("Soldevi Simulacrum", 314, Rarity.UNCOMMON, mage.cards.s.SoldeviSimulacrum.class)); + cards.add(new SetCardInfo("Songs of the Damned", 48, Rarity.COMMON, mage.cards.s.SongsOfTheDamned.class)); + cards.add(new SetCardInfo("Soul Barrier", 103, Rarity.UNCOMMON, mage.cards.s.SoulBarrier.class)); + cards.add(new SetCardInfo("Soul Burn", 361, Rarity.COMMON, mage.cards.s.SoulBurn.class)); + cards.add(new SetCardInfo("Soul Kiss", 50, Rarity.COMMON, mage.cards.s.SoulKiss.class)); + cards.add(new SetCardInfo("Spoils of Evil", 51, Rarity.RARE, mage.cards.s.SpoilsOfEvil.class)); + cards.add(new SetCardInfo("Stampede", 153, Rarity.RARE, mage.cards.s.Stampede.class)); + cards.add(new SetCardInfo("Stonehands", 219, Rarity.COMMON, mage.cards.s.Stonehands.class)); + cards.add(new SetCardInfo("Stone Rain", 217, Rarity.COMMON, mage.cards.s.StoneRain.class)); + cards.add(new SetCardInfo("Stone Spirit", 218, Rarity.UNCOMMON, mage.cards.s.StoneSpirit.class)); + cards.add(new SetCardInfo("Stormbind", 382, Rarity.RARE, mage.cards.s.Stormbind.class)); + cards.add(new SetCardInfo("Storm Spirit", 381, Rarity.RARE, mage.cards.s.StormSpirit.class)); + cards.add(new SetCardInfo("Stromgald Cabal", 54, Rarity.RARE, mage.cards.s.StromgaldCabal.class)); + cards.add(new SetCardInfo("Stunted Growth", 154, Rarity.RARE, mage.cards.s.StuntedGrowth.class)); + cards.add(new SetCardInfo("Sulfurous Springs", 352, Rarity.RARE, mage.cards.s.SulfurousSprings.class)); + cards.add(new SetCardInfo("Sunstone", 316, Rarity.UNCOMMON, mage.cards.s.Sunstone.class)); + cards.add(new SetCardInfo("Swamp", 353, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swamp", 354, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swamp", 355, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swords to Plowshares", 278, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class)); + cards.add(new SetCardInfo("Tarpan", 155, Rarity.COMMON, mage.cards.t.Tarpan.class)); + cards.add(new SetCardInfo("Thermokarst", 156, Rarity.UNCOMMON, mage.cards.t.Thermokarst.class)); + cards.add(new SetCardInfo("Thoughtleech", 157, Rarity.UNCOMMON, mage.cards.t.Thoughtleech.class)); + cards.add(new SetCardInfo("Thunder Wall", 104, Rarity.UNCOMMON, mage.cards.t.ThunderWall.class)); + cards.add(new SetCardInfo("Timberline Ridge", 356, Rarity.RARE, mage.cards.t.TimberlineRidge.class)); + cards.add(new SetCardInfo("Time Bomb", 317, Rarity.RARE, mage.cards.t.TimeBomb.class)); + cards.add(new SetCardInfo("Tinder Wall", 158, Rarity.COMMON, mage.cards.t.TinderWall.class)); + cards.add(new SetCardInfo("Tor Giant", 220, Rarity.COMMON, mage.cards.t.TorGiant.class)); + cards.add(new SetCardInfo("Touch of Death", 55, Rarity.COMMON, mage.cards.t.TouchOfDeath.class)); + cards.add(new SetCardInfo("Underground River", 357, Rarity.RARE, mage.cards.u.UndergroundRiver.class)); + cards.add(new SetCardInfo("Updraft", 105, Rarity.UNCOMMON, mage.cards.u.Updraft.class)); + cards.add(new SetCardInfo("Urza's Bauble", 318, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); + cards.add(new SetCardInfo("Veldt", 358, Rarity.RARE, mage.cards.v.Veldt.class)); + cards.add(new SetCardInfo("Vertigo", 222, Rarity.UNCOMMON, mage.cards.v.Vertigo.class)); + cards.add(new SetCardInfo("Walking Wall", 321, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); + cards.add(new SetCardInfo("Wall of Lava", 223, Rarity.UNCOMMON, mage.cards.w.WallOfLava.class)); + cards.add(new SetCardInfo("Wall of Pine Needles", 162, Rarity.UNCOMMON, mage.cards.w.WallOfPineNeedles.class)); + cards.add(new SetCardInfo("War Chariot", 323, Rarity.UNCOMMON, mage.cards.w.WarChariot.class)); + cards.add(new SetCardInfo("Warning", 279, Rarity.COMMON, mage.cards.w.Warning.class)); + cards.add(new SetCardInfo("Whiteout", 163, Rarity.UNCOMMON, mage.cards.w.Whiteout.class)); + cards.add(new SetCardInfo("White Scarab", 280, Rarity.UNCOMMON, mage.cards.w.WhiteScarab.class)); + cards.add(new SetCardInfo("Wild Growth", 165, Rarity.COMMON, mage.cards.w.WildGrowth.class)); + cards.add(new SetCardInfo("Wind Spirit", 106, Rarity.UNCOMMON, mage.cards.w.WindSpirit.class)); + cards.add(new SetCardInfo("Wings of Aesthir", 383, Rarity.UNCOMMON, mage.cards.w.WingsOfAesthir.class)); + cards.add(new SetCardInfo("Word of Blasting", 224, Rarity.UNCOMMON, mage.cards.w.WordOfBlasting.class)); + cards.add(new SetCardInfo("Wrath of Marit Lage", 109, Rarity.RARE, mage.cards.w.WrathOfMaritLage.class)); + cards.add(new SetCardInfo("Yavimaya Gnats", 168, Rarity.UNCOMMON, mage.cards.y.YavimayaGnats.class)); + cards.add(new SetCardInfo("Zuran Enchanter", 110, Rarity.COMMON, mage.cards.z.ZuranEnchanter.class)); + cards.add(new SetCardInfo("Zuran Orb", 325, Rarity.UNCOMMON, mage.cards.z.ZuranOrb.class)); + cards.add(new SetCardInfo("Zuran Spellcaster", 111, Rarity.COMMON, mage.cards.z.ZuranSpellcaster.class)); + cards.add(new SetCardInfo("Zur's Weirding", 112, Rarity.RARE, mage.cards.z.ZursWeirding.class)); + } +} diff --git a/Mage.Sets/src/mage/sets/Invasion.java b/Mage.Sets/src/mage/sets/Invasion.java index c6481c7859..3ee816513e 100644 --- a/Mage.Sets/src/mage/sets/Invasion.java +++ b/Mage.Sets/src/mage/sets/Invasion.java @@ -157,6 +157,7 @@ public class Invasion extends ExpansionSet { cards.add(new SetCardInfo("Holy Day", 20, Rarity.COMMON, mage.cards.h.HolyDay.class)); cards.add(new SetCardInfo("Hooded Kavu", 147, Rarity.COMMON, mage.cards.h.HoodedKavu.class)); cards.add(new SetCardInfo("Horned Cheetah", 251, Rarity.UNCOMMON, mage.cards.h.HornedCheetah.class)); + cards.add(new SetCardInfo("Hunting Kavu", 252, Rarity.UNCOMMON, mage.cards.h.HuntingKavu.class)); cards.add(new SetCardInfo("Hypnotic Cloud", 109, Rarity.COMMON, mage.cards.h.HypnoticCloud.class)); cards.add(new SetCardInfo("Irrigation Ditch", 324, Rarity.COMMON, mage.cards.i.IrrigationDitch.class)); cards.add(new SetCardInfo("Island", 335, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index 7de255753b..9257bdb3a1 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -124,6 +124,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Fungal Bloom", 165, Rarity.RARE, mage.cards.f.FungalBloom.class)); cards.add(new SetCardInfo("Gangrenous Zombies", 92, Rarity.COMMON, mage.cards.g.GangrenousZombies.class)); cards.add(new SetCardInfo("Giant Growth", 167, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); + cards.add(new SetCardInfo("Giant Trap Door Spider", 195, Rarity.UNCOMMON, mage.cards.g.GiantTrapDoorSpider.class)); cards.add(new SetCardInfo("Glacial Chasm", 229, Rarity.RARE, mage.cards.g.GlacialChasm.class)); cards.add(new SetCardInfo("Glacial Crevasses", 127, Rarity.RARE, mage.cards.g.GlacialCrevasses.class)); cards.add(new SetCardInfo("Gorilla Shaman", 129, Rarity.UNCOMMON, GorillaShaman.class)); @@ -133,6 +134,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Helm of Obedience", 210, Rarity.RARE, mage.cards.h.HelmOfObedience.class)); cards.add(new SetCardInfo("Icatian Javelineers", 15, Rarity.COMMON, IcatianJavelineers.class)); cards.add(new SetCardInfo("Icatian Scout", 17, Rarity.COMMON, IcatianScout.class)); + cards.add(new SetCardInfo("Iceberg", 49, Rarity.UNCOMMON, mage.cards.i.Iceberg.class)); cards.add(new SetCardInfo("Icequake", 94, Rarity.COMMON, mage.cards.i.Icequake.class)); cards.add(new SetCardInfo("Icy Prison", 50, Rarity.COMMON, mage.cards.i.IcyPrison.class)); cards.add(new SetCardInfo("Ihsan's Shade", 95, Rarity.RARE, mage.cards.i.IhsansShade.class)); diff --git a/Mage.Sets/src/mage/sets/MercadianMasques.java b/Mage.Sets/src/mage/sets/MercadianMasques.java index b504288d70..cc1131be17 100644 --- a/Mage.Sets/src/mage/sets/MercadianMasques.java +++ b/Mage.Sets/src/mage/sets/MercadianMasques.java @@ -63,6 +63,7 @@ public class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Balloon Peddler", 59, Rarity.COMMON, mage.cards.b.BalloonPeddler.class)); cards.add(new SetCardInfo("Battle Rampart", 173, Rarity.COMMON, mage.cards.b.BattleRampart.class)); cards.add(new SetCardInfo("Battle Squadron", 174, Rarity.RARE, mage.cards.b.BattleSquadron.class)); + cards.add(new SetCardInfo("Bifurcate", 230, Rarity.RARE, mage.cards.b.Bifurcate.class)); cards.add(new SetCardInfo("Black Market", 116, Rarity.RARE, mage.cards.b.BlackMarket.class)); cards.add(new SetCardInfo("Blaster Mage", 175, Rarity.COMMON, mage.cards.b.BlasterMage.class)); cards.add(new SetCardInfo("Blockade Runner", 60, Rarity.COMMON, mage.cards.b.BlockadeRunner.class)); diff --git a/Mage.Sets/src/mage/sets/Mirage.java b/Mage.Sets/src/mage/sets/Mirage.java index 7a6853cf8b..0988b782eb 100644 --- a/Mage.Sets/src/mage/sets/Mirage.java +++ b/Mage.Sets/src/mage/sets/Mirage.java @@ -1,301 +1,303 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets; - -import mage.cards.CardGraphicInfo; -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author North - */ -public class Mirage extends ExpansionSet { - - private static final Mirage instance = new Mirage(); - - public static Mirage getInstance() { - return instance; - } - - private Mirage() { - super("Mirage", "MIR", ExpansionSet.buildDate(1996, 8, 21), SetType.EXPANSION); - this.blockName = "Mirage"; - this.hasBoosters = true; - this.numBoosterLands = 0; - this.numBoosterCommon = 11; - this.numBoosterUncommon = 3; - this.numBoosterRare = 1; - this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("Abyssal Hunter", 1, Rarity.RARE, mage.cards.a.AbyssalHunter.class)); - cards.add(new SetCardInfo("Afterlife", 205, Rarity.UNCOMMON, mage.cards.a.Afterlife.class)); - cards.add(new SetCardInfo("Agility", 154, Rarity.COMMON, mage.cards.a.Agility.class)); - cards.add(new SetCardInfo("Alarum", 206, Rarity.COMMON, mage.cards.a.Alarum.class)); - cards.add(new SetCardInfo("Aleatory", 155, Rarity.UNCOMMON, mage.cards.a.Aleatory.class)); - cards.add(new SetCardInfo("Amber Prison", 257, Rarity.RARE, mage.cards.a.AmberPrison.class)); - cards.add(new SetCardInfo("Ancestral Memories", 52, Rarity.RARE, mage.cards.a.AncestralMemories.class)); - cards.add(new SetCardInfo("Armorer Guildmage", 156, Rarity.COMMON, mage.cards.a.ArmorerGuildmage.class)); - cards.add(new SetCardInfo("Armor of Thorns", 104, Rarity.COMMON, mage.cards.a.ArmorOfThorns.class)); - cards.add(new SetCardInfo("Ashen Powder", 2, Rarity.RARE, mage.cards.a.AshenPowder.class)); - cards.add(new SetCardInfo("Asmira, Holy Avenger", 316, Rarity.RARE, mage.cards.a.AsmiraHolyAvenger.class)); - cards.add(new SetCardInfo("Auspicious Ancestor", 207, Rarity.RARE, mage.cards.a.AuspiciousAncestor.class)); - cards.add(new SetCardInfo("Azimaet Drake", 53, Rarity.COMMON, mage.cards.a.AzimaetDrake.class)); - cards.add(new SetCardInfo("Bad River", 289, Rarity.UNCOMMON, mage.cards.b.BadRiver.class)); - cards.add(new SetCardInfo("Barbed-Back Wurm", 3, Rarity.UNCOMMON, mage.cards.b.BarbedBackWurm.class)); - cards.add(new SetCardInfo("Bay Falcon", 54, Rarity.COMMON, mage.cards.b.BayFalcon.class)); - cards.add(new SetCardInfo("Benthic Djinn", 317, Rarity.RARE, mage.cards.b.BenthicDjinn.class)); - cards.add(new SetCardInfo("Binding Agony", 4, Rarity.COMMON, mage.cards.b.BindingAgony.class)); - cards.add(new SetCardInfo("Blighted Shaman", 5, Rarity.UNCOMMON, mage.cards.b.BlightedShaman.class)); - cards.add(new SetCardInfo("Blinding Light", 209, Rarity.UNCOMMON, mage.cards.b.BlindingLight.class)); - cards.add(new SetCardInfo("Blistering Barrier", 159, Rarity.COMMON, mage.cards.b.BlisteringBarrier.class)); - cards.add(new SetCardInfo("Bone Harvest", 6, Rarity.COMMON, mage.cards.b.BoneHarvest.class)); - cards.add(new SetCardInfo("Boomerang", 56, Rarity.COMMON, mage.cards.b.Boomerang.class)); - cards.add(new SetCardInfo("Breathstealer", 7, Rarity.COMMON, mage.cards.b.Breathstealer.class)); - cards.add(new SetCardInfo("Brushwagg", 106, Rarity.RARE, mage.cards.b.Brushwagg.class)); - cards.add(new SetCardInfo("Burning Shield Askari", 162, Rarity.COMMON, mage.cards.b.BurningShieldAskari.class)); - cards.add(new SetCardInfo("Cadaverous Bloom", 318, Rarity.RARE, mage.cards.c.CadaverousBloom.class)); - cards.add(new SetCardInfo("Cadaverous Knight", 8, Rarity.COMMON, mage.cards.c.CadaverousKnight.class)); - cards.add(new SetCardInfo("Canopy Dragon", 107, Rarity.RARE, mage.cards.c.CanopyDragon.class)); - cards.add(new SetCardInfo("Celestial Dawn", 210, Rarity.RARE, mage.cards.c.CelestialDawn.class)); - cards.add(new SetCardInfo("Cerulean Wyvern", 57, Rarity.UNCOMMON, mage.cards.c.CeruleanWyvern.class)); - cards.add(new SetCardInfo("Chaos Charm", 163, Rarity.COMMON, mage.cards.c.ChaosCharm.class)); - cards.add(new SetCardInfo("Chaosphere", 164, Rarity.RARE, mage.cards.c.Chaosphere.class)); - cards.add(new SetCardInfo("Charcoal Diamond", 261, Rarity.UNCOMMON, mage.cards.c.CharcoalDiamond.class)); - cards.add(new SetCardInfo("Choking Sands", 11, Rarity.COMMON, mage.cards.c.ChokingSands.class)); - cards.add(new SetCardInfo("Civic Guildmage", 211, Rarity.COMMON, mage.cards.c.CivicGuildmage.class)); - cards.add(new SetCardInfo("Cloak of Invisibility", 58, Rarity.COMMON, mage.cards.c.CloakOfInvisibility.class)); - cards.add(new SetCardInfo("Coral Fighters", 59, Rarity.UNCOMMON, mage.cards.c.CoralFighters.class)); - cards.add(new SetCardInfo("Crash of Rhinos", 108, Rarity.COMMON, mage.cards.c.CrashOfRhinos.class)); - cards.add(new SetCardInfo("Crimson Hellkite", 167, Rarity.RARE, mage.cards.c.CrimsonHellkite.class)); - cards.add(new SetCardInfo("Crypt Cobra", 12, Rarity.UNCOMMON, mage.cards.c.CryptCobra.class)); - cards.add(new SetCardInfo("Crystal Golem", 263, Rarity.UNCOMMON, mage.cards.c.CrystalGolem.class)); - cards.add(new SetCardInfo("Crystal Vein", 290, Rarity.UNCOMMON, mage.cards.c.CrystalVein.class)); - cards.add(new SetCardInfo("Cursed Totem", 264, Rarity.RARE, mage.cards.c.CursedTotem.class)); - cards.add(new SetCardInfo("Daring Apprentice", 60, Rarity.RARE, mage.cards.d.DaringApprentice.class)); - cards.add(new SetCardInfo("Dark Banishing", 13, Rarity.COMMON, mage.cards.d.DarkBanishing.class)); - cards.add(new SetCardInfo("Dark Ritual", 14, Rarity.COMMON, mage.cards.d.DarkRitual.class)); - cards.add(new SetCardInfo("Dirtwater Wraith", 15, Rarity.COMMON, mage.cards.d.DirtwaterWraith.class)); - cards.add(new SetCardInfo("Disenchant", 214, Rarity.COMMON, mage.cards.d.Disenchant.class)); - cards.add(new SetCardInfo("Dissipate", 61, Rarity.UNCOMMON, mage.cards.d.Dissipate.class)); - cards.add(new SetCardInfo("Divine Offering", 215, Rarity.COMMON, mage.cards.d.DivineOffering.class)); - cards.add(new SetCardInfo("Drain Life", 16, Rarity.COMMON, mage.cards.d.DrainLife.class)); - cards.add(new SetCardInfo("Dread Specter", 17, Rarity.UNCOMMON, mage.cards.d.DreadSpecter.class)); - cards.add(new SetCardInfo("Dream Cache", 62, Rarity.COMMON, mage.cards.d.DreamCache.class)); - cards.add(new SetCardInfo("Dwarven Miner", 169, Rarity.UNCOMMON, mage.cards.d.DwarvenMiner.class)); - cards.add(new SetCardInfo("Dwarven Nomad", 170, Rarity.COMMON, mage.cards.d.DwarvenNomad.class)); - cards.add(new SetCardInfo("Early Harvest", 111, Rarity.RARE, mage.cards.e.EarlyHarvest.class)); - cards.add(new SetCardInfo("Ebony Charm", 18, Rarity.COMMON, mage.cards.e.EbonyCharm.class)); - cards.add(new SetCardInfo("Ekundu Griffin", 217, Rarity.COMMON, mage.cards.e.EkunduGriffin.class)); - cards.add(new SetCardInfo("Elixir of Vitality", 265, Rarity.UNCOMMON, mage.cards.e.ElixirOfVitality.class)); - cards.add(new SetCardInfo("Enfeeblement", 19, Rarity.COMMON, mage.cards.e.Enfeeblement.class)); - cards.add(new SetCardInfo("Enlightened Tutor", 218, Rarity.UNCOMMON, mage.cards.e.EnlightenedTutor.class)); - cards.add(new SetCardInfo("Ersatz Gnomes", 266, Rarity.UNCOMMON, mage.cards.e.ErsatzGnomes.class)); - cards.add(new SetCardInfo("Ethereal Champion", 219, Rarity.RARE, mage.cards.e.EtherealChampion.class)); - cards.add(new SetCardInfo("Fallow Earth", 112, Rarity.UNCOMMON, mage.cards.f.FallowEarth.class)); - cards.add(new SetCardInfo("Femeref Archers", 113, Rarity.UNCOMMON, mage.cards.f.FemerefArchers.class)); - cards.add(new SetCardInfo("Femeref Healer", 221, Rarity.COMMON, mage.cards.f.FemerefHealer.class)); - cards.add(new SetCardInfo("Femeref Knight", 222, Rarity.COMMON, mage.cards.f.FemerefKnight.class)); - cards.add(new SetCardInfo("Femeref Scouts", 223, Rarity.COMMON, mage.cards.f.FemerefScouts.class)); - cards.add(new SetCardInfo("Feral Shadow", 20, Rarity.COMMON, mage.cards.f.FeralShadow.class)); - cards.add(new SetCardInfo("Fetid Horror", 21, Rarity.COMMON, mage.cards.f.FetidHorror.class)); - cards.add(new SetCardInfo("Final Fortune", 173, Rarity.RARE, mage.cards.f.FinalFortune.class)); - cards.add(new SetCardInfo("Firebreathing", 174, Rarity.COMMON, mage.cards.f.Firebreathing.class)); - cards.add(new SetCardInfo("Fire Diamond", 267, Rarity.UNCOMMON, mage.cards.f.FireDiamond.class)); - cards.add(new SetCardInfo("Flare", 176, Rarity.COMMON, mage.cards.f.Flare.class)); - cards.add(new SetCardInfo("Flash", 66, Rarity.RARE, mage.cards.f.Flash.class)); - cards.add(new SetCardInfo("Flood Plain", 291, Rarity.UNCOMMON, mage.cards.f.FloodPlain.class)); - cards.add(new SetCardInfo("Fog", 114, Rarity.COMMON, mage.cards.f.Fog.class)); - cards.add(new SetCardInfo("Foratog", 115, Rarity.UNCOMMON, mage.cards.f.Foratog.class)); - cards.add(new SetCardInfo("Forbidden Crypt", 22, Rarity.RARE, mage.cards.f.ForbiddenCrypt.class)); - cards.add(new SetCardInfo("Forest", 292, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forest", 293, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forest", 294, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forest", 295, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Forsaken Wastes", 23, Rarity.RARE, mage.cards.f.ForsakenWastes.class)); - cards.add(new SetCardInfo("Frenetic Efreet", 324, Rarity.RARE, mage.cards.f.FreneticEfreet.class)); - cards.add(new SetCardInfo("Giant Mantis", 116, Rarity.COMMON, mage.cards.g.GiantMantis.class)); - cards.add(new SetCardInfo("Goblin Elite Infantry", 177, Rarity.COMMON, mage.cards.g.GoblinEliteInfantry.class)); - cards.add(new SetCardInfo("Goblin Scouts", 178, Rarity.UNCOMMON, mage.cards.g.GoblinScouts.class)); - cards.add(new SetCardInfo("Goblin Soothsayer", 179, Rarity.COMMON, mage.cards.g.GoblinSoothsayer.class)); - cards.add(new SetCardInfo("Goblin Tinkerer", 180, Rarity.COMMON, mage.cards.g.GoblinTinkerer.class)); - cards.add(new SetCardInfo("Granger Guildmage", 118, Rarity.COMMON, mage.cards.g.GrangerGuildmage.class)); - cards.add(new SetCardInfo("Grasslands", 296, Rarity.UNCOMMON, mage.cards.g.Grasslands.class)); - cards.add(new SetCardInfo("Gravebane Zombie", 25, Rarity.COMMON, mage.cards.g.GravebaneZombie.class)); - cards.add(new SetCardInfo("Grave Servitude", 24, Rarity.COMMON, mage.cards.g.GraveServitude.class)); - cards.add(new SetCardInfo("Grinning Totem", 268, Rarity.RARE, mage.cards.g.GrinningTotem.class)); - cards.add(new SetCardInfo("Hall of Gemstone", 119, Rarity.RARE, mage.cards.h.HallOfGemstone.class)); - cards.add(new SetCardInfo("Hammer of Bogardan", 181, Rarity.RARE, mage.cards.h.HammerOfBogardan.class)); - cards.add(new SetCardInfo("Harbinger of Night", 26, Rarity.RARE, mage.cards.h.HarbingerOfNight.class)); - cards.add(new SetCardInfo("Harmattan Efreet", 69, Rarity.UNCOMMON, mage.cards.h.HarmattanEfreet.class)); - cards.add(new SetCardInfo("Hazerider Drake", 328, Rarity.UNCOMMON, mage.cards.h.HazeriderDrake.class)); - cards.add(new SetCardInfo("Healing Salve", 224, Rarity.COMMON, mage.cards.h.HealingSalve.class)); - cards.add(new SetCardInfo("Horrible Hordes", 269, Rarity.UNCOMMON, mage.cards.h.HorribleHordes.class)); - cards.add(new SetCardInfo("Igneous Golem", 270, Rarity.UNCOMMON, mage.cards.i.IgneousGolem.class)); - cards.add(new SetCardInfo("Illicit Auction", 183, Rarity.RARE, mage.cards.i.IllicitAuction.class)); - cards.add(new SetCardInfo("Illumination", 225, Rarity.UNCOMMON, mage.cards.i.Illumination.class)); - cards.add(new SetCardInfo("Incinerate", 184, Rarity.COMMON, mage.cards.i.Incinerate.class)); - cards.add(new SetCardInfo("Infernal Contract", 27, Rarity.RARE, mage.cards.i.InfernalContract.class)); - cards.add(new SetCardInfo("Iron Tusk Elephant", 226, Rarity.UNCOMMON, mage.cards.i.IronTuskElephant.class)); - cards.add(new SetCardInfo("Island", 297, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Island", 298, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Island", 299, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Island", 300, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Ivory Charm", 227, Rarity.COMMON, mage.cards.i.IvoryCharm.class)); - cards.add(new SetCardInfo("Jolrael's Centaur", 120, Rarity.COMMON, mage.cards.j.JolraelsCentaur.class)); - cards.add(new SetCardInfo("Jolt", 70, Rarity.COMMON, mage.cards.j.Jolt.class)); - cards.add(new SetCardInfo("Jungle Patrol", 121, Rarity.RARE, mage.cards.j.JunglePatrol.class)); - cards.add(new SetCardInfo("Jungle Troll", 329, Rarity.UNCOMMON, mage.cards.j.JungleTroll.class)); - cards.add(new SetCardInfo("Jungle Wurm", 122, Rarity.COMMON, mage.cards.j.JungleWurm.class)); - cards.add(new SetCardInfo("Kaervek's Torch", 185, Rarity.COMMON, mage.cards.k.KaerveksTorch.class)); - cards.add(new SetCardInfo("Karoo Meerkat", 123, Rarity.UNCOMMON, mage.cards.k.KarooMeerkat.class)); - cards.add(new SetCardInfo("Kukemssa Serpent", 72, Rarity.COMMON, mage.cards.k.KukemssaSerpent.class)); - cards.add(new SetCardInfo("Lead Golem", 271, Rarity.UNCOMMON, mage.cards.l.LeadGolem.class)); - cards.add(new SetCardInfo("Lightning Reflexes", 186, Rarity.COMMON, mage.cards.l.LightningReflexes.class)); - cards.add(new SetCardInfo("Lion's Eye Diamond", 272, Rarity.RARE, mage.cards.l.LionsEyeDiamond.class)); - cards.add(new SetCardInfo("Locust Swarm", 124, Rarity.UNCOMMON, mage.cards.l.LocustSwarm.class)); - cards.add(new SetCardInfo("Mana Prism", 273, Rarity.UNCOMMON, mage.cards.m.ManaPrism.class)); - cards.add(new SetCardInfo("Mangara's Tome", 274, Rarity.RARE, mage.cards.m.MangarasTome.class)); - cards.add(new SetCardInfo("Marble Diamond", 275, Rarity.UNCOMMON, mage.cards.m.MarbleDiamond.class)); - cards.add(new SetCardInfo("Maro", 126, Rarity.RARE, mage.cards.m.Maro.class)); - cards.add(new SetCardInfo("Melesse Spirit", 231, Rarity.UNCOMMON, mage.cards.m.MelesseSpirit.class)); - cards.add(new SetCardInfo("Memory Lapse", 74, Rarity.COMMON, mage.cards.m.MemoryLapse.class)); - cards.add(new SetCardInfo("Merfolk Raiders", 75, Rarity.COMMON, mage.cards.m.MerfolkRaiders.class)); - cards.add(new SetCardInfo("Merfolk Seer", 76, Rarity.COMMON, mage.cards.m.MerfolkSeer.class)); - cards.add(new SetCardInfo("Mist Dragon", 79, Rarity.RARE, mage.cards.m.MistDragon.class)); - cards.add(new SetCardInfo("Moss Diamond", 277, Rarity.UNCOMMON, mage.cards.m.MossDiamond.class)); - cards.add(new SetCardInfo("Mountain", 301, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain", 302, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain", 303, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain", 304, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Mountain Valley", 305, Rarity.UNCOMMON, mage.cards.m.MountainValley.class)); - cards.add(new SetCardInfo("Mtenda Griffin", 232, Rarity.UNCOMMON, mage.cards.m.MtendaGriffin.class)); - cards.add(new SetCardInfo("Mtenda Herder", 233, Rarity.COMMON, mage.cards.m.MtendaHerder.class)); - cards.add(new SetCardInfo("Mystical Tutor", 80, Rarity.UNCOMMON, mage.cards.m.MysticalTutor.class)); - cards.add(new SetCardInfo("Natural Balance", 129, Rarity.RARE, mage.cards.n.NaturalBalance.class)); - cards.add(new SetCardInfo("Nettletooth Djinn", 130, Rarity.UNCOMMON, mage.cards.n.NettletoothDjinn.class)); - cards.add(new SetCardInfo("Nocturnal Raid", 30, Rarity.UNCOMMON, mage.cards.n.NocturnalRaid.class)); - cards.add(new SetCardInfo("Pacifism", 236, Rarity.COMMON, mage.cards.p.Pacifism.class)); - cards.add(new SetCardInfo("Painful Memories", 31, Rarity.UNCOMMON, mage.cards.p.PainfulMemories.class)); - cards.add(new SetCardInfo("Patagia Golem", 278, Rarity.UNCOMMON, mage.cards.p.PatagiaGolem.class)); - cards.add(new SetCardInfo("Paupers' Cage", 279, Rarity.RARE, mage.cards.p.PaupersCage.class)); - cards.add(new SetCardInfo("Pearl Dragon", 237, Rarity.RARE, mage.cards.p.PearlDragon.class)); - cards.add(new SetCardInfo("Phyrexian Dreadnought", 280, Rarity.RARE, mage.cards.p.PhyrexianDreadnought.class)); - cards.add(new SetCardInfo("Phyrexian Purge", 333, Rarity.RARE, mage.cards.p.PhyrexianPurge.class)); - cards.add(new SetCardInfo("Phyrexian Tribute", 32, Rarity.RARE, mage.cards.p.PhyrexianTribute.class)); - cards.add(new SetCardInfo("Phyrexian Vault", 281, Rarity.UNCOMMON, mage.cards.p.PhyrexianVault.class)); - cards.add(new SetCardInfo("Plains", 306, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Plains", 307, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Plains", 308, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Plains", 309, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Political Trickery", 81, Rarity.RARE, mage.cards.p.PoliticalTrickery.class)); - cards.add(new SetCardInfo("Polymorph", 82, Rarity.RARE, mage.cards.p.Polymorph.class)); - cards.add(new SetCardInfo("Power Sink", 83, Rarity.COMMON, mage.cards.p.PowerSink.class)); - cards.add(new SetCardInfo("Psychic Transfer", 85, Rarity.RARE, mage.cards.p.PsychicTransfer.class)); - cards.add(new SetCardInfo("Quirion Elves", 132, Rarity.COMMON, mage.cards.q.QuirionElves.class)); - cards.add(new SetCardInfo("Radiant Essence", 336, Rarity.UNCOMMON, mage.cards.r.RadiantEssence.class)); - cards.add(new SetCardInfo("Raging Spirit", 188, Rarity.COMMON, mage.cards.r.RagingSpirit.class)); - cards.add(new SetCardInfo("Rampant Growth", 133, Rarity.COMMON, mage.cards.r.RampantGrowth.class)); - cards.add(new SetCardInfo("Rashida Scalebane", 239, Rarity.RARE, mage.cards.r.RashidaScalebane.class)); - cards.add(new SetCardInfo("Ray of Command", 86, Rarity.COMMON, mage.cards.r.RayOfCommand.class)); - cards.add(new SetCardInfo("Reality Ripple", 87, Rarity.COMMON, mage.cards.r.RealityRipple.class)); - cards.add(new SetCardInfo("Reckless Embermage", 189, Rarity.RARE, mage.cards.r.RecklessEmbermage.class)); - cards.add(new SetCardInfo("Regeneration", 134, Rarity.COMMON, mage.cards.r.Regeneration.class)); - cards.add(new SetCardInfo("Restless Dead", 36, Rarity.COMMON, mage.cards.r.RestlessDead.class)); - cards.add(new SetCardInfo("Ritual of Steel", 240, Rarity.COMMON, mage.cards.r.RitualOfSteel.class)); - cards.add(new SetCardInfo("Rock Basilisk", 339, Rarity.RARE, mage.cards.r.RockBasilisk.class)); - cards.add(new SetCardInfo("Rocky Tar Pit", 310, Rarity.UNCOMMON, mage.cards.r.RockyTarPit.class)); - cards.add(new SetCardInfo("Sabertooth Cobra", 136, Rarity.COMMON, mage.cards.s.SabertoothCobra.class)); - cards.add(new SetCardInfo("Sacred Mesa", 241, Rarity.RARE, mage.cards.s.SacredMesa.class)); - cards.add(new SetCardInfo("Sandbar Crocodile", 88, Rarity.COMMON, mage.cards.s.SandbarCrocodile.class)); - cards.add(new SetCardInfo("Sandstorm", 137, Rarity.COMMON, mage.cards.s.Sandstorm.class)); - cards.add(new SetCardInfo("Sapphire Charm", 89, Rarity.COMMON, mage.cards.s.SapphireCharm.class)); - cards.add(new SetCardInfo("Savage Twister", 340, Rarity.UNCOMMON, mage.cards.s.SavageTwister.class)); - cards.add(new SetCardInfo("Searing Spear Askari", 191, Rarity.COMMON, mage.cards.s.SearingSpearAskari.class)); - cards.add(new SetCardInfo("Sea Scryer", 90, Rarity.COMMON, mage.cards.s.SeaScryer.class)); - cards.add(new SetCardInfo("Seedling Charm", 138, Rarity.COMMON, mage.cards.s.SeedlingCharm.class)); - cards.add(new SetCardInfo("Seeds of Innocence", 139, Rarity.RARE, mage.cards.s.SeedsOfInnocence.class)); - cards.add(new SetCardInfo("Serene Heart", 140, Rarity.COMMON, mage.cards.s.SereneHeart.class)); - cards.add(new SetCardInfo("Sewer Rats", 37, Rarity.COMMON, mage.cards.s.SewerRats.class)); - cards.add(new SetCardInfo("Shadow Guildmage", 38, Rarity.COMMON, mage.cards.s.ShadowGuildmage.class)); - cards.add(new SetCardInfo("Shallow Grave", 39, Rarity.RARE, mage.cards.s.ShallowGrave.class)); - cards.add(new SetCardInfo("Shaper Guildmage", 91, Rarity.COMMON, mage.cards.s.ShaperGuildmage.class)); - cards.add(new SetCardInfo("Shimmer", 92, Rarity.RARE, mage.cards.s.Shimmer.class)); - cards.add(new SetCardInfo("Sidar Jabari", 243, Rarity.RARE, mage.cards.s.SidarJabari.class)); - cards.add(new SetCardInfo("Skulking Ghost", 41, Rarity.COMMON, mage.cards.s.SkulkingGhost.class)); - cards.add(new SetCardInfo("Sky Diamond", 284, Rarity.UNCOMMON, mage.cards.s.SkyDiamond.class)); - cards.add(new SetCardInfo("Soar", 93, Rarity.COMMON, mage.cards.s.Soar.class)); - cards.add(new SetCardInfo("Soul Rend", 42, Rarity.UNCOMMON, mage.cards.s.SoulRend.class)); - cards.add(new SetCardInfo("Spirit of the Night", 44, Rarity.RARE, mage.cards.s.SpiritOfTheNight.class)); - cards.add(new SetCardInfo("Spitting Earth", 193, Rarity.COMMON, mage.cards.s.SpittingEarth.class)); - cards.add(new SetCardInfo("Stalking Tiger", 141, Rarity.COMMON, mage.cards.s.StalkingTiger.class)); - cards.add(new SetCardInfo("Stone Rain", 194, Rarity.COMMON, mage.cards.s.StoneRain.class)); - cards.add(new SetCardInfo("Stupor", 45, Rarity.UNCOMMON, mage.cards.s.Stupor.class)); - cards.add(new SetCardInfo("Sunweb", 246, Rarity.RARE, mage.cards.s.Sunweb.class)); - cards.add(new SetCardInfo("Suq'Ata Firewalker", 94, Rarity.UNCOMMON, mage.cards.s.SuqAtaFirewalker.class)); - cards.add(new SetCardInfo("Swamp", 311, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swamp", 312, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swamp", 313, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Swamp", 314, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); - cards.add(new SetCardInfo("Talruum Minotaur", 196, Rarity.COMMON, mage.cards.t.TalruumMinotaur.class)); - cards.add(new SetCardInfo("Taniwha", 95, Rarity.RARE, mage.cards.t.Taniwha.class)); - cards.add(new SetCardInfo("Teeka's Dragon", 285, Rarity.RARE, mage.cards.t.TeekasDragon.class)); - cards.add(new SetCardInfo("Teferi's Curse", 96, Rarity.COMMON, mage.cards.t.TeferisCurse.class)); - cards.add(new SetCardInfo("Teferi's Drake", 97, Rarity.COMMON, mage.cards.t.TeferisDrake.class)); - cards.add(new SetCardInfo("Teferi's Isle", 315, Rarity.RARE, mage.cards.t.TeferisIsle.class)); - cards.add(new SetCardInfo("Telim'Tor's Darts", 286, Rarity.UNCOMMON, mage.cards.t.TelimTorsDarts.class)); - cards.add(new SetCardInfo("Thirst", 99, Rarity.COMMON, mage.cards.t.Thirst.class)); - cards.add(new SetCardInfo("Tidal Wave", 100, Rarity.UNCOMMON, mage.cards.t.TidalWave.class)); - cards.add(new SetCardInfo("Tranquil Domain", 143, Rarity.COMMON, mage.cards.t.TranquilDomain.class)); - cards.add(new SetCardInfo("Uktabi Wildcats", 146, Rarity.RARE, mage.cards.u.UktabiWildcats.class)); - cards.add(new SetCardInfo("Unfulfilled Desires", 345, Rarity.RARE, mage.cards.u.UnfulfilledDesires.class)); - cards.add(new SetCardInfo("Unseen Walker", 147, Rarity.UNCOMMON, mage.cards.u.UnseenWalker.class)); - cards.add(new SetCardInfo("Unyaro Bee Sting", 148, Rarity.UNCOMMON, mage.cards.u.UnyaroBeeSting.class)); - cards.add(new SetCardInfo("Unyaro Griffin", 248, Rarity.UNCOMMON, mage.cards.u.UnyaroGriffin.class)); - cards.add(new SetCardInfo("Vaporous Djinn", 101, Rarity.UNCOMMON, mage.cards.v.VaporousDjinn.class)); - cards.add(new SetCardInfo("Viashino Warrior", 200, Rarity.COMMON, mage.cards.v.ViashinoWarrior.class)); - cards.add(new SetCardInfo("Vigilant Martyr", 249, Rarity.UNCOMMON, mage.cards.v.VigilantMartyr.class)); - cards.add(new SetCardInfo("Village Elder", 149, Rarity.COMMON, mage.cards.v.VillageElder.class)); - cards.add(new SetCardInfo("Vitalizing Cascade", 346, Rarity.UNCOMMON, mage.cards.v.VitalizingCascade.class)); - cards.add(new SetCardInfo("Volcanic Dragon", 201, Rarity.RARE, mage.cards.v.VolcanicDragon.class)); - cards.add(new SetCardInfo("Volcanic Geyser", 202, Rarity.UNCOMMON, mage.cards.v.VolcanicGeyser.class)); - cards.add(new SetCardInfo("Waiting in the Weeds", 150, Rarity.RARE, mage.cards.w.WaitingInTheWeeds.class)); - cards.add(new SetCardInfo("Wall of Roots", 151, Rarity.COMMON, mage.cards.w.WallOfRoots.class)); - cards.add(new SetCardInfo("Ward of Lights", 251, Rarity.COMMON, mage.cards.w.WardOfLights.class)); - cards.add(new SetCardInfo("Wild Elephant", 152, Rarity.COMMON, mage.cards.w.WildElephant.class)); - cards.add(new SetCardInfo("Wildfire Emissary", 203, Rarity.UNCOMMON, mage.cards.w.WildfireEmissary.class)); - cards.add(new SetCardInfo("Windreaper Falcon", 349, Rarity.UNCOMMON, mage.cards.w.WindreaperFalcon.class)); - cards.add(new SetCardInfo("Withering Boon", 50, Rarity.UNCOMMON, mage.cards.w.WitheringBoon.class)); - cards.add(new SetCardInfo("Worldly Tutor", 153, Rarity.UNCOMMON, mage.cards.w.WorldlyTutor.class)); - cards.add(new SetCardInfo("Zebra Unicorn", 350, Rarity.UNCOMMON, mage.cards.z.ZebraUnicorn.class)); - cards.add(new SetCardInfo("Zhalfirin Commander", 253, Rarity.UNCOMMON, mage.cards.z.ZhalfirinCommander.class)); - cards.add(new SetCardInfo("Zhalfirin Knight", 254, Rarity.COMMON, mage.cards.z.ZhalfirinKnight.class)); - cards.add(new SetCardInfo("Zirilan of the Claw", 204, Rarity.RARE, mage.cards.z.ZirilanOfTheClaw.class)); - cards.add(new SetCardInfo("Zuberi, Golden Feather", 255, Rarity.RARE, mage.cards.z.ZuberiGoldenFeather.class)); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import mage.cards.CardGraphicInfo; +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author North + */ +public class Mirage extends ExpansionSet { + + private static final Mirage instance = new Mirage(); + + public static Mirage getInstance() { + return instance; + } + + private Mirage() { + super("Mirage", "MIR", ExpansionSet.buildDate(1996, 8, 21), SetType.EXPANSION); + this.blockName = "Mirage"; + this.hasBoosters = true; + this.numBoosterLands = 0; + this.numBoosterCommon = 11; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Abyssal Hunter", 1, Rarity.RARE, mage.cards.a.AbyssalHunter.class)); + cards.add(new SetCardInfo("Afterlife", 205, Rarity.UNCOMMON, mage.cards.a.Afterlife.class)); + cards.add(new SetCardInfo("Agility", 154, Rarity.COMMON, mage.cards.a.Agility.class)); + cards.add(new SetCardInfo("Alarum", 206, Rarity.COMMON, mage.cards.a.Alarum.class)); + cards.add(new SetCardInfo("Aleatory", 155, Rarity.UNCOMMON, mage.cards.a.Aleatory.class)); + cards.add(new SetCardInfo("Amber Prison", 257, Rarity.RARE, mage.cards.a.AmberPrison.class)); + cards.add(new SetCardInfo("Ancestral Memories", 52, Rarity.RARE, mage.cards.a.AncestralMemories.class)); + cards.add(new SetCardInfo("Armorer Guildmage", 156, Rarity.COMMON, mage.cards.a.ArmorerGuildmage.class)); + cards.add(new SetCardInfo("Armor of Thorns", 104, Rarity.COMMON, mage.cards.a.ArmorOfThorns.class)); + cards.add(new SetCardInfo("Ashen Powder", 2, Rarity.RARE, mage.cards.a.AshenPowder.class)); + cards.add(new SetCardInfo("Asmira, Holy Avenger", 316, Rarity.RARE, mage.cards.a.AsmiraHolyAvenger.class)); + cards.add(new SetCardInfo("Auspicious Ancestor", 207, Rarity.RARE, mage.cards.a.AuspiciousAncestor.class)); + cards.add(new SetCardInfo("Azimaet Drake", 53, Rarity.COMMON, mage.cards.a.AzimaetDrake.class)); + cards.add(new SetCardInfo("Bad River", 289, Rarity.UNCOMMON, mage.cards.b.BadRiver.class)); + cards.add(new SetCardInfo("Barbed-Back Wurm", 3, Rarity.UNCOMMON, mage.cards.b.BarbedBackWurm.class)); + cards.add(new SetCardInfo("Bay Falcon", 54, Rarity.COMMON, mage.cards.b.BayFalcon.class)); + cards.add(new SetCardInfo("Benthic Djinn", 317, Rarity.RARE, mage.cards.b.BenthicDjinn.class)); + cards.add(new SetCardInfo("Binding Agony", 4, Rarity.COMMON, mage.cards.b.BindingAgony.class)); + cards.add(new SetCardInfo("Blighted Shaman", 5, Rarity.UNCOMMON, mage.cards.b.BlightedShaman.class)); + cards.add(new SetCardInfo("Blinding Light", 209, Rarity.UNCOMMON, mage.cards.b.BlindingLight.class)); + cards.add(new SetCardInfo("Blistering Barrier", 159, Rarity.COMMON, mage.cards.b.BlisteringBarrier.class)); + cards.add(new SetCardInfo("Bone Harvest", 6, Rarity.COMMON, mage.cards.b.BoneHarvest.class)); + cards.add(new SetCardInfo("Boomerang", 56, Rarity.COMMON, mage.cards.b.Boomerang.class)); + cards.add(new SetCardInfo("Breathstealer", 7, Rarity.COMMON, mage.cards.b.Breathstealer.class)); + cards.add(new SetCardInfo("Brushwagg", 106, Rarity.RARE, mage.cards.b.Brushwagg.class)); + cards.add(new SetCardInfo("Burning Shield Askari", 162, Rarity.COMMON, mage.cards.b.BurningShieldAskari.class)); + cards.add(new SetCardInfo("Cadaverous Bloom", 318, Rarity.RARE, mage.cards.c.CadaverousBloom.class)); + cards.add(new SetCardInfo("Cadaverous Knight", 8, Rarity.COMMON, mage.cards.c.CadaverousKnight.class)); + cards.add(new SetCardInfo("Canopy Dragon", 107, Rarity.RARE, mage.cards.c.CanopyDragon.class)); + cards.add(new SetCardInfo("Celestial Dawn", 210, Rarity.RARE, mage.cards.c.CelestialDawn.class)); + cards.add(new SetCardInfo("Cerulean Wyvern", 57, Rarity.UNCOMMON, mage.cards.c.CeruleanWyvern.class)); + cards.add(new SetCardInfo("Chaos Charm", 163, Rarity.COMMON, mage.cards.c.ChaosCharm.class)); + cards.add(new SetCardInfo("Chaosphere", 164, Rarity.RARE, mage.cards.c.Chaosphere.class)); + cards.add(new SetCardInfo("Charcoal Diamond", 261, Rarity.UNCOMMON, mage.cards.c.CharcoalDiamond.class)); + cards.add(new SetCardInfo("Choking Sands", 11, Rarity.COMMON, mage.cards.c.ChokingSands.class)); + cards.add(new SetCardInfo("Civic Guildmage", 211, Rarity.COMMON, mage.cards.c.CivicGuildmage.class)); + cards.add(new SetCardInfo("Cloak of Invisibility", 58, Rarity.COMMON, mage.cards.c.CloakOfInvisibility.class)); + cards.add(new SetCardInfo("Coral Fighters", 59, Rarity.UNCOMMON, mage.cards.c.CoralFighters.class)); + cards.add(new SetCardInfo("Crash of Rhinos", 108, Rarity.COMMON, mage.cards.c.CrashOfRhinos.class)); + cards.add(new SetCardInfo("Crimson Hellkite", 167, Rarity.RARE, mage.cards.c.CrimsonHellkite.class)); + cards.add(new SetCardInfo("Crypt Cobra", 12, Rarity.UNCOMMON, mage.cards.c.CryptCobra.class)); + cards.add(new SetCardInfo("Crystal Golem", 263, Rarity.UNCOMMON, mage.cards.c.CrystalGolem.class)); + cards.add(new SetCardInfo("Crystal Vein", 290, Rarity.UNCOMMON, mage.cards.c.CrystalVein.class)); + cards.add(new SetCardInfo("Cursed Totem", 264, Rarity.RARE, mage.cards.c.CursedTotem.class)); + cards.add(new SetCardInfo("Daring Apprentice", 60, Rarity.RARE, mage.cards.d.DaringApprentice.class)); + cards.add(new SetCardInfo("Dark Banishing", 13, Rarity.COMMON, mage.cards.d.DarkBanishing.class)); + cards.add(new SetCardInfo("Dark Ritual", 14, Rarity.COMMON, mage.cards.d.DarkRitual.class)); + cards.add(new SetCardInfo("Dirtwater Wraith", 15, Rarity.COMMON, mage.cards.d.DirtwaterWraith.class)); + cards.add(new SetCardInfo("Disenchant", 214, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Dissipate", 61, Rarity.UNCOMMON, mage.cards.d.Dissipate.class)); + cards.add(new SetCardInfo("Divine Offering", 215, Rarity.COMMON, mage.cards.d.DivineOffering.class)); + cards.add(new SetCardInfo("Drain Life", 16, Rarity.COMMON, mage.cards.d.DrainLife.class)); + cards.add(new SetCardInfo("Dread Specter", 17, Rarity.UNCOMMON, mage.cards.d.DreadSpecter.class)); + cards.add(new SetCardInfo("Dream Cache", 62, Rarity.COMMON, mage.cards.d.DreamCache.class)); + cards.add(new SetCardInfo("Dwarven Miner", 169, Rarity.UNCOMMON, mage.cards.d.DwarvenMiner.class)); + cards.add(new SetCardInfo("Dwarven Nomad", 170, Rarity.COMMON, mage.cards.d.DwarvenNomad.class)); + cards.add(new SetCardInfo("Early Harvest", 111, Rarity.RARE, mage.cards.e.EarlyHarvest.class)); + cards.add(new SetCardInfo("Ebony Charm", 18, Rarity.COMMON, mage.cards.e.EbonyCharm.class)); + cards.add(new SetCardInfo("Ekundu Griffin", 217, Rarity.COMMON, mage.cards.e.EkunduGriffin.class)); + cards.add(new SetCardInfo("Elixir of Vitality", 265, Rarity.UNCOMMON, mage.cards.e.ElixirOfVitality.class)); + cards.add(new SetCardInfo("Enfeeblement", 19, Rarity.COMMON, mage.cards.e.Enfeeblement.class)); + cards.add(new SetCardInfo("Enlightened Tutor", 218, Rarity.UNCOMMON, mage.cards.e.EnlightenedTutor.class)); + cards.add(new SetCardInfo("Ersatz Gnomes", 266, Rarity.UNCOMMON, mage.cards.e.ErsatzGnomes.class)); + cards.add(new SetCardInfo("Ethereal Champion", 219, Rarity.RARE, mage.cards.e.EtherealChampion.class)); + cards.add(new SetCardInfo("Fallow Earth", 112, Rarity.UNCOMMON, mage.cards.f.FallowEarth.class)); + cards.add(new SetCardInfo("Femeref Archers", 113, Rarity.UNCOMMON, mage.cards.f.FemerefArchers.class)); + cards.add(new SetCardInfo("Femeref Healer", 221, Rarity.COMMON, mage.cards.f.FemerefHealer.class)); + cards.add(new SetCardInfo("Femeref Knight", 222, Rarity.COMMON, mage.cards.f.FemerefKnight.class)); + cards.add(new SetCardInfo("Femeref Scouts", 223, Rarity.COMMON, mage.cards.f.FemerefScouts.class)); + cards.add(new SetCardInfo("Feral Shadow", 20, Rarity.COMMON, mage.cards.f.FeralShadow.class)); + cards.add(new SetCardInfo("Fetid Horror", 21, Rarity.COMMON, mage.cards.f.FetidHorror.class)); + cards.add(new SetCardInfo("Final Fortune", 173, Rarity.RARE, mage.cards.f.FinalFortune.class)); + cards.add(new SetCardInfo("Firebreathing", 174, Rarity.COMMON, mage.cards.f.Firebreathing.class)); + cards.add(new SetCardInfo("Fire Diamond", 267, Rarity.UNCOMMON, mage.cards.f.FireDiamond.class)); + cards.add(new SetCardInfo("Flare", 176, Rarity.COMMON, mage.cards.f.Flare.class)); + cards.add(new SetCardInfo("Flash", 66, Rarity.RARE, mage.cards.f.Flash.class)); + cards.add(new SetCardInfo("Flood Plain", 291, Rarity.UNCOMMON, mage.cards.f.FloodPlain.class)); + cards.add(new SetCardInfo("Fog", 114, Rarity.COMMON, mage.cards.f.Fog.class)); + cards.add(new SetCardInfo("Foratog", 115, Rarity.UNCOMMON, mage.cards.f.Foratog.class)); + cards.add(new SetCardInfo("Forbidden Crypt", 22, Rarity.RARE, mage.cards.f.ForbiddenCrypt.class)); + cards.add(new SetCardInfo("Forest", 292, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forest", 293, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forest", 294, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forest", 295, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Forsaken Wastes", 23, Rarity.RARE, mage.cards.f.ForsakenWastes.class)); + cards.add(new SetCardInfo("Frenetic Efreet", 324, Rarity.RARE, mage.cards.f.FreneticEfreet.class)); + cards.add(new SetCardInfo("Giant Mantis", 116, Rarity.COMMON, mage.cards.g.GiantMantis.class)); + cards.add(new SetCardInfo("Goblin Elite Infantry", 177, Rarity.COMMON, mage.cards.g.GoblinEliteInfantry.class)); + cards.add(new SetCardInfo("Goblin Scouts", 178, Rarity.UNCOMMON, mage.cards.g.GoblinScouts.class)); + cards.add(new SetCardInfo("Goblin Soothsayer", 179, Rarity.COMMON, mage.cards.g.GoblinSoothsayer.class)); + cards.add(new SetCardInfo("Goblin Tinkerer", 180, Rarity.COMMON, mage.cards.g.GoblinTinkerer.class)); + cards.add(new SetCardInfo("Granger Guildmage", 118, Rarity.COMMON, mage.cards.g.GrangerGuildmage.class)); + cards.add(new SetCardInfo("Grasslands", 296, Rarity.UNCOMMON, mage.cards.g.Grasslands.class)); + cards.add(new SetCardInfo("Gravebane Zombie", 25, Rarity.COMMON, mage.cards.g.GravebaneZombie.class)); + cards.add(new SetCardInfo("Grave Servitude", 24, Rarity.COMMON, mage.cards.g.GraveServitude.class)); + cards.add(new SetCardInfo("Grinning Totem", 268, Rarity.RARE, mage.cards.g.GrinningTotem.class)); + cards.add(new SetCardInfo("Hall of Gemstone", 119, Rarity.RARE, mage.cards.h.HallOfGemstone.class)); + cards.add(new SetCardInfo("Hammer of Bogardan", 181, Rarity.RARE, mage.cards.h.HammerOfBogardan.class)); + cards.add(new SetCardInfo("Harbinger of Night", 26, Rarity.RARE, mage.cards.h.HarbingerOfNight.class)); + cards.add(new SetCardInfo("Harmattan Efreet", 69, Rarity.UNCOMMON, mage.cards.h.HarmattanEfreet.class)); + cards.add(new SetCardInfo("Hazerider Drake", 328, Rarity.UNCOMMON, mage.cards.h.HazeriderDrake.class)); + cards.add(new SetCardInfo("Healing Salve", 224, Rarity.COMMON, mage.cards.h.HealingSalve.class)); + cards.add(new SetCardInfo("Hivis of the Scale", 182, Rarity.RARE, mage.cards.h.HivisOfTheScale.class)); + cards.add(new SetCardInfo("Horrible Hordes", 269, Rarity.UNCOMMON, mage.cards.h.HorribleHordes.class)); + cards.add(new SetCardInfo("Igneous Golem", 270, Rarity.UNCOMMON, mage.cards.i.IgneousGolem.class)); + cards.add(new SetCardInfo("Illicit Auction", 183, Rarity.RARE, mage.cards.i.IllicitAuction.class)); + cards.add(new SetCardInfo("Illumination", 225, Rarity.UNCOMMON, mage.cards.i.Illumination.class)); + cards.add(new SetCardInfo("Incinerate", 184, Rarity.COMMON, mage.cards.i.Incinerate.class)); + cards.add(new SetCardInfo("Infernal Contract", 27, Rarity.RARE, mage.cards.i.InfernalContract.class)); + cards.add(new SetCardInfo("Iron Tusk Elephant", 226, Rarity.UNCOMMON, mage.cards.i.IronTuskElephant.class)); + cards.add(new SetCardInfo("Island", 297, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Island", 298, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Island", 299, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Island", 300, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Ivory Charm", 227, Rarity.COMMON, mage.cards.i.IvoryCharm.class)); + cards.add(new SetCardInfo("Jolrael's Centaur", 120, Rarity.COMMON, mage.cards.j.JolraelsCentaur.class)); + cards.add(new SetCardInfo("Jolt", 70, Rarity.COMMON, mage.cards.j.Jolt.class)); + cards.add(new SetCardInfo("Jungle Patrol", 121, Rarity.RARE, mage.cards.j.JunglePatrol.class)); + cards.add(new SetCardInfo("Jungle Troll", 329, Rarity.UNCOMMON, mage.cards.j.JungleTroll.class)); + cards.add(new SetCardInfo("Jungle Wurm", 122, Rarity.COMMON, mage.cards.j.JungleWurm.class)); + cards.add(new SetCardInfo("Kaervek's Torch", 185, Rarity.COMMON, mage.cards.k.KaerveksTorch.class)); + cards.add(new SetCardInfo("Karoo Meerkat", 123, Rarity.UNCOMMON, mage.cards.k.KarooMeerkat.class)); + cards.add(new SetCardInfo("Kukemssa Serpent", 72, Rarity.COMMON, mage.cards.k.KukemssaSerpent.class)); + cards.add(new SetCardInfo("Lead Golem", 271, Rarity.UNCOMMON, mage.cards.l.LeadGolem.class)); + cards.add(new SetCardInfo("Lightning Reflexes", 186, Rarity.COMMON, mage.cards.l.LightningReflexes.class)); + cards.add(new SetCardInfo("Lion's Eye Diamond", 272, Rarity.RARE, mage.cards.l.LionsEyeDiamond.class)); + cards.add(new SetCardInfo("Locust Swarm", 124, Rarity.UNCOMMON, mage.cards.l.LocustSwarm.class)); + cards.add(new SetCardInfo("Mana Prism", 273, Rarity.UNCOMMON, mage.cards.m.ManaPrism.class)); + cards.add(new SetCardInfo("Mangara's Tome", 274, Rarity.RARE, mage.cards.m.MangarasTome.class)); + cards.add(new SetCardInfo("Marble Diamond", 275, Rarity.UNCOMMON, mage.cards.m.MarbleDiamond.class)); + cards.add(new SetCardInfo("Maro", 126, Rarity.RARE, mage.cards.m.Maro.class)); + cards.add(new SetCardInfo("Melesse Spirit", 231, Rarity.UNCOMMON, mage.cards.m.MelesseSpirit.class)); + cards.add(new SetCardInfo("Memory Lapse", 74, Rarity.COMMON, mage.cards.m.MemoryLapse.class)); + cards.add(new SetCardInfo("Merfolk Raiders", 75, Rarity.COMMON, mage.cards.m.MerfolkRaiders.class)); + cards.add(new SetCardInfo("Merfolk Seer", 76, Rarity.COMMON, mage.cards.m.MerfolkSeer.class)); + cards.add(new SetCardInfo("Mist Dragon", 79, Rarity.RARE, mage.cards.m.MistDragon.class)); + cards.add(new SetCardInfo("Moss Diamond", 277, Rarity.UNCOMMON, mage.cards.m.MossDiamond.class)); + cards.add(new SetCardInfo("Mountain", 301, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain", 302, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain", 303, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain", 304, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Mountain Valley", 305, Rarity.UNCOMMON, mage.cards.m.MountainValley.class)); + cards.add(new SetCardInfo("Mtenda Griffin", 232, Rarity.UNCOMMON, mage.cards.m.MtendaGriffin.class)); + cards.add(new SetCardInfo("Mtenda Herder", 233, Rarity.COMMON, mage.cards.m.MtendaHerder.class)); + cards.add(new SetCardInfo("Mystical Tutor", 80, Rarity.UNCOMMON, mage.cards.m.MysticalTutor.class)); + cards.add(new SetCardInfo("Natural Balance", 129, Rarity.RARE, mage.cards.n.NaturalBalance.class)); + cards.add(new SetCardInfo("Nettletooth Djinn", 130, Rarity.UNCOMMON, mage.cards.n.NettletoothDjinn.class)); + cards.add(new SetCardInfo("Nocturnal Raid", 30, Rarity.UNCOMMON, mage.cards.n.NocturnalRaid.class)); + cards.add(new SetCardInfo("Pacifism", 236, Rarity.COMMON, mage.cards.p.Pacifism.class)); + cards.add(new SetCardInfo("Painful Memories", 31, Rarity.UNCOMMON, mage.cards.p.PainfulMemories.class)); + cards.add(new SetCardInfo("Patagia Golem", 278, Rarity.UNCOMMON, mage.cards.p.PatagiaGolem.class)); + cards.add(new SetCardInfo("Paupers' Cage", 279, Rarity.RARE, mage.cards.p.PaupersCage.class)); + cards.add(new SetCardInfo("Pearl Dragon", 237, Rarity.RARE, mage.cards.p.PearlDragon.class)); + cards.add(new SetCardInfo("Phyrexian Dreadnought", 280, Rarity.RARE, mage.cards.p.PhyrexianDreadnought.class)); + cards.add(new SetCardInfo("Phyrexian Purge", 333, Rarity.RARE, mage.cards.p.PhyrexianPurge.class)); + cards.add(new SetCardInfo("Phyrexian Tribute", 32, Rarity.RARE, mage.cards.p.PhyrexianTribute.class)); + cards.add(new SetCardInfo("Phyrexian Vault", 281, Rarity.UNCOMMON, mage.cards.p.PhyrexianVault.class)); + cards.add(new SetCardInfo("Plains", 306, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Plains", 307, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Plains", 308, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Plains", 309, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Political Trickery", 81, Rarity.RARE, mage.cards.p.PoliticalTrickery.class)); + cards.add(new SetCardInfo("Polymorph", 82, Rarity.RARE, mage.cards.p.Polymorph.class)); + cards.add(new SetCardInfo("Power Sink", 83, Rarity.COMMON, mage.cards.p.PowerSink.class)); + cards.add(new SetCardInfo("Psychic Transfer", 85, Rarity.RARE, mage.cards.p.PsychicTransfer.class)); + cards.add(new SetCardInfo("Quirion Elves", 132, Rarity.COMMON, mage.cards.q.QuirionElves.class)); + cards.add(new SetCardInfo("Radiant Essence", 336, Rarity.UNCOMMON, mage.cards.r.RadiantEssence.class)); + cards.add(new SetCardInfo("Raging Spirit", 188, Rarity.COMMON, mage.cards.r.RagingSpirit.class)); + cards.add(new SetCardInfo("Rampant Growth", 133, Rarity.COMMON, mage.cards.r.RampantGrowth.class)); + cards.add(new SetCardInfo("Rashida Scalebane", 239, Rarity.RARE, mage.cards.r.RashidaScalebane.class)); + cards.add(new SetCardInfo("Ray of Command", 86, Rarity.COMMON, mage.cards.r.RayOfCommand.class)); + cards.add(new SetCardInfo("Reality Ripple", 87, Rarity.COMMON, mage.cards.r.RealityRipple.class)); + cards.add(new SetCardInfo("Reckless Embermage", 189, Rarity.RARE, mage.cards.r.RecklessEmbermage.class)); + cards.add(new SetCardInfo("Regeneration", 134, Rarity.COMMON, mage.cards.r.Regeneration.class)); + cards.add(new SetCardInfo("Reparations", 338, Rarity.RARE, mage.cards.r.Reparations.class)); + cards.add(new SetCardInfo("Restless Dead", 36, Rarity.COMMON, mage.cards.r.RestlessDead.class)); + cards.add(new SetCardInfo("Ritual of Steel", 240, Rarity.COMMON, mage.cards.r.RitualOfSteel.class)); + cards.add(new SetCardInfo("Rock Basilisk", 339, Rarity.RARE, mage.cards.r.RockBasilisk.class)); + cards.add(new SetCardInfo("Rocky Tar Pit", 310, Rarity.UNCOMMON, mage.cards.r.RockyTarPit.class)); + cards.add(new SetCardInfo("Sabertooth Cobra", 136, Rarity.COMMON, mage.cards.s.SabertoothCobra.class)); + cards.add(new SetCardInfo("Sacred Mesa", 241, Rarity.RARE, mage.cards.s.SacredMesa.class)); + cards.add(new SetCardInfo("Sandbar Crocodile", 88, Rarity.COMMON, mage.cards.s.SandbarCrocodile.class)); + cards.add(new SetCardInfo("Sandstorm", 137, Rarity.COMMON, mage.cards.s.Sandstorm.class)); + cards.add(new SetCardInfo("Sapphire Charm", 89, Rarity.COMMON, mage.cards.s.SapphireCharm.class)); + cards.add(new SetCardInfo("Savage Twister", 340, Rarity.UNCOMMON, mage.cards.s.SavageTwister.class)); + cards.add(new SetCardInfo("Searing Spear Askari", 191, Rarity.COMMON, mage.cards.s.SearingSpearAskari.class)); + cards.add(new SetCardInfo("Sea Scryer", 90, Rarity.COMMON, mage.cards.s.SeaScryer.class)); + cards.add(new SetCardInfo("Seedling Charm", 138, Rarity.COMMON, mage.cards.s.SeedlingCharm.class)); + cards.add(new SetCardInfo("Seeds of Innocence", 139, Rarity.RARE, mage.cards.s.SeedsOfInnocence.class)); + cards.add(new SetCardInfo("Serene Heart", 140, Rarity.COMMON, mage.cards.s.SereneHeart.class)); + cards.add(new SetCardInfo("Sewer Rats", 37, Rarity.COMMON, mage.cards.s.SewerRats.class)); + cards.add(new SetCardInfo("Shadow Guildmage", 38, Rarity.COMMON, mage.cards.s.ShadowGuildmage.class)); + cards.add(new SetCardInfo("Shallow Grave", 39, Rarity.RARE, mage.cards.s.ShallowGrave.class)); + cards.add(new SetCardInfo("Shaper Guildmage", 91, Rarity.COMMON, mage.cards.s.ShaperGuildmage.class)); + cards.add(new SetCardInfo("Shimmer", 92, Rarity.RARE, mage.cards.s.Shimmer.class)); + cards.add(new SetCardInfo("Sidar Jabari", 243, Rarity.RARE, mage.cards.s.SidarJabari.class)); + cards.add(new SetCardInfo("Skulking Ghost", 41, Rarity.COMMON, mage.cards.s.SkulkingGhost.class)); + cards.add(new SetCardInfo("Sky Diamond", 284, Rarity.UNCOMMON, mage.cards.s.SkyDiamond.class)); + cards.add(new SetCardInfo("Soar", 93, Rarity.COMMON, mage.cards.s.Soar.class)); + cards.add(new SetCardInfo("Soul Rend", 42, Rarity.UNCOMMON, mage.cards.s.SoulRend.class)); + cards.add(new SetCardInfo("Spirit of the Night", 44, Rarity.RARE, mage.cards.s.SpiritOfTheNight.class)); + cards.add(new SetCardInfo("Spitting Earth", 193, Rarity.COMMON, mage.cards.s.SpittingEarth.class)); + cards.add(new SetCardInfo("Stalking Tiger", 141, Rarity.COMMON, mage.cards.s.StalkingTiger.class)); + cards.add(new SetCardInfo("Stone Rain", 194, Rarity.COMMON, mage.cards.s.StoneRain.class)); + cards.add(new SetCardInfo("Stupor", 45, Rarity.UNCOMMON, mage.cards.s.Stupor.class)); + cards.add(new SetCardInfo("Sunweb", 246, Rarity.RARE, mage.cards.s.Sunweb.class)); + cards.add(new SetCardInfo("Suq'Ata Firewalker", 94, Rarity.UNCOMMON, mage.cards.s.SuqAtaFirewalker.class)); + cards.add(new SetCardInfo("Swamp", 311, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swamp", 312, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swamp", 313, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Swamp", 314, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true))); + cards.add(new SetCardInfo("Talruum Minotaur", 196, Rarity.COMMON, mage.cards.t.TalruumMinotaur.class)); + cards.add(new SetCardInfo("Taniwha", 95, Rarity.RARE, mage.cards.t.Taniwha.class)); + cards.add(new SetCardInfo("Teeka's Dragon", 285, Rarity.RARE, mage.cards.t.TeekasDragon.class)); + cards.add(new SetCardInfo("Teferi's Curse", 96, Rarity.COMMON, mage.cards.t.TeferisCurse.class)); + cards.add(new SetCardInfo("Teferi's Drake", 97, Rarity.COMMON, mage.cards.t.TeferisDrake.class)); + cards.add(new SetCardInfo("Teferi's Isle", 315, Rarity.RARE, mage.cards.t.TeferisIsle.class)); + cards.add(new SetCardInfo("Telim'Tor's Darts", 286, Rarity.UNCOMMON, mage.cards.t.TelimTorsDarts.class)); + cards.add(new SetCardInfo("Thirst", 99, Rarity.COMMON, mage.cards.t.Thirst.class)); + cards.add(new SetCardInfo("Tidal Wave", 100, Rarity.UNCOMMON, mage.cards.t.TidalWave.class)); + cards.add(new SetCardInfo("Tranquil Domain", 143, Rarity.COMMON, mage.cards.t.TranquilDomain.class)); + cards.add(new SetCardInfo("Uktabi Wildcats", 146, Rarity.RARE, mage.cards.u.UktabiWildcats.class)); + cards.add(new SetCardInfo("Unfulfilled Desires", 345, Rarity.RARE, mage.cards.u.UnfulfilledDesires.class)); + cards.add(new SetCardInfo("Unseen Walker", 147, Rarity.UNCOMMON, mage.cards.u.UnseenWalker.class)); + cards.add(new SetCardInfo("Unyaro Bee Sting", 148, Rarity.UNCOMMON, mage.cards.u.UnyaroBeeSting.class)); + cards.add(new SetCardInfo("Unyaro Griffin", 248, Rarity.UNCOMMON, mage.cards.u.UnyaroGriffin.class)); + cards.add(new SetCardInfo("Vaporous Djinn", 101, Rarity.UNCOMMON, mage.cards.v.VaporousDjinn.class)); + cards.add(new SetCardInfo("Viashino Warrior", 200, Rarity.COMMON, mage.cards.v.ViashinoWarrior.class)); + cards.add(new SetCardInfo("Vigilant Martyr", 249, Rarity.UNCOMMON, mage.cards.v.VigilantMartyr.class)); + cards.add(new SetCardInfo("Village Elder", 149, Rarity.COMMON, mage.cards.v.VillageElder.class)); + cards.add(new SetCardInfo("Vitalizing Cascade", 346, Rarity.UNCOMMON, mage.cards.v.VitalizingCascade.class)); + cards.add(new SetCardInfo("Volcanic Dragon", 201, Rarity.RARE, mage.cards.v.VolcanicDragon.class)); + cards.add(new SetCardInfo("Volcanic Geyser", 202, Rarity.UNCOMMON, mage.cards.v.VolcanicGeyser.class)); + cards.add(new SetCardInfo("Waiting in the Weeds", 150, Rarity.RARE, mage.cards.w.WaitingInTheWeeds.class)); + cards.add(new SetCardInfo("Wall of Roots", 151, Rarity.COMMON, mage.cards.w.WallOfRoots.class)); + cards.add(new SetCardInfo("Ward of Lights", 251, Rarity.COMMON, mage.cards.w.WardOfLights.class)); + cards.add(new SetCardInfo("Wild Elephant", 152, Rarity.COMMON, mage.cards.w.WildElephant.class)); + cards.add(new SetCardInfo("Wildfire Emissary", 203, Rarity.UNCOMMON, mage.cards.w.WildfireEmissary.class)); + cards.add(new SetCardInfo("Windreaper Falcon", 349, Rarity.UNCOMMON, mage.cards.w.WindreaperFalcon.class)); + cards.add(new SetCardInfo("Withering Boon", 50, Rarity.UNCOMMON, mage.cards.w.WitheringBoon.class)); + cards.add(new SetCardInfo("Worldly Tutor", 153, Rarity.UNCOMMON, mage.cards.w.WorldlyTutor.class)); + cards.add(new SetCardInfo("Zebra Unicorn", 350, Rarity.UNCOMMON, mage.cards.z.ZebraUnicorn.class)); + cards.add(new SetCardInfo("Zhalfirin Commander", 253, Rarity.UNCOMMON, mage.cards.z.ZhalfirinCommander.class)); + cards.add(new SetCardInfo("Zhalfirin Knight", 254, Rarity.COMMON, mage.cards.z.ZhalfirinKnight.class)); + cards.add(new SetCardInfo("Zirilan of the Claw", 204, Rarity.RARE, mage.cards.z.ZirilanOfTheClaw.class)); + cards.add(new SetCardInfo("Zuberi, Golden Feather", 255, Rarity.RARE, mage.cards.z.ZuberiGoldenFeather.class)); + } +} diff --git a/Mage.Sets/src/mage/sets/Nemesis.java b/Mage.Sets/src/mage/sets/Nemesis.java index 1a84b91e6e..61a7be980b 100644 --- a/Mage.Sets/src/mage/sets/Nemesis.java +++ b/Mage.Sets/src/mage/sets/Nemesis.java @@ -103,6 +103,7 @@ public class Nemesis extends ExpansionSet { cards.add(new SetCardInfo("Oracle's Attendants", 16, Rarity.RARE, mage.cards.o.OraclesAttendants.class)); cards.add(new SetCardInfo("Oraxid", 35, Rarity.COMMON, mage.cards.o.Oraxid.class)); cards.add(new SetCardInfo("Overlaid Terrain", 108, Rarity.RARE, mage.cards.o.OverlaidTerrain.class)); + cards.add(new SetCardInfo("Pack Hunt", 109, Rarity.RARE, mage.cards.p.PackHunt.class)); cards.add(new SetCardInfo("Parallax Dementia", 62, Rarity.COMMON, mage.cards.p.ParallaxDementia.class)); cards.add(new SetCardInfo("Parallax Inhibitor", 134, Rarity.RARE, mage.cards.p.ParallaxInhibitor.class)); cards.add(new SetCardInfo("Parallax Nexus", 63, Rarity.RARE, mage.cards.p.ParallaxNexus.class)); diff --git a/Mage.Sets/src/mage/sets/Odyssey.java b/Mage.Sets/src/mage/sets/Odyssey.java index ca9b9e1624..95a2a78102 100644 --- a/Mage.Sets/src/mage/sets/Odyssey.java +++ b/Mage.Sets/src/mage/sets/Odyssey.java @@ -194,6 +194,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Kamahl, Pit Fighter", 198, Rarity.RARE, mage.cards.k.KamahlPitFighter.class)); cards.add(new SetCardInfo("Kamahl's Desire", 199, Rarity.COMMON, mage.cards.k.KamahlsDesire.class)); cards.add(new SetCardInfo("Karmic Justice", 26, Rarity.RARE, mage.cards.k.KarmicJustice.class)); + cards.add(new SetCardInfo("Kirtar's Desire", 27, Rarity.COMMON, mage.cards.k.KirtarsDesire.class)); cards.add(new SetCardInfo("Kirtar's Wrath", 28, Rarity.RARE, mage.cards.k.KirtarsWrath.class)); cards.add(new SetCardInfo("Krosan Archer", 246, Rarity.COMMON, mage.cards.k.KrosanArcher.class)); cards.add(new SetCardInfo("Krosan Avenger", 247, Rarity.COMMON, mage.cards.k.KrosanAvenger.class)); @@ -260,6 +261,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Pianna, Nomad Captain", 39, Rarity.RARE, mage.cards.p.PiannaNomadCaptain.class)); cards.add(new SetCardInfo("Pilgrim of Justice", 40, Rarity.COMMON, mage.cards.p.PilgrimOfJustice.class)); cards.add(new SetCardInfo("Pilgrim of Virtue", 41, Rarity.COMMON, mage.cards.p.PilgrimOfVirtue.class)); + cards.add(new SetCardInfo("Piper's Melody", 261, Rarity.UNCOMMON, mage.cards.p.PipersMelody.class)); cards.add(new SetCardInfo("Plains", 331, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); cards.add(new SetCardInfo("Plains", 332, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); cards.add(new SetCardInfo("Plains", 333, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true))); @@ -281,6 +283,7 @@ public class Odyssey extends ExpansionSet { cards.add(new SetCardInfo("Repentant Vampire", 157, Rarity.RARE, mage.cards.r.RepentantVampire.class)); cards.add(new SetCardInfo("Resilient Wanderer", 43, Rarity.UNCOMMON, mage.cards.r.ResilientWanderer.class)); cards.add(new SetCardInfo("Rites of Initiation", 217, Rarity.COMMON, mage.cards.r.RitesOfInitiation.class)); + cards.add(new SetCardInfo("Rites of Refusal", 99, Rarity.COMMON, mage.cards.r.RitesOfRefusal.class)); cards.add(new SetCardInfo("Roar of the Wurm", 266, Rarity.UNCOMMON, mage.cards.r.RoarOfTheWurm.class)); cards.add(new SetCardInfo("Rotting Giant", 158, Rarity.UNCOMMON, mage.cards.r.RottingGiant.class)); cards.add(new SetCardInfo("Sacred Rites", 44, Rarity.COMMON, mage.cards.s.SacredRites.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasDestiny.java b/Mage.Sets/src/mage/sets/UrzasDestiny.java index 0ccf844f02..42e434817a 100644 --- a/Mage.Sets/src/mage/sets/UrzasDestiny.java +++ b/Mage.Sets/src/mage/sets/UrzasDestiny.java @@ -86,6 +86,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Eradicate", 60, Rarity.UNCOMMON, mage.cards.e.Eradicate.class)); cards.add(new SetCardInfo("Extruder", 130, Rarity.UNCOMMON, mage.cards.e.Extruder.class)); cards.add(new SetCardInfo("False Prophet", 6, Rarity.RARE, mage.cards.f.FalseProphet.class)); + cards.add(new SetCardInfo("Festering Wound", 61, Rarity.UNCOMMON, mage.cards.f.FesteringWound.class)); cards.add(new SetCardInfo("Field Surgeon", 8, Rarity.COMMON, mage.cards.f.FieldSurgeon.class)); cards.add(new SetCardInfo("Flame Jet", 81, Rarity.COMMON, mage.cards.f.FlameJet.class)); cards.add(new SetCardInfo("Fledgling Osprey", 33, Rarity.COMMON, mage.cards.f.FledglingOsprey.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasSaga.java b/Mage.Sets/src/mage/sets/UrzasSaga.java index 3b48ae7ae8..ffd8c670e2 100644 --- a/Mage.Sets/src/mage/sets/UrzasSaga.java +++ b/Mage.Sets/src/mage/sets/UrzasSaga.java @@ -120,6 +120,7 @@ public class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Dark Hatchling", 126, Rarity.RARE, mage.cards.d.DarkHatchling.class)); cards.add(new SetCardInfo("Dark Ritual", 127, Rarity.COMMON, mage.cards.d.DarkRitual.class)); cards.add(new SetCardInfo("Despondency", 129, Rarity.COMMON, mage.cards.d.Despondency.class)); + cards.add(new SetCardInfo("Destructive Urge", 180, Rarity.UNCOMMON, mage.cards.d.DestructiveUrge.class)); cards.add(new SetCardInfo("Diabolic Servitude", 130, Rarity.UNCOMMON, mage.cards.d.DiabolicServitude.class)); cards.add(new SetCardInfo("Disciple of Grace", 10, Rarity.COMMON, mage.cards.d.DiscipleOfGrace.class)); cards.add(new SetCardInfo("Disciple of Law", 11, Rarity.COMMON, mage.cards.d.DiscipleOfLaw.class)); diff --git a/Mage.Sets/src/mage/sets/Visions.java b/Mage.Sets/src/mage/sets/Visions.java index a4d48e5e98..f4f5d16e3b 100644 --- a/Mage.Sets/src/mage/sets/Visions.java +++ b/Mage.Sets/src/mage/sets/Visions.java @@ -70,6 +70,7 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Creeping Mold", 53, Rarity.UNCOMMON, mage.cards.c.CreepingMold.class)); cards.add(new SetCardInfo("Crypt Rats", 5, Rarity.COMMON, mage.cards.c.CryptRats.class)); cards.add(new SetCardInfo("Daraja Griffin", 102, Rarity.UNCOMMON, mage.cards.d.DarajaGriffin.class)); + cards.add(new SetCardInfo("Dark Privilege", 6, Rarity.COMMON, mage.cards.d.DarkPrivilege.class)); cards.add(new SetCardInfo("Death Watch", 7, Rarity.COMMON, mage.cards.d.DeathWatch.class)); cards.add(new SetCardInfo("Desertion", 30, Rarity.RARE, mage.cards.d.Desertion.class)); cards.add(new SetCardInfo("Diamond Kaleidoscope", 143, Rarity.RARE, mage.cards.d.DiamondKaleidoscope.class)); @@ -106,6 +107,7 @@ public class Visions extends ExpansionSet { cards.add(new SetCardInfo("Jungle Basin", 164, Rarity.UNCOMMON, mage.cards.j.JungleBasin.class)); cards.add(new SetCardInfo("Kaervek's Spite", 13, Rarity.RARE, mage.cards.k.KaerveksSpite.class)); cards.add(new SetCardInfo("Karoo", 165, Rarity.UNCOMMON, mage.cards.k.Karoo.class)); + cards.add(new SetCardInfo("Katabatic Winds", 59, Rarity.RARE, mage.cards.k.KatabaticWinds.class)); cards.add(new SetCardInfo("Keeper of Kookus", 85, Rarity.COMMON, mage.cards.k.KeeperOfKookus.class)); cards.add(new SetCardInfo("King Cheetah", 60, Rarity.COMMON, mage.cards.k.KingCheetah.class)); cards.add(new SetCardInfo("Knight of Valor", 111, Rarity.COMMON, mage.cards.k.KnightOfValor.class)); diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index 741d85df34..1db6ab52f3 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -145,6 +145,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Nature's Kiss", 78, Rarity.COMMON, mage.cards.n.NaturesKiss.class)); cards.add(new SetCardInfo("Nature's Resurgence", 79, Rarity.RARE, mage.cards.n.NaturesResurgence.class)); cards.add(new SetCardInfo("Necratog", 18, Rarity.UNCOMMON, mage.cards.n.Necratog.class)); + cards.add(new SetCardInfo("Noble Benefactor", 44, Rarity.UNCOMMON, mage.cards.n.NobleBenefactor.class)); cards.add(new SetCardInfo("Null Rod", 154, Rarity.RARE, mage.cards.n.NullRod.class)); cards.add(new SetCardInfo("Odylic Wraith", 19, Rarity.UNCOMMON, mage.cards.o.OdylicWraith.class)); cards.add(new SetCardInfo("Ophidian", 45, Rarity.COMMON, mage.cards.o.Ophidian.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java index 05296b70f8..ae8ec57119 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java @@ -7,14 +7,14 @@ import org.mage.test.serverside.base.CardTestPlayerBase; public class AfflictTest extends CardTestPlayerBase { - private String khenra = "Khenra Eternal"; - private String elves = "Llanowar Elves"; + private final String khenra = "Khenra Eternal"; + private final String elves = "Llanowar Elves"; @Test - public void testBecomesBlocked(){ + public void testBecomesBlocked() { addCard(Zone.BATTLEFIELD, playerA, khenra); - addCard(Zone.BATTLEFIELD, playerB, elves ); + addCard(Zone.BATTLEFIELD, playerB, elves); attack(1, playerA, khenra); block(1, playerB, elves, khenra); @@ -27,10 +27,10 @@ public class AfflictTest extends CardTestPlayerBase { } @Test - public void testNotBlocked(){ + public void testNotBlocked() { addCard(Zone.BATTLEFIELD, playerA, khenra); - addCard(Zone.BATTLEFIELD, playerB, elves ); + addCard(Zone.BATTLEFIELD, playerB, elves); attack(1, playerA, khenra); @@ -40,4 +40,36 @@ public class AfflictTest extends CardTestPlayerBase { assertLife(playerB, 18); } + + // My afflict didn't come through after using Endless Sands on my own creature. The afflict ability was on the stack already. + @Test + public void testRemoveAfflictCreatureAfterAfflictIsOnTheStack() { + + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + // Afflict 2 (Whenever this creature becomes blocked, defending player loses 2 life.) + // {1}{R}: Frontline Devastator gets +1/+0 until end of turn. + addCard(Zone.BATTLEFIELD, playerA, "Frontline Devastator"); + + // {T}: Add {C} to your mana pool. + // {2}, {T}: Exile target creature you control. + // {4}, {T}, Sacrifice Endless Sands: Return each creature card exiled with Endless Sands to the battlefield under its owner’s control. + addCard(Zone.BATTLEFIELD, playerA, "Endless Sands"); + + // Deathtouch + // When Ruin Rat dies, exile target card from an opponent's graveyard. + addCard(Zone.BATTLEFIELD, playerB, "Ruin Rat"); // Creature 1/1 + + attack(1, playerA, "Frontline Devastator"); + block(1, playerB, "Ruin Rat", "Frontline Devastator"); + + activateAbility(1, PhaseStep.DECLARE_BLOCKERS, playerA, "{2},", "Frontline Devastator"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertExileCount(playerA, "Frontline Devastator", 1); + assertPermanentCount(playerB, "Ruin Rat", 1); + + assertLife(playerB, 18); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EternalizeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EternalizeTest.java index ff35998728..608c27c983 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EternalizeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/EternalizeTest.java @@ -8,7 +8,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase; public class EternalizeTest extends CardTestPlayerBase { - private String sentinel = "Steadfast Sentinel"; + // Creature - Human Cleric {3}{W} 2/3 + // Vigilance + // Eternalize ({4}{W}{W}, Exile this card from your graveyard: Create a token that's a copy of it, + // except it's a 4/4 black Zombie Human Cleric with no mana cost. Eternalize only as a sorcery.) + private final String sentinel = "Steadfast Sentinel"; @Test public void testEternalize() { @@ -22,4 +26,26 @@ public class EternalizeTest extends CardTestPlayerBase { assertPowerToughness(playerA, sentinel, 4, 4); assertAbility(playerA, sentinel, VigilanceAbility.getInstance(), true); } + + @Test + public void testEternalizeAndFatalPush() { + addCard(Zone.GRAVEYARD, playerA, sentinel, 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 10); + + // Destroy target creature if it has converted mana cost 2 or less. + // Revolt - Destroy that creature if it has converted mana cost 4 or less + // instead if a permanent you controlled left the battlefield this turn. + addCard(Zone.HAND, playerB, "Fatal Push"); // Instant {B} + addCard(Zone.BATTLEFIELD, playerB, "Swamp", 1); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Eternalize"); + castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, "Fatal Push", sentinel); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerB, "Fatal Push", 1); + + assertPermanentCount(playerA, sentinel, 0); + assertExileCount(playerA, sentinel, 1); + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/BronzeBombshellTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/BronzeBombshellTest.java new file mode 100644 index 0000000000..9130c50c4d --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/BronzeBombshellTest.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package org.mage.test.cards.control; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX + */ +public class BronzeBombshellTest extends CardTestPlayerBase { + + @Test + public void testEndlessWhispers() { + // When a player other than Bronze Bombshell's owner controls it, that player sacrifices it. + // If the player does, Bronze Bombshell deals 7 damage to him or her. + addCard(Zone.BATTLEFIELD, playerA, "Bronze Bombshell", 1); + + // Each creature has "When this creature dies, choose target opponent. + // That player puts this card from its owner's graveyard onto the battlefield + // under his or her control at the beginning of the next end step." + addCard(Zone.BATTLEFIELD, playerA, "Endless Whispers", 1); + + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + // Destroy target creature or planeswalker.. + addCard(Zone.HAND, playerA, "Hero's Downfall"); // {1}{B}{B} + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hero's Downfall", "Bronze Bombshell"); + addTarget(playerA, playerB); + + setStopAt(2, PhaseStep.UPKEEP); + execute(); + + assertGraveyardCount(playerA, "Hero's Downfall", 1); + assertGraveyardCount(playerA, "Bronze Bombshell", 1); + + assertLife(playerA, 20); + assertLife(playerB, 13); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/BreathOfFuryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/BreathOfFuryTest.java new file mode 100644 index 0000000000..f99aa4036f --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/BreathOfFuryTest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package org.mage.test.cards.enchantments; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class BreathOfFuryTest extends CardTestPlayerBase { + + @Test + public void testMoveEnchantment() { + + // Enchant creature you control + // When enchanted creature deals combat damage to a player, sacrifice it and attach Breath of Fury to a creature you control. + // If you do, untap all creatures you control and after this phase, there is an additional combat phase. + addCard(Zone.HAND, playerA, "Breath of Fury", 1); // Enchantment - Aura {2}{R}{R} + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); + addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Breath of Fury", "Silvercoat Lion"); + + attack(3, playerA, "Pillarfield Ox"); + attack(3, playerA, "Silvercoat Lion"); + + addTarget(playerA, "Pillarfield Ox"); + + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 16); + + assertGraveyardCount(playerA, "Silvercoat Lion", 1); + assertTappedCount("Pillarfield Ox", false, 1); + assertPermanentCount(playerA, "Breath of Fury", 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FuryOfTheHordeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FuryOfTheHordeTest.java index 99286d2cdd..748ca3b637 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FuryOfTheHordeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FuryOfTheHordeTest.java @@ -10,16 +10,16 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * @author BetaSteward */ public class FuryOfTheHordeTest extends CardTestPlayerBase { + /* * Fury of the Horde * Sorcery, 5RR (7) - * You may exile two red cards from your hand rather than pay Fury of the + * You may exile two red cards from your hand rather than pay Fury of the * Horde's mana cost. - * Untap all creatures that attacked this turn. After this main phase, there + * Untap all creatures that attacked this turn. After this main phase, there * is an additional combat phase followed by an additional main phase. * - */ - + */ // test that creatures attack twice @Test public void testCreaturesAttackTwice() { @@ -27,16 +27,18 @@ public class FuryOfTheHordeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Craw Wurm"); addCard(Zone.BATTLEFIELD, playerA, "Goblin Roughrider"); addCard(Zone.HAND, playerA, "Fury of the Horde"); - + attack(3, playerA, "Craw Wurm"); attack(3, playerA, "Goblin Roughrider"); castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Fury of the Horde"); - + attack(3, playerA, "Craw Wurm"); + attack(3, playerA, "Goblin Roughrider"); + setStopAt(3, PhaseStep.END_TURN); execute(); - + this.assertLife(playerB, 2); - + } // test that creatures attack once @@ -46,17 +48,17 @@ public class FuryOfTheHordeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Craw Wurm"); addCard(Zone.BATTLEFIELD, playerA, "Goblin Roughrider"); addCard(Zone.HAND, playerA, "Fury of the Horde"); - + attack(3, playerA, "Craw Wurm"); attack(3, playerA, "Goblin Roughrider"); - + setStopAt(3, PhaseStep.END_TURN); execute(); - + this.assertLife(playerB, 11); - + } - + // test that only creatures that attacked attack twice @Test public void testCreaturesThatAttacked() { @@ -64,15 +66,16 @@ public class FuryOfTheHordeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Craw Wurm"); addCard(Zone.BATTLEFIELD, playerA, "Goblin Roughrider"); addCard(Zone.HAND, playerA, "Fury of the Horde"); - + attack(3, playerA, "Craw Wurm"); castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Fury of the Horde"); - + attack(3, playerA, "Craw Wurm"); + setStopAt(3, PhaseStep.END_TURN); execute(); - + this.assertLife(playerB, 8); - + } - + } diff --git a/Mage.Tests/src/test/java/org/mage/test/game/ends/GameIsADrawTest.java b/Mage.Tests/src/test/java/org/mage/test/game/ends/GameIsADrawTest.java index 5ffde49c85..824d247eba 100644 --- a/Mage.Tests/src/test/java/org/mage/test/game/ends/GameIsADrawTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/game/ends/GameIsADrawTest.java @@ -1,7 +1,29 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. */ package org.mage.test.game.ends; diff --git a/Mage.Tests/src/test/java/org/mage/test/game/ends/PhageTheUntouchableTest.java b/Mage.Tests/src/test/java/org/mage/test/game/ends/PhageTheUntouchableTest.java new file mode 100644 index 0000000000..933e1334ac --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/game/ends/PhageTheUntouchableTest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package org.mage.test.game.ends; + +import mage.constants.PhaseStep; +import mage.constants.TurnPhase; +import mage.constants.Zone; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LeveöX + */ +public class PhageTheUntouchableTest extends CardTestPlayerBase { + + @Test + public void TestWithEndlessWhispers() { + // Each creature has "When this creature dies, choose target opponent. + // That player puts this card from its owner's graveyard onto the battlefield + // under his or her control at the beginning of the next end step." + addCard(Zone.BATTLEFIELD, playerA, "Endless Whispers"); + + // Destroy target creature or planeswalker.. + addCard(Zone.HAND, playerA, "Hero's Downfall"); // {1}{B}{B} + + // When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. + // Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. + // Whenever Phage deals combat damage to a player, that player loses the game. + addCard(Zone.HAND, playerA, "Phage the Untouchable"); // Creature {3}{B}{B}{B}{B} 4/4 + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phage the Untouchable"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hero's Downfall", "Phage the Untouchable"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertGraveyardCount(playerA, "Hero's Downfall", 1); + assertPermanentCount(playerB, "Phage the Untouchable", 1); + + Assert.assertTrue("Game has ended.", currentGame.hasEnded()); + Assert.assertTrue("Player A has won.", playerA.hasWon()); + Assert.assertTrue("Game ist At end phase", currentGame.getPhase().getType().equals(TurnPhase.END)); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index b35298b230..ce65580ab5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -27,6 +27,10 @@ */ package org.mage.test.player; +import java.io.Serializable; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import mage.MageObject; import mage.MageObjectReference; import mage.abilities.*; @@ -50,7 +54,6 @@ import mage.filter.FilterPermanent; import mage.filter.common.*; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.NamePredicate; -import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.SummoningSicknessPredicate; import mage.game.Game; import mage.game.Graveyard; @@ -71,11 +74,6 @@ import mage.target.*; import mage.target.common.*; import org.junit.Ignore; -import java.io.Serializable; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - /** * @author BetaSteward_at_googlemail.com * @author Simown @@ -585,7 +583,9 @@ public class TestPlayer implements Player { public void selectAttackers(Game game, UUID attackingPlayerId) { // Loop through players and validate can attack/block this turn UUID defenderId = null; - for (PlayerAction action : actions) { + //List + for (Iterator it = actions.iterator(); it.hasNext();) { + PlayerAction action = it.next(); if (action.getTurnNum() == game.getTurnNum() && action.getAction().startsWith("attack:")) { String command = action.getAction(); command = command.substring(command.indexOf("attack:") + 7); @@ -623,14 +623,16 @@ public class TestPlayer implements Player { findPermanent(firstFilter, groups[0], computerPlayer.getId(), game); // Second check to filter creature for combat - less strict to workaround issue in #3038 FilterCreatureForCombat secondFilter = new FilterCreatureForCombat(); - secondFilter.add(Predicates.not(new AttackingPredicate())); + // secondFilter.add(Predicates.not(new AttackingPredicate())); secondFilter.add(Predicates.not(new SummoningSicknessPredicate())); // TODO: Cannot enforce legal attackers multiple times per combat. See issue #3038 Permanent attacker = findPermanent(secondFilter, groups[0], computerPlayer.getId(), game, false); if (attacker != null && attacker.canAttack(defenderId, game)) { computerPlayer.declareAttacker(attacker.getId(), defenderId, game, false); + it.remove(); } } + } } diff --git a/Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java index 9f3fc3ef00..5469b289b1 100644 --- a/Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttackedByCreatureTriggeredAbility.java @@ -74,21 +74,16 @@ public class AttackedByCreatureTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - UUID playerId = game.getCombat().getDefendingPlayerId(event.getSourceId(), game); + UUID defendingPlayer = game.getCombat().getDefendingPlayerId(event.getSourceId(), game); Permanent attackingCreature = game.getPermanent(event.getSourceId()); - if (getControllerId().equals(playerId) && attackingCreature != null) { - if (setTargetPointer != SetTargetPointer.NONE) { - for (Effect effect : this.getEffects()) { - switch (setTargetPointer) { - case PERMANENT: - effect.setTargetPointer(new FixedTarget(attackingCreature.getId())); - break; - case PLAYER: - effect.setTargetPointer(new FixedTarget(attackingCreature.getControllerId())); - break; - } - - } + if (getControllerId().equals(defendingPlayer) && attackingCreature != null) { + switch (setTargetPointer) { + case PERMANENT: + this.getEffects().setTargetPointer(new FixedTarget(attackingCreature, game)); + break; + case PLAYER: + this.getEffects().setTargetPointer(new FixedTarget(attackingCreature.getControllerId())); + break; } return true; } diff --git a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java index 8331b33861..2445b391bb 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; @@ -84,9 +83,7 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI Permanent sourcePermanent = game.getPermanent(event.getSourceId()); if (sourcePermanent != null && filter.match(sourcePermanent, sourceId, controllerId, game)) { if (setTargetPointer) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getSourceId())); } return true; } diff --git a/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java index 58a00f4543..ec977c8aa5 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java @@ -71,9 +71,7 @@ public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) { if (setTargetPointer) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId())); } return true; } diff --git a/Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java index 8fbb14821a..3f56eaad44 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesBlockedByCreatureTriggeredAbility.java @@ -68,9 +68,7 @@ public class BecomesBlockedByCreatureTriggeredAbility extends TriggeredAbilityIm if (event.getTargetId().equals(this.getSourceId())) { Permanent blocker = game.getPermanent(event.getSourceId()); if (filter.match(blocker, game)) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getSourceId())); - } + this.getEffects().setTargetPointer(new FixedTarget(blocker, game)); return true; } } diff --git a/Mage/src/main/java/mage/abilities/common/BecomesMonstrousTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesMonstrousTriggeredAbility.java index 452adbba58..41ddae73ad 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesMonstrousTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesMonstrousTriggeredAbility.java @@ -8,7 +8,6 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -20,8 +19,6 @@ import mage.target.targetpointer.FixedTarget; */ public class BecomesMonstrousTriggeredAbility extends TriggeredAbilityImpl { - protected FilterCreaturePermanent filter = new FilterCreaturePermanent(); - public BecomesMonstrousTriggeredAbility(Effect effect) { super(Zone.BATTLEFIELD, effect, false); } @@ -43,11 +40,9 @@ public class BecomesMonstrousTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (filter.match(permanent, sourceId, controllerId, game) - && (permanent.getControllerId().equals(this.controllerId))) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); - } + if (permanent != null && permanent.isCreature() + && (permanent.getControllerId().equals(getControllerId()))) { + this.getEffects().setTargetPointer(new FixedTarget(permanent, game)); return true; } return false; @@ -55,6 +50,6 @@ public class BecomesMonstrousTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever " + filter.getMessage() + " becomes monstrous, " + super.getRule(); + return "Whenever a creature you control becomes monstrous, " + super.getRule(); } } diff --git a/Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java index 34b7a0af99..80b03b2c87 100644 --- a/Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BeginningOfDrawTriggeredAbility.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; @@ -38,14 +37,16 @@ import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl { + private TargetController targetController; /** - * The Ability sets if no target is defined the target pointer to the active player of the current draw phase - * + * The Ability sets if no target is defined the target pointer to the active + * player of the current draw phase + * * @param effect * @param targetController - * @param isOptional + * @param isOptional */ public BeginningOfDrawTriggeredAbility(Effect effect, TargetController targetController, boolean isOptional) { this(Zone.BATTLEFIELD, effect, targetController, isOptional); @@ -78,18 +79,14 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl { boolean yours = event.getPlayerId().equals(this.controllerId); if (yours) { if (getTargets().isEmpty()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); } } return yours; case OPPONENT: if (game.getPlayer(this.controllerId).hasOpponent(event.getPlayerId(), game)) { if (getTargets().isEmpty()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); } return true; } @@ -97,9 +94,7 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl { case NOT_YOU: if (!this.controllerId.equals(event.getPlayerId())) { if (getTargets().isEmpty()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); } return true; } @@ -110,9 +105,7 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl { Permanent attachedTo = game.getPermanent(attachment.getAttachedTo()); if (attachedTo != null && attachedTo.getControllerId().equals(event.getPlayerId())) { if (getTargets().isEmpty()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); } return true; } @@ -120,9 +113,7 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl { break; case ANY: if (getTargets().isEmpty()) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getPlayerId())); - } + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); } return true; } diff --git a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java index 750f6a6a86..93e774aa74 100644 --- a/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ControlsPermanentsControllerTriggeredAbility.java @@ -47,6 +47,10 @@ public class ControlsPermanentsControllerTriggeredAbility extends StateTriggered protected final ComparisonType type; protected final int value; + public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, Effect effect){ + this(filter, ComparisonType.MORE_THAN, 0, effect); + } + public ControlsPermanentsControllerTriggeredAbility(FilterPermanent filter, ComparisonType type, int value, Effect effect) { super(Zone.BATTLEFIELD, effect); this.filter = filter; diff --git a/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java index b587bbc7bb..6496e8ade8 100644 --- a/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesTriggeredAbility.java @@ -57,12 +57,20 @@ public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility { public boolean isInUseableZone(Game game, MageObject source, GameEvent event) { // check it was previously on battlefield Permanent before = ((ZoneChangeEvent) event).getTarget(); + if (before == null) { + return false; + } if (!(before instanceof PermanentToken) && !this.hasSourceObjectAbility(game, before, event)) { return false; } // check now it is in graveyard - Zone after = game.getState().getZone(sourceId); - return before != null && after != null && Zone.GRAVEYARD.match(after); + if (before.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(source.getId())) { + Zone after = game.getState().getZone(sourceId); + return after != null && Zone.GRAVEYARD.match(after); + } else { + // Already moved to another zone, so guess it's ok + return true; + } } @Override diff --git a/Mage/src/main/java/mage/abilities/effects/Effects.java b/Mage/src/main/java/mage/abilities/effects/Effects.java index f479863bfb..5598970061 100644 --- a/Mage/src/main/java/mage/abilities/effects/Effects.java +++ b/Mage/src/main/java/mage/abilities/effects/Effects.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.effects; import java.util.ArrayList; @@ -34,6 +33,7 @@ import java.util.List; import java.util.Set; import mage.abilities.Mode; import mage.constants.Outcome; +import mage.target.targetpointer.TargetPointer; /** * @@ -41,10 +41,11 @@ import mage.constants.Outcome; */ public class Effects extends ArrayList { - public Effects() {} + public Effects() { + } public Effects(final Effects effects) { - for (Effect effect: effects) { + for (Effect effect : effects) { this.add(effect.copy()); } } @@ -64,7 +65,7 @@ public class Effects extends ArrayList { public String getText(Mode mode) { StringBuilder sbText = new StringBuilder(); String lastRule = null; - for (Effect effect: this) { + for (Effect effect : this) { String endString = ""; String nextRule = effect.getText(mode); if (nextRule != null) { @@ -72,7 +73,7 @@ public class Effects extends ArrayList { endString = " "; } else if (nextRule.startsWith(",") || nextRule.startsWith(" ")) { endString = ""; - } else if (lastRule != null && lastRule.length()> 3) { + } else if (lastRule != null && lastRule.length() > 3) { if (!lastRule.endsWith(".") && !lastRule.endsWith("
")) { endString = ". "; } @@ -84,19 +85,19 @@ public class Effects extends ArrayList { } lastRule = nextRule; } - if (lastRule != null && lastRule.length()> 3 && - !lastRule.endsWith(".") && - !lastRule.endsWith("\"") && - !lastRule.startsWith("Level ") && - !lastRule.endsWith(".)") && - !lastRule.endsWith("") ) { + if (lastRule != null && lastRule.length() > 3 + && !lastRule.endsWith(".") + && !lastRule.endsWith("\"") + && !lastRule.startsWith("Level ") + && !lastRule.endsWith(".)") + && !lastRule.endsWith("")) { sbText.append('.'); } return sbText.toString(); } public boolean hasOutcome(Outcome outcome) { - for (Effect effect: this) { + for (Effect effect : this) { if (effect.getOutcome() == outcome) { return true; } @@ -106,7 +107,7 @@ public class Effects extends ArrayList { public List getOutcomes() { Set outcomes = new HashSet<>(); - for (Effect effect: this) { + for (Effect effect : this) { outcomes.add(effect.getOutcome()); } return new ArrayList<>(outcomes); @@ -114,11 +115,10 @@ public class Effects extends ArrayList { public int getOutcomeTotal() { int total = 0; - for (Effect effect: this) { + for (Effect effect : this) { if (effect.getOutcome().isGood()) { total++; - } - else { + } else { total--; } } @@ -126,8 +126,18 @@ public class Effects extends ArrayList { } public void newId() { - for (Effect effect: this) { + for (Effect effect : this) { effect.newId(); } } + + public void setTargetPointer(TargetPointer targetPointer) { + if (targetPointer == null) { + return; + } + for (Effect effect : this) { + effect.setTargetPointer(targetPointer.copy()); + } + } + } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java index d5296bb901..1d2fca57b2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java @@ -73,7 +73,7 @@ public class LoseLifeDefendingPlayerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player defender = null; + Player defender; if (attackerIsSource) { defender = game.getPlayer(game.getCombat().getDefendingPlayerId(source.getSourceId(), game)); } else { diff --git a/Mage/src/main/java/mage/abilities/keyword/AfflictAbility.java b/Mage/src/main/java/mage/abilities/keyword/AfflictAbility.java index a97e4474a7..2e8feb1cee 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AfflictAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AfflictAbility.java @@ -1,11 +1,15 @@ package mage.abilities.keyword; +import java.util.UUID; import mage.abilities.common.BecomesBlockedTriggeredAbility; -import mage.abilities.effects.common.LoseLifeDefendingPlayerEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; public class AfflictAbility extends BecomesBlockedTriggeredAbility { - private int lifeLoss; + private final int lifeLoss; @Override public AfflictAbility copy() { @@ -13,11 +17,23 @@ public class AfflictAbility extends BecomesBlockedTriggeredAbility { } public AfflictAbility(int amount) { - super(new LoseLifeDefendingPlayerEffect(amount, true) + super(new LoseLifeTargetEffect(amount) .setText("Afflict " + amount + " (Whenever this creature becomes blocked, defending player loses " + amount + " life.)"), false); lifeLoss = amount; } + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (super.checkTrigger(event, game)) { + UUID defenderId = game.getCombat().getDefendingPlayerId(getSourceId(), game); + if (defenderId != null) { + this.getEffects().setTargetPointer(new FixedTarget(defenderId)); + return true; + } + } + return false; + } + public AfflictAbility(final AfflictAbility afflictAbility) { super(afflictAbility); lifeLoss = afflictAbility.lifeLoss; diff --git a/Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java index a46f817189..8565a5a42a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BasicLandcyclingAbility.java @@ -29,18 +29,17 @@ package mage.abilities.keyword; import mage.abilities.costs.mana.ManaCosts; -import mage.filter.common.FilterBasicLandCard; +import mage.filter.StaticFilters; /** * * @author Loki */ public class BasicLandcyclingAbility extends CyclingAbility{ - private static final FilterBasicLandCard filter = new FilterBasicLandCard(); private static final String text = "Basic landcycling"; public BasicLandcyclingAbility(ManaCosts costs) { - super(costs, filter, text); + super(costs, StaticFilters.FILTER_BASIC_LAND_CARD, text); } public BasicLandcyclingAbility(final BasicLandcyclingAbility ability) { diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 915d145258..24fcd178b2 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -72,6 +72,7 @@ public enum CounterType { HOOFPRINT("hoofprint"), HOUR("hour"), ICE("ice"), + INFECTION("infection"), INTERVENTION("intervention"), JAVELIN("javelin"), KI("ki"), diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index ff16f24eca..46a5867299 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -22,6 +22,8 @@ public final class StaticFilters { public static final FilterSpiritOrArcaneCard SPIRIT_OR_ARCANE_CARD = new FilterSpiritOrArcaneCard(); + public static final FilterArtifactOrEnchantmentPermanent ARTIFACT_OR_ENCHANTMENT_PERMANENT = new FilterArtifactOrEnchantmentPermanent(); + public static final FilterEnchantmentPermanent FILTER_ENCHANTMENT_PERMANENT = new FilterEnchantmentPermanent(); public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard(); public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard(); @@ -40,7 +42,7 @@ public final class StaticFilters { public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_NON_LAND = new FilterControlledPermanent("nonland permanent"); public static final FilterLandPermanent FILTER_LAND = new FilterLandPermanent(); public static final FilterLandPermanent FILTER_LANDS = new FilterLandPermanent("lands"); - public static final FilterLandPermanent FILTER_BASIC_LAND = new FilterLandPermanent(); + public static final FilterBasicLandCard FILTER_BASIC_LAND_CARD = new FilterBasicLandCard(); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent(); public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature"); diff --git a/Mage/src/main/java/mage/game/command/emblems/DarettiScrapSavantEmblem.java b/Mage/src/main/java/mage/game/command/emblems/DarettiScrapSavantEmblem.java index 1e37bf8c61..3ee5593a90 100644 --- a/Mage/src/main/java/mage/game/command/emblems/DarettiScrapSavantEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/DarettiScrapSavantEmblem.java @@ -55,7 +55,6 @@ public class DarettiScrapSavantEmblem extends Emblem { setName("Emblem Daretti"); this.setExpansionSetCodeForImage("C14"); - this.getAbilities().add(new DarettiScrapSavantTriggeredAbility()); } } @@ -87,9 +86,7 @@ class DarettiScrapSavantTriggeredAbility extends TriggeredAbilityImpl { && zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getTarget().isArtifact() && zEvent.getTarget().getOwnerId().equals(this.controllerId)) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(zEvent.getTargetId())); - } + this.getEffects().setTargetPointer(new FixedTarget(zEvent.getTargetId())); return true; } return false; diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index 194df0a44a..7152b7c68d 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -27,6 +27,7 @@ */ package mage.game.permanent; +import java.util.*; import mage.MageObject; import mage.MageObjectReference; import mage.ObjectColor; @@ -55,8 +56,6 @@ import mage.players.Player; import mage.util.GameLog; import mage.util.ThreadLocalStringBuilder; -import java.util.*; - /** * @author BetaSteward_at_googlemail.com */ @@ -990,8 +989,6 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { game.informPlayers(player.getLogName() + " sacrificed " + this.getLogName()); } game.fireEvent(GameEvent.getEvent(EventType.SACRIFICED_PERMANENT, objectId, sourceId, controllerId)); - game.checkStateAndTriggered(); - game.applyEffects(); return true; } return false; diff --git a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java index c7068ad981..a269c524c5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java @@ -27,18 +27,20 @@ */ package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.util.RandomUtil; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * */ @@ -54,7 +56,7 @@ public class ClueArtifactToken extends Token { super("Clue", "colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\""); availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); - subtype.add("Clue"); + subtype.add(SubType.CLUE); // {2}, Sacrifice this artifact: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2));