fixes revised art investigators

This commit is contained in:
Chr1Z93 2023-03-02 15:58:42 +01:00
parent ceef316adf
commit f390a29e73

View File

@ -140,7 +140,7 @@ do
local slots = deck.slots local slots = deck.slots
internal.maybeDrawRandomWeakness(slots, playerColor) internal.maybeDrawRandomWeakness(slots, playerColor)
if loadInvestigators then if loadInvestigators then
internal.addInvestigatorCards(deck, slots) internal.addInvestigatorCards(deck, slots, playerColor)
end end
internal.maybeAddCustomizeUpgradeSheets(slots) internal.maybeAddCustomizeUpgradeSheets(slots)
internal.maybeAddSummonedServitor(slots) internal.maybeAddSummonedServitor(slots)
@ -186,7 +186,7 @@ do
---@param deck Table The processed ArkhamDB deck response ---@param deck Table The processed ArkhamDB deck response
---@param slots Table The slot list for cards in this deck. Table key is the cardId, value is the ---@param slots Table The slot list for cards in this deck. Table key is the cardId, value is the
--- number of those cards which will be spawned --- number of those cards which will be spawned
internal.addInvestigatorCards = function(deck, slots) internal.addInvestigatorCards = function(deck, slots, playerColor)
local investigatorId = deck.investigator_code local investigatorId = deck.investigator_code
slots[investigatorId .. "-m"] = 1 slots[investigatorId .. "-m"] = 1
local deckMeta = JSON.decode(deck.meta) local deckMeta = JSON.decode(deck.meta)
@ -197,7 +197,7 @@ do
elseif parallelFront then elseif parallelFront then
local alternateNum = tonumber(deckMeta.alternate_front) local alternateNum = tonumber(deckMeta.alternate_front)
if alternateNum >= 01501 and alternateNum <= 01506 then if alternateNum >= 01501 and alternateNum <= 01506 then
investigatorId = investigatorId .. "-r" internal.maybePrint("Original investigator art loaded. Revised art added as states to the card.", playerColor)
else else
investigatorId = investigatorId .. "-pf" investigatorId = investigatorId .. "-pf"
end end