Roland/lovely.toml
2026-07-27 19:31:49 +02:00

202 lines
6.3 KiB
TOML

[manifest]
version = "1.0.0"
dump_lua = true
priority = -2
# Huge shoutouts to the fantastic Cryptid mod and [MathIsFun0](https://github.com/MathIsFun0)
# in particular because this would be so annoying to figure out on your own.
# The following patches are all adapted from:
# https://github.com/SpectralPack/Cryptid/blob/84895c0349971341e4e09a041a8c94c07ebf0f3f/lovely/stake.toml#L210-L284
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.GAME.round_resets.blind_choices.Boss = get_new_boss()"
position = "before"
payload = """
if G.GAME.modifiers.Roland_blossom_deck then
self.GAME.round_resets.blind_choices.Small = get_new_boss()
self.GAME.round_resets.blind_choices.Big = get_new_boss()
end
"""
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "G.GAME.round_resets.blind_choices.Boss = get_new_boss()"
position = "before"
payload = """
if G.GAME.modifiers.Roland_blossom_deck then
G.GAME.round_resets.blind_choices.Small = get_new_boss()
G.GAME.round_resets.blind_choices.Big = get_new_boss()
end
"""
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "if G.GAME.blind:get_type() == 'Boss' then"
position = "at"
payload = "if G.GAME.blind_on_deck == 'Boss' then"
match_indent = true
[[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 = "at"
payload = "if G.GAME.round_resets.ante >= G.GAME.win_ante and G.GAME.blind_on_deck == 'Boss' then"
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "if G.GAME.round_resets.blind == G.P_BLINDS.bl_small then"
position = "at"
payload = "if G.GAME.blind_on_deck == 'Small' then"
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "elseif G.GAME.round_resets.blind == G.P_BLINDS.bl_big then"
position = "at"
payload = "elseif G.GAME.blind_on_deck == 'Big' then"
match_indent = true
# Misfortune Cookie
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if self.seal == 'Purple' and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then"
position = "at"
payload = """if self.seal == 'Purple' and
(next(SMODS.find_card "j_Roland_misfortune") or
#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit) then"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, nil, '8ba')"
position = "after"
times = 1
payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition("e_negative", true, true)
end"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if self.seal == 'Blue' and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit and not self.ability.extra_enhancement then"
position = "at"
payload = """if self.seal == 'Blue' and
(next(SMODS.find_card "j_Roland_misfortune") or
#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit and
not self.ability.extra_enhancement) then
"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "local card = create_card(card_type,G.consumeables, nil, nil, nil, nil, _planet, 'blusl')"
position = "after"
payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition("e_negative", true, true)
end"""
match_indent = true
# Frozen
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = """if self.ability.name == 'Throwback' then
self.ability.x_mult = 1 + G.GAME.skips*self.ability.extra
end
if self.ability.name == "Driver's License" then"""
position = "at"
payload = """if self.ability.name == 'Throwback' then
self.ability.x_mult = 1 + G.GAME.skips*self.ability.extra
end
if self.ability.name == "Driver's License" and not (self.edition and self.edition.Roland_frozen) then"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = """if self.ability.name == "Steel Joker" then"""
position = "at"
payload = """if self.ability.name == "Steel Joker" and not (self.edition and self.edition.Roland_frozen) then"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = """if self.ability.name == "Cloud 9" then"""
position = "at"
payload = """if self.ability.name == "Cloud 9" and not (self.edition and self.edition.Roland_frozen) then"""
match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = """if self.ability.name == "Stone Joker" then"""
position = "at"
payload = """if self.ability.name == "Stone Joker" and not (self.edition and self.edition.Roland_frozen) then"""
match_indent = true
[[patches]]
[patches.regex]
target = "card.lua"
pattern = "math\\.floor\\(\\(G\\.GAME\\.dollars \\+ \\(G\\.GAME\\.dollar_buffer or 0\\)\\)/self\\.ability\\.extra\\.dollars\\)"
position = "at"
payload = "SMODS.Mods.Roland.bootstraps_mult(self)"
[[patches]]
[patches.regex]
target = "card.lua"
pattern = "if self\\.ability\\.h_size ~= 0 then"
position = "at"
payload = "if self.ability.h_size and self.ability.h_size ~= 0 then"
[[patches]]
[patches.regex]
target = "card.lua"
pattern = "if self\\.ability\\.d_size > 0 then"
position = "at"
payload = "if self.ability.d_size and self.ability.d_size > 0 then"
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "value = value + card.ability[property]"
position = "at"
payload = "value = value + (card.ability[property] or 0)"
match_indent = true
# [[patches]]
# [patches.pattern]
# target = '=[SMODS DebugPlus "debugplus/console.lua"]'
# pattern = "if toCheck == '/' or toCheck == 'kp/' then"
# position = "at"
# payload = "if toCheck == '/' or toCheck == 'kp/' or toCheck == 'f' then"
# match_indent = true
# [[patches]]
# [patches.pattern]
# target = '=[SMODS DebugPlus "debugplus/console.lua"]'
# pattern = 'local cmdName = string.lower(string.gsub(inputText, "^(%S+).*", "%1"))'
# position = "at"
# payload = 'local cmdName = "eval"'
# match_indent = true
# [[patches]]
# [patches.pattern]
# target = '=[SMODS DebugPlus "debugplus/console.lua"]'
# pattern = 'local rawArgs = string.gsub(inputText, "^%S+%s*(.*)", "%1")'
# position = "at"
# payload = 'local cmdName = inputText'
# match_indent = true