Skip to content

Commit 210e3d9

Browse files
committed
fix anaptyxi
1 parent e5fd548 commit 210e3d9

File tree

3 files changed

+46
-13
lines changed

3 files changed

+46
-13
lines changed

items/inversions/reverse_spectrals.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,16 +1750,6 @@ local purity = {
17501750
}
17511751
end
17521752
}
1753-
local calculate_joker = Card.calculate_joker
1754-
function Card:calculate_joker(context)
1755-
if self.ability.entr_pure then
1756-
local abil = copy_table(self.ability)
1757-
local c = calculate_joker(self, context)
1758-
self.ability = abil
1759-
return c
1760-
end
1761-
return calculate_joker(self, context)
1762-
end
17631753

17641754
local misprintize = Cryptid.misprintize
17651755
function Cryptid.misprintize(card, ...)

items/jokers/entropic_jokers.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ local anaptyxi = {
238238
rarity = "entr_entropic",
239239
cost = 150,
240240

241-
name = "cry-Scalae",
241+
name = "entr-Anaptyxi",
242242
blueprint_compat = true,
243243
eternal_compat = true,
244244
pos = { x = 0, y = 6 },
@@ -266,16 +266,18 @@ local anaptyxi = {
266266
}
267267
end,
268268
calculate = function(self, card, context)
269-
if (context.end_of_round and not context.individual and not context.repetition and not context.blueprint) or context.forcetrigger then
269+
if (context.end_of_round and not context.individual and not context.repetition and not context.blueprint)
270+
or context.forcetrigger then
270271
card.ability.extra.scale = card.ability.extra.scale + card.ability.extra.scale_mod
271272
return {
272273
message = localize("k_upgrade_ex"),
273274
colour = G.C.DARK_EDITION,
274275
}
275276
end
277+
return nil, nil
276278
end,
277279
cry_scale_mod = function(self, card, joker, orig_scale_scale, true_base, orig_scale_base, new_scale_base)
278-
if joker.config.center.key == "j_entr_anaptyxi" then return end
280+
if joker.config.center.key == "j_entr_anaptyxi" or joker.config.center.name == "cry-Scalae" then return end
279281
local new_scale = lenient_bignum(
280282
to_big(true_base)
281283
* (

lovely/core.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,3 +1232,44 @@ payload = '''
12321232
if not G.GAME.hands[text] then text = "cry_None" end
12331233
'''
12341234
match_indent = true
1235+
1236+
[[patches]]
1237+
[patches.pattern]
1238+
target = '''=[SMODS Cryptid "lib/calculate.lua"]'''
1239+
pattern = '''
1240+
local active_side = self
1241+
'''
1242+
position = "after"
1243+
payload = '''
1244+
local ability
1245+
if self.ability.entr_pure then
1246+
ability = copy_table(card.ability)
1247+
end
1248+
'''
1249+
match_indent = true
1250+
1251+
[[patches]]
1252+
[patches.pattern]
1253+
target = '''=[SMODS Cryptid "lib/calculate.lua"]'''
1254+
pattern = '''
1255+
if next(find_joker("cry-Scalae")) or next(find_joker("cry-Double Scale")) then
1256+
active_side:cry_double_scale_calc(orig_ability, in_context_scaling)
1257+
end
1258+
'''
1259+
position = "after"
1260+
payload = '''
1261+
if self.ability.entr_pure then self.ability = ability end
1262+
'''
1263+
match_indent = true
1264+
1265+
[[patches]]
1266+
[patches.pattern]
1267+
target = '''=[SMODS Cryptid "lib/calculate.lua"]'''
1268+
pattern = '''
1269+
if next(find_joker("cry-Scalae")) or next(find_joker("cry-Double Scale")) then
1270+
'''
1271+
position = "at"
1272+
payload = '''
1273+
if next(find_joker("cry-Scalae")) or next(find_joker("cry-Double Scale")) or next(find_joker("entr-Anaptyxi")) then
1274+
'''
1275+
match_indent = true

0 commit comments

Comments
 (0)