From a7738a191298a9128b18f315ca04f89d8a5dd6ac Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 14 Jun 2018 08:08:22 -0400 Subject: [PATCH] fixed Malfegor overwriting a static filter --- Mage.Sets/src/mage/cards/c/CapitalPunishment.java | 10 +++++----- Mage.Sets/src/mage/cards/m/Malfegor.java | 3 +-- .../effects/common/SacrificeOpponentsEffect.java | 4 ---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CapitalPunishment.java b/Mage.Sets/src/mage/cards/c/CapitalPunishment.java index 9c3c9c8f83..12d184d282 100644 --- a/Mage.Sets/src/mage/cards/c/CapitalPunishment.java +++ b/Mage.Sets/src/mage/cards/c/CapitalPunishment.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -13,7 +12,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; @@ -25,7 +24,6 @@ public final class CapitalPunishment extends CardImpl { public CapitalPunishment(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); - // Council's dilemma — Starting with you, each player votes for death or taxes. Each opponent sacrifices a creature for each death vote and discards a card for each taxes vote. this.getSpellAbility().addEffect(new CapitalPunishmentDilemmaEffect()); @@ -57,13 +55,15 @@ class CapitalPunishmentDilemmaEffect extends CouncilsDilemmaVoteEffect { Player controller = game.getPlayer(source.getControllerId()); //If no controller, exit out here and do not vote. - if (controller == null) return false; + if (controller == null) { + return false; + } this.vote("death", "taxes", controller, game, source); //Death Votes if (voteOneCount > 0) { - Effect sacrificeEffect = new SacrificeOpponentsEffect(voteOneCount, new FilterControlledCreaturePermanent()); + Effect sacrificeEffect = new SacrificeOpponentsEffect(voteOneCount, StaticFilters.FILTER_CONTROLLED_CREATURE); sacrificeEffect.apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/m/Malfegor.java b/Mage.Sets/src/mage/cards/m/Malfegor.java index 31116dc7d7..27e7f2fc1c 100644 --- a/Mage.Sets/src/mage/cards/m/Malfegor.java +++ b/Mage.Sets/src/mage/cards/m/Malfegor.java @@ -1,4 +1,3 @@ - package mage.cards.m; import java.util.UUID; @@ -74,7 +73,7 @@ class MalfegorEffect extends OneShotEffect { return true; } new DiscardHandControllerEffect().apply(game, source); - return new SacrificeOpponentsEffect(sacrificeNumber, StaticFilters.FILTER_PERMANENT_CREATURE).apply(game, source); + return new SacrificeOpponentsEffect(sacrificeNumber, StaticFilters.FILTER_CONTROLLED_CREATURE).apply(game, source); } @Override diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java index 267371c7dc..308264e35d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsEffect.java @@ -1,4 +1,3 @@ - package mage.abilities.effects.common; import java.util.ArrayList; @@ -9,9 +8,7 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; -import mage.constants.TargetController; import mage.filter.FilterPermanent; -import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -57,7 +54,6 @@ public class SacrificeOpponentsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { List perms = new ArrayList<>(); - filter.add(new ControllerPredicate(TargetController.YOU)); for (UUID playerId : game.getOpponents(source.getControllerId())) { Player player = game.getPlayer(playerId); if (player != null) {