From 7443f30b899a2d6a3a37b2b082fbc4d3467c8685 Mon Sep 17 00:00:00 2001 From: Nanuzer0 Date: Wed, 31 Dec 2025 00:39:07 +0300 Subject: [PATCH 1/3] fix Sapphire stake --- lovely/stake.toml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lovely/stake.toml b/lovely/stake.toml index 52a4d3601..3fc03223c 100644 --- a/lovely/stake.toml +++ b/lovely/stake.toml @@ -285,16 +285,13 @@ match_indent = true # Sapphire Stake - ante tax -# The Joke boss effect -# Save game state for Revert -# this needs to be redone at a later point -# [[patches]] -#[patches.pattern] -#target = "functions/state_events.lua" -#pattern = "delay(0.4); ease_ante(1); delay(0.4); check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1})" -#position = "at" -#payload = "delay(0.4); ease_ante(G.GAME.blind and G.GAME.blind:cry_calc_ante_gain() or 1); Cryptid.apply_ante_tax(); delay(0.4); check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1})" -#match_indent = true +[[patches]] +[patches.pattern] +target = "functions/state_events.lua" +pattern = "delay(0.4); SMODS.ante_end = true; ease_ante(1); SMODS.ante_end = nil; delay(0.4); check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1})" +position = "at" +payload = "delay(0.4); SMODS.ante_end = true; ease_ante(1); Cryptid.apply_ante_tax(); SMODS.ante_end = nil; delay(0.4); check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1})" +match_indent = true # Emerald Stake - Permanently flipped cards From 4472c05a62286fccfba171d4e4a72775fec7d277 Mon Sep 17 00:00:00 2001 From: Nanuzer0 Date: Wed, 31 Dec 2025 18:13:31 +0300 Subject: [PATCH 2/3] fix Glass stake --- items/stake.lua | 7 +++++++ lib/overrides.lua | 5 +++++ lovely/Probability.toml | 26 +++++++++++++------------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/items/stake.lua b/items/stake.lua index aaf55520d..43fb8a631 100644 --- a/items/stake.lua +++ b/items/stake.lua @@ -179,6 +179,13 @@ local glass = { shiny = true, order = 21, colour = HEX("ffffff8f"), + calculate = function(self, context) + if context.destroy_card and context.cardarea == G.play and G.GAME.modifiers.cry_shatter_rate + and SMODS.pseudorandom_probability(self, 'cry_shatter', 1, G.GAME.modifiers.cry_shatter_rate) and not SMODS.is_eternal(context.destroy_card) then + context.destroy_card.cry_glass_trigger = true + return { remove = true } + end + end, } local sapphire = { object_type = "Stake", diff --git a/lib/overrides.lua b/lib/overrides.lua index 2fb5ac7a3..38e5f2b4d 100644 --- a/lib/overrides.lua +++ b/lib/overrides.lua @@ -2310,3 +2310,8 @@ function UIElement:draw_self() end draw_self(self) end + +local smods_shatters_ref = SMODS.shatters +function SMODS.shatters(card) + return card.cry_glass_trigger or smods_shatters_ref(card) +end \ No newline at end of file diff --git a/lovely/Probability.toml b/lovely/Probability.toml index 23c0d857d..0ea20772f 100644 --- a/lovely/Probability.toml +++ b/lovely/Probability.toml @@ -37,16 +37,16 @@ match_indent = true # wow this is a fat line # Yellow Stake - Glass can't destroy Eternals # Glass Stake - Any card can shatter -[[patches]] -[patches.pattern] -target = "functions/state_events.lua" -pattern = '''if SMODS.has_enhancement(scoring_hand[i], 'm_glass') and scoring_hand[i]:can_calculate() and pseudorandom('glass') < G.GAME.probabilities.normal/(scoring_hand[i].ability.name == 'Glass Card' and scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) then''' -position = "at" -payload = ''' -if (SMODS.has_enhancement(scoring_hand[i], 'm_glass') - and not scoring_hand[i].debuff - and SMODS.pseudorandom_probability(scoring_hand[i], 'glass', 1, scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) - or (G.GAME.modifiers.cry_shatter_rate - and pseudorandom('cry_shatter') < 1 / G.GAME.modifiers.cry_shatter_rate)) - and not SMODS.is_eternal(scoring_hand[i]) then''' -match_indent = true \ No newline at end of file +# [[patches]] +# [patches.pattern] +# target = "functions/state_events.lua" +# pattern = '''if SMODS.has_enhancement(scoring_hand[i], 'm_glass') and scoring_hand[i]:can_calculate() and pseudorandom('glass') < G.GAME.probabilities.normal/(scoring_hand[i].ability.name == 'Glass Card' and scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) then''' +# position = "at" +# payload = ''' +# if (SMODS.has_enhancement(scoring_hand[i], 'm_glass') +# and not scoring_hand[i].debuff +# and SMODS.pseudorandom_probability(scoring_hand[i], 'glass', 1, scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) +# or (G.GAME.modifiers.cry_shatter_rate +# and pseudorandom('cry_shatter') < 1 / G.GAME.modifiers.cry_shatter_rate)) +# and not SMODS.is_eternal(scoring_hand[i]) then''' +# match_indent = true \ No newline at end of file From 44cc085982d5b479fb736bad4cffe93dbdb00d2a Mon Sep 17 00:00:00 2001 From: Nanuzer0 Date: Thu, 1 Jan 2026 21:38:44 +0300 Subject: [PATCH 3/3] fix Azure stake --- lib/misprintize.lua | 1 + lib/overrides.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/misprintize.lua b/lib/misprintize.lua index 6b0e87e08..e9da199c7 100644 --- a/lib/misprintize.lua +++ b/lib/misprintize.lua @@ -257,6 +257,7 @@ function Cryptid.sanity_check(val, is_big) end return val end +-- Do i not untersand smth or is this function literally not used for anything? function Cryptid.misprintize(card, override, force_reset, stack, grow_type, pow_level) local clamps = card.config.center.misprintize_caps or {} if Card.no(card, "immutable", true) then diff --git a/lib/overrides.lua b/lib/overrides.lua index d6311db4e..7c65aa3f4 100644 --- a/lib/overrides.lua +++ b/lib/overrides.lua @@ -1125,6 +1125,9 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable if not (card.edition and (card.edition.cry_oversat or card.edition.cry_glitched)) then Cryptid.manipulate(card) end + if card.ability.set == "Joker" and G.GAME.modifiers.cry_jkr_misprint_mod then + Cryptid.manipulate(card, { value = G.GAME.modifiers.cry_jkr_misprint_mod }) + end if card.ability.set == "Joker" and G.GAME.modifiers.cry_common_value_quad then if card.config.center.rarity == 1 then Cryptid.manipulate(card, { value = 4 })