forked from MrYamiTsu/Giga-Balatro_Mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlovely.toml
More file actions
187 lines (181 loc) · 5.5 KB
/
lovely.toml
File metadata and controls
187 lines (181 loc) · 5.5 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# MANIFEST #
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# RANDOM SCORING ORDER #
# From TogaStuff (so thx TogaStuff)
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "for _, card in ipairs(context.cardarea.cards) do"
position = "before"
payload = "local scoreCards = Giga.preprocess(context)"
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "for _, card in ipairs(context.cardarea.cards) do"
position = "at"
payload = '''
if not scoreCards then return end
for _, card in ipairs(scoreCards) do
'''
overwrite = true
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "for i, card in ipairs(context.cardarea.cards) do"
position = "before"
payload = "local scoreCards = Giga.preprocess(context)"
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "for i, card in ipairs(context.cardarea.cards) do"
position = "at"
payload = "for i, card in ipairs(scoreCards) do"
overwrite = true
match_indent = true
[[patches]]
[patches.regex]
target = 'main.lua'
pattern = "Oops! The game crashed"
position = "at"
payload = "A problem has been detected and Balatro has been stopped"
overwrite = true
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "for _, area in ipairs(SMODS.get_card_areas('jokers')) do for _, _card in ipairs(area.cards) do"
position = "at"
payload = "local places = Giga.areaprocess(SMODS.get_card_areas('jokers')); for _, place in ipairs(places) do local scoreCards = Giga.areaprocess(place.cards); for _, _card in ipairs(scoreCards) do"
overwrite = true
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "for _, v in ipairs(SMODS.get_card_areas('playing_cards')) do"
position = "at"
payload = "local playedCardsPlace = Giga.areaorderprocess(SMODS.get_card_areas('playing_cards')); for _, v in ipairs(playedCardsPlace) do"
overwrite = true
match_indent = true
# PACKS MODIFICATION #
[[patches]]
[patches.pattern]
target = 'card.lua'
position = 'after'
pattern = '''
booster_obj = self.config.center
'''
payload = '''
if self.config.center.group_key == 'k_restaurant_pack' then
self.ability.extra = self.ability.extra + (G.GAME.giga and G.GAME.giga.vouchers and G.GAME.giga.vouchers.newMenu or 0)
end
if self.config.center.group_key == 'k_restaurant_pack' then
self.ability.choose = self.ability.choose + (G.GAME.giga and G.GAME.giga.vouchers and G.GAME.giga.vouchers._courseMeal or 0)
end
'''
overwrite = true
match_indent = true
# INFO_QUEUE #
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
position = "after"
pattern = '''
if full_UI_table.name then
full_UI_table.info[#full_UI_table.info+1] = {}
desc_nodes = full_UI_table.info[#full_UI_table.info]
end
'''
payload = '''
if first_pass and _c.giga_data then
if _c.giga_data.uncopiable then -- Uncopiable
info_queue[#info_queue+1] = {set = 'Other', key = 'giga_uncopiable_info'}
end
if _c.giga_data.is_dino then -- Dinosaurs
info_queue[#info_queue+1] = {set = 'Other', key = 'giga_dinosaurs_info'}
end
if _c.giga_data.from_ygo then -- Yu-Gi-Oh
info_queue[#info_queue+1] = {set = 'Other', key = 'yugioh_credit'}
end
end
'''
match_indent = false
times = 1
# ASTRAL PLANETS #
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
position = 'at'
pattern = '''
elseif not (G.GAME.used_jokers[v.key] and not pool_opts.allow_duplicates and not SMODS.showman(v.key)) and
'''
payload = '''
elseif not ((G.GAME.used_jokers[v.key] or v.giga_data and v.giga_data.astral_variant and G.GAME.used_jokers[v.giga_data.astral_variant]) and not pool_opts.allow_duplicates and not SMODS.showman(v.key)) and
'''
match_indent = true
times = 1
# OVERCHARGES #
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
position = "after"
pattern = 'new_card:set_base(other.config.card)'
payload = "Giga.delete_overcharge(new_card)"
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
position = "before"
pattern = 'percent = percent + percent_delta'
payload = '''
SMODS.calculate_context({giga_pre_joker = true, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands})
'''
match_indent = true
# REMOVE USE ARTEFACT #
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''local base_attach = base_background:get_UIE_by_ID('ATTACH_TO_ME')'''
position = "after"
payload = '''
local con_save = nil
if card.ability.set == 'Giga_Artefact' then
con_save = card.ability.consumeable
card.ability.consumeable = nil
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''return base_background'''
position = "before"
payload = '''
if con_save then
card.ability.consumeable = con_save
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''*booster_obj *and card:selectable_from_pack(booster_obj)*'''
position = "before"
payload = '''
if card.ability.set == 'Giga_Artefact' and not (card.area == G.pack_cards and G.pack_cards) then
return {
n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={
{n=G.UIT.C, config={padding = 0.15, align = 'cl'}, nodes={
{n=G.UIT.R, config={align = 'cl'}, nodes={
sell
}},
}},
}}
end
'''
match_indent = true