Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion lovely/better_calc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2000,4 +2000,34 @@ if ret then
ret.colour = G.C.RED
return ret
end
'''
'''

# Add modify_final_cashout
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''
dollars = dollars + G.GAME.interest_amount*math.min(math.floor(G.GAME.dollars/5), G.GAME.interest_cap/5)
end
'''
position = "after"
payload = '''

for _, area in ipairs(SMODS.get_card_areas('jokers')) do
for _, _card in ipairs(area.cards) do
local obj = _card.config.center
if obj.modify_final_cashout and type(obj.modify_final_cashout) == 'function' then
local ret = obj:modify_final_cashout(_card, dollars)

-- TARGET: modify_final_cashout per card
if ret then
add_round_eval_row({dollars = ret, bonus = true, name='joker'..i, pitch = pitch, card = _card})
i = i+1
pitch = pitch + 0.06
dollars = dollars + ret
end
end
end
end
'''
match_indent = false