Merge pull request #56 from argonui/trait-fix

Fix bug with deck loader since trait removal
This commit is contained in:
Chr1Z 2022-11-18 19:20:35 +01:00 committed by GitHub
commit 9478ef8010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -540,7 +540,7 @@ function handleUnderworldMarket(cardList, playerColor)
-- Underworld Market found
hasMarket = true
card.zone = "SetAside3"
elseif (string.find(card.metadata.traits, "Illicit", 1, true)
elseif (card.metadata.traits ~= nil and string.find(card.metadata.traits, "Illicit", 1, true)
and card.metadata.bonded_to == nil
and not card.metadata.weakness) then
table.insert(illicitList, i)
@ -583,6 +583,7 @@ function handleHunchDeck(investigatorId, cardList, playerColor)
local insightList = {}
for i, card in ipairs(cardList) do
if (card.metadata.type == "Event"
and card.metadata.traits ~= nil
and string.match(card.metadata.traits, "Insight")
and card.metadata.bonded_to == nil) then
table.insert(insightList, i)