From 1869e60d918d8f8eb83ea8141c5144a601431a3a Mon Sep 17 00:00:00 2001 From: Emik Date: Thu, 19 Mar 2026 01:34:19 +0100 Subject: [PATCH] Add new joker --- src/joker.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/joker.lua b/src/joker.lua index b569d19..a2eab2c 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -572,6 +572,36 @@ joker { end, } +joker { + key = "suitable", + pronouns = "she_they", + cost = 4, + rarity = 2, + eternal_compat = true, + blueprint_compat = false, + perishable_compat = true, + loc_vars = function(_, _) + local suit = (G.GAME.current_round.Roland_suitable or {}).suit or "Spades" + return {vars = {localize(suit, "suits_singular"), colours = {G.C.SUITS[suit]}}} + end, +} + +function SMODS.current_mod.reset_game_globals() + local suitable = {suit = "Spades"} + G.GAME.current_round.Roland_suitable = suitable + local suits = f(G.playing_cards):where(SMODS.has_no_suit, false):table() + local card = pseudorandom_element(suits, "Roland_suitable" .. G.GAME.round_resets.ante) + suitable.suit = card and card.base.suit or suitable.suit +end + +local orig_has_any_suit = SMODS.has_any_suit + +function SMODS.has_any_suit(card, ...) + return next(SMODS.find_card "j_Roland_suitable") and + card.base.suit == G.GAME.current_round.Roland_suitable.suit or + orig_has_any_suit(card, ...) +end + joker { key = "misfortune", pronouns = "she_they",