Deal encounter cards to players' hands

This commit is contained in:
Adam Goldsmith 2024-07-28 00:29:14 -04:00
parent 03bf4dbb6c
commit 65701768db

View File

@ -180,17 +180,7 @@ end
-- draw the provided card to the requesting playermat
function actualEncounterCardDraw(card, params)
local metadata = JSON.decode(card.getGMNotes()) or {}
local DATA_HELPER = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DataHelper")
-- draw hidden cards facedown
local faceUpRotation = 0
if metadata.hidden or DATA_HELPER.call('checkHiddenCard', card.getName()) then
faceUpRotation = 180
end
local rot = playermatApi.returnRotation(params.matColor):setAt("z", faceUpRotation)
deckLib.placeOrMergeIntoDeck(card, params.position, rot)
card.deal(1, params.mat.matColor)
end
-- gets the discard pile and shuffles it into the encounter deck