keep 'doInUpkeep' separate

This commit is contained in:
Chr1Z93 2024-10-01 16:11:11 +02:00
parent 6104950046
commit 9a8a30f79f

View File

@ -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 {}