diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index a404f8e9..bb4959f3 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -800,13 +800,22 @@ function spawnWeaknesses() prepareToPlaceCards() + -- exclude custom signature weaknesses + local customExcludeList = {} + local customInvestigatorData = allCardsBagApi.getCustomInvestigatorData() + for investigatorId, invdata in pairs(customInvestigatorData.InvestigatorSubdata or {}) do + for _, cardId in ipairs(invdata.signatures or {}) do + customExcludeList[cardId] = true + end + end + local basicWeaknessList = {} local otherWeaknessList = {} for _, id in ipairs(allCardsBagApi.getUniqueWeaknesses()) do local cardMetadata = allCardsBagApi.getCardById(id).metadata if cardMetadata.basicWeaknessCount ~= nil and cardMetadata.basicWeaknessCount > 0 then table.insert(basicWeaknessList, id) - elseif excludedNonBasicWeaknesses[id] == nil then + elseif excludedNonBasicWeaknesses[id] == nil and customExcludeList[id] == nil then table.insert(otherWeaknessList, id) end end