Minor corrections

This commit is contained in:
Entrox-Licher 2023-10-15 21:40:57 -04:00
parent 6dbf817e20
commit 93bf6b3435
3 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@
"UniqueBack": false "UniqueBack": false
} }
}, },
"Description": "The Dead Speak", "Description": "The Dead Listen",
"DragSelectable": true, "DragSelectable": true,
"GMNotes_path": "AllPlayerCards.15bb07/JimsTrumpet.03c6a7.gmnotes", "GMNotes_path": "AllPlayerCards.15bb07/JimsTrumpet.03c6a7.gmnotes",
"GUID": "03c6a7", "GUID": "03c6a7",

View File

@ -22,7 +22,7 @@
"UniqueBack": false "UniqueBack": false
} }
}, },
"Description": "The Dead Speak (Advanced)", "Description": "The Dead Listen (Advanced)",
"DragSelectable": true, "DragSelectable": true,
"GMNotes_path": "AllPlayerCards.15bb07/JimsTrumpet.7dfd5f.gmnotes", "GMNotes_path": "AllPlayerCards.15bb07/JimsTrumpet.7dfd5f.gmnotes",
"GUID": "7dfd5f", "GUID": "7dfd5f",

View File

@ -331,7 +331,7 @@ end
---@param playerColor String Color this deck is being loaded for ---@param playerColor String Color this deck is being loaded for
function handleSpiritDeck(investigatorId, cardList, playerColor) function handleSpiritDeck(investigatorId, cardList, playerColor)
if investigatorId == "02004-p" or investigatorId == "02004-pb" then -- Parallel Jim Culver if investigatorId == "02004-p" or investigatorId == "02004-pb" then -- Parallel Jim Culver
local spritList = {} local spiritList = {}
for i, card in ipairs(cardList) do for i, card in ipairs(cardList) do
if card.metadata.id == "90053" or ( if card.metadata.id == "90053" or (
card.metadata.type == "Asset" card.metadata.type == "Asset"
@ -339,7 +339,7 @@ function handleSpiritDeck(investigatorId, cardList, playerColor)
and string.match(card.metadata.traits, "Ally") and string.match(card.metadata.traits, "Ally")
and card.metadata.level ~= nil and card.metadata.level ~= nil
and card.metadata.level < 3) then and card.metadata.level < 3) then
table.insert(spritList, i) table.insert(spiritList, i)
end end
end end
-- Process allies to move them to the spirit deck. This is done in reverse -- Process allies to move them to the spirit deck. This is done in reverse
@ -347,17 +347,17 @@ function handleSpiritDeck(investigatorId, cardList, playerColor)
-- Performance here may be an issue, as table.remove() is an O(n) operation -- Performance here may be an issue, as table.remove() is an O(n) operation
-- which makes the full shift O(n^2). But keep it simple unless it becomes -- which makes the full shift O(n^2). But keep it simple unless it becomes
-- a problem -- a problem
for i = #spritList, 1, -1 do for i = #spiritList, 1, -1 do
local moving = cardList[spritList[i]] local moving = cardList[spiritList[i]]
moving.zone = "SetAside5" moving.zone = "SetAside5"
table.remove(cardList, spritList[i]) table.remove(cardList, spiritList[i])
table.insert(cardList, moving) table.insert(cardList, moving)
end end
if #spritList < 10 then if #spiritList < 10 then
printToAll("Jim's spirit deck must have 9 Ally assets but the deck only has " .. (#spritList - 1) .. printToAll("Jim's spirit deck must have 9 Ally assets but the deck only has " .. (#spiritList - 1) ..
" Ally assets.", playerColor) " Ally assets.", playerColor)
elseif #spritList > 11 then elseif #spiritList > 11 then
printToAll("Moved all " .. (#spritList - 1) .. printToAll("Moved all " .. (#spiritList - 1) ..
" Ally assets to the spirit deck, reduce it to 10 (including Vengeful Shade).", playerColor) " Ally assets to the spirit deck, reduce it to 10 (including Vengeful Shade).", playerColor)
else else
printToAll("Built Jim's spirit deck", playerColor) printToAll("Built Jim's spirit deck", playerColor)