From a2fbfa87bc1766c8a6e97cab4544da8aff20fce7 Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Mon, 27 Jul 2020 21:26:03 +0100 Subject: [PATCH] Fix Unesh, Criosphinx Sovereign Unesh incorrectly defaulted to the first opponent in multiplayer rather than letting the player choose an opponent. --- .../src/mage/cards/u/UneshCriosphinxSovereign.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java b/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java index 61a7d71316..be82c99084 100644 --- a/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java +++ b/Mage.Sets/src/mage/cards/u/UneshCriosphinxSovereign.java @@ -15,6 +15,7 @@ import mage.filter.FilterPermanent; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; +import mage.target.common.TargetOpponent; import java.util.ArrayList; import java.util.List; @@ -93,9 +94,16 @@ class UneshCriosphinxSovereignEffect extends OneShotEffect { Set opponents = game.getOpponents(source.getControllerId()); if (!opponents.isEmpty()) { Player opponent = game.getPlayer(opponents.iterator().next()); + if (opponents.size() > 1) { + Target targetOpponent = new TargetOpponent(true); + if (controller.chooseTarget(Outcome.Neutral, targetOpponent, source, game)) { + opponent = game.getPlayer(targetOpponent.getFirstTarget()); + game.informPlayers(controller.getLogName() + " chose " + opponent.getLogName() + " to separate the revealed cards"); + } + } TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, new FilterCard("cards to put in the first pile")); List pile1 = new ArrayList<>(); - if (opponent != null && opponent.choose(Outcome.Neutral, cards, target, game)) { + if (opponent.choose(Outcome.Neutral, cards, target, game)) { List targets = target.getTargets(); for (UUID targetId : targets) { Card card = cards.get(targetId, game);