1+ function oracle_apply_dollar_cap (mod , current_dollars , max_dollars )
2+ return math.min (max_dollars - current_dollars , mod )
3+ end
4+
5+ function oracle_should_show_max (mod , current_dollars , max_dollars )
6+ return mod == 0 and current_dollars >= max_dollars
7+ end
8+
9+ function oracle_show_max_alert (dollar_UI )
10+ attention_text ({
11+ text = " MAX" ,
12+ scale = 0.8 ,
13+ hold = 0.7 ,
14+ cover = dollar_UI .parent ,
15+ cover_colour = G .C .RED ,
16+ align = " cm" ,
17+ })
18+ play_sound (" timpani" , 0.9 , 0.7 )
19+ play_sound (" timpani" , 1.2 , 0.7 )
20+ end
21+
122SMODS .Back ({
223 key = " oracle" ,
324 config = { vouchers = { " v_clearance_sale" }, consumables = { " c_medium" } },
@@ -8,44 +29,3 @@ SMODS.Back({
829 end ,
930 mp_credits = { art = { " aura!" , " Ganpan140" }, code = { " Toneblock" } },
1031})
11-
12- -- billionth create card hook ever
13- local ease_dollars_ref = ease_dollars
14- function ease_dollars (mod , instant )
15- if G .GAME .modifiers .oracle_max then
16- local lmod = (G .GAME .dollar_buffer or 0 ) > 0 and mod or 0 -- this whole thing is really uncomfortable but seems to work
17- local dollars = G .GAME .dollars + ((G .GAME .dollar_buffer or 0 ) - lmod )
18- if mod >= 0 and dollars >= G .GAME .modifiers .oracle_max then -- recreate the function for max anim
19- local function _mod ()
20- local dollar_UI = G .HUD :get_UIE_by_ID (" dollar_text_UI" )
21- dollar_UI .config .object :update ()
22- G .HUD :recalculate ()
23- attention_text ({
24- text = " MAX" ,
25- scale = 0.8 ,
26- hold = 0.7 ,
27- cover = dollar_UI .parent ,
28- cover_colour = G .C .RED ,
29- align = " cm" ,
30- })
31- play_sound (" timpani" , 0.9 , 0.7 ) -- timpani spam makes good sfx
32- play_sound (" timpani" , 1.2 , 0.7 )
33- end
34- if instant then
35- _mod ()
36- else
37- G .E_MANAGER :add_event (Event ({
38- trigger = " immediate" ,
39- func = function ()
40- _mod ()
41- return true
42- end ,
43- }))
44- end
45- return
46- else
47- mod = math.min (mod , G .GAME .modifiers .oracle_max - dollars )
48- end
49- end
50- return ease_dollars_ref (mod , instant )
51- end
0 commit comments