Skip to content

Commit 9efb351

Browse files
committed
fix(api): clear hand highlights before selecting new cards
1 parent 5b3c513 commit 9efb351

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lua/api.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ API.functions["play_hand_or_discard"] = function(args)
423423
end
424424
end
425425

426+
-- Clear any existing highlights before selecting new cards to prevent state pollution
427+
G.hand:unhighlight_all()
428+
426429
-- Select cards
427430
for _, card_index in ipairs(args.cards) do
428431
G.hand.cards[card_index]:click()

0 commit comments

Comments
 (0)