Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/accessories/HandHelper.ttslua
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ function getHandSizeModifierData()
local cardMod = HAND_MODIFIERS[md.id]

if cardMod then
local cardName = obj.getName()
appliedCards[cardName] = (appliedCards[cardName] or 0) + 1
modSize = modSize + cardMod
if not isObjectInHand(obj) then
local cardName = obj.getName()
appliedCards[cardName] = (appliedCards[cardName] or 0) + 1
modSize = modSize + cardMod
end
end

-- store DES value in a global variable for later
Expand Down Expand Up @@ -247,3 +249,12 @@ function updateValue()
printToColor(tool .. " detected new " .. modStr .. table.concat(newCardNames, "\n"), messageColor)
end
end

function isObjectInHand(obj)
for _, zone in ipairs(obj.getZones()) do
if zone.type == "Hand" then
return true
end
end
return false
end
Loading