mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fix Unesh, Criosphinx Sovereign
Unesh incorrectly defaulted to the first opponent in multiplayer rather than letting the player choose an opponent.
This commit is contained in:
parent
6e68e038b6
commit
a2fbfa87bc
1 changed files with 9 additions and 1 deletions
|
@ -15,6 +15,7 @@ import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -93,9 +94,16 @@ class UneshCriosphinxSovereignEffect extends OneShotEffect {
|
||||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||||
if (!opponents.isEmpty()) {
|
if (!opponents.isEmpty()) {
|
||||||
Player opponent = game.getPlayer(opponents.iterator().next());
|
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"));
|
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, new FilterCard("cards to put in the first pile"));
|
||||||
List<Card> pile1 = new ArrayList<>();
|
List<Card> pile1 = new ArrayList<>();
|
||||||
if (opponent != null && opponent.choose(Outcome.Neutral, cards, target, game)) {
|
if (opponent.choose(Outcome.Neutral, cards, target, game)) {
|
||||||
List<UUID> targets = target.getTargets();
|
List<UUID> targets = target.getTargets();
|
||||||
for (UUID targetId : targets) {
|
for (UUID targetId : targets) {
|
||||||
Card card = cards.get(targetId, game);
|
Card card = cards.get(targetId, game);
|
||||||
|
|
Loading…
Reference in a new issue