Don't assume that cards have traits in the deck importer
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
c31e508061
commit
588a24b77a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user