-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlovely.toml
90 lines (79 loc) · 2.5 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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 1
# 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, cfg.mult, 5, cfg.p_dollars, 15}"
position = 'at'
match_indent = true
payload = '''
elseif _c.effect == 'Lucky Card' then loc_vars = {kcv_get_irish_normal(card), cfg.mult, 5, cfg.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 = '''
SMODS.calculate_context({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, kcv_forecast_event = true})
'''
# 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
'''
# Powergrid: increment count when mult card scored
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "if context.cardarea == G.play and context.main_scoring then"
position = 'after'
match_indent = true
payload = '''
-- KCVanilla check for Power Grid
if SMODS.has_enhancement(card, 'm_mult') and not card.debuff then
G.GAME.current_round.kcv_mults_scored = (G.GAME.current_round.kcv_mults_scored or 0) + 1
end
'''