mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Realms Uncharted - fixed game error on controller disconnect
This commit is contained in:
parent
2271fae196
commit
ebef329bc3
1 changed files with 8 additions and 7 deletions
|
@ -83,14 +83,15 @@ class RealmsUnchartedEffect extends OneShotEffect {
|
|||
targetOpponent.setNotTarget(true);
|
||||
player.choose(outcome, targetOpponent, source, game);
|
||||
Player opponent = game.getPlayer(targetOpponent.getFirstTarget());
|
||||
Cards cardsToKeep = new CardsImpl();
|
||||
cardsToKeep.addAll(cards);
|
||||
TargetCard targetDiscard = new TargetCard(2, Zone.LIBRARY, filter2);
|
||||
if (opponent.choose(Outcome.Discard, cards, targetDiscard, source, game)) {
|
||||
cardsToKeep.removeIf(targetDiscard.getTargets()::contains);
|
||||
cards.removeAll(cardsToKeep);
|
||||
if (opponent != null) {
|
||||
Cards cardsToKeep = new CardsImpl(cards);
|
||||
TargetCard targetDiscard = new TargetCard(2, Zone.LIBRARY, filter2);
|
||||
if (opponent.choose(Outcome.Discard, cards, targetDiscard, source, game)) {
|
||||
cardsToKeep.removeIf(targetDiscard.getTargets()::contains);
|
||||
cards.removeAll(cardsToKeep);
|
||||
}
|
||||
player.moveCards(cardsToKeep, Zone.HAND, source, game);
|
||||
}
|
||||
player.moveCards(cardsToKeep, Zone.HAND, source, game);
|
||||
}
|
||||
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
|
|
Loading…
Reference in a new issue