From d650401429e12a05651aad9837d137d9ca8154e5 Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Sat, 11 Jul 2026 14:18:33 -0700 Subject: [PATCH 1/9] (Joker) Added "Lone Digger" --- content/joker/lone_digger.lua | 35 ++++++++++++++++++++++++++++++++++ localization/en-us.lua | 8 ++++++++ utilities/definitions/misc.lua | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 content/joker/lone_digger.lua diff --git a/content/joker/lone_digger.lua b/content/joker/lone_digger.lua new file mode 100644 index 00000000..d6ee88a0 --- /dev/null +++ b/content/joker/lone_digger.lua @@ -0,0 +1,35 @@ +SMODS.Joker { + key = "lone_digger", + attributes = { + 'retrigger', + 'face', + 'music' + }, + pools = { + Music = true + }, + rarity = 3, + pos = { x = 18, y = 3 }, + atlas = "jokers_atlas", + cost = 8, + blueprint_compat = true, + eternal_compat = true, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + calculate = function(self, card, context) + if context.repetition and context.cardarea == G.play and context.other_card:is_face() then + local face_count, card_count = 0, 0 + for _, c in ipairs(context.scoring_hand) do + if c:is_face() then face_count = face_count + 1 end + card_count = card_count + 1 + end + if face_count == 1 then + return { + repetitions = card_count + } + end + end + end +} diff --git a/localization/en-us.lua b/localization/en-us.lua index ecef1947..d5e14eda 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2874,6 +2874,14 @@ return { "Retrigger all scored {C:paperback_stars}#1#{}" } }, + j_paperback_lone_digger = { + name = "Lone Digger", + text = { + "If {C:attention}scored hand{} has only", + "one face card, {C:attention}retrigger{} it", + "for each scored card" + } + }, -- Cross-Mod jokers start here j_paperback_moon_waltz = { name = "Moon Waltz", diff --git a/utilities/definitions/misc.lua b/utilities/definitions/misc.lua index 9fe7e1ee..5bd0c1f7 100644 --- a/utilities/definitions/misc.lua +++ b/utilities/definitions/misc.lua @@ -292,7 +292,7 @@ PB_UTIL.ENABLED_JOKERS = { "deck_of_cards", "pocket_pair", "ultra_rare", - -- "lore_digger", + "lone_digger", "the_quiet", "big_misser", -- "sinister_minds", From 1ad867e50b850b9016def41cd466333d2c09e9b6 Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Sat, 11 Jul 2026 14:19:26 -0700 Subject: [PATCH 2/9] Fix some minor errors --- content/joker/cardboard_box.lua | 2 +- content/joker/doppler_radar.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/joker/cardboard_box.lua b/content/joker/cardboard_box.lua index 2e4a586b..32c73098 100644 --- a/content/joker/cardboard_box.lua +++ b/content/joker/cardboard_box.lua @@ -23,7 +23,7 @@ SMODS.Joker { }, paperback_credit = { - coder = 'thermo' + coder = { 'thermo' } }, loc_vars = function(self, info_queue, card) diff --git a/content/joker/doppler_radar.lua b/content/joker/doppler_radar.lua index e8ed8d0e..803b80fb 100644 --- a/content/joker/doppler_radar.lua +++ b/content/joker/doppler_radar.lua @@ -12,7 +12,7 @@ SMODS.Joker { eternal_compat = true, perishable_compat = true, paperback_credit = { - coder = 'thermo' + coder = { 'thermo' } }, loc_vars = function(self, info_queue, card) From 6e2645ff62e7928b7419db6e6b9085ebfd5b74d5 Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Sat, 11 Jul 2026 22:39:28 -0700 Subject: [PATCH 3/9] (Joker) Added "Sinister Minds" --- content/joker/sinister_minds.lua | 80 ++++++++++++++++++++++++++++++++ localization/en-us.lua | 10 ++++ utilities/definitions/misc.lua | 2 +- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 content/joker/sinister_minds.lua diff --git a/content/joker/sinister_minds.lua b/content/joker/sinister_minds.lua new file mode 100644 index 00000000..211b54f7 --- /dev/null +++ b/content/joker/sinister_minds.lua @@ -0,0 +1,80 @@ +SMODS.Joker { + key = "sinister_minds", + config = { + extra = { + retriggers = 1, + a_retriggers = 1, + required_spectrals = 1, + hand = 'Pair', + spectrals_left = 1 + } + }, + attributes = { + 'retrigger', + 'spectral', + 'hand_type', + 'music' + }, + pools = { + Music = true + }, + rarity = 3, + pos = { x = 0, y = 11 }, + atlas = "jokers_atlas", + cost = 8, + blueprint_compat = true, + eternal_compat = true, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.retriggers, + card.ability.extra.retriggers == 1 and "" or "s", + card.ability.extra.a_retriggers, + card.ability.extra.required_spectrals, + localize('k_spectral'), + card.ability.extra.required_spectrals == 1 and "" or "s", + localize(card.ability.extra.hand, 'poker_hands'), + card.ability.extra.spectrals_left + } + } + end, + + calculate = function(self, card, context) + if context.repetition and context.cardarea == G.play and context.scoring_name == card.ability.extra.hand then + return { + repetitions = card.ability.extra.retriggers + } + end + if not context.blueprint_card and context.using_consumeable and context.consumeable.ability.set == 'Spectral' then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'spectrals_left', + scalar_value = 'a_retriggers', + operation = '-', + no_message = true + }) + + if card.ability.extra.spectrals_left == 0 then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'retriggers', + scalar_value = 'a_retriggers', + message_colour = G.C.ORANGE + }) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'required_spectrals', + scalar_value = 'a_retriggers', + no_message = true + }) + card.ability.extra.spectrals_left = card.ability.extra.required_spectrals + return nil, true + end + end + end +} diff --git a/localization/en-us.lua b/localization/en-us.lua index d5e14eda..afbd100d 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2882,6 +2882,16 @@ return { "for each scored card" } }, + j_paperback_sinister_minds = { + name = "Sinister Minds", + text = { + "Retrigger all scored cards {C:attention}#1#{} time#2#", + "if played hand was a {C:attention}#7#", + "Increases by {C:attention}#3#{} when", + "using {C:attention}#4#{} {C:spectral}#5#{} card#6#", + "{C:inactive}(Currently {C:attention}#8#{C:inactive} #5# card#6# left)" + } + }, -- Cross-Mod jokers start here j_paperback_moon_waltz = { name = "Moon Waltz", diff --git a/utilities/definitions/misc.lua b/utilities/definitions/misc.lua index 5bd0c1f7..040fb292 100644 --- a/utilities/definitions/misc.lua +++ b/utilities/definitions/misc.lua @@ -295,7 +295,7 @@ PB_UTIL.ENABLED_JOKERS = { "lone_digger", "the_quiet", "big_misser", - -- "sinister_minds", + "sinister_minds", "stereoscopic_specs", "fodder", "the_strongest", From 9388abc3eba8923d92b7f8d40ab2788fb4b91c3d Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Sun, 12 Jul 2026 10:46:14 -0700 Subject: [PATCH 4/9] Freedom of Choice and Technology can only spawn when you can fullfill their conditions --- content/joker/freedom_of_choice.lua | 13 ++++++++++++- content/joker/technology.lua | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/content/joker/freedom_of_choice.lua b/content/joker/freedom_of_choice.lua index a8383604..14345378 100644 --- a/content/joker/freedom_of_choice.lua +++ b/content/joker/freedom_of_choice.lua @@ -36,11 +36,22 @@ SMODS.Joker { } end, + in_pool = function(self, args) + -- Only in pool if you have played a Five of a Kind or a Flush Five + for k, v in pairs(G.GAME.hands) do + if string.find(k, "Five of a Kind", nil, true) or string.find(k, "Flush Five", nil, true) or string.find(k, "Spectrum Five", nil, true) then + if G.GAME.hands[k].played > 0 then + return true + end + end + end + end, + calculate = function(self, card, context) if context.before and context.main_eval and next(context.poker_hands[card.ability.extra.poker_hands]) then for _, scored_card in ipairs(context.scoring_hand) do scored_card.ability[card.ability.extra.upgrade] = (scored_card.ability[card.ability.extra.upgrade] or 1) + - card.ability.extra.a_xmult + card.ability.extra.a_xmult end return { message = localize('k_upgrade_ex'), diff --git a/content/joker/technology.lua b/content/joker/technology.lua index c2b10b15..980c4d3f 100644 --- a/content/joker/technology.lua +++ b/content/joker/technology.lua @@ -66,5 +66,13 @@ SMODS.Joker { message = localize('k_reset') } end + end, + in_pool = function(self, args) + for _, playing_card in ipairs(G.playing_cards or {}) do + if SMODS.has_enhancement(playing_card, 'm_mult') then + return true + end + end + return false end } From 55d0fa001ce5e4624788635eaffb75e54678cc62 Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Mon, 13 Jul 2026 12:16:20 -0700 Subject: [PATCH 5/9] (Joker) Added "Joker Jacks" --- content/joker/joker_jacks.lua | 95 ++++++++++++++++++++++++++++++++++ localization/en-us.lua | 11 ++++ utilities/definitions/misc.lua | 1 + 3 files changed, 107 insertions(+) create mode 100644 content/joker/joker_jacks.lua diff --git a/content/joker/joker_jacks.lua b/content/joker/joker_jacks.lua new file mode 100644 index 00000000..dcdd5a0c --- /dev/null +++ b/content/joker/joker_jacks.lua @@ -0,0 +1,95 @@ +SMODS.Joker { + key = "joker_jacks", + config = { + extra = { + dollars = 3, + m_dollars = 1, + rank = "Jack", + consumable_odds = { + 'Planet', + 'Planet', + 'Planet', + 'Tarot', + 'Tarot', + 'Tarot', + 'paperback_minor_arcana', + 'paperback_minor_arcana', + 'paperback_minor_arcana', + 'Spectral' + } + } + }, + attributes = { + 'generation', + 'rank', + 'jack', + 'economy', + 'red', + 'food' + }, + pools = { + Food = true + }, + rarity = 1, + pos = { x = 13, y = 12 }, + atlas = "jokers_atlas", + cost = 6, + blueprint_compat = true, + eternal_compat = false, + perishable_compat = true, + paperback_credit = { + coder = { 'thermo' } + }, + + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.dollars, + card.ability.extra.rank, + card.ability.extra.m_dollars + } + } + end, + + calculate = function(self, card, context) + if context.individual and context.cardarea == G.play then + if PB_UTIL.is_rank(context.other_card, card.ability.extra.rank) then + return { + dollars = card.ability.extra.dollars + } + end + end + if context.end_of_round and context.main_eval and not context.blueprint_card then + if card.ability.extra.dollars - card.ability.extra.m_dollars < 1 then + PB_UTIL.destroy_joker(card) + local set = pseudorandom_element(card.ability.extra.consumable_odds, "joker_jacks") + if PB_UTIL.try_spawn_card { set = set } then + card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, + { + message = localize('paperback_plus_consumable'), + colour = G.C.ORANGE + }) + end + return { + message = localize('paperback_consumed_ex'), + colour = G.C.MULT + } + end + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = 'dollars', + scalar_value = 'm_dollars', + operation = '-', + scaling_message = { + message = localize { + type = 'variable', + key = 'paperback_a_dollars_minus', + vars = { card.ability.extra.m_dollars } + }, + colour = G.C.ORANGE + } + }) + return nil, true + end + end +} diff --git a/localization/en-us.lua b/localization/en-us.lua index afbd100d..556a1ed2 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2892,6 +2892,16 @@ return { "{C:inactive}(Currently {C:attention}#8#{C:inactive} #5# card#6# left)" } }, + j_paperback_joker_jacks = { + name = "Joker Jacks", + text = { + "Scored {C:attention}#2#{} give {C:money}$#1#", + "Decreases by {C:money}$#3#", + "Create a {C:attention}prize{}", + "after being consumed", + "{C:inactive}(Must have room)" + } + }, -- Cross-Mod jokers start here j_paperback_moon_waltz = { name = "Moon Waltz", @@ -4498,6 +4508,7 @@ return { paperback_a_plus_cards = "+#1# #2#s", paperback_a_plus_tags = "+#1# Tags", paperback_a_dollars = "$#1#", + paperback_a_dollars_minus = "-$#1#", paperback_a_odds = "+#1# Odds", paperback_a_plus_consumable_slot = "+#1# Consumable Slots", diff --git a/utilities/definitions/misc.lua b/utilities/definitions/misc.lua index 040fb292..0de04b1a 100644 --- a/utilities/definitions/misc.lua +++ b/utilities/definitions/misc.lua @@ -89,6 +89,7 @@ PB_UTIL.ENABLED_JOKERS = { "soft_taco", "shabu_shabu", "watermelon", + "joker_jacks", "complete_breakfast", "ghost_cola", "b_soda", From ed86e59dbec9860f229cec6e603c10755132bf79 Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Mon, 13 Jul 2026 21:20:24 -0700 Subject: [PATCH 6/9] (Joker) Added "Ponzu" --- content/joker/ponzu.lua | 64 ++++++++++++++++++++++++++++++++++ localization/en-us.lua | 9 +++++ utilities/definitions.lua | 1 + utilities/definitions/misc.lua | 1 + utilities/misc_functions.lua | 12 +++++++ 5 files changed, 87 insertions(+) create mode 100644 content/joker/ponzu.lua diff --git a/content/joker/ponzu.lua b/content/joker/ponzu.lua new file mode 100644 index 00000000..185f3ac1 --- /dev/null +++ b/content/joker/ponzu.lua @@ -0,0 +1,64 @@ +SMODS.Joker { + key = "ponzu", + config = { + extra = { + odds = 2, + dollars = 2, + active = false + } + }, + attributes = { + 'economy', + 'suit', + 'food', + 'chance' + }, + rarity = 1, + pos = { x = 18, y = 12 }, + atlas = "jokers_atlas", + cost = 6, + blueprint_compat = true, + eternal_compat = true, + perishable_compat = true, + paperback = { + + }, + paperback_credit = { + coder = { 'thermo' } + }, + + loc_vars = function(self, info_queue, card) + local numerator, denominator = PB_UTIL.chance_vars(card) + local suit = G.GAME.paperback.ponzu_suit or "Spades" + return { + vars = { + numerator, + denominator, + card.ability.extra.dollars, + localize( + suit, + 'suits_plural'), + colours = { G.C.SUITS[suit] } + } + } + end, + + calculate = function(self, card, context) + if context.individual and context.cardarea == G.hand and not context.end_of_round + and context.other_card:is_suit(G.GAME.paperback.ponzu_suit) then + if not context.other_card.debuff and PB_UTIL.chance(card, 'ponzu') then + card.ability.extra.active = true + return { + dollars = 2 + } + end + end + if context.end_of_round and context.main_eval and not card.ability.extra.active then + PB_UTIL.destroy_joker(card) + return { + message = localize('paperback_consumed_ex'), + colour = G.C.MULT + } + end + end +} diff --git a/localization/en-us.lua b/localization/en-us.lua index 556a1ed2..99f28d61 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2902,6 +2902,15 @@ return { "{C:inactive}(Must have room)" } }, + j_paperback_ponzu = { + name = "Ponzu", + text = { + "{V:1}#4#{} held in hand have a ", + "{C:green}#1# in #2#{} chance to give {C:money}$#3#", + "Consumed if not triggered", + "{s:0.8}suit changes at end of round" + } + }, -- Cross-Mod jokers start here j_paperback_moon_waltz = { name = "Moon Waltz", diff --git a/utilities/definitions.lua b/utilities/definitions.lua index d14d565c..29865234 100644 --- a/utilities/definitions.lua +++ b/utilities/definitions.lua @@ -145,6 +145,7 @@ SMODS.current_mod.reset_game_globals = function(run_start) G.GAME.paperback.highest_rank_this_round = nil G.GAME.paperback.weather_radio_hand = PB_UTIL.get_random_visible_hand('weather_radio') G.GAME.paperback.joke_master_hand = PB_UTIL.get_random_visible_hand('joke_master') + G.GAME.paperback.ponzu_suit = PB_UTIL.choose_new_item(G.GAME.paperback.ponzu_suit or nil, PB_UTIL.base_suits, 'ponzu') -- Shopkeep local shopkeeps = SMODS.find_card('j_paperback_shopkeep') if #shopkeeps > 0 then diff --git a/utilities/definitions/misc.lua b/utilities/definitions/misc.lua index 0de04b1a..0bdad90d 100644 --- a/utilities/definitions/misc.lua +++ b/utilities/definitions/misc.lua @@ -121,6 +121,7 @@ PB_UTIL.ENABLED_JOKERS = { 'grenadine', 'blue_curacao', 'stout', + 'ponzu', "pear", "teapot", "sake_cup", diff --git a/utilities/misc_functions.lua b/utilities/misc_functions.lua index 391249e0..5e813514 100644 --- a/utilities/misc_functions.lua +++ b/utilities/misc_functions.lua @@ -1434,3 +1434,15 @@ function PB_UTIL.refresh_shop_cost() end })) end + +--- Choose a new item from a list +--- @param current_item (string|integer|nil) +--- @param list (table) +--- @param seed (string) +--- @return (string) +function PB_UTIL.choose_new_item(current_item, list, seed) + if current_item then + list[current_item] = nil + end + return pseudorandom_element(list, seed) +end From 75f2f50c58c32f75ed2ba6800987dda7ed62a36c Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Mon, 13 Jul 2026 21:24:51 -0700 Subject: [PATCH 7/9] Consumed --- localization/en-us.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/en-us.lua b/localization/en-us.lua index 99f28d61..687e4b2e 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -2907,7 +2907,7 @@ return { text = { "{V:1}#4#{} held in hand have a ", "{C:green}#1# in #2#{} chance to give {C:money}$#3#", - "Consumed if not triggered", + "{C:red,E:1}Consumed{} if not triggered", "{s:0.8}suit changes at end of round" } }, From 1df6f92e6cf85c3882fab4ed4f7d0f753449905e Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Mon, 13 Jul 2026 23:10:29 -0700 Subject: [PATCH 8/9] Change `choose_new_item()` to work --- utilities/misc_functions.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utilities/misc_functions.lua b/utilities/misc_functions.lua index 5e813514..2b30b564 100644 --- a/utilities/misc_functions.lua +++ b/utilities/misc_functions.lua @@ -1436,13 +1436,14 @@ function PB_UTIL.refresh_shop_cost() end --- Choose a new item from a list ---- @param current_item (string|integer|nil) +--- @param current_item (string|nil) --- @param list (table) --- @param seed (string) --- @return (string) function PB_UTIL.choose_new_item(current_item, list, seed) - if current_item then - list[current_item] = nil + local new_list = {} + for _, item in ipairs(list) do + table.insert(new_list, (item ~= current_item or nil)) end - return pseudorandom_element(list, seed) + return pseudorandom_element(new_list, seed) end From c3763dd98b8ce3928b2e13e18291c4777b82068b Mon Sep 17 00:00:00 2001 From: Thermo-Dyn Date: Mon, 13 Jul 2026 23:33:02 -0700 Subject: [PATCH 9/9] :again: --- utilities/misc_functions.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utilities/misc_functions.lua b/utilities/misc_functions.lua index 2b30b564..5ec84539 100644 --- a/utilities/misc_functions.lua +++ b/utilities/misc_functions.lua @@ -1443,7 +1443,9 @@ end function PB_UTIL.choose_new_item(current_item, list, seed) local new_list = {} for _, item in ipairs(list) do - table.insert(new_list, (item ~= current_item or nil)) + if item ~= current_item then + table.insert(new_list, item) + end end return pseudorandom_element(new_list, seed) end