diff --git a/src/core/DataHelper.ttslua b/src/core/DataHelper.ttslua index c9594a9b..f2aa0b10 100644 --- a/src/core/DataHelper.ttslua +++ b/src/core/DataHelper.ttslua @@ -526,6 +526,11 @@ function setSpawnedPlayerCardGuid(params) end end +-- deprecated, use metadata (GM Notes) instead (still used by custom data helpers) +-- Encounter Cards with "Hidden." +HIDDEN_CARD_DATA = {} + +-- called by "Global" during encounter card drawing function checkHiddenCard(name) for _, n in ipairs(HIDDEN_CARD_DATA) do if name == n then @@ -535,6 +540,7 @@ function checkHiddenCard(name) return false end +-- called by custom data helpers function updateHiddenCards(args) local custom_data_helper = getObjectFromGUID(args[1]) local data_hiddenCards = custom_data_helper.getTable("HIDDEN_CARD_DATA") @@ -565,12 +571,6 @@ end -- } -- }]]) --- deprecated, use metadata (GM Notes) instead --- Encounter Cards with "Hidden." --- HIDDEN_CARD_DATA = { --- "Visions in Your Mind (Death)" --- } - -- deprecated, included in TokenManager -- PLAYER_CARD_TOKEN_OFFSETS = { -- [1] = {{ 0, 3, -0.2 }} diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index e3e7afbf..4fde9093 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -217,7 +217,8 @@ function actualEncounterCardDraw(card, params) local alwaysFaceUp = params[3] local faceUpRotation = 0 if not alwaysFaceUp then - if getObjectFromGUID(DATA_HELPER_GUID).call('checkHiddenCard', card.getName()) then + local metadata = JSON.decode(card.getGMNotes()) or {} + if metadata.hidden or getObjectFromGUID(DATA_HELPER_GUID).call('checkHiddenCard', card.getName()) then faceUpRotation = 180 end end