Merge pull request #790 from argonui/starterdecks
Fixed starterdeck spawning
This commit is contained in:
commit
f68f1ad8da
@ -603,9 +603,14 @@ function spawnStarterDeck(investigatorName, investigatorData, position)
|
|||||||
local cardIdList = {}
|
local cardIdList = {}
|
||||||
for id, count in pairs(slots) do
|
for id, count in pairs(slots) do
|
||||||
for i = 1, count do
|
for i = 1, count do
|
||||||
table.insert(cardIdList, id)
|
-- don't include mini-cards and investigators
|
||||||
|
local card = allCardsBagApi.getCardById(id)
|
||||||
|
if card and card.metadata and card.metadata.type ~= "Investigator" and card.metadata.type ~= "Minicard" then
|
||||||
|
table.insert(cardIdList, id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
spawnBag.spawn({
|
spawnBag.spawn({
|
||||||
name = investigatorName .. "starter",
|
name = investigatorName .. "starter",
|
||||||
cards = cardIdList,
|
cards = cardIdList,
|
||||||
|
Loading…
Reference in New Issue
Block a user