-
Notifications
You must be signed in to change notification settings - Fork 3
/
lovely.toml
158 lines (134 loc) · 4.26 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
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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# add `kcv_juice_card_until` field to context.individual return object
# Provides an appropriate timeslot to call juice_card_until during context.individual
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "if effects[ii].extra then"
position = 'before'
match_indent = true
payload = '''
if effects[ii].kcv_juice_card_until then
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
local eval = function(card)
return true
end
juice_card_until(effects[ii].card, eval, true)
return true
end
}))
end
'''
# Luck of the Irish (mult effect)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "if pseudorandom('lucky_mult') < G.GAME.probabilities.normal/5 then"
position = 'at'
match_indent = true
payload = '''
if pseudorandom('lucky_mult') < kcv_get_irish_normal(self)/5 then
'''
# Luck of the Irish (money effect)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "if pseudorandom('lucky_money') < G.GAME.probabilities.normal/15 then"
position = 'at'
match_indent = true
payload = '''
if pseudorandom('lucky_money') < kcv_get_irish_normal(self)/15 then
'''
# Luck of the Irish: text
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "elseif _c.effect == 'Lucky Card' then loc_vars = {G.GAME.probabilities.normal, _c.config.mult, 5, _c.config.p_dollars, 15}"
position = 'at'
match_indent = true
payload = '''
elseif _c.effect == 'Lucky Card' then loc_vars = {kcv_get_irish_normal(card), _c.config.mult, 5, _c.config.p_dollars, 15}
'''
# Five-Day Forecast must rank-up cards *before* context.before runs so other jokers can get updated ranks
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "local hand_text_set = false"
position = 'after'
match_indent = true
payload = '''
for kcv_i, kcv_joker in ipairs(G.jokers.cards) do
kcv_joker:calculate_joker({scoring_hand = scoring_hand, poker_hands = poker_hands, kcv_forecast_event = true})
end
'''
# Five-Day Forecast: use kcv_ranked_up_discreetly
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "self:set_sprites(nil, card)"
position = 'at'
match_indent = true
payload = '''
if not self.kcv_ranked_up_discreetly then
self:set_sprites(nil, card)
end
'''
# 5-day forecast: set_base() will re-evaluate debuffs, causing just-played cards to debuff during The Pillar
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "if not initial then G.GAME.blind:debuff_card(self) end"
position = 'at'
match_indent = true
payload = '''
if not initial and not self.kcv_ignore_debuff_check then G.GAME.blind:debuff_card(self) end
'''
# Composition: score chips along with mult
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "local effects = eval_card(_card, {cardarea = G.jokers, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, joker_main = true})"
position = 'after'
match_indent = true
payload = '''
if effects.jokers and effects.jokers.kcv_composition_chips_effect then
hand_chips = mod_chips(hand_chips + effects.jokers.kcv_composition_chips_effect.chip_mod)
update_hand_text({delay = 0}, {chips = hand_chips})
card_eval_status_text(_card, 'jokers', nil, percent, nil, effects.jokers.kcv_composition_chips_effect)
end
'''
# Powergrid: init count
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "G.GAME.current_round.used_packs = {}"
position = 'after'
match_indent = true
payload = '''
G.GAME.current_round.kcv_mults_scored = 0
'''
# Powergrid: increment count when mult card scored
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "if effects[ii].mult then"
position = 'after'
match_indent = true
payload = '''
G.GAME.current_round.kcv_mults_scored = (G.GAME.current_round.kcv_mults_scored or 0) + 1
'''
# Powergrid: reset count at end of round, to be safe
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "if G.GAME.round_resets.ante == G.GAME.win_ante and G.GAME.blind:get_type() == 'Boss' then"
position = 'before'
match_indent = true
payload = '''
G.GAME.current_round.kcv_mults_scored = 0
'''