Skip to content

Commit 2adc489

Browse files
authored
custom observatory stuff part 2
1 parent 192f3a5 commit 2adc489

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

lovely/planet.toml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,23 @@ elseif v.config.hand_types then
2424
end
2525
if not softlocked then
2626
'''
27-
match_indent = true
27+
match_indent = true
28+
29+
# context.cry_observatory
30+
[[patches]]
31+
[patches.pattern]
32+
target = '=[SMODS _ "src/game_object.lua"]'
33+
pattern = '''if
34+
context.other_consumeable and'''
35+
position = "at"
36+
payload = '''
37+
if context.other_consumeable then
38+
local ctx = SMODS.shallow_copy(context)
39+
ctx.cry_observatory = card
40+
ctx.other_consumeable = nil
41+
local ret = context.other_consumeable:calculate_joker(ctx)
42+
if ret then SMODS.calculate_effect(ret, context.other_consumeable) end
43+
elseif context.other_consumeable and
44+
not ret and
45+
'''
46+
match_indent = true

0 commit comments

Comments
 (0)