check decks for forced learning

This commit is contained in:
Chr1Z93 2024-04-14 18:27:29 +02:00
parent 48b7a1e14b
commit c26bb0cee3
2 changed files with 8 additions and 1 deletions

View File

@ -2,7 +2,6 @@
"id": "08031", "id": "08031",
"type": "Asset", "type": "Asset",
"class": "Seeker", "class": "Seeker",
"startsInPlay": true,
"level": 0, "level": 0,
"traits": "Talent. Ritual.", "traits": "Talent. Ritual.",
"permanent": true, "permanent": true,

View File

@ -295,6 +295,14 @@ function doUpkeep(_, clickedByColor, isRightClick)
if cardMetadata.uses ~= nil then if cardMetadata.uses ~= nil then
tokenManager.maybeReplenishCard(obj, cardMetadata.uses, self) tokenManager.maybeReplenishCard(obj, cardMetadata.uses, self)
end 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
end end