-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlovely.toml
More file actions
215 lines (200 loc) · 6.75 KB
/
lovely.toml
File metadata and controls
215 lines (200 loc) · 6.75 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# set var to track glass not broken
#[[patches]]
#[patches.pattern]
#target = "functions/state_events.lua"
#pattern = ''' local cards_destroyed = {}'''
#position = "at"
#payload = '''local cards_destroyed = {}
#local glass_not_destroyed = {}
#print('setupGlassTrackingvar')'''
#match_indent = false
# setup todo as a global function
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''function reset_ancient_card()
'''
position = "at"
payload = '''
function reset_todoList()
print("in reset Todolist")
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible and k ~= G.GAME.current_round.to_do_poker_hand then _poker_hands[#_poker_hands+1] = k end
end
G.GAME.current_round.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed('to_do'))
--self.ability.to_do_poker_hand = G.GAME.current_round.to_do_poker_hand
print("To do hand set as : " .. G.GAME.current_round.to_do_poker_hand)
end
function reset_ancient_card()
'''
match_indent = false
# disabled because then card became out of sync
# set to do list global to be reset every round
#[[patches]]
#[patches.pattern]
#target = "functions/state_events.lua"
#pattern = '''
# reset_ancient_card()
# reset_castle_card()
#'''
#position = "at"
#payload = '''
# reset_ancient_card()
# reset_todoList()
# reset_castle_card()
#'''
#match_indent = false
# override to do to respect new global var
#[[patches]]
#[patches.pattern]
#target = "card.lua"
#pattern = '''
# local _poker_hands = {}
# for k, v in pairs(G.GAME.hands) do
# if v.visible then _poker_hands[#_poker_hands+1] = k end
# end
# local old_hand = self.ability.to_do_poker_hand
# self.ability.to_do_poker_hand = nil
#
# while not self.ability.to_do_poker_hand do
# self.ability.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed((self.area and self.area.config.type == 'title') and 'false_to_do' or 'to_do'))
# if self.ability.to_do_poker_hand == old_hand then self.ability.to_do_poker_hand = nil end
# end
# end
#'''
#position = "at"
#payload = '''
# if nil == G.GAME.current_round.to_do_poker_hand then reset_todoList() end
# print("using global to do hand of " .. G.GAME.current_round.to_do_poker_hand)
# self.ability.to_do_poker_hand = G.GAME.current_round.to_do_poker_hand
#if self.ability.name == 'To Do List' and not context.blueprint then
# reset_todoList()
# print("using global to do hand of " .. G.GAME.current_round.to_do_poker_hand)
# self.ability.to_do_poker_hand = G.GAME.current_round.to_do_poker_hand
# return {
# message = localize('k_reset')
# }
#end
#'''
#match_indent = false
# override the OTHER implementation of To do list to respect global var
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
if self.ability.name == 'To Do List' and not context.blueprint then
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible and k ~= self.ability.to_do_poker_hand then _poker_hands[#_poker_hands+1] = k end
end
self.ability.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed('to_do'))
return {
message = localize('k_reset')
}
end
'''
position = "at"
payload = '''
if self.ability.name == 'To Do List' and not context.blueprint then
reset_todoList()
print("using global to do hand of " .. G.GAME.current_round.to_do_poker_hand)
self.ability.to_do_poker_hand = G.GAME.current_round.to_do_poker_hand
return {
message = localize('k_reset')
}
end
'''
match_indent = false
#move to do to a global var
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''function reset_ancient_card()
'''
position = "at"
payload = '''
function reset_todoList()
print("in reset Todolist")
local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do
if v.visible and k ~= G.GAME.current_round.to_do_poker_hand then _poker_hands[#_poker_hands+1] = k end
end
G.GAME.current_round.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed('to_do'))
--self.ability.to_do_poker_hand = G.GAME.current_round.to_do_poker_hand
print("To do hand set as : " .. G.GAME.current_round.to_do_poker_hand)
end
function reset_ancient_card()
'''
match_indent = false
# set logging to triage cards not appearing as they should
#[[patches]]
#[patches.pattern]
#target = "functions/common_events.lua"
#pattern = '''if _type == 'Base' then
# forced_key = 'c_base'
# end
#'''
#position = "at"
#payload = ''' if _type == 'Base' then
# forced_key = 'c_base'
# end
#
# local safeForcedKey = forced_key or "nil"
# print("in create card, attempting to creatr card with forced key of" .. safeForcedKey)
# print(" next line will be [ center = G.P_CENTERS[safeForcedKey]]")
#'''
#match_indent = false
# spawn WAYYY more cards
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
for i = 1, 200 do
'''
position = "at"
payload = '''
print("test")
for i = 1, 450 do
'''
match_indent = false
# spawn our hero card
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
--VERSION
'''
position = "at"
payload = '''
local card
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 2.04,
func = (function()
local SC_scale = 1.1*(G.debug_splash_size_toggle and 0.8 or 1)
card = Card(G.title_top.T.x, G.title_top.T.y, 1.2*G.CARD_W*SC_scale, 1.2*G.CARD_H*SC_scale, nil, G.P_CENTERS.j_Fox_flushFox)
card.no_ui = 1
card.states.visible = false
if nil ~= replace_card then
replace_card.parent = nil
replace_card:start_dissolve({G.C.BLACK, G.C.ORANGE, G.C.RED, G.C.GOLD})
end
G.title_top:emplace(card)
return true
end)}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 1.04,
func = (function()
card:start_materialize()
G.title_top:emplace(card)
return true
end)}))
--VERSION
'''
match_indent = false