222 lines
6.5 KiB
TOML
222 lines
6.5 KiB
TOML
[manifest]
|
|
version = "1.0.0"
|
|
dump_lua = true
|
|
priority = 115
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = "card.lua"
|
|
pattern = "if v ~= chosen_joker then"
|
|
position = "at"
|
|
payload = """if v ~= chosen_joker and
|
|
not next(SMODS.find_card('j_jane_saint')) and
|
|
not next(SMODS.find_card('j_jen_saint')) and
|
|
not next(SMODS.find_card('j_jen_saint_attuned')) then"""
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = '=[SMODS jen "Jen.lua"]'
|
|
pattern = "'rot',"
|
|
position = "after"
|
|
payload = "'escapey',"
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = '=[SMODS jen "Jen.lua"]'
|
|
pattern = "if cen.click_noise then"
|
|
position = "before"
|
|
payload = """
|
|
if cen.key == "j_jen_escapey" then
|
|
local escapey_per = 10
|
|
cen.click_noise_vol = 0.4
|
|
cen.click_noise = 'jen_plasticButton' .. math.random(2)
|
|
cen.click_noise_per = math.random() / escapey_per + (escapey_per * 2 - 1) / (escapey_per * 2)
|
|
end
|
|
"""
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = '=[SMODS jen "Jen.lua"]'
|
|
pattern = "--SOUNDS"
|
|
position = "after"
|
|
payload = """
|
|
SMODS.Sound({
|
|
key = "plasticButton1",
|
|
path = "plasticButton1.ogg"
|
|
})
|
|
|
|
SMODS.Sound({
|
|
key = "plasticButton2",
|
|
path = "plasticButton2.ogg"
|
|
})
|
|
"""
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = '=[SMODS jen "Jen.lua"]'
|
|
pattern = "local crimbo_quotes = {"
|
|
position = "before"
|
|
payload = """
|
|
local function destructible(card)
|
|
return card.ability.consumeable and not card.highlighted and not (card.ability or {}).eternal
|
|
end
|
|
|
|
local escapey_quotes = {
|
|
marble = {"there is no escape..."},
|
|
normal = {
|
|
{"", "I can't wait to work with you!"},
|
|
{"", "Did you need something from me?"},
|
|
{"", "Oh! I'm just so happy to see you!"},
|
|
{"Can I say something irrelevant?", "I promise it won't be long."},
|
|
{"Tell me about your buddies!", "Assuming you have them, anyway."},
|
|
},
|
|
scared = {
|
|
"What am I going to do?!",
|
|
"I'm not scared, you are!",
|
|
"Tell me when this is over...",
|
|
"I can't keep looking at this!",
|
|
"Let me go hide in this corner... Okay?",
|
|
},
|
|
}
|
|
|
|
local function escapey_button_text(card)
|
|
if card.debuff then
|
|
return "DEBUFFED"
|
|
end
|
|
|
|
for _, v in ipairs(G.consumeables.cards) do
|
|
if destructible(v) then
|
|
return "CONSUME"
|
|
end
|
|
end
|
|
|
|
return "ESCAPE"
|
|
end
|
|
|
|
SMODS.Joker {
|
|
key = "escapey",
|
|
atlas = "jenescapey",
|
|
pronouns = "they_them",
|
|
loc_txt = {
|
|
name = "Escapey",
|
|
text = {
|
|
"{s:1.25}Use to sell {C:attention,s:1.25}tags",
|
|
"{s:1.25}for {X:money,C:white,s:1.25}$#1#X{s:1.25} each",
|
|
"If any {C:attention}consumables",
|
|
"are unselected, sell",
|
|
"those for {C:money}$#3# {}instead",
|
|
"{C:inactive,s:0.75,E:1}#4#",
|
|
"{C:inactive,s:0.75,E:1}#5#{C:red,s:1.5,E:1}#6#",
|
|
},
|
|
},
|
|
config = {extra = {money = 2, xmoney = 2, max = 200, escape_label = "ESCAPE"}},
|
|
attributes = {"destroy_card", "economy", "tag"},
|
|
pos = {x = 0, y = 0},
|
|
sinis = {x = 2, y = 0},
|
|
soul_pos = {x = 1, y = 0},
|
|
cost = 4,
|
|
rarity = 2,
|
|
eternal_compat = true,
|
|
blueprint_compat = false,
|
|
perishable_compat = true,
|
|
inject = not SMODS.Attribute and function(...)
|
|
SMODS.Joker.inject(...)
|
|
Bakery_API.usable_jokers.j_jen_escapey = true
|
|
end or nil,
|
|
loc_vars = function(_, _, card)
|
|
local extra = card.ability.extra
|
|
|
|
local normal = Jen.sinister and {"", ""} or
|
|
pseudorandom_element(escapey_quotes.normal, pseudoseed "EscapeyQuotes") or {"", ""}
|
|
|
|
local scared = not Jen.sinister and "" or
|
|
pseudorandom_element(escapey_quotes.scared, pseudoseed "EscapeyQuotes") or ""
|
|
|
|
return {vars = {extra.xmoney, number_format(extra.max), extra.money, normal[1], normal[2], scared}}
|
|
end,
|
|
calculate = function(_, card)
|
|
local extra = card.ability.extra
|
|
local label = extra.escape_label
|
|
extra.escape_label = escapey_button_text(card)
|
|
local _ = label ~= extra.escape_label and Bakery_API.rehighlight(card)
|
|
end,
|
|
Bakery_can_use = function(_, card)
|
|
if not jl.canuse() or card.debuff then
|
|
return false
|
|
end
|
|
|
|
if next(G.GAME.tags) then
|
|
return true
|
|
end
|
|
|
|
for _, v in ipairs(G.consumeables.cards) do
|
|
if destructible(v) then
|
|
return true
|
|
end
|
|
end
|
|
|
|
return false
|
|
end,
|
|
Bakery_use_button_text = function(_, card)
|
|
return card.ability.extra.escape_label
|
|
end,
|
|
Bakery_use_joker = function(self, card)
|
|
if card.debuff then
|
|
return
|
|
end
|
|
|
|
local times, xtimes = 0, 0
|
|
local extra = card.ability.extra
|
|
|
|
for _, v in ipairs(G.consumeables.cards) do
|
|
if destructible(v) then
|
|
v:start_dissolve({HEX "57ecabff"}, nil, 1.6)
|
|
times = times + 1
|
|
end
|
|
end
|
|
|
|
if times == 0 then
|
|
local delay = #G.GAME.tags >= self.tag_threshold and 0 or 1 / #G.GAME.tags
|
|
local trigger = delay == 0 and "immediate" or "before"
|
|
|
|
for _, v in ipairs(G.GAME.tags) do
|
|
Q(function()
|
|
attention_text {
|
|
scale = 0.7,
|
|
align = "cm",
|
|
text = "ESC",
|
|
cover = v.HUD_tag,
|
|
colour = G.C.WHITE,
|
|
cover_colour = G.C.BLACK,
|
|
hold = 0.3 / G.SETTINGS.GAMESPEED,
|
|
}
|
|
|
|
play_sound("cancel", 1.66, 0.5)
|
|
v.HUD_tag.states.visible = false
|
|
v:remove()
|
|
end, delay, nil, trigger, nil, delay ~= 0)
|
|
|
|
xtimes = xtimes + 1
|
|
end
|
|
end
|
|
|
|
local tag_money = G.GAME.dollars
|
|
local tag_times = math.pow(extra.xmoney, xtimes) - 1
|
|
ease_dollars(math.ceil(times * extra.money + tag_money * tag_times))
|
|
end,
|
|
tag_threshold = 30,
|
|
}
|
|
"""
|
|
match_indent = true
|
|
|
|
[[patches]]
|
|
[patches.pattern]
|
|
target = '=[SMODS _ "src/utils.lua"]'
|
|
pattern = "function SMODS.has_enhancement(card, key)"
|
|
position = "after"
|
|
payload = "if not card.config then return false end"
|
|
match_indent = true
|