Interleave cards held in hand effects

This commit is contained in:
Emik 2025-03-24 16:19:56 +01:00
parent f2e1ea7046
commit 926175105e
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D

View file

@ -40,14 +40,34 @@ payload = '''if Jane and G.ARGS.score_intensity.required_score ~= 0 then
end''' end'''
match_indent = true match_indent = true
[[patches]]
[patches.pattern]
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
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)
SMODS.calculate_main_scoring({cardarea = area, full_hand = area.cards, scoring_hand = area.cards, scoring_name = text, poker_hands = poker_hands}, nil)
end
else'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "SMODS.calculate_main_scoring({cardarea = v, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands}, v == G.play and scoring_hand or nil)"
position = "after"
payload = "end"
match_indent = true
[[patches]] [[patches]]
[patches.pattern] [patches.pattern]
target = "functions/state_events.lua" target = "functions/state_events.lua"
pattern = "-- context.final_scoring_step calculations" pattern = "-- context.final_scoring_step calculations"
position = "before" 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 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
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 _, area in ipairs(SMODS.get_card_areas('jokers')) do
for _, _card in ipairs(area.cards) do for _, _card in ipairs(area.cards) do
local eval = eval_card(_card, { local eval = eval_card(_card, {
@ -69,7 +89,19 @@ match_indent = true
target = "functions/state_events.lua" 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})" 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" 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})" 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
SMODS.calculate_context({full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, final_scoring_step = true})
end'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "-- context.remove_playing_cards 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
SMODS.calculate_destroying_cards({ full_hand = G.hand.cards, scoring_hand = G.hand.cards, scoring_name = text, poker_hands = poker_hands, cardarea = G.hand }, cards_destroyed, G.hand)
end'''
match_indent = true match_indent = true
[[patches]] [[patches]]