From bd6f78bd618ac00804f80ddd084f14258477f9bd Mon Sep 17 00:00:00 2001 From: Steven Knipe Date: Sun, 19 Nov 2023 01:21:37 -0800 Subject: [PATCH] use static filters in Orzhov Pontiff and Kros Defense Contractor --- .../src/mage/cards/k/KrosDefenseContractor.java | 12 ++---------- Mage.Sets/src/mage/cards/o/OrzhovPontiff.java | 15 +++------------ 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrosDefenseContractor.java b/Mage.Sets/src/mage/cards/k/KrosDefenseContractor.java index 26e9e34ead4..9f2ac18adec 100644 --- a/Mage.Sets/src/mage/cards/k/KrosDefenseContractor.java +++ b/Mage.Sets/src/mage/cards/k/KrosDefenseContractor.java @@ -13,8 +13,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetOpponentsCreaturePermanent; @@ -27,13 +26,6 @@ import java.util.UUID; */ public final class KrosDefenseContractor extends CardImpl { - private static final FilterPermanent filter - = new FilterCreaturePermanent("creature you don't control"); - - static { - filter.add(TargetController.NOT_YOU.getControllerPredicate()); - } - public KrosDefenseContractor(UUID ownerID, CardSetInfo setInfo) { super(ownerID, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); @@ -50,7 +42,7 @@ public final class KrosDefenseContractor extends CardImpl { this.addAbility(ability); // Whenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn. - this.addAbility(new PutCounterOnCreatureTriggeredAbility(new KrosDefenseContractorEffect(), null, filter, true)); + this.addAbility(new PutCounterOnCreatureTriggeredAbility(new KrosDefenseContractorEffect(), null, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, true)); } private KrosDefenseContractor(final KrosDefenseContractor card) { diff --git a/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java b/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java index fbd720ad83b..f2f3ce55103 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovPontiff.java @@ -12,22 +12,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; /** * * @author LevelX2 */ public final class OrzhovPontiff extends CardImpl { - - private static final FilterCreaturePermanent filterControlled = new FilterCreaturePermanent("Creatures you control"); - private static final FilterCreaturePermanent filterNotControlled = new FilterCreaturePermanent("creatures you don't control"); - static { - filterControlled.add(TargetController.YOU.getControllerPredicate()); - filterNotControlled.add((TargetController.NOT_YOU.getControllerPredicate())); - } - public OrzhovPontiff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}"); this.subtype.add(SubType.HUMAN); @@ -38,8 +29,8 @@ public final class OrzhovPontiff extends CardImpl { // Haunt // When Orzhov Pontiff enters the battlefield or the creature it haunts dies, choose one - Creatures you control get +1/+1 until end of turn; or creatures you don't control get -1/-1 until end of turn. - Ability ability = new HauntAbility(this, new BoostAllEffect(1,1, Duration.EndOfTurn, filterControlled, false)); - Mode mode = new Mode(new BoostAllEffect(-1,-1, Duration.EndOfTurn, filterNotControlled, false)); + Ability ability = new HauntAbility(this, new BoostAllEffect(1,1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, false)); + Mode mode = new Mode(new BoostAllEffect(-1,-1, Duration.EndOfTurn, StaticFilters.FILTER_CREATURES_YOU_DONT_CONTROL, false)); ability.addMode(mode); this.addAbility(ability);