diff --git a/Mage.Sets/src/mage/sets/bornofthegods/HeroOfIroas.java b/Mage.Sets/src/mage/sets/bornofthegods/HeroOfIroas.java index 0589cb44cc2..a5819f2231f 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/HeroOfIroas.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/HeroOfIroas.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class HeroOfIroas extends CardImpl { - private static final FilterCard filter = new FilterCard("Aura spells"); + private static final FilterSpell filter = new FilterSpell("Aura spells"); static { filter.add(new SubtypePredicate("Aura")); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/LongForgottenGohei.java b/Mage.Sets/src/mage/sets/championsofkamigawa/LongForgottenGohei.java index 5f570e39908..ed7f48f308b 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/LongForgottenGohei.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/LongForgottenGohei.java @@ -39,7 +39,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -50,7 +50,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class LongForgottenGohei extends CardImpl { - private static final FilterCard arcaneFilter = new FilterCard("Arcane spells"); + private static final FilterSpell arcaneFilter = new FilterSpell("Arcane spells"); private static final FilterCreaturePermanent spiritFilter = new FilterCreaturePermanent("Spirit creatures"); static { diff --git a/Mage.Sets/src/mage/sets/futuresight/CentaurOmenreader.java b/Mage.Sets/src/mage/sets/futuresight/CentaurOmenreader.java index 1c835e830f1..95ab73a2ff4 100644 --- a/Mage.Sets/src/mage/sets/futuresight/CentaurOmenreader.java +++ b/Mage.Sets/src/mage/sets/futuresight/CentaurOmenreader.java @@ -28,15 +28,16 @@ package mage.sets.futuresight; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.common.FilterCreatureCard; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -46,6 +47,11 @@ import mage.game.permanent.Permanent; */ public class CentaurOmenreader extends CardImpl { + private static final FilterSpell filter = new FilterSpell("creature spells"); + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + public CentaurOmenreader(UUID ownerId) { super(ownerId, 143, "Centaur Omenreader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.expansionSetCode = "FUT"; @@ -58,7 +64,7 @@ public class CentaurOmenreader extends CardImpl { this.toughness = new MageInt(3); // As long as Centaur Omenreader is tapped, creature spells you cast cost {2} less to cast. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CentaurOmenreaderSpellsCostReductionEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CentaurOmenreaderSpellsCostReductionEffect(filter))); } public CentaurOmenreader(final CentaurOmenreader card) { @@ -73,8 +79,9 @@ public class CentaurOmenreader extends CardImpl { class CentaurOmenreaderSpellsCostReductionEffect extends SpellsCostReductionEffect { - public CentaurOmenreaderSpellsCostReductionEffect() { - super(new FilterCreatureCard("creature spells"), 2); + public CentaurOmenreaderSpellsCostReductionEffect(FilterSpell filter) { + super(filter, 2); + staticText = "As long as {this} is tapped, creature spells you cast cost {2} less to cast"; } protected CentaurOmenreaderSpellsCostReductionEffect(SpellsCostReductionEffect effect) { @@ -94,4 +101,4 @@ class CentaurOmenreaderSpellsCostReductionEffect extends SpellsCostReductionEffe public CentaurOmenreaderSpellsCostReductionEffect copy() { return new CentaurOmenreaderSpellsCostReductionEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/innistrad/HeartlessSummoning.java b/Mage.Sets/src/mage/sets/innistrad/HeartlessSummoning.java index 56f3df93e8e..7db92b88ccf 100644 --- a/Mage.Sets/src/mage/sets/innistrad/HeartlessSummoning.java +++ b/Mage.Sets/src/mage/sets/innistrad/HeartlessSummoning.java @@ -28,15 +28,15 @@ package mage.sets.innistrad; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.common.FilterCreatureCard; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureSpell; /** * @@ -51,7 +51,7 @@ public class HeartlessSummoning extends CardImpl { this.color.setBlack(true); // Creature spells you cast cost {2} less to cast. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(new FilterCreatureCard("Creature spells"), 2))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(new FilterCreatureSpell("Creature spells"), 2))); // Creatures you control get -1/-1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(-1, -1, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/sets/lorwyn/StinkdrinkerDaredevil.java b/Mage.Sets/src/mage/sets/lorwyn/StinkdrinkerDaredevil.java index bdc8b58cca5..494aa5f02f9 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/StinkdrinkerDaredevil.java +++ b/Mage.Sets/src/mage/sets/lorwyn/StinkdrinkerDaredevil.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class StinkdrinkerDaredevil extends CardImpl { - private static final FilterCard filter = new FilterCard("Giant spells"); + private static final FilterSpell filter = new FilterSpell("Giant spells"); static { filter.add(new SubtypePredicate("Giant")); diff --git a/Mage.Sets/src/mage/sets/magic2014/WardenOfEvosIsle.java b/Mage.Sets/src/mage/sets/magic2014/WardenOfEvosIsle.java index 8fcd1d651e8..80ce38637f7 100644 --- a/Mage.Sets/src/mage/sets/magic2014/WardenOfEvosIsle.java +++ b/Mage.Sets/src/mage/sets/magic2014/WardenOfEvosIsle.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class WardenOfEvosIsle extends CardImpl { - private static final FilterCard filter = new FilterCard("Creature spells with flying"); + private static final FilterSpell filter = new FilterSpell("Creature spells with flying"); static { filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new AbilityPredicate(FlyingAbility.class)); diff --git a/Mage.Sets/src/mage/sets/modernmasters/GrandArbiterAugustinIV.java b/Mage.Sets/src/mage/sets/modernmasters/GrandArbiterAugustinIV.java index 91092b37fb5..9b13331e6b4 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/GrandArbiterAugustinIV.java +++ b/Mage.Sets/src/mage/sets/modernmasters/GrandArbiterAugustinIV.java @@ -43,7 +43,7 @@ import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; import mage.constants.CostModificationType; import mage.constants.Duration; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.util.CardUtil; @@ -54,8 +54,8 @@ import mage.util.CardUtil; */ public class GrandArbiterAugustinIV extends CardImpl { - private static final FilterCard filterWhite = new FilterCard("White spells"); - private static final FilterCard filterBlue = new FilterCard("Blue spells"); + private static final FilterSpell filterWhite = new FilterSpell("White spells"); + private static final FilterSpell filterBlue = new FilterSpell("Blue spells"); static { filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); diff --git a/Mage.Sets/src/mage/sets/morningtide/BallyrushBanneret.java b/Mage.Sets/src/mage/sets/morningtide/BallyrushBanneret.java index d9001d30927..37f7deb874f 100644 --- a/Mage.Sets/src/mage/sets/morningtide/BallyrushBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/BallyrushBanneret.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -45,7 +45,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class BallyrushBanneret extends CardImpl { - private static final FilterCard filter = new FilterCard("Kithkin spells and Soldier spells"); + private static final FilterSpell filter = new FilterSpell("Kithkin spells and Soldier spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/morningtide/BoskBanneret.java b/Mage.Sets/src/mage/sets/morningtide/BoskBanneret.java index 6150dbf5f01..85f885a1ad3 100644 --- a/Mage.Sets/src/mage/sets/morningtide/BoskBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/BoskBanneret.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -45,7 +45,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class BoskBanneret extends CardImpl { - private static final FilterCard filter = new FilterCard("Treefolk spells and Shaman spells"); + private static final FilterSpell filter = new FilterSpell("Treefolk spells and Shaman spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java b/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java index eb0c436639a..11f1b074c5c 100644 --- a/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/BrighthearthBanneret.java @@ -37,7 +37,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.ReinforceAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class BrighthearthBanneret extends CardImpl { - private static final FilterCard filter = new FilterCard("Elemental spells and Warrior spells"); + private static final FilterSpell filter = new FilterSpell("Elemental spells and Warrior spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/morningtide/FrogtosserBanneret.java b/Mage.Sets/src/mage/sets/morningtide/FrogtosserBanneret.java index 1ebeb763adc..18c661f3317 100644 --- a/Mage.Sets/src/mage/sets/morningtide/FrogtosserBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/FrogtosserBanneret.java @@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class FrogtosserBanneret extends CardImpl { - private static final FilterCard filter = new FilterCard("Goblin spells and Rogue spells"); + private static final FilterSpell filter = new FilterSpell("Goblin spells and Rogue spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/morningtide/StonybrookBanneret.java b/Mage.Sets/src/mage/sets/morningtide/StonybrookBanneret.java index 5d499a08019..4b3ad7c56d1 100644 --- a/Mage.Sets/src/mage/sets/morningtide/StonybrookBanneret.java +++ b/Mage.Sets/src/mage/sets/morningtide/StonybrookBanneret.java @@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.IslandwalkAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class StonybrookBanneret extends CardImpl { - private static final FilterCard filter = new FilterCard("Merfolk spells and Wizard spells"); + private static final FilterSpell filter = new FilterSpell("Merfolk spells and Wizard spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/onslaught/DreamChisel.java b/Mage.Sets/src/mage/sets/onslaught/DreamChisel.java index 6ffd5eeafe4..1baed660a40 100644 --- a/Mage.Sets/src/mage/sets/onslaught/DreamChisel.java +++ b/Mage.Sets/src/mage/sets/onslaught/DreamChisel.java @@ -34,7 +34,7 @@ import mage.constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreatureSpell; import mage.filter.predicate.other.FaceDownPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.other.FaceDownPredicate; */ public class DreamChisel extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("Face-down creature spells"); + private static final FilterCreatureSpell filter = new FilterCreatureSpell("Face-down creature spells"); static { filter.add(new FaceDownPredicate()); diff --git a/Mage.Sets/src/mage/sets/planechase/UndeadWarchief.java b/Mage.Sets/src/mage/sets/planechase/UndeadWarchief.java index be7a35c68b3..5db53a087a2 100644 --- a/Mage.Sets/src/mage/sets/planechase/UndeadWarchief.java +++ b/Mage.Sets/src/mage/sets/planechase/UndeadWarchief.java @@ -38,6 +38,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,7 +48,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class UndeadWarchief extends CardImpl { - private static final FilterCard filter = new FilterCard("Zombie spells"); + private static final FilterSpell filter = new FilterSpell("Zombie spells"); private static final FilterCreaturePermanent filterCreatures = new FilterCreaturePermanent("Zombie creatures"); static { diff --git a/Mage.Sets/src/mage/sets/planeshift/NightscapeFamiliar.java b/Mage.Sets/src/mage/sets/planeshift/NightscapeFamiliar.java index 91996845125..ab9c709fc6e 100644 --- a/Mage.Sets/src/mage/sets/planeshift/NightscapeFamiliar.java +++ b/Mage.Sets/src/mage/sets/planeshift/NightscapeFamiliar.java @@ -39,7 +39,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -49,7 +49,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class NightscapeFamiliar extends CardImpl { - private static final FilterCard filter = new FilterCard("Blue spells and red spells"); + private static final FilterSpell filter = new FilterSpell("Blue spells and red spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/planeshift/SunscapeFamiliar.java b/Mage.Sets/src/mage/sets/planeshift/SunscapeFamiliar.java index 3067ee6afc1..1a436729940 100644 --- a/Mage.Sets/src/mage/sets/planeshift/SunscapeFamiliar.java +++ b/Mage.Sets/src/mage/sets/planeshift/SunscapeFamiliar.java @@ -37,7 +37,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class SunscapeFamiliar extends CardImpl { - private static final FilterCard filter = new FilterCard("Green spells and blue spells"); + private static final FilterSpell filter = new FilterSpell("Green spells and blue spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/planeshift/ThornscapeFamiliar.java b/Mage.Sets/src/mage/sets/planeshift/ThornscapeFamiliar.java index 81d09d6793f..07741815832 100644 --- a/Mage.Sets/src/mage/sets/planeshift/ThornscapeFamiliar.java +++ b/Mage.Sets/src/mage/sets/planeshift/ThornscapeFamiliar.java @@ -36,7 +36,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class ThornscapeFamiliar extends CardImpl { - private static final FilterCard filter = new FilterCard("Red spells and white spells"); + private static final FilterSpell filter = new FilterSpell("Red spells and white spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/planeshift/ThunderscapeFamiliar.java b/Mage.Sets/src/mage/sets/planeshift/ThunderscapeFamiliar.java index aa24bc3f944..d2f2d98750f 100644 --- a/Mage.Sets/src/mage/sets/planeshift/ThunderscapeFamiliar.java +++ b/Mage.Sets/src/mage/sets/planeshift/ThunderscapeFamiliar.java @@ -37,7 +37,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class ThunderscapeFamiliar extends CardImpl { - private static final FilterCard filter = new FilterCard("Black spells and green spells"); + private static final FilterSpell filter = new FilterSpell("Black spells and green spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/returntoravnica/GoblinElectromancer.java b/Mage.Sets/src/mage/sets/returntoravnica/GoblinElectromancer.java index 8fe29c96e83..212be8bec69 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/GoblinElectromancer.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/GoblinElectromancer.java @@ -36,7 +36,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class GoblinElectromancer extends CardImpl { - private static final FilterCard filter = new FilterCard("Instant and sorcery spells"); + private static final FilterSpell filter = new FilterSpell("Instant and sorcery spells"); static { filter.add(Predicates.or( new CardTypePredicate(CardType.INSTANT), diff --git a/Mage.Sets/src/mage/sets/scourge/DaruWarchief.java b/Mage.Sets/src/mage/sets/scourge/DaruWarchief.java index 2ecc29b2f5d..b55753f983d 100644 --- a/Mage.Sets/src/mage/sets/scourge/DaruWarchief.java +++ b/Mage.Sets/src/mage/sets/scourge/DaruWarchief.java @@ -37,7 +37,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class DaruWarchief extends CardImpl { - private static final FilterCard filter = new FilterCard("Soldier spells"); + private static final FilterSpell filter = new FilterSpell("Soldier spells"); private static final FilterCreaturePermanent filterCreatures = new FilterCreaturePermanent("Soldier creatures"); static { diff --git a/Mage.Sets/src/mage/sets/scourge/DragonspeakerShaman.java b/Mage.Sets/src/mage/sets/scourge/DragonspeakerShaman.java index b344005f9e0..b5c3225b393 100644 --- a/Mage.Sets/src/mage/sets/scourge/DragonspeakerShaman.java +++ b/Mage.Sets/src/mage/sets/scourge/DragonspeakerShaman.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -44,7 +44,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class DragonspeakerShaman extends CardImpl { - private static final FilterCard filter = new FilterCard("Dragon spells"); + private static final FilterSpell filter = new FilterSpell("Dragon spells"); static { filter.add(new SubtypePredicate("Dragon")); diff --git a/Mage.Sets/src/mage/sets/scourge/GoblinWarchief.java b/Mage.Sets/src/mage/sets/scourge/GoblinWarchief.java index bd9d469d51d..3fd251f6065 100644 --- a/Mage.Sets/src/mage/sets/scourge/GoblinWarchief.java +++ b/Mage.Sets/src/mage/sets/scourge/GoblinWarchief.java @@ -38,7 +38,7 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -48,7 +48,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class GoblinWarchief extends CardImpl { - private static final FilterCard filterSpells = new FilterCard("Goblin spells"); + private static final FilterSpell filterSpells = new FilterSpell("Goblin spells"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins"); static { diff --git a/Mage.Sets/src/mage/sets/scourge/KrosanWarchief.java b/Mage.Sets/src/mage/sets/scourge/KrosanWarchief.java index d09c3fede88..cb26a7256d3 100644 --- a/Mage.Sets/src/mage/sets/scourge/KrosanWarchief.java +++ b/Mage.Sets/src/mage/sets/scourge/KrosanWarchief.java @@ -38,7 +38,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.RegenerateTargetEffect; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.Target; @@ -50,7 +50,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class KrosanWarchief extends CardImpl { - private static final FilterCard filter = new FilterCard("Beast spells"); + private static final FilterSpell filter = new FilterSpell("Beast spells"); private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("Beast"); static { diff --git a/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java b/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java index daef726c406..6d73d5cf73e 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java @@ -35,13 +35,18 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.common.FilterArtifactCard; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; /** * * @author North */ public class EtheriumSculptor extends CardImpl { + private static final FilterSpell filter = new FilterSpell("Artifact spells"); + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } public EtheriumSculptor(UUID ownerId) { super(ownerId, 42, "Etherium Sculptor", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}"); @@ -54,7 +59,7 @@ public class EtheriumSculptor extends CardImpl { this.toughness = new MageInt(2); // Artifact spells you cast cost {1} less to cast. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(new FilterArtifactCard("Artifact spells"), 1))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionEffect(filter, 1))); } public EtheriumSculptor(final EtheriumSculptor card) { diff --git a/Mage.Sets/src/mage/sets/tempest/EmeraldMedallion.java b/Mage.Sets/src/mage/sets/tempest/EmeraldMedallion.java index af6b6fbdb4a..18ef3850e5e 100644 --- a/Mage.Sets/src/mage/sets/tempest/EmeraldMedallion.java +++ b/Mage.Sets/src/mage/sets/tempest/EmeraldMedallion.java @@ -35,7 +35,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class EmeraldMedallion extends CardImpl { - private static final FilterCard filter = new FilterCard("Green spells"); + private static final FilterSpell filter = new FilterSpell("Green spells"); static { filter.add(new ColorPredicate(ObjectColor.GREEN)); diff --git a/Mage.Sets/src/mage/sets/tempest/JetMedallion.java b/Mage.Sets/src/mage/sets/tempest/JetMedallion.java index 15bd529a69c..a3c4db9748d 100644 --- a/Mage.Sets/src/mage/sets/tempest/JetMedallion.java +++ b/Mage.Sets/src/mage/sets/tempest/JetMedallion.java @@ -35,7 +35,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class JetMedallion extends CardImpl { - private static final FilterCard filter = new FilterCard("Black spells"); + private static final FilterSpell filter = new FilterSpell("Black spells"); static { filter.add(new ColorPredicate(ObjectColor.BLACK)); diff --git a/Mage.Sets/src/mage/sets/tempest/PearlMedallion.java b/Mage.Sets/src/mage/sets/tempest/PearlMedallion.java index 9c51f16c415..9a7476e1a4e 100644 --- a/Mage.Sets/src/mage/sets/tempest/PearlMedallion.java +++ b/Mage.Sets/src/mage/sets/tempest/PearlMedallion.java @@ -35,7 +35,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class PearlMedallion extends CardImpl { - private static final FilterCard filter = new FilterCard("White spells"); + private static final FilterSpell filter = new FilterSpell("White spells"); static { filter.add(new ColorPredicate(ObjectColor.WHITE)); diff --git a/Mage.Sets/src/mage/sets/tempest/RubyMedallion.java b/Mage.Sets/src/mage/sets/tempest/RubyMedallion.java index f8d6caabcf2..ff34f231611 100644 --- a/Mage.Sets/src/mage/sets/tempest/RubyMedallion.java +++ b/Mage.Sets/src/mage/sets/tempest/RubyMedallion.java @@ -35,7 +35,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class RubyMedallion extends CardImpl { - private static final FilterCard filter = new FilterCard("Red spells"); + private static final FilterSpell filter = new FilterSpell("Red spells"); static { filter.add(new ColorPredicate(ObjectColor.RED)); diff --git a/Mage.Sets/src/mage/sets/tempest/SapphireMedallion.java b/Mage.Sets/src/mage/sets/tempest/SapphireMedallion.java index 3703d61affe..f9f20582e09 100644 --- a/Mage.Sets/src/mage/sets/tempest/SapphireMedallion.java +++ b/Mage.Sets/src/mage/sets/tempest/SapphireMedallion.java @@ -35,7 +35,7 @@ import mage.ObjectColor; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; /** @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class SapphireMedallion extends CardImpl { - private static final FilterCard filter = new FilterCard("Blue spells"); + private static final FilterSpell filter = new FilterSpell("Blue spells"); static { filter.add(new ColorPredicate(ObjectColor.BLUE)); diff --git a/Mage.Sets/src/mage/sets/timeshifted/StormscapeFamiliar.java b/Mage.Sets/src/mage/sets/timeshifted/StormscapeFamiliar.java index 1de52045507..0191abaa2f2 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/StormscapeFamiliar.java +++ b/Mage.Sets/src/mage/sets/timeshifted/StormscapeFamiliar.java @@ -37,7 +37,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; */ public class StormscapeFamiliar extends CardImpl { - private static final FilterCard filter = new FilterCard("White spells and black spells"); + private static final FilterSpell filter = new FilterSpell("White spells and black spells"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/sets/worldwake/EyeOfUgin.java b/Mage.Sets/src/mage/sets/worldwake/EyeOfUgin.java index cb67ed04d25..535f7914cd9 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EyeOfUgin.java +++ b/Mage.Sets/src/mage/sets/worldwake/EyeOfUgin.java @@ -40,7 +40,7 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.cost.SpellsCostReductionEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -53,7 +53,7 @@ import mage.target.common.TargetCardInLibrary; public class EyeOfUgin extends CardImpl { private static final FilterCreatureCard filter = new FilterCreatureCard(); - private static final FilterCard filterSpells = new FilterCard("Colorless Eldrazi spells"); + private static final FilterSpell filterSpells = new FilterSpell("Colorless Eldrazi spells"); static { filter.add(new ColorlessPredicate()); diff --git a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionEffect.java b/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionEffect.java index bc915f2d1fe..f04294e82f2 100644 --- a/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionEffect.java +++ b/Mage/src/mage/abilities/effects/common/cost/SpellsCostReductionEffect.java @@ -35,8 +35,9 @@ import mage.abilities.effects.CostModificationEffectImpl; import mage.abilities.keyword.FlashbackAbility; import mage.cards.Card; import mage.constants.CostModificationType; -import mage.filter.FilterCard; +import mage.filter.FilterSpell; import mage.game.Game; +import mage.game.stack.Spell; import mage.util.CardUtil; /** @@ -45,10 +46,10 @@ import mage.util.CardUtil; */ public class SpellsCostReductionEffect extends CostModificationEffectImpl { - private FilterCard filter; + private FilterSpell filter; private int amount; - public SpellsCostReductionEffect(FilterCard filter, int amount) { + public SpellsCostReductionEffect(FilterSpell filter, int amount) { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); this.filter = filter; this.amount = amount; @@ -72,10 +73,10 @@ public class SpellsCostReductionEffect extends CostModificationEffectImpl { +public class FlashbackAbility extends SpellAbility { private SpellAbilityType spellAbilityType; private String abilityName; public FlashbackAbility(Cost cost, TimingRule timingRule) { - //super(cost, "", new FlashbackEffect(), Constants.Zone.GRAVEYARD); - super(Zone.GRAVEYARD, new FlashbackEffect(), cost); + super(null, "", Zone.GRAVEYARD); + this.name = new StringBuilder("Flashback ").append(cost.getText()).toString(); + this.addEffect(new FlashbackEffect()); + this.addCost(cost); this.timing = timingRule; this.usesStack = false; this.spellAbilityType = SpellAbilityType.BASE; @@ -104,10 +105,12 @@ public class FlashbackAbility extends /*SpellAbility*/ ActivatedAbilityImpl> implements Player, Ser else if (ability instanceof ManaAbility) { result = playManaAbility((ManaAbility)ability.copy(), game); } + else if (ability instanceof FlashbackAbility){ + result = playAbility((ActivatedAbility)ability.copy(), game); + } else if (ability instanceof SpellAbility) { result = cast((SpellAbility)ability, game, false); }