From 9a8a30f79f66b80336da9087ab8cba554e2e16d3 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 1 Oct 2024 16:11:11 +0200 Subject: [PATCH] keep 'doInUpkeep' separate --- src/playermat/Playermat.ttslua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/playermat/Playermat.ttslua b/src/playermat/Playermat.ttslua index f25b99d2..88be296b 100644 --- a/src/playermat/Playermat.ttslua +++ b/src/playermat/Playermat.ttslua @@ -352,9 +352,14 @@ function doUpkeep(_, clickedByColor, isRightClick) discardListOfObjects({ obj }) elseif obj.hasTag("UniversalToken") and obj.is_face_down then obj.flip() - elseif obj.hasTag("DoInUpkeep") and obj.is_face_down then + end + + -- call the 'doInUpkeep' function for face-up objects with the respective tag + if obj.hasTag("DoInUpkeep") and not obj.is_face_down then obj.call("doInUpkeep") - elseif obj.type == "Card" and not inArea(self.positionToLocal(obj.getPosition()), INVESTIGATOR_AREA) then + end + + if obj.type == "Card" and not inArea(self.positionToLocal(obj.getPosition()), INVESTIGATOR_AREA) then -- do not continue for cards in investigator card area local cardMetadata = JSON.decode(obj.getGMNotes()) or {}