Rewrite survivor joker
This commit is contained in:
parent
1a6d181cd0
commit
f2e1ea7046
2 changed files with 26 additions and 8 deletions
28
lovely.toml
28
lovely.toml
|
|
@ -43,17 +43,35 @@ match_indent = true
|
||||||
[[patches]]
|
[[patches]]
|
||||||
[patches.pattern]
|
[patches.pattern]
|
||||||
target = "functions/state_events.lua"
|
target = "functions/state_events.lua"
|
||||||
pattern = "scoring_hand = final_scoring_hand"
|
pattern = "-- context.final_scoring_step calculations"
|
||||||
position = "after"
|
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
|
||||||
for _, v in ipairs(G.hand.cards) do
|
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)
|
||||||
if not v:gc().unhighlightable then
|
|
||||||
table.insert(scoring_hand, v)
|
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
|
end
|
||||||
end'''
|
end'''
|
||||||
match_indent = true
|
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]]
|
||||||
[patches.regex]
|
[patches.regex]
|
||||||
target = "functions/state_events.lua"
|
target = "functions/state_events.lua"
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ SMODS.Joker {
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
local operator = Cryptid and "^" or "*"
|
local operator = Cryptid and "^" or "x"
|
||||||
|
|
||||||
SMODS.Joker {
|
SMODS.Joker {
|
||||||
key = "betmma",
|
key = "betmma",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue