From 7e674bca9c78e1aa6fddef2ffe48b51ed5a7b12c Mon Sep 17 00:00:00 2001 From: Emik Date: Thu, 6 Aug 2026 21:18:13 +0200 Subject: [PATCH] Fix Junk rarity --- manifest.json | 2 +- src/slugcat.lua | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index ea1e4c8..bd6f044 100644 --- a/manifest.json +++ b/manifest.json @@ -18,5 +18,5 @@ "conflicts": [ "Jen" ], - "version": "1.11.24" + "version": "1.11.25" } \ No newline at end of file diff --git a/src/slugcat.lua b/src/slugcat.lua index 818cd7a..904bac1 100644 --- a/src/slugcat.lua +++ b/src/slugcat.lua @@ -63,10 +63,25 @@ local exotic = Jane.cry and "cry_exotic" or 4 SMODS.Rarity { key = "junk", - default_weight = 0.05, + default_weight = 0, pools = {Joker = true}, loc_txt = {name = "Junk"}, badge_colour = G.C.JOKER_GREY, + get_weight = function() + local rarity = 0.05 + + if next(SMODS.find_card("j_jane_rot")) then + return rarity + end + + for _, v in pairs(SMODS.find_card("j_jane_honey")) do + if tonumber(v.ability.extra.level) == #Jane.rarity_ids - 1 then + return rarity + end + end + + return 0 + end, } local monk_limit = 25 @@ -803,18 +818,10 @@ SMODS.Joker { pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, blueprint_compat = true, - cost = 1, + cost = 2, rarity = "jane_junk", - in_pool = function(_, _) - if next(SMODS.find_card("j_jane_rot")) then - return true, {allow_duplicates = true} - end - - for _, v in pairs(SMODS.find_card("j_jane_honey")) do - if tonumber(v.ability.extra.level) == #Jane.rarity_ids - 1 then - return true, {allow_duplicates = true} - end - end + in_pool = function() + return true, {allow_duplicates = true} end, calculate = Jane.cry and function(_, card, context) local function has_room()