Fix encounter card drawing for new Mythos Area scripting

This commit is contained in:
Adam Goldsmith 2024-02-04 12:02:37 -05:00
parent bce71fa7ab
commit c412c3cfce

View File

@ -209,19 +209,7 @@ function drawEncounterCard(params)
end
function actualEncounterCardDraw(card, params)
local faceUpRotation = 0
if not params.alwaysFaceUp then
local metadata = JSON.decode(card.getGMNotes()) or {}
if metadata.hidden or DATA_HELPER.call('checkHiddenCard', card.getName()) then
faceUpRotation = 180
end
end
local DRAWN_ENCOUNTER_CARD_OFFSET = {1.365, 0.5, -0.625}
local pos = params.mat.positionToWorld(DRAWN_ENCOUNTER_CARD_OFFSET)
local rotY = params.mat.getRotation().y
deckLib.placeOrMergeIntoDeck(card, pos, { 0, rotY, faceUpRotation })
card.deal(1, params.mat.getMemo())
end
function reshuffleEncounterDeck()
@ -673,4 +661,4 @@ do
return TokenSpawnTracker
end
end)
return __bundle_require("__root")
return __bundle_require("__root")