mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Mist of Stagnation - Fixed untap effect.
This commit is contained in:
parent
874de47b28
commit
5a9671cbca
1 changed files with 5 additions and 14 deletions
|
@ -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<TargetPermanent> 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue