diff --git a/lovely.toml b/lovely.toml index 79cefeb..dbcde70 100644 --- a/lovely.toml +++ b/lovely.toml @@ -43,17 +43,35 @@ match_indent = true [[patches]] [patches.pattern] target = "functions/state_events.lua" -pattern = "scoring_hand = final_scoring_hand" -position = "after" +pattern = "-- context.final_scoring_step calculations" +position = "before" payload = '''if 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 - if not v:gc().unhighlightable then - table.insert(scoring_hand, v) - end - end + SMODS.calculate_main_scoring({cardarea = G.hand, full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands}, G.hand.cards) + + for _, area in ipairs(SMODS.get_card_areas('jokers')) do + for _, _card in ipairs(area.cards) do + local eval = eval_card(_card, { + cardarea = G.jokers, + full_hand = G.hand.cards, + scoring_hand = G.hand.cards, + scoring_name = text, + poker_hands = poker_hands, + edition = true, + pre_joker = true + }) + end + end end''' match_indent = true +[[patches]] +[patches.pattern] +target = "functions/state_events.lua" +pattern = "SMODS.calculate_context({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, final_scoring_step = true})" +position = "after" +payload = "SMODS.calculate_context({full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, final_scoring_step = true})" +match_indent = true + [[patches]] [patches.regex] target = "functions/state_events.lua" diff --git a/src/joker.lua b/src/joker.lua index efe34b3..f7d985b 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -235,7 +235,7 @@ SMODS.Joker { end } -local operator = Cryptid and "^" or "*" +local operator = Cryptid and "^" or "x" SMODS.Joker { key = "betmma",