Skip to content

Commit fdf5644

Browse files
authored
Merge pull request #832 from InvalidOS/main
cryptlib parity + fix broken sync catalyst
2 parents f24501f + e4ddb3b commit fdf5644

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

items/misc_joker.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10931,7 +10931,7 @@ local broken_sync = {
1093110931
calculate = function(self, card, context)
1093210932
if context.joker_main or context.forcetrigger then
1093310933
return {
10934-
cry_broken_swap = to_number(Cryptid.clamp(card.ability.extra.portion * 100, 0, 100)),
10934+
cry_broken_swap = to_number(Cryptid.clamp(card.ability.extra.portion, 0, 1)),
1093510935
}
1093610936
end
1093710937
end,

lib/overrides.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
21872187
return ret
21882188
end
21892189

2190-
if key == "cry_broken_swap" and amount > 0 then
2190+
if key == "cry_broken_swap" or key == "cry_partial_swap" and amount > 0 then
21912191
if effect.card and effect.card ~= scored_card then
21922192
juice_card(effect.card)
21932193
end
@@ -2202,19 +2202,17 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
22022202
chips:modify(mult_mod - chip_mod)
22032203
mult:modify(chip_mod - mult_mod)
22042204

2205-
if not Cryptid.safe_get(Talisman, "config_file", "disable_anims") then
2206-
G.E_MANAGER:add_event(Event({
2205+
if key == "cry_broken_swap" and not Cryptid.safe_get(Talisman, "config_file", "disable_anims") then
2206+
G.E_MANAGER:add_event(Event{
22072207
func = function()
22082208
-- scored_card:juice_up()
22092209
local pitch_mod = pseudorandom("cry_broken_sync") * 0.05 + 0.85
2210-
-- wolf fifth as opposed to plasma deck's just-intonated fifth
2211-
-- yes i'm putting music theory nerd stuff in here no you cannot stop me
22122210
play_sound("gong", pitch_mod, 0.3)
22132211
play_sound("gong", pitch_mod * 1.4814814, 0.2)
22142212
play_sound("tarot1", 1.5)
22152213
ease_colour(G.C.UI_CHIPS, mix_colours(G.C.BLUE, G.C.RED, amount))
22162214
ease_colour(G.C.UI_MULT, mix_colours(G.C.RED, G.C.BLUE, amount))
2217-
G.E_MANAGER:add_event(Event({
2215+
G.E_MANAGER:add_event(Event{
22182216
trigger = "after",
22192217
blockable = false,
22202218
blocking = false,
@@ -2224,8 +2222,8 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
22242222
ease_colour(G.C.UI_MULT, G.C.RED, 0.8)
22252223
return true
22262224
end,
2227-
}))
2228-
G.E_MANAGER:add_event(Event({
2225+
})
2226+
G.E_MANAGER:add_event(Event{
22292227
trigger = "after",
22302228
blockable = false,
22312229
blocking = false,
@@ -2238,10 +2236,10 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
22382236
G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4]
22392237
return true
22402238
end,
2241-
}))
2239+
})
22422240
return true
22432241
end,
2244-
}))
2242+
})
22452243
if not effect.remove_default_message then
22462244
if effect.balance_message then
22472245
card_eval_status_text(
@@ -2270,7 +2268,9 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
22702268
end
22712269
end
22722270

2273-
SMODS.scoring_parameter_keys[#SMODS.scoring_parameter_keys + 1] = "cry_broken_swap"
2271+
for _, v in ipairs{ "cry_broken_swap", "cry_partial_swap" } do
2272+
table.insert(SMODS.scoring_parameter_keys, v)
2273+
end
22742274

22752275
local smods_calculate_round_score_stuff = SMODS.calculate_round_score
22762276
function SMODS.calculate_round_score(flames)

0 commit comments

Comments
 (0)