From 48b7a1e14b83622f3fd8f7844d828c26a39758e2 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 11 Apr 2024 23:09:22 +0200 Subject: [PATCH 1/2] added startsInPlay to forced learning --- objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes | 1 + 1 file changed, 1 insertion(+) diff --git a/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes b/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes index 3af17a53..adc52cca 100644 --- a/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes +++ b/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes @@ -2,6 +2,7 @@ "id": "08031", "type": "Asset", "class": "Seeker", + "startsInPlay": true, "level": 0, "traits": "Talent. Ritual.", "permanent": true, From c26bb0cee3825fe7f37b9132a2aebf810edc85c2 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 14 Apr 2024 18:27:29 +0200 Subject: [PATCH 2/2] check decks for forced learning --- .../AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes | 1 - src/playermat/Playmat.ttslua | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes b/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes index adc52cca..3af17a53 100644 --- a/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes +++ b/objects/AllPlayerCards.15bb07/ForcedLearning.fa06f9.gmnotes @@ -2,7 +2,6 @@ "id": "08031", "type": "Asset", "class": "Seeker", - "startsInPlay": true, "level": 0, "traits": "Talent. Ritual.", "permanent": true, diff --git a/src/playermat/Playmat.ttslua b/src/playermat/Playmat.ttslua index 4b133d7d..9ddb7269 100644 --- a/src/playermat/Playmat.ttslua +++ b/src/playermat/Playmat.ttslua @@ -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