Skip to content

Commit e4b3b6e

Browse files
committed
feat: add sell joker completion condition
1 parent 876a249 commit e4b3b6e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/lua/utils.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,27 @@ utils.COMPLETION_CONDITIONS = {
799799
return elapsed > 0.30
800800
end,
801801
},
802+
sell_joker = {
803+
[""] = function()
804+
local base_condition = #G.E_MANAGER.queues.base < EVENT_QUEUE_THRESHOLD - 1 -- need to reduce the threshold
805+
and G.STATE_COMPLETE
806+
807+
if not base_condition then
808+
-- Reset timestamp if base condition is not met
809+
condition_timestamps.sell_joker = nil
810+
return false
811+
end
812+
813+
-- Base condition is met, start timing
814+
if not condition_timestamps.sell_joker then
815+
condition_timestamps.sell_joker = socket.gettime()
816+
end
817+
818+
-- Check if 0.2 seconds have passed
819+
local elapsed = socket.gettime() - condition_timestamps.sell_joker
820+
return elapsed > 0.30
821+
end,
822+
},
802823
}
803824

804825
return utils

0 commit comments

Comments
 (0)