diff --git a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java index b1892b6e44..c0d45ff144 100644 --- a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java +++ b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java @@ -53,20 +53,25 @@ public class ManticoreOfTheGauntlet extends CardImpl { public ManticoreOfTheGauntlet(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); - + this.subtype.add("Manticore"); this.power = new MageInt(5); this.toughness = new MageInt(4); // When Manticore of the Gauntlet enters the battlefield, put a -1/-1 counter on target creature you control. Manticore of the Gauntlet deals 3 damage to target opponent. - Effect counters = new AddCountersTargetEffect(CounterType.M1M1.createInstance(), new StaticValue(1)); + Effect counters = new AddCountersTargetEffect(CounterType.M1M1.createInstance()); counters.setTargetPointer(new FirstTargetPointer()); - Ability ability = new EntersBattlefieldTriggeredAbility(counters); + Effect damage = new DamageTargetEffect(new StaticValue(3), true, "", true); damage.setTargetPointer(new SecondTargetPointer()); + + Ability ability = new EntersBattlefieldTriggeredAbility(counters); ability.addTarget(new TargetControlledCreaturePermanent()); + + ability.addEffect(damage); ability.addTarget(new TargetOpponent()); - addAbility(ability); + + this.addAbility(ability); } public ManticoreOfTheGauntlet(final ManticoreOfTheGauntlet card) { @@ -77,4 +82,4 @@ public class ManticoreOfTheGauntlet extends CardImpl { public ManticoreOfTheGauntlet copy() { return new ManticoreOfTheGauntlet(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java index 81db59f2c7..2e9ea7b7df 100644 --- a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java +++ b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java @@ -48,14 +48,16 @@ import mage.target.common.TargetCreaturePermanent; * @author stravant */ public class PathmakerInitiate extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); + static { filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); } public PathmakerInitiate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - + this.subtype.add("Human"); this.subtype.add("Wizard"); this.power = new MageInt(2); @@ -64,6 +66,7 @@ public class PathmakerInitiate extends CardImpl { // {T}: Target creature with power 2 or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); } public PathmakerInitiate(final PathmakerInitiate card) { diff --git a/Mage.Sets/src/mage/cards/p/PursueGlory.java b/Mage.Sets/src/mage/cards/p/PursueGlory.java index 1b66e14bac..a62a0f4bc0 100644 --- a/Mage.Sets/src/mage/cards/p/PursueGlory.java +++ b/Mage.Sets/src/mage/cards/p/PursueGlory.java @@ -35,22 +35,19 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.filter.StaticFilters; import mage.filter.common.FilterAttackingCreature; -import mage.filter.common.FilterCreaturePermanent; /** * * @author stravant */ public class PursueGlory extends CardImpl { - private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures"); public PursueGlory(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); // Attacking creatures get +2/+0 until end of turn. - getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false)); + getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/s/SacredExcavation.java b/Mage.Sets/src/mage/cards/s/SacredExcavation.java index 72acbc13a5..a062f6954e 100644 --- a/Mage.Sets/src/mage/cards/s/SacredExcavation.java +++ b/Mage.Sets/src/mage/cards/s/SacredExcavation.java @@ -29,17 +29,13 @@ package mage.cards.s; import java.util.UUID; -import mage.MageObject; -import mage.abilities.Ability; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import mage.filter.predicate.Predicate; -import mage.game.Game; +import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCardInYourGraveyard; /** @@ -47,18 +43,18 @@ import mage.target.common.TargetCardInYourGraveyard; * @author stravant */ public class SacredExcavation extends CardImpl { - private static final FilterCard cardsWithCycling = new FilterCard(); + + private static final FilterCard cardsWithCycling = new FilterCard("cards with cycling from your graveyard"); + static { - cardsWithCycling.add(new CyclingPredicate()); + cardsWithCycling.add(new AbilityPredicate(CyclingAbility.class)); } public SacredExcavation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}"); // Return up to two target cards with cycling from your graveyard to your hand. - Effect effect = new ReturnFromGraveyardToHandTargetEffect(); - effect.setText("Return up to two target cards with cycling from your graveyard to your hand"); - getSpellAbility().addEffect(effect); + getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, cardsWithCycling)); } @@ -71,15 +67,3 @@ public class SacredExcavation extends CardImpl { return new SacredExcavation(this); } } - -class CyclingPredicate implements Predicate { - @Override - public boolean apply(MageObject input, Game game) { - for (Ability ability : input.getAbilities()) { - if (ability instanceof CyclingAbility) { - return true; - } - } - return false; - } -} \ No newline at end of file