Skip to content

Commit f8c4295

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent 3246646 commit f8c4295

File tree

2 files changed

+49
-31
lines changed

2 files changed

+49
-31
lines changed

items/misc_joker.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10915,10 +10915,10 @@ local broken_sync = {
1091510915
calculate = function(self, card, context)
1091610916
if context.joker_main or context.forcetrigger then
1091710917
return {
10918-
cry_broken_swap = card.ability.extra.portion
10918+
cry_broken_swap = card.ability.extra.portion,
1091910919
}
1092010920
end
10921-
end
10921+
end,
1092210922
}
1092310923

1092410924
local miscitems = {

lib/overrides.lua

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,12 +2220,14 @@ end
22202220
local scie = SMODS.calculate_individual_effect
22212221
function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition, ...)
22222222
local ret = scie(effect, scored_card, key, amount, from_edition, ...)
2223-
if ret then
2224-
return ret
2225-
end
2223+
if ret then
2224+
return ret
2225+
end
22262226

2227-
if key == 'cry_broken_swap' and amount > 0 then
2228-
if effect.card and effect.card ~= scored_card then juice_card(effect.card) end
2227+
if key == "cry_broken_swap" and amount > 0 then
2228+
if effect.card and effect.card ~= scored_card then
2229+
juice_card(effect.card)
2230+
end
22292231
-- only need math.min due to amount being required to be greater than 0
22302232
amount = math.min(amount, 1)
22312233

@@ -2235,58 +2237,74 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro
22352237
local mult_mod = mult.current * amount
22362238

22372239
chips:modify(mult_mod - chip_mod)
2238-
mult:modify(chip_mod - mult_mod)
2240+
mult:modify(chip_mod - mult_mod)
22392241

22402242
if not Cryptid.safe_get(Talisman, "config_file", "disable_anims") then
22412243
G.E_MANAGER:add_event(Event({
2242-
func = (function()
2244+
func = function()
22432245
-- scored_card:juice_up()
2244-
local pitch_mod = pseudorandom("cry_broken_sync")*0.05 + 0.85
2246+
local pitch_mod = pseudorandom("cry_broken_sync") * 0.05 + 0.85
22452247
-- wolf fifth as opposed to plasma deck's just-intonated fifth
22462248
-- yes i'm putting music theory nerd stuff in here no you cannot stop me
2247-
play_sound('gong', pitch_mod, 0.3)
2248-
play_sound('gong', pitch_mod*1.4814814, 0.2)
2249-
play_sound('tarot1', 1.5)
2249+
play_sound("gong", pitch_mod, 0.3)
2250+
play_sound("gong", pitch_mod * 1.4814814, 0.2)
2251+
play_sound("tarot1", 1.5)
22502252
ease_colour(G.C.UI_CHIPS, mix_colours(G.C.BLUE, G.C.RED, amount))
22512253
ease_colour(G.C.UI_MULT, mix_colours(G.C.RED, G.C.BLUE, amount))
22522254
G.E_MANAGER:add_event(Event({
2253-
trigger = 'after',
2255+
trigger = "after",
22542256
blockable = false,
22552257
blocking = false,
2256-
delay = 0.8,
2257-
func = (function()
2258-
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.8)
2259-
ease_colour(G.C.UI_MULT, G.C.RED, 0.8)
2258+
delay = 0.8,
2259+
func = function()
2260+
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.8)
2261+
ease_colour(G.C.UI_MULT, G.C.RED, 0.8)
22602262
return true
2261-
end)
2263+
end,
22622264
}))
22632265
G.E_MANAGER:add_event(Event({
2264-
trigger = 'after',
2266+
trigger = "after",
22652267
blockable = false,
22662268
blocking = false,
22672269
no_delete = true,
2268-
delay = 1.3,
2269-
func = (function()
2270-
G.C.UI_CHIPS[1], G.C.UI_CHIPS[2], G.C.UI_CHIPS[3], G.C.UI_CHIPS[4] = G.C.BLUE[1], G.C.BLUE[2], G.C.BLUE[3], G.C.BLUE[4]
2271-
G.C.UI_MULT[1], G.C.UI_MULT[2], G.C.UI_MULT[3], G.C.UI_MULT[4] = G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4]
2270+
delay = 1.3,
2271+
func = function()
2272+
G.C.UI_CHIPS[1], G.C.UI_CHIPS[2], G.C.UI_CHIPS[3], G.C.UI_CHIPS[4] =
2273+
G.C.BLUE[1], G.C.BLUE[2], G.C.BLUE[3], G.C.BLUE[4]
2274+
G.C.UI_MULT[1], G.C.UI_MULT[2], G.C.UI_MULT[3], G.C.UI_MULT[4] =
2275+
G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4]
22722276
return true
2273-
end)
2277+
end,
22742278
}))
22752279
return true
2276-
end)
2280+
end,
22772281
}))
22782282
if not effect.remove_default_message then
22792283
if effect.balance_message then
2280-
card_eval_status_text(effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, effect.balance_message)
2284+
card_eval_status_text(
2285+
effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus,
2286+
"extra",
2287+
nil,
2288+
percent,
2289+
nil,
2290+
effect.balance_message
2291+
)
22812292
else
2282-
card_eval_status_text(effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, {message = localize('cry_balanced_q'), colour = {0.8, 0.45, 0.85, 1}})
2293+
card_eval_status_text(
2294+
effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus,
2295+
"extra",
2296+
nil,
2297+
percent,
2298+
nil,
2299+
{ message = localize("cry_balanced_q"), colour = { 0.8, 0.45, 0.85, 1 } }
2300+
)
22832301
end
22842302
end
22852303
delay(0.6)
22862304
end
22872305

2288-
return true
2289-
end
2306+
return true
2307+
end
22902308
end
22912309

2292-
SMODS.scoring_parameter_keys[#SMODS.scoring_parameter_keys+1] = "cry_broken_swap"
2310+
SMODS.scoring_parameter_keys[#SMODS.scoring_parameter_keys + 1] = "cry_broken_swap"

0 commit comments

Comments
 (0)