From 8f5d6b830e55625805a9293b0e748467347eb73f Mon Sep 17 00:00:00 2001 From: Emik Date: Wed, 26 Mar 2025 15:06:59 +0100 Subject: [PATCH] Implement missing logic from The Saint --- lovely.toml | 11 +++++++++-- src/slugcat.lua | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lovely.toml b/lovely.toml index 41addbf..7986c8a 100644 --- a/lovely.toml +++ b/lovely.toml @@ -3,6 +3,14 @@ version = "1.0.0" dump_lua = true priority = 2147483647 +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = "if v ~= chosen_joker then" +position = "at" +payload = "if v ~= chosen_joker and not next(SMODS.find_card('j_jane_saint')) then" +match_indent = true + [[patches]] [patches.pattern] target = "globals.lua" @@ -20,7 +28,6 @@ pattern = "if v.name == 'Black Hole' or v.name == 'The Soul' or v.hidden then" position = "at" payload = "if Jane.hidden(v) then" match_indent = true -overwrite = false [[patches]] [patches.pattern] @@ -47,7 +54,7 @@ match_indent = true target = "functions/state_events.lua" pattern = "for _, v in ipairs(SMODS.get_card_areas('playing_cards')) do" position = "after" -payload = '''if v == G.hand and not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card('j_jane_survivor')) then +payload = '''if v == G.hand and not (G.GAME.blind and G.GAME.blind.name == "The Card" and not G.GAME.blind.disabled) and next(SMODS.find_card("j_jane_survivor")) then for _, v in ipairs(G.hand.cards) do local area = {cards = {v}} SMODS.calculate_main_scoring({cardarea = area, full_hand = area.cards, scoring_hand = area.cards, scoring_name = text, poker_hands = poker_hands}, area.cards) diff --git a/src/slugcat.lua b/src/slugcat.lua index 4dbd826..dab84af 100644 --- a/src/slugcat.lua +++ b/src/slugcat.lua @@ -441,7 +441,7 @@ SMODS.Joker { return {vars = { attuned and " (Attuned)" or "", - Cryptid and "Gateway" or "Ankh", + Cryptid and "Ankh and Gateway" or "Ankh", attuned and "" or "Attune ", attuned and "" or "after using ", attuned and (Cryptid and "^^" or "^") .. attunement or max_karma,