Skip to content

Commit

Permalink
Add jokers support to Back config
Browse files Browse the repository at this point in the history
  • Loading branch information
Eremel committed Feb 7, 2025
1 parent 58a9d92 commit 877ae18
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions lovely/back.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,29 @@ target = 'back.lua'
pattern = "key = back_config\\.key"
position = 'at'
payload = "key = key_override or back_config.key"

# Back:apply_to_run() - add jokers support to config
[[patches]]
[patches.pattern]
target = 'back.lua'
match_indent = true
position = 'before'
pattern = '''
if self.effect.config.voucher then
'''
payload = '''
if self.effect.config.jokers then
delay(0.4)
G.E_MANAGER:add_event(Event({
func = function()
for k, v in ipairs(self.effect.config.jokers) do
local card = create_card('Joker', G.jokers, nil, nil, nil, nil, v, 'deck')
card:add_to_deck()
G.jokers:emplace(card)
card:start_materialize()
end
return true
end
}))
end
'''
2 changes: 1 addition & 1 deletion version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return "1.0.0~ALPHA-1406c-STEAMODDED"
return "1.0.0~ALPHA-1407a-STEAMODDED"

0 comments on commit 877ae18

Please sign in to comment.