Interleave cards held in hand effects
This commit is contained in:
parent
f2e1ea7046
commit
926175105e
1 changed files with 35 additions and 3 deletions
38
lovely.toml
38
lovely.toml
|
|
@ -40,14 +40,34 @@ payload = '''if Jane and G.ARGS.score_intensity.required_score ~= 0 then
|
|||
end'''
|
||||
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.pattern]
|
||||
target = "functions/state_events.lua"
|
||||
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
|
||||
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, {
|
||||
|
|
@ -69,7 +89,19 @@ match_indent = true
|
|||
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})"
|
||||
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
|
||||
|
||||
[[patches]]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue