Merge pull request #645 from argonui/start-in-play

Added deck-checking for "Forced Learning"
This commit is contained in:
Entrox-Licher 2024-04-14 17:56:26 -04:00 committed by GitHub
commit 85cbb09c75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -295,6 +295,14 @@ function doUpkeep(_, clickedByColor, isRightClick)
if cardMetadata.uses ~= nil then
tokenManager.maybeReplenishCard(obj, cardMetadata.uses, self)
end
-- check decks for forced learning
elseif obj.type == "Deck" and forcedLearning == false then
for _, deepObj in ipairs(obj.getObjects()) do
local cardMetadata = JSON.decode(deepObj.gm_notes) or {}
if cardMetadata.id == "08031" then
forcedLearning = true
end
end
end
end