-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlovely.toml
116 lines (104 loc) · 3.05 KB
/
lovely.toml
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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 1
# Four Fingers for flushes
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "local four_fingers = next(find_joker('Four Fingers'))"
position = "at"
payload = '''
local min_size = 5
for _, value in pairs(SMODS.find_card("j_four_fingers")) do
if value.ability.extra < min_size then
min_size = value.ability.extra
end
end
'''
match_indent = true
# Turns out pattern cannot change content inside a line
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "if #hand < (5 - (four_fingers and 1 or 0)) then return ret else"
position = "at"
payload = '''
if #hand < min_size then return ret else
'''
match_indent = true
times = 2
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "if flush_count >= (5 - (four_fingers and 1 or 0)) then"
position = "at"
payload = '''
if flush_count >= min_size then
'''
match_indent = true
# Credit Card interest bonus
# There's also Cryptid payload, so this is be the best way I can think of
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "if G.GAME.dollars >= 5 and not G.GAME.modifiers.no_interest and G.GAME.cry_payload then"
position = "before"
payload = '''
-- Add dollars
G.GAME.ouija_interest_start = G.GAME.ouija_interest_start or 0
G.GAME.dollars = G.GAME.dollars - G.GAME.ouija_interest_start
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "add_round_eval_row({name = 'bottom', dollars = dollars})"
position = "before"
payload = '''
-- Sub dollars
G.GAME.dollars = G.GAME.dollars + G.GAME.ouija_interest_start
'''
match_indent = true
# Crystal Ball make The Fool more likely
# I didn't want to mess with other Cryptid's get_current_pool overrides
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if _pool_size == 0 then"
position = "before"
payload = '''
-- Actually the stuff for pool empty is later
-- I felt like injecting on a comment is too risky
if G.GAME.used_vouchers["v_crystal_ball"] and _type == "Tarot" and _append == "sho" then
for k, v in pairs(_pool) do
if v == "c_fool" then
if pseudorandom("crystal_fool") < 0.2 then
_pool = {"c_fool"}
end
break
end
end
end
'''
match_indent = true
# Half Joker making all Blinds Bosses
# Also override the UI box since taking ownership is not enough
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "elseif self.ability.name == 'Half Joker' then loc_vars = {self.ability.extra.mult, self.ability.extra.size}"
position = "at"
payload = '''
elseif self.ability.name == 'Half Joker' then
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "blind.lua"
pattern = "self.boss = blind and not not blind.boss"
position = "after"
payload = '''
self.boss = self.boss or (blind and next(SMODS.find_card("j_half")))
'''
match_indent = true