From 8b04ee02452d0a670a4507083d514773fb6cbe6b Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 5 Nov 2023 17:17:28 +0100 Subject: [PATCH] clue/doom handling --- src/core/GameKeyHandler.ttslua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/GameKeyHandler.ttslua b/src/core/GameKeyHandler.ttslua index 4ddab8e4..aa178ef3 100644 --- a/src/core/GameKeyHandler.ttslua +++ b/src/core/GameKeyHandler.ttslua @@ -153,11 +153,25 @@ function removeOneUse(playerColor, hoveredObject) return end + -- handling for stacked tokens + if targetObject.getQuantity() > 1 then + targetObject = targetObject.takeObject() + end + -- feedback message local tokenName = targetObject.getName() if tokenName == "" then if targetObject.memo ~= "" then - tokenName = titleCase(targetObject.memo) + -- name handling for clue / doom + if targetObject.memo == "clueDoom" then + if targetObject.is_face_down then + tokenName = "Doom" + else + tokenName = "Clue" + end + else + tokenName = titleCase(targetObject.memo) + end else tokenName = "Unknown" end