From 6b60e478eee68e169d52fd8b6d223ce5c65edff9 Mon Sep 17 00:00:00 2001 From: leriomaggio Date: Mon, 12 Jul 2021 09:22:15 +0100 Subject: [PATCH] Patch showing custom card warning properly --- forge-core/src/main/java/forge/deck/DeckFormat.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/forge-core/src/main/java/forge/deck/DeckFormat.java b/forge-core/src/main/java/forge/deck/DeckFormat.java index fffa10aa08a..19d0773eaf1 100644 --- a/forge-core/src/main/java/forge/deck/DeckFormat.java +++ b/forge-core/src/main/java/forge/deck/DeckFormat.java @@ -338,12 +338,11 @@ public enum DeckFormat { // should group all cards by name, so that different editions of same card are really counted as the same card for (final Entry cp : Aggregates.groupSumBy(allCards, PaperCard.FN_GET_NAME)) { IPaperCard simpleCard = StaticData.instance().getCommonCards().getCard(cp.getKey()); - if (simpleCard == null) + if (simpleCard == null) { simpleCard = StaticData.instance().getCustomCards().getCard(cp.getKey()); - - if (simpleCard != null && !StaticData.instance().isEnableCustomCardsInDecks()) - return TextUtil.concatWithSpace("contains a Custom Card:", cp.getKey(), "\nPlease Enable Custom Cards in Forge Preferences to use this deck."); - + if (simpleCard != null && !StaticData.instance().isEnableCustomCardsInDecks()) + return TextUtil.concatWithSpace("contains a Custom Card:", cp.getKey(), "\nPlease Enable Custom Cards in Forge Preferences to use this deck."); + } // Might cause issues since it ignores "Special" Cards if (simpleCard == null) { return TextUtil.concatWithSpace("contains the nonexisting card", cp.getKey());