forked from BurndiL/BalatroAP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlovely.toml
More file actions
166 lines (149 loc) · 4.99 KB
/
lovely.toml
File metadata and controls
166 lines (149 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# add check before playing hand
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
match_indent = true
position = 'at'
pattern = '''if not G.GAME.blind:debuff_hand(G.play.cards, poker_hands, text) then'''
payload = '''if G.FUNCS.evaluate_play_precalculate(G.play.cards, poker_hands, text) then
print("Skipping normal play evaluation.")
elseif not G.GAME.blind:debuff_hand(G.play.cards, poker_hands, text) then'''
# disable SMODS save conversion for AP files
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''function convert_save_data()'''
position = "after"
payload = '''if isAPProfileLoaded and isAPProfileLoaded() then return nil end'''
match_indent=true
# save run serverside
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''if G.FILE_HANDLER.run then'''
position = "after"
payload = '''if isAPProfileLoaded() then
G.AP.server_save_run(G.ARGS.save_run)
G.SAVED_GAME = G.ARGS.save_run
end'''
match_indent=true
# fix the game breaking our use of bypass_lock
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.bypass_lock = true'''
position = "before"
payload = 'if not isAPProfileLoaded() then'
match_indent=true
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.bypass_lock = true'''
position = "after"
payload = 'end'
match_indent=true
# Fallback card
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''if _pool_size == 0 then'''
position = "before"
payload = '''if not isAPProfileLoaded() then'''
match_indent=true
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''return _pool, _pool_key..(not _legendary and G.GAME.round_resets.ante or '')'''
position = "before"
payload = '''else
if _pool_size == 0 then _pool[1] = "j_rand_fallback" end
end'''
match_indent=true
# remove rarities from polling if they're unavailable
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''v.weight = v.weight*v.mod'''
position = "before"
payload = '''if isAPProfileLoaded() then
local pool_poll, pool_poll_key = get_current_pool(_pool_key, v.key)
if pool_poll[1] == "j_rand_fallback" then
v.mod = 0
end
end'''
match_indent=true
# division by zero bad
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''-- recalculate rarities to account for v.mod'''
position = "before"
payload = '''if isAPProfileLoaded() and total_weight == 0 then
available_rarities[1].weight = 1
available_rarities[1].mod = 1
total_weight = 1
end'''
match_indent=true
# custom shop
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''for _, v in ipairs(rates) do'''
position = "before"
payload = '''if isAPProfileLoaded() then
local new_total, modified = G.AP.recalc_shop_rates(rates)
if modified then
total_rate = new_total
polled_rate = pseudorandom(pseudoseed('cdt'..G.GAME.round_resets.ante))*total_rate
end
end'''
match_indent=true
# resize run info & options button to fit custom shop button
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''{n=G.UIT.R, config={id = 'run_info_button', align = "cm", minh = 1.75, minw = 1.5,padding = 0.05, r = 0.1, hover = true, colour = G.C.RED, button = "run_info", shadow = true}, nodes={'''
position = "at"
payload = '''{n=G.UIT.R, config={id = 'run_info_button', align = "cm", minh = 1.25, minw = 1.5,padding = 0.05, r = 0.1, hover = true, colour = G.C.RED, button = "run_info", shadow = true}, nodes={'''
match_indent=true
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''{n=G.UIT.R, config={align = "cm", minh = 1.75, minw = 1.5,padding = 0.05, r = 0.1, hover = true, colour = G.C.ORANGE, button = "options", shadow = true}, nodes={'''
position = "at"
payload = '''{n=G.UIT.R, config={align = "cm", minh = 1.25, minw = 1.5,padding = 0.05, r = 0.1, hover = true, colour = G.C.ORANGE, button = "options", shadow = true}, nodes={'''
match_indent=true
# DEBUG, REMOVE LINES BELOW ON RELEASE
# Remove wait for intro animations
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''delay = change_context == 'game' and 1.5 or 0,'''
position = "at"
payload = '''delay = 0,'''
match_indent=true
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''delay = change_context == 'splash' and 1.8 or change_context == 'game' and 2 or 0.5,'''
position = "at"
payload = '''delay = 0,'''
match_indent=true
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''delay = change_context == 'splash' and 4.05 or change_context == 'game' and 3 or 1.5,'''
position = "at"
payload = '''delay = 0,'''
match_indent=true
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''delay(0.1 + (change_context == 'splash' and 2 or change_context == 'game' and 1.5 or 0))'''
position = "at"
payload = ''' '''
match_indent=true