From cb89c96dac056d01744f5a5ce54dfba1190b8a19 Mon Sep 17 00:00:00 2001 From: Agetian Date: Thu, 17 Aug 2017 04:51:43 +0000 Subject: [PATCH] - Momir Basic: when auto-generating the deck, only update the original deck instead of fully overwriting it. Allows the Momir Basic variant to be used in conjunction with other variants, such as Planechase, without crashing Forge. --- forge-gui/src/main/java/forge/match/GameLobby.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/forge-gui/src/main/java/forge/match/GameLobby.java b/forge-gui/src/main/java/forge/match/GameLobby.java index f3a89708594..4b97273af55 100644 --- a/forge-gui/src/main/java/forge/match/GameLobby.java +++ b/forge-gui/src/main/java/forge/match/GameLobby.java @@ -399,7 +399,13 @@ public abstract class GameLobby implements IHasGameType { } } else if (autoGenerateVariant != null) { - deck = autoGenerateVariant.autoGenerateDeck(rp); + Deck autoDeck = autoGenerateVariant.autoGenerateDeck(rp); + for (DeckSection d : DeckSection.values()) { + if (autoDeck.has(d)) { + deck.getOrCreate(d).clear(); + deck.get(d).addAll(autoDeck.get(d)); + } + } } // Initialise variables for other variants