mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
fixed Malfegor overwriting a static filter
This commit is contained in:
parent
0a635ac341
commit
a7738a1912
3 changed files with 6 additions and 11 deletions
|
@ -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;
|
||||
|
||||
|
@ -26,7 +25,6 @@ public final class CapitalPunishment extends CardImpl {
|
|||
public CapitalPunishment(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}");
|
||||
|
||||
|
||||
// <i>Council's dilemma</i> — 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<UUID> perms = new ArrayList<>();
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
|
|
Loading…
Reference in a new issue