[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 = "globals.lua" pattern = "EDITION = {1,1,1,1}," position = "before" payload = "jane_RGB = {1,1,1,1}," match_indent = true [[patches]] [patches.pattern] target = "functions/common_events.lua" pattern = "if v.name == 'Black Hole' or v.name == 'The Soul' or v.hidden then" position = "at" payload = "if Jane and Jane.hidden(v) or v.name == 'Black Hole' or v.name == 'The Soul' or v.hidden then" match_indent = true [[patches]] [patches.pattern] target = "functions/misc_functions.lua" pattern = "G.GAME.current_round.current_hand.chips*G.GAME.current_round.current_hand.mult" position = "at" payload = '''Jane and Jane.get_chipmult_sum(G.GAME.current_round.current_hand.chips, G.GAME.current_round.current_hand.mult) or G.GAME.current_round.current_hand.chips*G.GAME.current_round.current_hand.mult''' match_indent = true [[patches]] [patches.pattern] target = "functions/misc_functions.lua" pattern = "local AC = G.SETTINGS.ambient_control" position = "before" payload = '''if Jane and (type(G.ARGS.score_intensity.required_score) == "table" and G.ARGS.score_intensity.required_score:to_number() or G.ARGS.score_intensity.required_score) ~= 0 then local break_infinity = ((Talisman or {}).config_file or {}).break_infinity local small = function (x) return type(x) == "table" and x:to_number() or x end local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big local base = Cryptid and 2 or G.ARGS.score_intensity.required_score local expo = Cryptid and G.ARGS.score_intensity.required_score or 2 local ratio = G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo)) Jane.sinister = small(ratio) > 1 G.ARGS.score_intensity.ambientSurreal4 = (break_infinity and SMODS.Mods.Amulet and G.ARGS.score_intensity.earned_score >= (SMODS.Mods.Amulet and Big:new { 1.7976931348623157e308, 1, [1.7975e308] = 1 } or Bakery_API.parse_hyper_e 'e10#10##100000' )) and 1 or 0 G.ARGS.score_intensity.ambientSurreal3 = (G.ARGS.score_intensity.ambientSurreal4 == 0 and number_format(G.ARGS.score_intensity.earned_score):find("#")) and 1 or 0 G.ARGS.score_intensity.ambientSurreal2 = (G.ARGS.score_intensity.ambientSurreal3 == 0 and G.ARGS.score_intensity.ambientSurreal4 == 0 and small(G.ARGS.score_intensity.earned_score / (Cryptid and big(G.ARGS.score_intensity.required_score) ^ big(G.ARGS.score_intensity.required_score) ^ big(G.ARGS.score_intensity.required_score) or big(2) ^ big(G.ARGS.score_intensity.required_score) ) ) > 1 ) and 1 or 0 G.ARGS.score_intensity.ambientSurreal1 = (Jane.sinister and G.ARGS.score_intensity.ambientSurreal2 == 0 and G.ARGS.score_intensity.ambientSurreal3 == 0 and G.ARGS.score_intensity.ambientSurreal4 == 0) and 1 or 0 end''' match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" pattern = "for _, v in ipairs(SMODS.get_card_areas('playing_cards')) do" position = "after" payload = '''if v == G.hand and not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card("j_jane_survivor")) then if Jane.cry then for _, v in ipairs(G.hand.cards) do local area = {cards = {v}} SMODS.calculate_main_scoring({cardarea = area, full_hand = area.cards, scoring_hand = area.cards, scoring_name = text, poker_hands = poker_hands}, area.cards) SMODS.calculate_main_scoring({cardarea = area, full_hand = area.cards, scoring_hand = area.cards, scoring_name = text, poker_hands = poker_hands}, nil) end else SMODS.calculate_main_scoring({cardarea = G.hand, full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands}, G.hand.cards) SMODS.calculate_main_scoring({cardarea = G.hand, full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands}, nil) end else''' match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" pattern = "SMODS.calculate_main_scoring({cardarea = v, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands}, v == G.play and scoring_hand or nil)" position = "after" payload = "end" match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" pattern = "-- context.final_scoring_step calculations" position = "before" payload = '''if not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card('j_jane_survivor')) then for _, area in ipairs(SMODS.get_card_areas('jokers')) do for _, _card in ipairs(area.cards) do local eval = eval_card(_card, { cardarea = G.jokers, full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, edition = true, pre_joker = true }) end end end''' match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" pattern = "SMODS.calculate_context({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, final_scoring_step = true})" position = "after" payload = '''if not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card('j_jane_survivor')) then SMODS.calculate_context({full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, final_scoring_step = true}) end''' match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" pattern = "-- context.remove_playing_cards calculations" position = "before" payload = '''if not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card('j_jane_survivor')) then SMODS.calculate_destroying_cards({ full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, cardarea = G.hand }, cards_destroyed, G.hand) end''' match_indent = true [[patches]] [patches.regex] target = "functions/state_events.lua" pattern = '''hand_chips\*mult\)''' position = "at" payload = "Jane and Jane.get_chipmult_sum(hand_chips, mult) or hand_chips*mult)" [[patches]] [patches.pattern] target = '=[SMODS Cryptid "items/spectral.lua"]' pattern = "local _first_dissolve = nil" position = "after" payload = 'deletable_jokers = next(SMODS.find_card("j_jane_saint")) and {} or deletable_jokers' match_indent = true [[patches]] [patches.pattern] target = '=[SMODS Cryptid "items/exotic.lua"]' pattern = "local _first_dissolve = nil" position = "after" payload = 'deletable_jokers = next(SMODS.find_card("j_jane_saint")) and {} or deletable_jokers' 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 [[patches]] [patches.pattern] target = "game.lua" pattern = '''self.consumeables = CardArea(''' position = "before" payload = '''if not G.GAME.modifiers.jane_spacious then''' match_indent = true [[patches]] [patches.pattern] target = "game.lua" pattern = '''self.discard = CardArea(''' position = "before" payload = '''else self.jokers = CardArea( 0, 0, CAI.joker_W+CAI.consumeable_W, CAI.joker_H, {card_limit = (self.GAME.starting_params.joker_slots + self.GAME.starting_params.consumable_slots - (G.GAME.modifiers.jane_spacious_omega and 0 or 1)) * (G.GAME.modifiers.alt_jane_spacious and 2 or 1), type = 'joker', highlight_limit = 1e100 } ) self.consumeables = self.jokers end''' match_indent = true [[patches]] [patches.pattern] target = "functions/common_events.lua" pattern = '''G.consumeables.T.y = 0''' position = "after" payload = '''G.jokers.T.x = G.hand.T.x - 0.1 G.jokers.T.y = 0''' match_indent = true [[patches]] [patches.pattern] target = "card.lua" pattern = '''if G.consumeables.cards[1] then''' position = "at" payload = '''local eligible = {} for i = 1, #G.consumeables.cards do if G.consumeables.cards[i].ability.consumeable then eligible[#eligible + 1] = G.consumeables.cards[i] end end if #eligible > 0 then''' match_indent = true [[patches]] [patches.pattern] target = "card.lua" pattern = '''local card = copy_card(pseudorandom_element(G.consumeables.cards, pseudoseed('perkeo')), nil)''' position = "at" payload = '''local card = copy_card(pseudorandom_element(eligible, pseudoseed('perkeo')), nil)''' match_indent = true [[patches]] [patches.pattern] target = '''=[SMODS _ "src/utils.lua"]''' pattern = '''-- TARGET: add your own CardAreas for joker evaluation''' position = "after" payload = ''' if G.GAME.modifiers.jane_spacious then t = {G.jokers, G.vouchers} end''' match_indent = true [[patches]] [patches.pattern] target = "functions/misc_functions.lua" pattern = "ambientOrgan1 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 100)/200*(G.ARGS.score_intensity.organ) end}," position = "after" payload = ''' jane_ambientSurreal1 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 80)/200*((G.ARGS.score_intensity.ambientSurreal1 or 0) * 1.4) end}, jane_ambientSurreal2 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 90)/200*((G.ARGS.score_intensity.ambientSurreal2 or 0) * 1.6) end}, jane_ambientSurreal3 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 100)/200*((G.ARGS.score_intensity.ambientSurreal3 or 0) * 1.8) end}, jane_ambientSurreal4 = {volfunc = function(_prev_volume) return _prev_volume*(1 - dt) + dt*0.6*(G.SETTINGS.SOUND.music_volume + 110)/200*((G.ARGS.score_intensity.ambientSurreal4 or 0) * 2) end}, ''' match_indent = true