From cd7701d4fd0b1de7fcd0b7cb3259d4a29b6c5d26 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Tue, 25 Apr 2023 21:16:14 -0400 Subject: [PATCH] Fix filter on Anathemancer --- Mage.Sets/src/mage/cards/a/Anathemancer.java | 7 +++++-- Mage.Sets/src/mage/cards/p/Pallimud.java | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/Anathemancer.java b/Mage.Sets/src/mage/cards/a/Anathemancer.java index 5785ab161b..e5a6e8886b 100644 --- a/Mage.Sets/src/mage/cards/a/Anathemancer.java +++ b/Mage.Sets/src/mage/cards/a/Anathemancer.java @@ -12,7 +12,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.StaticFilters; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.target.TargetPlayer; @@ -61,8 +62,10 @@ enum AnathemancerCount implements DynamicValue { if (sourceAbility.getFirstTarget() == null) { return 0; } + FilterLandPermanent filter = FilterLandPermanent.nonbasicLands(); + filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget())); return game.getBattlefield().count( - StaticFilters.FILTER_LANDS_NONBASIC, + filter, sourceAbility.getControllerId(), sourceAbility, game ); diff --git a/Mage.Sets/src/mage/cards/p/Pallimud.java b/Mage.Sets/src/mage/cards/p/Pallimud.java index 12118c86c5..8408702917 100644 --- a/Mage.Sets/src/mage/cards/p/Pallimud.java +++ b/Mage.Sets/src/mage/cards/p/Pallimud.java @@ -38,7 +38,7 @@ public final class Pallimud extends CardImpl { this.addAbility(new AsEntersBattlefieldAbility(new ChooseOpponentEffect(Outcome.Detriment))); // Pallimud's power is equal to the number of tapped lands the chosen player controls. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerSourceEffect(new AnathemancerCount()))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerSourceEffect(new PallimudCount()))); } private Pallimud(final Pallimud card) { @@ -51,7 +51,7 @@ public final class Pallimud extends CardImpl { } } -class AnathemancerCount implements DynamicValue { +class PallimudCount implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { @@ -69,8 +69,8 @@ class AnathemancerCount implements DynamicValue { } @Override - public AnathemancerCount copy() { - return new AnathemancerCount(); + public PallimudCount copy() { + return new PallimudCount(); } @Override