mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Fact or Fiction multiplayer fix
Now allows the controller to choose which opponent separates the pile.
This commit is contained in:
parent
3053710109
commit
8a77350eae
1 changed files with 9 additions and 0 deletions
|
@ -41,7 +41,9 @@ import mage.constants.Zone;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
* @author North
|
||||
|
@ -96,6 +98,13 @@ class FactOrFictionEffect extends OneShotEffect {
|
|||
Set<UUID> 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<Card> pile1 = new ArrayList<>();
|
||||
if (opponent.choose(Outcome.Neutral, cards, target, game)) {
|
||||
|
|
Loading…
Reference in a new issue