Don't assume that cards have traits in the deck importer
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Adam Goldsmith 2022-11-26 22:13:58 -05:00
parent c31e508061
commit 588a24b77a
1 changed files with 2 additions and 2 deletions

View File

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