From 5a9671cbca94d9ff8f90eafb31b30d6138d57bae Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 4 Nov 2017 17:08:44 +0100 Subject: [PATCH] * Mist of Stagnation - Fixed untap effect. --- .../src/mage/cards/m/MistOfStagnation.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MistOfStagnation.java b/Mage.Sets/src/mage/cards/m/MistOfStagnation.java index 5d821a7cda..9cfe18d56c 100644 --- a/Mage.Sets/src/mage/cards/m/MistOfStagnation.java +++ b/Mage.Sets/src/mage/cards/m/MistOfStagnation.java @@ -27,8 +27,6 @@ */ package mage.cards.m; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -96,23 +94,16 @@ class MistOfStagnationEffect extends OneShotEffect { if (activePlayer != null) { int cardsInGrave = activePlayer.getGraveyard().size(); if (cardsInGrave > 0) { - Set targets = new HashSet<>(); - for (int i = 1; 1 <= cardsInGrave; i++) { - TargetPermanent target = new TargetPermanent(1, 1, new FilterPermanent(), true); - target.setTargetController(activePlayer.getId()); - target.setTargetController(activePlayer.getId()); - if (target.canChoose(source.getSourceId(), activePlayer.getId(), game) && activePlayer.chooseTarget(Outcome.Untap, target, source, game)) { - targets.add(target); - } - } - for (TargetPermanent target : targets) { - Permanent p = game.getPermanent(target.getFirstTarget()); + TargetPermanent target = new TargetPermanent(cardsInGrave, cardsInGrave, new FilterPermanent("permanents to untap"), true); + activePlayer.chooseTarget(outcome, target, source, game); + for (UUID oneTarget : target.getTargets()) { + Permanent p = game.getPermanent(oneTarget); if (p != null) { p.untap(game); } } - return true; } + return true; } return false; }