From e3b4e600c14148ae90c3d22ee2dc685a17190fb8 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 18 Jul 2024 00:40:31 +0200 Subject: [PATCH] bugfix for single cards in deck area --- src/arkhamdb/DeckImporter.ttslua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/arkhamdb/DeckImporter.ttslua b/src/arkhamdb/DeckImporter.ttslua index 8619eec4..563bd21e 100644 --- a/src/arkhamdb/DeckImporter.ttslua +++ b/src/arkhamdb/DeckImporter.ttslua @@ -454,7 +454,11 @@ function removeBusyZones(playerColor, zoneDecks) -- check for existing deck local cardsInDeckArea = 0 for _, obj in pairs(playermatApi.getDeckAreaObjects(playerColor)) do - cardsInDeckArea = cardsInDeckArea + #obj.getObjects() + if obj.type == "Card" then + cardsInDeckArea = cardsInDeckArea + 1 + elseif obj.type == "Deck" then + cardsInDeckArea = cardsInDeckArea + #obj.getObjects() + end end -- threshhold of 16 cards for skipping deck import to cover cases like Tekeli-li cards