Rewrite survivor joker

This commit is contained in:
Emik 2025-03-24 15:35:26 +01:00
parent 1a6d181cd0
commit f2e1ea7046
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
2 changed files with 26 additions and 8 deletions

View file

@ -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)
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"

View file

@ -235,7 +235,7 @@ SMODS.Joker {
end
}
local operator = Cryptid and "^" or "*"
local operator = Cryptid and "^" or "x"
SMODS.Joker {
key = "betmma",