Isolate Omega cards into a deck

This commit is contained in:
Emik 2026-10-05 00:46:52 +02:00
parent 230f4680f8
commit ec09da279f
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
5 changed files with 143 additions and 59 deletions

View file

@ -16,5 +16,5 @@
"Bakery (>=3.0.0~*)" "Bakery (>=3.0.0~*)"
], ],
"conflicts": [], "conflicts": [],
"version": "1.12.5" "version": "1.12.6"
} }

View file

@ -157,7 +157,7 @@ local rain_world_jokers = {
"j_jane_saint", "j_jane_saint",
} }
local function add_rain_world_joker() function Jane.add_rain_world_joker()
if not G.jokers then if not G.jokers then
return return
end end
@ -200,14 +200,14 @@ back {
}, },
}, },
alt_apply = function(_) alt_apply = function(_)
Jane.q(add_rain_world_joker) Jane.q(Jane.add_rain_world_joker)
end, end,
apply = function(_) apply = function(_)
Jane.q(add_rain_world_joker) Jane.q(Jane.add_rain_world_joker)
end, end,
alt_calculate = function(_, _, context) alt_calculate = function(_, _, context)
if Jane.is_end_of_ante(context) then if Jane.is_end_of_ante(context) then
add_rain_world_joker() Jane.add_rain_world_joker()
end end
end, end,
} }
@ -265,12 +265,12 @@ local function redeem_omen_globe()
end) end)
end end
local function increase_rates() function Jane.increase_rates()
for _, v in ipairs(SMODS.ConsumableType.obj_buffer) do for _, v in ipairs(SMODS.ConsumableType.obj_buffer) do
local key = v:lower() .. "_rate" local key = v:lower() .. "_rate"
local n = G.GAME[key] local n = G.GAME[key]
if type(n) == "number" then if v ~= "jane_omegaconsumable" and type(n) == "number" then
G.GAME[key] = math.max(n, 1) G.GAME[key] = math.max(n, 1)
end end
end end
@ -305,13 +305,13 @@ back {
alt_apply = function(_) alt_apply = function(_)
G.GAME.alt_obsidian = true G.GAME.alt_obsidian = true
G.GAME.obsidian = true G.GAME.obsidian = true
Jane.increase_rates()
redeem_omen_globe() redeem_omen_globe()
increase_rates()
end, end,
apply = function(_) apply = function(_)
G.GAME.obsidian = true G.GAME.obsidian = true
Jane.increase_rates()
redeem_omen_globe() redeem_omen_globe()
increase_rates()
end, end,
} }
@ -346,7 +346,7 @@ function get_current_pool(_type, ...)
return pool, pool_key return pool, pool_key
end end
local function apply_orrery() function Jane.apply_orrery()
Jane.q(function() Jane.q(function()
local orrery = {} local orrery = {}
G.GAME.orrery = orrery G.GAME.orrery = orrery
@ -361,7 +361,7 @@ local function apply_orrery()
end) end)
end end
local function rebalance_orrery() function Jane.rebalance_orrery()
local function small(x) local function small(x)
return type(x) == "table" and x:to_number() or x return type(x) == "table" and x:to_number() or x
end end
@ -454,12 +454,12 @@ back {
}, },
}, },
alt_apply = function(_) alt_apply = function(_)
apply_orrery() Jane.apply_orrery()
end, end,
apply = function(_) apply = function(_)
apply_orrery() Jane.apply_orrery()
end, end,
calculate = rebalance_orrery, calculate = Jane.rebalance_orrery,
alt_calculate = function(_, _, context) alt_calculate = function(_, _, context)
local function small(x) local function small(x)
return type(x) == "table" and x:to_number() or x return type(x) == "table" and x:to_number() or x
@ -493,7 +493,7 @@ back {
ease_discard(new_discards, true) ease_discard(new_discards, true)
end end
rebalance_orrery() Jane.rebalance_orrery()
end, end,
} }
@ -663,6 +663,35 @@ back {
end, end,
} }
function Jane.display_omega_odds()
if not ((G.GAME or {}).modifiers or {}).omega_replacement then
return
end
local handy_speed = ((Handy or {}).speed_multiplier or {}).value or 1
play_sound("jane_pop", 0.75, 1)
play_sound("jane_pop")
Jane.card_status_text(
nil,
"Omega Cards are now a 1 in " .. number_format(1 / G.GAME.modifiers.omega_replacement),
0,
0.0001,
G.C.jane_RGB,
1.5,
nil,
nil,
nil,
"cm",
"jane_pop",
1,
1.5,
nil,
nil,
G.SETTINGS.GAMESPEED * handy_speed * 3
)
end
local banned_keys = { local banned_keys = {
sleeve_Seen_Seen = true, sleeve_Seen_Seen = true,
sleeve_jane_omega = true, sleeve_jane_omega = true,
@ -675,8 +704,8 @@ back {
loc_txt = { loc_txt = {
name = "Omega Deck", name = "Omega Deck",
text = { text = {
"Applies the {C:legendary,E:1}upsides", "{C:jane_RGB}Omega {}cards may appear",
"of {C:attention}every Jane deck", "Odds increase per {C:attention}ante",
}, },
}, },
alt_loc_txt = { alt_loc_txt = {
@ -703,22 +732,8 @@ back {
end end
end, end,
apply = function(_) apply = function(_)
apply_orrery() G.GAME.banned_keys.j_Bakery_Lua = true
increase_rates() G.GAME.modifiers.omega_replacement = 1 / 301
G.GAME.modifiers.jane_spacious = true
G.GAME.used_vouchers.v_omen_globe = true
G.GAME.modifiers.jane_spacious_omega = true
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1
Jane.q(function()
add_rain_world_joker()
local wee = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck")
G.jokers:emplace(wee)
G.GAME.tortoise = true
G.GAME.obsidian = true
G.GAME.mysterious = true
save_run()
end)
end, end,
alt_calculate = function(_, ...) alt_calculate = function(_, ...)
for _, v in pairs(G.P_CENTERS) do for _, v in pairs(G.P_CENTERS) do
@ -734,13 +749,9 @@ back {
G.hand.config.card_limit = math.max(G.hand.config.card_limit or 12, 12) G.hand.config.card_limit = math.max(G.hand.config.card_limit or 12, 12)
end, end,
calculate = function(_, _, context) calculate = function(_, _, context)
rebalance_orrery()
G.GAME.mysterious = nil
if Jane.is_end_of_ante(context) then if Jane.is_end_of_ante(context) then
Jane.q(function() G.GAME.modifiers.omega_replacement = G.GAME.modifiers.omega_replacement ^ 0.765
Jane.empowered() Jane.q(Jane.display_omega_odds)
end)
end end
end, end,
} }

View file

@ -93,3 +93,47 @@ G.localization.misc.v_text.ch_c_jane_downpour2 =
G.localization.misc.v_text.ch_c_jane_downpour3 = G.localization.misc.v_text.ch_c_jane_downpour3 =
{"{C:attention}Boss Blind {}is defeated, or {C:red}lose"} {"{C:attention}Boss Blind {}is defeated, or {C:red}lose"}
SMODS.Challenge {
key = "jerma",
loc_txt = {name = "Jerma"},
rules = {custom = {{id = "jane_jerma1"}, {id = "jane_jerma2"}}},
apply = function(_)
Jane.apply_orrery()
Jane.increase_rates()
G.GAME.modifiers.jane_spacious = true
G.GAME.used_vouchers.v_omen_globe = true
G.GAME.modifiers.jane_spacious_omega = true
G.GAME.modifiers.omega_replacement = 1 / 301
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1
Jane.q(function()
Jane.add_rain_world_joker()
local wee = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck")
G.jokers:emplace(wee)
G.GAME.tortoise = true
G.GAME.obsidian = true
G.GAME.mysterious = true
save_run()
end)
end,
calculate = function(_, context)
Jane.rebalance_orrery()
G.GAME.mysterious = nil
if Jane.is_end_of_ante(context) then
G.GAME.modifiers.omega_replacement = G.GAME.modifiers.omega_replacement ^ 0.765
Jane.q(Jane.display_omega_odds)
Jane.q(function()
Jane.empowered()
end)
end
end,
}
G.localization.misc.v_text.ch_c_jane_jerma1 =
{"Applies the {C:legendary,E:1}upsides"}
G.localization.misc.v_text.ch_c_jane_jerma2 =
{"of {C:attention}every Jane deck"}

View file

@ -12,10 +12,9 @@ end
Jane = { Jane = {
cry = SMODS.Mods.Cryptid and not SMODS.Mods.Cryptid.disabled, cry = SMODS.Mods.Cryptid and not SMODS.Mods.Cryptid.disabled,
config = { config = {
omega_chance = 1 / 301,
texture_pack = "default", texture_pack = "default",
wee_sizemod = math.sqrt(2), wee_sizemod = math.sqrt(2),
bans = {"j_Bakery_Lua", "j_cry_crustulum", "c_cry_hammerspace"}, bans = {"j_cry_crustulum", "c_cry_hammerspace"},
}, },
} }
@ -28,6 +27,28 @@ if not Jane.misprintize then
assert(SMODS.load_file("src/misprintize.lua"))() assert(SMODS.load_file("src/misprintize.lua"))()
end end
local function update_omega_from_collection()
local buffer = SMODS.ConsumableType.visible_buffer
if not buffer then
return
end
local flag
for i = 1, #buffer do
if buffer[i] == "jane_omegaconsumable" then
table.remove(buffer, i)
flag = true
i = i - 1
end
end
if not flag and G.GAME.modifiers.omega_replacement then
buffer[#buffer + 1] = "jane_omegaconsumable"
end
end
function Jane.can_use() function Jane.can_use()
return not (((G.play and #G.play.cards > 0) or return not (((G.play and #G.play.cards > 0) or
(G.CONTROLLER.locked) or (G.CONTROLLER.locked) or
@ -52,7 +73,8 @@ function Jane.card_status_text(
volume, volume,
pitch, pitch,
trigger, trigger,
f f,
hold
) )
if (delay or 0) <= 0 then if (delay or 0) <= 0 then
if type(f) == "function" then if type(f) == "function" then
@ -62,7 +84,7 @@ function Jane.card_status_text(
attention_text({ attention_text({
text = text, text = text,
scale = size or 1, scale = size or 1,
hold = 0.7, hold = hold or 0.7,
backdrop_colour = colour or (G.C.FILTER), backdrop_colour = colour or (G.C.FILTER),
align = align or "bm", align = align or "bm",
major = card, major = card,
@ -94,7 +116,7 @@ function Jane.card_status_text(
attention_text({ attention_text({
text = text, text = text,
scale = size or 1, scale = size or 1,
hold = 0.7 + (delay or 0), hold = (hold or 0.7) + (delay or 0),
backdrop_colour = colour or (G.C.FILTER), backdrop_colour = colour or (G.C.FILTER),
align = align or "bm", align = align or "bm",
major = card, major = card,
@ -306,10 +328,11 @@ end
local orig_menu = Game.main_menu local orig_menu = Game.main_menu
function Game:main_menu(change_context) function Game:main_menu(change_context)
Jane.sinister = nil orig_menu(self, change_context)
update_omega_from_collection()
G.C.BACKGROUND.C[4] = 1 G.C.BACKGROUND.C[4] = 1
G.C.BACKGROUND.L[4] = 1 G.C.BACKGROUND.L[4] = 1
orig_menu(self, change_context) Jane.sinister = nil
end end
local orig_start_run = Game.start_run local orig_start_run = Game.start_run
@ -317,9 +340,8 @@ local orig_start_run = Game.start_run
function Game:start_run(...) function Game:start_run(...)
orig_start_run(self, ...) orig_start_run(self, ...)
self.GAME.modifiers.omegas_found = nil self.GAME.modifiers.omegas_found = nil
Jane.q(Jane.display_omega_odds)
self.GAME.modifiers.omega_replacement = update_omega_from_collection()
self.GAME.modifiers.omega_replacement or Jane.config.omega_chance
if self.GAME.banned_keys then if self.GAME.banned_keys then
for _, v in pairs(Jane.config.bans) do for _, v in pairs(Jane.config.bans) do
@ -327,7 +349,7 @@ function Game:start_run(...)
end end
end end
if next(SMODS.find_card("j_Bakery_Lua")) then if self.GAME.banned_keys.j_Bakery_Lua and next(SMODS.find_card("j_Bakery_Lua")) then
G.C.BACKGROUND.L[4] = 0 G.C.BACKGROUND.L[4] = 0
end end
end end

View file

@ -36,10 +36,10 @@ SMODS.ConsumableType {
undiscovered = { undiscovered = {
name = "Not Discovered", name = "Not Discovered",
text = { text = {
"Purchase or use", "Use this {C:dark_edition,E:1}very rare",
"this {C:dark_edition,E:1}rare {}card in", "card in an unseeded",
"an unseeded run to", "run to learn what",
"learn what it does", "it is {C:dark_edition,E:1}capable of",
}, },
}, },
}, },
@ -1218,9 +1218,16 @@ SMODS.Consumable {
end end
Jane.q(function() Jane.q(function()
G.GAME.banned_keys.j_Bakery_Lua = nil local lua = G.GAME.banned_keys.j_Bakery_Lua
if G.GAME.banned_keys.j_Bakery_Lua then
SMODS.destroy_cards(G.jokers.cards, {bypass_eternal = true}) SMODS.destroy_cards(G.jokers.cards, {bypass_eternal = true})
G.jokers:change_size(1 - G.jokers.config.card_limits.base) G.jokers:change_size(1 - G.jokers.config.card_limits.base)
else
G.jokers:change_size(1)
end
G.GAME.banned_keys.j_Bakery_Lua = nil
SMODS.add_card { SMODS.add_card {
set = "Joker", set = "Joker",
@ -1230,8 +1237,8 @@ SMODS.Consumable {
} }
play_sound("jane_enchant", 0.75, 1) play_sound("jane_enchant", 0.75, 1)
G.GAME.banned_keys.j_Bakery_Lua = true G.GAME.banned_keys.j_Bakery_Lua = lua
G.GAME.banned_keys.c_jane_soul_omega = true G.GAME.banned_keys.c_jane_soul_omega = lua
local function darken(i) local function darken(i)
if i > 450 then if i > 450 then
@ -1267,7 +1274,7 @@ end
function create_card(...) function create_card(...)
local card = orig_create_card(...) local card = orig_create_card(...)
if G.STATE ~= G.STATES.SMODS_BOOSTER_OPENED or not card.gc then if G.STATE ~= G.STATES.SMODS_BOOSTER_OPENED or not card.gc or not G.GAME.modifiers.omega_replacement then
return card return card
end end