-
Notifications
You must be signed in to change notification settings - Fork 1
/
lovely.toml
109 lines (98 loc) · 3.2 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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Joker keys
[vars]
banana_farm = "j_aiz_banana_farm"
battle_pass = "j_aiz_battle_pass"
blahaj = "j_aiz_blåhaj"
randomizer = "j_aiz_randomizer"
randomizer_seed = "aiz_randomizer"
# Back:trigger_effect
[[patches]]
[patches.pattern]
target = 'back.lua'
pattern = "if self.name == 'Plasma Deck' and args.context == 'final_scoring_step' then"
position = 'before'
payload = '''
if args.context == "final_scoring_step" then
for i = 1, #G.jokers.cards do
local card = G.jokers.cards[i]
local obj = card.config.center
if obj.final_scoring_step and type(obj.final_scoring_step) == 'function' then
local o = obj:final_scoring_step(card, args)
if o then args = o end
end
end
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = 'back.lua'
pattern = 'return args.chips, args.mult'
position = 'after'
payload = '''
else if args.context == "final_scoring_step" then
return args.chips, args.mult
end
'''
match_indent = true
# Patch to make banana farm work
# sets forced_key to to forced_key of first banana farm
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)'
position = 'after'
payload = '''
local aiz_banana_farm_array = SMODS.find_card('{{lovely:banana_farm}}')
if _type == 'Joker' and next(aiz_banana_farm_array) then
forced_key = aiz_banana_farm_array[1].ability.extra.forced_key
end
'''
match_indent = true
# Patch to make battle pass work
# Don't know if i can target the level up function directly
# instead of this vague amount that only it has.
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'amount = amount or 1'
position = 'after'
payload = '''
local aiz_battle_pass_array = SMODS.find_card('{{lovely:battle_pass}}')
if next(aiz_battle_pass_array) and amount >= 1 and card.ability.consumeable == nil then
for _, other_card in ipairs(aiz_battle_pass_array) do
amount = amount + other_card.ability.extra.levels
end
end
'''
match_indent = true
# Patch to allow blåhaj to be bought when all joker slots are full.
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "not (card.ability.set == 'Joker' and #G.jokers.cards < G.jokers.config.card_limit + ((card.edition and card.edition.negative) and 1 or 0)) and"
position = 'after'
payload = "not (card.ability.set == 'Joker' and #G.jokers.cards < G.jokers.config.card_limit + ((card.config.center_key == '{{lovely:blahaj}}') and (card.ability.extra.joker_slots + ((card.edition and card.edition.negative) and 1 or 0)) or 0)) and"
match_indent = true
## randomizer
# Randomize scoring hand
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "local percent_delta = 0.08"
position = 'after'
payload = '''
for index, randomizer_joker in ipairs(SMODS.find_card('{{lovely:randomizer}}')) do
local shuffled = {}
while #scoring_hand >= 1 do
local _, key = pseudorandom_element(scoring_hand, pseudoseed('{{lovely:randomizer_seed}}'))
table.insert(shuffled, table.remove(scoring_hand, key))
end
scoring_hand = shuffled
end
'''
match_indent = true