From 8dd12284f775b873cc31c31912a3e94d0e205b26 Mon Sep 17 00:00:00 2001 From: Emik Date: Sun, 24 May 2026 16:00:46 +0200 Subject: [PATCH] Handle missing joker --- manifest.json | 2 +- src/challenge.lua | 29 +++++++---------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/manifest.json b/manifest.json index 3d2f6fb..2a19f0a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "author": [ "Emik" ], - "version": "2.6.4", + "version": "2.6.5", "badge_colour": "8BE9FD", "main_file": "src/main.lua", "badge_text_colour": "44475A", diff --git a/src/challenge.lua b/src/challenge.lua index 4f798c8..b5c8d8c 100644 --- a/src/challenge.lua +++ b/src/challenge.lua @@ -30,10 +30,6 @@ local function is_center_banned_from_pastry(v) return arcana_boosters[v.key] or pastries_targets[v.set] and is_banned_from_pastry(v) end -local function is_joker(v) - return v.set == "Joker" and not ({j_joker = true, j_Roland_msjoker = true})[v.key] -end - local function is_showdown_except(key) ---@param v SMODS.Blind ---@param k string @@ -49,8 +45,8 @@ local function is_vanilla(v) end) end -local jokerful, vanillas, pastries, amber, cerulean, crimson, verdant, violet, final -= bans(), bans(), bans(), bans(), bans(), bans(), bans(), bans(), bans() +local vanillas, pastries, amber, cerulean, crimson, verdant, violet, final += bans(), bans(), bans(), bans(), bans(), bans(), bans(), bans() SMODS.Challenge { key = "Go", @@ -75,7 +71,7 @@ SMODS.Challenge { end, } -SMODS.Challenge { +local spin_to_win = SMODS.Challenge { key = "Spin_To_Win", jokers = f(4):map(f().const {id = "j_Bakery_Spinner", eternal = true}):table(), restrictions = {banned_cards = {{id = "c_Roland_coolheaded"}}}, @@ -94,13 +90,6 @@ SMODS.Challenge { rotation = 0, } -SMODS.Challenge { - key = "Jokerful", - rules = {custom = {{id = "Roland_Jokerful"}}}, - restrictions = jokerful, - pronouns = "he_him", -} - SMODS.Challenge { key = "Ornate", rules = {custom = {{id = "Roland_Ornate"}}}, @@ -115,13 +104,6 @@ SMODS.Challenge { pronouns = "she_them", } -SMODS.Challenge { - key = "Pastries", - rules = {custom = {{id = "Roland_Pastries"}}}, - restrictions = pastries, - pronouns = "she_them", -} - local finalizers = { SMODS.Challenge { key = "Eternally_Amber", @@ -293,8 +275,11 @@ SMODS.Challenge { } q(function() + if not G.P_CENTERS.j_Bakery_Spinner then + spin_to_win.jokers = nil + end + f { - {G.P_CENTERS, is_joker, jokerful.banned_cards}, {G.P_TAGS, is_vanilla, vanillas.banned_tags}, {G.P_BLINDS, is_vanilla, vanillas.banned_other}, {G.P_CENTERS, is_vanilla, vanillas.banned_cards},