We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a4a41 commit 644f667Copy full SHA for 644f667
src/lua/api.lua
@@ -705,8 +705,15 @@ API.functions["shop"] = function(args)
705
local times_rerolled_before = 0
706
if G.GAME.round_scores and G.GAME.round_scores.times_rerolled then
707
times_rerolled_before = G.GAME.round_scores.times_rerolled.amt or 0
708
+ end
709
- sendDebugMessage("times_rerolled_before: " .. tostring(times_rerolled_before))
710
+ if dollars_before < reroll_cost then
711
+ API.send_error_response(
712
+ "Not enough dollars to reroll",
713
+ ERROR_CODES.INVALID_ACTION,
714
+ { dollars = dollars_before, reroll_cost = reroll_cost }
715
+ )
716
+ return
717
end
718
719
-- Perform the reroll (nil element because the function doesn't require it)
0 commit comments