diff --git a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java index af0a6e29e4c..c36cb3c830a 100644 --- a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java +++ b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java @@ -40,6 +40,8 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.filter.StaticFilters; import mage.target.TargetPlayer; /** @@ -60,11 +62,12 @@ public class AxelrodGunnarson extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever a creature dealt damage by Axelrod Gunnarson this turn dies, you gain 1 life and Axelrod deals 1 damage to target player. - Ability ability = new DealtDamageAndDiedTriggeredAbility(new GainLifeEffect(1), false); + Ability ability = new DealtDamageAndDiedTriggeredAbility(new GainLifeEffect(1), false, StaticFilters.FILTER_PERMANENT_CREATURE, SetTargetPointer.NONE); Effect effect = new DamageTargetEffect(1); effect.setText("and {this} deals 1 damage to target player"); ability.addEffect(effect); ability.addTarget(new TargetPlayer()); + this.addAbility(ability); } public AxelrodGunnarson(final AxelrodGunnarson card) { diff --git a/Mage.Sets/src/mage/cards/b/BogElemental.java b/Mage.Sets/src/mage/cards/b/BogElemental.java index d3a6f6e7af0..ef3638c661c 100644 --- a/Mage.Sets/src/mage/cards/b/BogElemental.java +++ b/Mage.Sets/src/mage/cards/b/BogElemental.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; /** @@ -60,7 +60,7 @@ public class BogElemental extends CardImpl { // At the beginning of your upkeep, sacrifice Bog Elemental unless you sacrifice a land. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, - new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent()))), + new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))), TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/c/CephalidScout.java b/Mage.Sets/src/mage/cards/c/CephalidScout.java index 5a00be02c17..2a7c0c9165f 100644 --- a/Mage.Sets/src/mage/cards/c/CephalidScout.java +++ b/Mage.Sets/src/mage/cards/c/CephalidScout.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; /** @@ -62,7 +62,7 @@ public class CephalidScout extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {2}{U}, Sacrifice a land: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{2}{U}")); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent()))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CityInABottle.java b/Mage.Sets/src/mage/cards/c/CityInABottle.java index ace85cc6a30..191999b8c02 100644 --- a/Mage.Sets/src/mage/cards/c/CityInABottle.java +++ b/Mage.Sets/src/mage/cards/c/CityInABottle.java @@ -141,7 +141,7 @@ public class CityInABottle extends CardImpl { namePredicatesArabianNights.add(new NamePredicate("Piety")); namePredicatesArabianNights.add(new NamePredicate("Pyramids")); namePredicatesArabianNights.add(new NamePredicate("Repentant Blacksmith")); - namePredicatesArabianNights.add(new NamePredicate("Ring of Ma'rûf")); + namePredicatesArabianNights.add(new NamePredicate("Ring of Ma'ruf")); namePredicatesArabianNights.add(new NamePredicate("Rukh Egg")); namePredicatesArabianNights.add(new NamePredicate("Sandals of Abdallah")); namePredicatesArabianNights.add(new NamePredicate("Sandstorm")); diff --git a/Mage.Sets/src/mage/cards/c/Corrupt.java b/Mage.Sets/src/mage/cards/c/Corrupt.java index 154bfc5176e..23929b8eac2 100644 --- a/Mage.Sets/src/mage/cards/c/Corrupt.java +++ b/Mage.Sets/src/mage/cards/c/Corrupt.java @@ -54,6 +54,7 @@ public class Corrupt extends CardImpl { public Corrupt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{B}"); + // Corrupt deals damage to target creature or player equal to the number of Swamps you control. You gain life equal to the damage dealt this way. this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new CorruptEffect()); } @@ -80,7 +81,7 @@ class CorruptEffect extends OneShotEffect { public CorruptEffect() { super(Outcome.Damage); - staticText = "{this} deals damage equal to the number of Swamps you control to target creature or player. You gain life equal to the damage dealt this way"; + staticText = "{this} deals damage to target creature or player equal to the number of Swamps you control. You gain life equal to the damage dealt this way"; } public CorruptEffect(final CorruptEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/CropRotation.java b/Mage.Sets/src/mage/cards/c/CropRotation.java index 518985c4d43..ce9b937c573 100644 --- a/Mage.Sets/src/mage/cards/c/CropRotation.java +++ b/Mage.Sets/src/mage/cards/c/CropRotation.java @@ -34,8 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; @@ -46,14 +45,12 @@ import mage.target.common.TargetControlledPermanent; */ public class CropRotation extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); - public CropRotation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // As an additional cost to cast Crop Rotation, sacrifice a land. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); // Search your library for a land card and put that card onto the battlefield. Then shuffle your library. this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard()), false, Outcome.PutLandInPlay)); diff --git a/Mage.Sets/src/mage/cards/d/Drought.java b/Mage.Sets/src/mage/cards/d/Drought.java index 99ebb2e0839..480212c0e3b 100644 --- a/Mage.Sets/src/mage/cards/d/Drought.java +++ b/Mage.Sets/src/mage/cards/d/Drought.java @@ -101,7 +101,9 @@ class DroughtAdditionalCostEffect extends CostModificationEffectImpl { @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { int blackSymbols = abilityToModify.getManaCosts().getMana().getBlack(); - abilityToModify.addCost(new SacrificeTargetCost(new TargetControlledPermanent(blackSymbols, blackSymbols, filter, true))); + TargetControlledPermanent target = new TargetControlledPermanent(blackSymbols, blackSymbols, filter, true); + target.setRequired(false); + abilityToModify.addCost(new SacrificeTargetCost(target)); return true; } diff --git a/Mage.Sets/src/mage/cards/d/DwarvenArmory.java b/Mage.Sets/src/mage/cards/d/DwarvenArmory.java index 966e1745d17..721177b5573 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenArmory.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenArmory.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; @@ -59,7 +59,7 @@ public class DwarvenArmory extends CardImpl { new ManaCostsImpl("{2}"), new IsStepCondition(PhaseStep.UPKEEP, false), null); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent()))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GlacialChasm.java b/Mage.Sets/src/mage/cards/g/GlacialChasm.java index d08dde2007f..3eac0b415f3 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialChasm.java +++ b/Mage.Sets/src/mage/cards/g/GlacialChasm.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TargetController; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; @@ -57,7 +57,7 @@ public class GlacialChasm extends CardImpl { // Cumulative upkeep-Pay 2 life. this.addAbility(new CumulativeUpkeepAbility(new PayLifeCost(2))); // When Glacial Chasm enters the battlefield, sacrifice a land. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterControlledLandPermanent(), 1, ""))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 1, ""))); // Creatures you control can't attack. FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); filter.add(new ControllerPredicate(TargetController.YOU)); diff --git a/Mage.Sets/src/mage/cards/g/GlyphKeeper.java b/Mage.Sets/src/mage/cards/g/GlyphKeeper.java index b99153d9a52..2598f0ab5e6 100644 --- a/Mage.Sets/src/mage/cards/g/GlyphKeeper.java +++ b/Mage.Sets/src/mage/cards/g/GlyphKeeper.java @@ -62,7 +62,7 @@ public class GlyphKeeper extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Glyph Keeper becomes the target of a spell or ability for the first time in a turn, counter that spell or ability. + // Whenever Glyph Keeper becomes the target of a spell or ability for the first time each turn, counter that spell or ability. this.addAbility(new GlyphKeeperAbility(), new NumberOfTimesPermanentTargetedATurnWatcher()); // Embalm {5}{U}{U} @@ -120,7 +120,7 @@ class GlyphKeeperAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} becomes the target of a spell or ability for the first time in a turn, counter that spell or ability."; + return "Whenever {this} becomes the target of a spell or ability for the first time each turn, counter that spell or ability."; } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/g/GoblinBombardment.java b/Mage.Sets/src/mage/cards/g/GoblinBombardment.java index 6bd20e9f5fa..251cc987776 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBombardment.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBombardment.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -48,7 +49,7 @@ public class GoblinBombardment extends CardImpl { public GoblinBombardment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java index 1a99c590743..dfcc8a6c8a9 100644 --- a/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java +++ b/Mage.Sets/src/mage/cards/k/KiraGreatGlassSpinner.java @@ -63,7 +63,7 @@ public class KiraGreatGlassSpinner extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability." + // Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time each turn, counter that spell or ability." Effect effect = new CounterTargetEffect(); effect.setText("counter that spell or ability"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, @@ -122,7 +122,7 @@ class KiraGreatGlassSpinnerAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability."; + return "Whenever this creature becomes the target of a spell or ability for the first time each turn, counter that spell or ability."; } } diff --git a/Mage.Sets/src/mage/cards/l/LastStand.java b/Mage.Sets/src/mage/cards/l/LastStand.java index fd8e4f6d1e3..6d8266d33a3 100644 --- a/Mage.Sets/src/mage/cards/l/LastStand.java +++ b/Mage.Sets/src/mage/cards/l/LastStand.java @@ -54,7 +54,7 @@ public class LastStand extends CardImpl { public LastStand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}{U}{B}{R}{G}"); - // Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards. + // Target opponent loses 2 life for each Swamp you control. Last Stand deals damage to target creature equal to the number of Mountains you control. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards. this.getSpellAbility().addEffect(new LastStandEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); @@ -87,7 +87,7 @@ class LastStandEffect extends OneShotEffect { public LastStandEffect() { super(Outcome.Benefit); - this.staticText = "Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards"; + this.staticText = "Target opponent loses 2 life for each Swamp you control. Last Stand deals damage to target creature equal to the number of Mountains you control. Create a 1/1 green Saproling creature token for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards"; } public LastStandEffect(final LastStandEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LimDulsHex.java b/Mage.Sets/src/mage/cards/l/LimDulsHex.java index 070299ec6da..daa6d3fd465 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulsHex.java +++ b/Mage.Sets/src/mage/cards/l/LimDulsHex.java @@ -51,7 +51,7 @@ public class LimDulsHex extends CardImpl { public LimDulsHex(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); - // At the beginning of your upkeep, for each player, Lim-Dûl's Hex deals 1 damage to that player unless he or she pays {B} or {3}. + // At the beginning of your upkeep, for each player, Lim-Dul's Hex deals 1 damage to that player unless he or she pays {B} or {3}. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LimDulsHexEffect(), TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaRift.java b/Mage.Sets/src/mage/cards/m/MagmaRift.java index b2037743cc9..843815a4f74 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaRift.java +++ b/Mage.Sets/src/mage/cards/m/MagmaRift.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; @@ -44,14 +43,11 @@ import mage.target.common.TargetCreaturePermanent; */ public class MagmaRift extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); - public MagmaRift(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - // As an additional cost to cast Magma Rift, sacrifice a land. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); // Magma Rift deals 5 damage to target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); diff --git a/Mage.Sets/src/mage/cards/p/PegasusStampede.java b/Mage.Sets/src/mage/cards/p/PegasusStampede.java index ad2e614427b..6453315cd90 100644 --- a/Mage.Sets/src/mage/cards/p/PegasusStampede.java +++ b/Mage.Sets/src/mage/cards/p/PegasusStampede.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.game.permanent.token.PegasusToken; import mage.target.common.TargetControlledPermanent; @@ -48,7 +48,7 @@ public class PegasusStampede extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}"); // Buyback-Sacrifice a land. - this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledLandPermanent(), true)))); + this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT, true)))); // Create a 1/1 white Pegasus creature token with flying. this.getSpellAbility().addEffect(new CreateTokenEffect(new PegasusToken())); diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java b/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java index 074a596fe1a..2bf1db8d0a3 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianWarBeast.java @@ -38,9 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.common.FilterControlledLandPermanent; -import mage.target.common.TargetControlledPermanent; - +import mage.filter.StaticFilters; /** * * @author fireshoes @@ -54,11 +52,10 @@ public class PhyrexianWarBeast extends CardImpl { this.toughness = new MageInt(4); // When Phyrexian War Beast leaves the battlefield, sacrifice a land and Phyrexian War Beast deals 1 damage to you. - Ability ability = new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterControlledLandPermanent(), 1, ""), false); + Ability ability = new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 1, ""), false); Effect effect = new DamageControllerEffect(1); effect.setText("and {this} deals 1 damage to you"); ability.addEffect(effect); - ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PolarKraken.java b/Mage.Sets/src/mage/cards/p/PolarKraken.java index e07ddc11eb0..8e0894a1ce9 100644 --- a/Mage.Sets/src/mage/cards/p/PolarKraken.java +++ b/Mage.Sets/src/mage/cards/p/PolarKraken.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; /** @@ -58,7 +58,7 @@ public class PolarKraken extends CardImpl { // Polar Kraken enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // Cumulative upkeep-Sacrifice a land. - this.addAbility(new CumulativeUpkeepAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent())))); + this.addAbility(new CumulativeUpkeepAbility(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT)))); } public PolarKraken(final PolarKraken card) { diff --git a/Mage.Sets/src/mage/cards/r/Raze.java b/Mage.Sets/src/mage/cards/r/Raze.java index ec725221a38..b6d6c3968e6 100644 --- a/Mage.Sets/src/mage/cards/r/Raze.java +++ b/Mage.Sets/src/mage/cards/r/Raze.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetLandPermanent; @@ -48,7 +48,7 @@ public class Raze extends CardImpl { // As an additional cost to cast Raze, sacrifice a land. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledLandPermanent(), true))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT, true))); // Destroy target land. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetLandPermanent()); diff --git a/Mage.Sets/src/mage/cards/s/ScytheTiger.java b/Mage.Sets/src/mage/cards/s/ScytheTiger.java index a7e49df3462..8417f5d24b8 100644 --- a/Mage.Sets/src/mage/cards/s/ScytheTiger.java +++ b/Mage.Sets/src/mage/cards/s/ScytheTiger.java @@ -37,8 +37,7 @@ 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 mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; /** @@ -47,8 +46,6 @@ import mage.target.common.TargetControlledPermanent; */ public class ScytheTiger extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); - public ScytheTiger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); this.subtype.add(SubType.CAT); @@ -60,7 +57,7 @@ public class ScytheTiger extends CardImpl { this.addAbility(ShroudAbility.getInstance()); // When Scythe Tiger enters the battlefield, sacrifice it unless you sacrifice a land. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))))); } public ScytheTiger(final ScytheTiger card) { diff --git a/Mage.Sets/src/mage/cards/s/ShardVolley.java b/Mage.Sets/src/mage/cards/s/ShardVolley.java index f3c16373119..b90caff89a8 100644 --- a/Mage.Sets/src/mage/cards/s/ShardVolley.java +++ b/Mage.Sets/src/mage/cards/s/ShardVolley.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreatureOrPlayer; @@ -44,14 +43,12 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class ShardVolley extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); - public ShardVolley(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); // As an additional cost to cast Shard Volley, sacrifice a land. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); // Shard Volley deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java b/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java index 84357f0d973..50e0bc23dbb 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringGlasskite.java @@ -59,7 +59,7 @@ public class ShimmeringGlasskite extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Shimmering Glasskite becomes the target of a spell or ability for the first time in a turn, counter that spell or ability. + // Whenever Shimmering Glasskite becomes the target of a spell or ability for the first time each turn, counter that spell or ability. this.addAbility(new ShimmeringGlasskiteAbility()); } @@ -112,7 +112,7 @@ class ShimmeringGlasskiteAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} becomes the target of a spell or ability for the first time in a turn, counter that spell or ability."; + return "Whenever {this} becomes the target of a spell or ability for the first time each turn, counter that spell or ability."; } } diff --git a/Mage.Sets/src/mage/cards/s/SpittingSpider.java b/Mage.Sets/src/mage/cards/s/SpittingSpider.java index 6d086337eb6..867f69d5cf0 100644 --- a/Mage.Sets/src/mage/cards/s/SpittingSpider.java +++ b/Mage.Sets/src/mage/cards/s/SpittingSpider.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetControlledPermanent; @@ -64,7 +64,7 @@ public class SpittingSpider extends CardImpl { // Reach this.addAbility(ReachAbility.getInstance()); // Sacrifice a land: Spitting Spider deals 1 damage to each creature with flying. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(1, filter), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent())))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(1, filter), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT)))); } public SpittingSpider(final SpittingSpider card) { diff --git a/Mage.Sets/src/mage/cards/w/WorldBreaker.java b/Mage.Sets/src/mage/cards/w/WorldBreaker.java index ad439c20fed..36b4420a50f 100644 --- a/Mage.Sets/src/mage/cards/w/WorldBreaker.java +++ b/Mage.Sets/src/mage/cards/w/WorldBreaker.java @@ -44,7 +44,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; @@ -84,7 +84,7 @@ public class WorldBreaker extends CardImpl { // {2}{C}, Sacrifice a land: Return World Breaker from your graveyard to your hand. ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{2}{C}")); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent()))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZuranOrb.java b/Mage.Sets/src/mage/cards/z/ZuranOrb.java index 186fb72fe3b..ac62622f072 100644 --- a/Mage.Sets/src/mage/cards/z/ZuranOrb.java +++ b/Mage.Sets/src/mage/cards/z/ZuranOrb.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; /** @@ -48,7 +48,7 @@ public class ZuranOrb extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); // Sacrifice a land: You gain 2 life. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent())))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT)))); } public ZuranOrb(final ZuranOrb card) { diff --git a/Mage.Sets/src/mage/sets/ArabianNights.java b/Mage.Sets/src/mage/sets/ArabianNights.java index 215f3245f1a..6affa052bfa 100644 --- a/Mage.Sets/src/mage/sets/ArabianNights.java +++ b/Mage.Sets/src/mage/sets/ArabianNights.java @@ -131,7 +131,7 @@ public class ArabianNights extends ExpansionSet { cards.add(new SetCardInfo("Piety", 65, Rarity.COMMON, Piety.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Pyramids", 81, Rarity.RARE, mage.cards.p.Pyramids.class)); cards.add(new SetCardInfo("Repentant Blacksmith", 66, Rarity.RARE, mage.cards.r.RepentantBlacksmith.class)); - cards.add(new SetCardInfo("Ring of Ma'rûf", 82, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); + cards.add(new SetCardInfo("Ring of Ma'ruf", 82, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); cards.add(new SetCardInfo("Rukh Egg", 52, Rarity.COMMON, RukhEgg.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rukh Egg", 53, Rarity.COMMON, RukhEgg.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sandals of Abdallah", 83, Rarity.UNCOMMON, mage.cards.s.SandalsOfAbdallah.class)); diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index 83b9ef3c1f1..37048084b9d 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -221,7 +221,7 @@ public class IceAge extends ExpansionSet { 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("Leshrac's Sigil", 32, Rarity.UNCOMMON, mage.cards.l.LeshracsSigil.class)); - cards.add(new SetCardInfo("Lim-Dûl's Hex", 34, Rarity.UNCOMMON, mage.cards.l.LimDulsHex.class)); + cards.add(new SetCardInfo("Lim-Dul's Hex", 34, Rarity.UNCOMMON, mage.cards.l.LimDulsHex.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)); diff --git a/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java index bb080f081d0..96684e01d35 100644 --- a/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DealtDamageAndDiedTriggeredAbility.java @@ -3,7 +3,9 @@ package mage.abilities.common; import mage.MageObjectReference; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.SetTargetPointer; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; @@ -13,23 +15,30 @@ import mage.target.targetpointer.FixedTarget; public class DealtDamageAndDiedTriggeredAbility extends TriggeredAbilityImpl { private final FilterCreaturePermanent filter; + protected SetTargetPointer setTargetPointer; public DealtDamageAndDiedTriggeredAbility(Effect effect) { this(effect, false); } public DealtDamageAndDiedTriggeredAbility(Effect effect, boolean optional) { - this(effect, optional, new FilterCreaturePermanent()); + this(effect, optional, StaticFilters.FILTER_PERMANENT_CREATURE); } public DealtDamageAndDiedTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) { + this(effect, optional, filter, SetTargetPointer.PERMANENT); + } + + public DealtDamageAndDiedTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter, SetTargetPointer setTargetPointer) { super(Zone.ALL, effect, optional); this.filter = filter; + this.setTargetPointer = setTargetPointer; } public DealtDamageAndDiedTriggeredAbility(final DealtDamageAndDiedTriggeredAbility ability) { super(ability); this.filter = ability.filter; + this.setTargetPointer = ability.setTargetPointer; } @Override @@ -55,8 +64,10 @@ public class DealtDamageAndDiedTriggeredAbility extends TriggeredAbilityImpl { } } if (damageDealt) { - for (Effect effect : getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); + if(this.setTargetPointer == SetTargetPointer.PERMANENT) { + for (Effect effect : getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getTargetId())); + } } return true; } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 0cfe31f09ad..27a367e88cb 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -236,6 +236,13 @@ public final class StaticFilters { static { FILTER_BASIC_LAND_CARD.setLockedFilter(true); } + + // Used for sacrifice targets that don't need the "you control" text + public static final FilterControlledLandPermanent FILTER_CONTROLLED_LAND_SHORT_TEXT = new FilterControlledLandPermanent("a land"); + + static { + FILTER_CONTROLLED_LAND_SHORT_TEXT.setLockedFilter(true); + } public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent();