Exclude custom sigs from weakness spread
This commit is contained in:
parent
c20d747921
commit
f5b60223bb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user