Deal encounter cards to players' hands

This commit is contained in:
Adam Goldsmith 2024-07-28 00:29:14 -04:00
parent a33e5ee973
commit 6790578e20

View File

@ -177,17 +177,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