release discard sealed tokens

This commit is contained in:
Chr1Z93 2024-11-19 22:48:17 +01:00
parent 8f72911c03
commit 46bfa275c7

View File

@ -2938,8 +2938,14 @@ function removeTokensFromObject(params)
if cardTokens[object] then
-- check if this card was moved with tokens on it
for _, tokenData in ipairs(cardTokens[object]) do
tokenData.token.locked = false
trash.putObject(tokenData.token)
if tokenData.token ~= nil then
tokenData.token.locked = false
if tokenChecker.isChaosToken(tokenData.token) then
returnChaosTokenToBag({ token = tokenData.token, fromBag = false })
else
trash.putObject(tokenData.token)
end
end
end
cardTokens[object] = nil
else