update for clues

This commit is contained in:
Chr1Z93 2024-08-15 00:06:44 +02:00
parent a44183bd6b
commit 02ab80952e

View File

@ -2408,9 +2408,10 @@ function TokenManager.replenishTokens(card, useInfo)
local foundTokens = 0
-- we're only searching 80% of the cards area to avoid matching tokens on other cards
-- (except for clues, since these are on locations and they should never be this close)
local maybeDeleteThese = {}
if useInfo.token == "clue" then
for _, obj in ipairs(searchLib.onObject(card, "isClue", 0.8)) do
for _, obj in ipairs(searchLib.onObject(card, "isClue")) do
foundTokens = foundTokens + math.abs(obj.getQuantity())
table.insert(maybeDeleteThese, obj)
end