From 68543efeb763d2cf8507a6530702ed2e9829d8f3 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Sat, 13 May 2023 11:48:34 -0500 Subject: [PATCH] Fixing sealed/draft formats choking on ownership of cards that were reprinted, as in The Ruling Ring and Hobbit Sword. --- .../main/java/com/gempukku/lotro/hall/HallServer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java index f44511133..189ff7810 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java @@ -715,10 +715,17 @@ public class HallServer extends AbstractServer { int collectionCount = collection.getItemCount(cardCount.getKey()) + collection.getItemCount(format.applyErrata(cardCount.getKey())); - for(String id : format.findBaseCards(cardCount.getKey())) { - collectionCount += collection.getItemCount(id); + var alts = _library.getAllAlternates(cardCount.getKey()); + if(alts != null) { + for (String id : alts) { + collectionCount += collection.getItemCount(id); + } } +// for(String id : format.findBaseCards(cardCount.getKey())) { +// collectionCount += collection.getItemCount(id); +// } + if (collectionCount < cardCount.getValue()) { String cardName = null; try {