File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ API.functions["shop"] = function(args)
686686 API .pending_requests [" shop" ] = {
687687 condition = function ()
688688 -- Purchase action is non-atomic, so we need to check dollars
689- return utils .COMPLETION_CONDITIONS .cash_out ()
689+ return utils .COMPLETION_CONDITIONS .shop_idle ()
690690 and # G .shop_jokers .cards == shop_size_before - 1
691691 and G .GAME .dollars == expected_dollars
692692 end ,
Original file line number Diff line number Diff line change @@ -680,6 +680,12 @@ utils.COMPLETION_CONDITIONS = {
680680 return G .STATE == G .STATES .SHOP and # G .E_MANAGER .queues .base < EVENT_QUEUE_THRESHOLD and G .STATE_COMPLETE
681681 end ,
682682
683+ -- Actions that keep the player in the shop (e.g. buy_card, reroll, buy_and_use_card).
684+ -- Semantically identical to cash_out but named for clarity.
685+ shop_idle = function ()
686+ return G .STATE == G .STATES .SHOP and # G .E_MANAGER .queues .base < EVENT_QUEUE_THRESHOLD and G .STATE_COMPLETE
687+ end ,
688+
683689 shop = function ()
684690 return G .STATE == G .STATES .BLIND_SELECT and # G .E_MANAGER .queues .base < EVENT_QUEUE_THRESHOLD and G .STATE_COMPLETE
685691 end ,
You can’t perform that action at this time.
0 commit comments