Skip to content

Commit b027e86

Browse files
committed
universum chipmult api stuff
1 parent 27efd76 commit b027e86

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

lovely/universum.toml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,24 @@ version = "1.0.0"
33
dump_lua = true
44
priority = -1
55

6-
# Level up modifier
76
[[patches]]
87
[patches.pattern]
9-
target = "functions/common_events.lua"
10-
pattern = "amount = amount or 1"
11-
position = "after"
12-
payload = "if not next(find_joker('cry-Universum')) then"
13-
match_indent = true
14-
15-
16-
[[patches]]
17-
[patches.pattern]
18-
target = "functions/common_events.lua"
19-
pattern = "G.GAME.hands[hand].mult = math.max(G.GAME.hands[hand].s_mult + G.GAME.hands[hand].l_mult*(G.GAME.hands[hand].level - 1), 1)"
20-
position = "at"
21-
payload = "G.GAME.hands[hand].mult = math.max(G.GAME.hands[hand].mult + G.GAME.hands[hand].l_mult*amount, 1)"
22-
match_indent = true
23-
24-
25-
[[patches]]
26-
[patches.pattern]
27-
target = "functions/common_events.lua"
28-
pattern = "G.GAME.hands[hand].chips = math.max(G.GAME.hands[hand].s_chips + G.GAME.hands[hand].l_chips*(G.GAME.hands[hand].level - 1), 0)"
8+
target = '''=[SMODS _ "src/game_object.lua"]'''
9+
pattern = '''
10+
hand[self.key] = math.max(hand['s_'..self.key] + hand['l_'..self.key]*(hand.level - 1), 0)
11+
'''
2912
position = "at"
3013
payload = '''
31-
G.GAME.hands[hand].chips = math.max(G.GAME.hands[hand].chips + G.GAME.hands[hand].l_chips*amount, 1)
14+
if not next(find_joker('cry-Universum')) then
15+
hand[self.key] = math.max(hand['s_'..self.key] + hand['l_'..self.key]*(hand.level - 1), 0)
3216
else
3317
universum_mod = 1
3418
local effects = {}
3519
SMODS.calculate_context({cry_universum = true}, effects)
3620
for i = 1, #effects do
3721
universum_mod = universum_mod * (effects[i] and effects[i].jokers and effects[i].jokers.mod or 1)
3822
end
39-
G.GAME.hands[hand].level = math.max(0, G.GAME.hands[hand].level + amount)
40-
G.GAME.hands[hand].mult = G.GAME.hands[hand].mult * (universum_mod)^amount
41-
G.GAME.hands[hand].chips = G.GAME.hands[hand].chips * (universum_mod)^amount
23+
hand[self.key] = hand[self.key]* (universum_mod)^amount
4224
end
4325
'''
4426
match_indent = true

0 commit comments

Comments
 (0)