Skip to content

Commit 6adff6c

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent 25c2d14 commit 6adff6c

File tree

11 files changed

+80
-60
lines changed

11 files changed

+80
-60
lines changed

items/code.lua

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,11 +1211,13 @@ local rework = {
12111211
return card.ability.set == "Joker"
12121212
end)
12131213
local jkr = cards[1]
1214-
if not jkr then return {
1215-
vars = {
1216-
"None"
1214+
if not jkr then
1215+
return {
1216+
vars = {
1217+
"None",
1218+
},
12171219
}
1218-
} end
1220+
end
12191221
local found_index = 1
12201222
if jkr.edition then
12211223
for i, v in ipairs(G.P_CENTER_POOLS.Edition) do
@@ -1230,7 +1232,7 @@ local rework = {
12301232
found_index = found_index - #G.P_CENTER_POOLS.Edition
12311233
end
12321234
local rework_edition = G.P_CENTER_POOLS.Edition[found_index].key
1233-
return { vars = {(G.localization.descriptions.Edition[rework_edition] or {}).name or "ERROR"} }
1235+
return { vars = { (G.localization.descriptions.Edition[rework_edition] or {}).name or "ERROR" } }
12341236
end,
12351237
can_use = function(self, card)
12361238
local cards = Cryptid.get_highlighted_cards({ G.jokers }, card, 1, 1, function(card)
@@ -1245,7 +1247,9 @@ local rework = {
12451247
return card.ability.set == "Joker"
12461248
end)
12471249
local jkr = cards[1]
1248-
if not jkr then return end
1250+
if not jkr then
1251+
return
1252+
end
12491253
local found_index = 1
12501254
if jkr.edition then
12511255
for i, v in ipairs(G.P_CENTER_POOLS.Edition) do
@@ -4168,7 +4172,8 @@ local ctrl_v = {
41684172
end,
41694173
can_use = function(self, card)
41704174
local cards = Cryptid.get_highlighted_cards({ G.hand, G.consumeables, G.pack_cards }, card, 1, 1, function(card)
4171-
return (card.area ~= G.pack_Cards or card.ability.set == "Default" or card.ability.set == "Enhanced") and not card.config.center.hidden
4175+
return (card.area ~= G.pack_Cards or card.ability.set == "Default" or card.ability.set == "Enhanced")
4176+
and not card.config.center.hidden
41724177
end)
41734178
return #cards == 1
41744179
end,

items/deck.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,15 @@ local wormhole = {
220220
pos = { x = 3, y = 4 },
221221
atlas = "atlasdeck",
222222
calculate = function(self, back, context)
223-
if context.end_of_round
223+
if
224+
context.end_of_round
224225
and not context.individual
225226
and not context.repetition
226-
and not context.blueprint and G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.boss then
227+
and not context.blueprint
228+
and G.GAME.blind
229+
and G.GAME.blind.config.blind
230+
and G.GAME.blind.config.blind.boss
231+
then
227232
if G.jokers.cards[1] and G.jokers.cards[1].config.center.rarity ~= "cry_exotic" then
228233
Cryptid.with_deck_effects(G.jokers.cards[1], function(card)
229234
Cryptid.upgrade_rarity(card, "cry_wormhole")

items/sleeve.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,15 @@ if CardSleeves then
118118
return { vars = {} }
119119
end,
120120
calculate = function(self, back, context)
121-
if context.end_of_round
121+
if
122+
context.end_of_round
122123
and not context.individual
123124
and not context.repetition
124-
and not context.blueprint and G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.boss then
125+
and not context.blueprint
126+
and G.GAME.blind
127+
and G.GAME.blind.config.blind
128+
and G.GAME.blind.config.blind.boss
129+
then
125130
if G.jokers.cards[1] and G.jokers.cards[1].config.center.rarity ~= "cry_exotic" then
126131
Cryptid.with_deck_effects(G.jokers.cards[1], function(card)
127132
Cryptid.upgrade_rarity(card, "cry_wormhole")

items/spectral.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ local chambered = {
833833
func = function()
834834
Overflow.set_amount(card_copy, card.ability.extra.num_copies)
835835
return true
836-
end
836+
end,
837837
}))
838838
return true
839839
end,

items/stake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ return {
302302
end,
303303
items = {
304304
stake_atlas,
305-
305+
306306
ruby,
307307
topaz,
308308
quartz,
@@ -311,6 +311,6 @@ return {
311311
ember,
312312
horizon,
313313
blossom,
314-
ascendant
314+
ascendant,
315315
},
316316
}

lib/misc.lua

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,19 +1455,27 @@ end
14551455

14561456
function Cryptid.is_in_shop(key, consumable)
14571457
local center = G.P_CENTERS[key]
1458-
if center.hidden or center.no_doe or center.no_collection then return
1459-
elseif G.GAME.banned_keys[key] or not center.unlocked then return
1458+
if center.hidden or center.no_doe or center.no_collection then
1459+
return
1460+
elseif G.GAME.banned_keys[key] or not center.unlocked then
1461+
return
14601462
elseif center.set == "Joker" then
14611463
if type(center.rarity) == "number" and center.rarity <= 3 then
14621464
return center.unlocked or nil
14631465
end
14641466
else
14651467
if consumable then
1466-
if center.set == "Tarot" then return G.GAME.tarot_rate*(G.GAME.cry_percrate.tarot/100) > 0 or nil end
1467-
if center.set == "Planet" then return G.GAME.planet_rate*(G.GAME.cry_percrate.planet/100) > 0 or nil end
1468-
if center.set == "Spectral" then return G.GAME.spectral_rate > 0 or nil end
1468+
if center.set == "Tarot" then
1469+
return G.GAME.tarot_rate * (G.GAME.cry_percrate.tarot / 100) > 0 or nil
1470+
end
1471+
if center.set == "Planet" then
1472+
return G.GAME.planet_rate * (G.GAME.cry_percrate.planet / 100) > 0 or nil
1473+
end
1474+
if center.set == "Spectral" then
1475+
return G.GAME.spectral_rate > 0 or nil
1476+
end
14691477
local num = G.GAME.cry_percrate and G.GAME.cry_percrate[center.set:lower()] or 100
1470-
local val = G.GAME[center.set:lower()..'_rate'] * ((num or 100) / 100)
1478+
local val = G.GAME[center.set:lower() .. "_rate"] * ((num or 100) / 100)
14711479
return val > 0
14721480
end
14731481
end
@@ -1478,17 +1486,19 @@ end
14781486

14791487
function Cryptid.get_equilibrium_pool()
14801488
local P_CRY_ITEMS = {}
1481-
local valid_pools = { "Joker" , "Consumeables", "Booster" }
1489+
local valid_pools = { "Joker", "Consumeables", "Booster" }
14821490
for _, id in ipairs(valid_pools) do
14831491
for k, v in pairs(G.P_CENTER_POOLS[id]) do
14841492
if not Cryptid.no(v, "doe", k) and Cryptid.is_in_shop(v.key, id == "Consumeables") then
14851493
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
14861494
end
14871495
end
14881496
end
1489-
local _pool, _pool_key = get_current_pool('Voucher', nil, nil, nil, true)
1497+
local _pool, _pool_key = get_current_pool("Voucher", nil, nil, nil, true)
14901498
for i, v in pairs(_pool) do
1491-
if v ~= "UNAVAILABLE" then P_CRY_ITEMS[#P_CRY_ITEMS+1] = v end
1499+
if v ~= "UNAVAILABLE" then
1500+
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v
1501+
end
14921502
end
14931503
for k, v in pairs(G.P_CARDS) do
14941504
if not Cryptid.no(v, "doe", k) then
@@ -1503,20 +1513,20 @@ function Cryptid.upgrade_rarity(card, seed)
15031513
"Common",
15041514
"Uncommon",
15051515
"Rare",
1506-
"Legendary"
1516+
"Legendary",
15071517
})[card.config.center.rarity] or card.config.center.rarity
15081518
if rarity ~= "cry_exotic" then
15091519
local next_rarity = rarity
15101520
for i, v in pairs(Cryptid.rarity_table) do
15111521
if v == rarity then
1512-
next_rarity = Cryptid.rarity_table[i+1] or next_rarity
1522+
next_rarity = Cryptid.rarity_table[i + 1] or next_rarity
15131523
end
15141524
end
15151525
local next_rarity = ({
15161526
Common = 1,
15171527
Uncommon = 2,
15181528
Rare = 3,
1519-
Legendary = 4
1529+
Legendary = 4,
15201530
})[next_rarity] or next_rarity
15211531
local center = pseudorandom_element(G.P_JOKER_RARITY_POOLS[next_rarity], pseudoseed(seed))
15221532
card:flip()
@@ -1527,4 +1537,4 @@ function Cryptid.upgrade_rarity(card, seed)
15271537
delay(1)
15281538
card:juice_up()
15291539
end
1530-
end
1540+
end

lib/misprintize.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function Cryptid.misprintize(card, override, force_reset, stack, grow_type, pow_
260260
end
261261
end
262262
if
263-
(not force_reset)
263+
not force_reset
264264
and (G.GAME.modifiers.cry_misprint_min or override or card.ability.set == "Joker")
265265
and not stack
266266
or not Card.no(card, "immutable", true)

lib/modifiers.lua

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,20 +456,15 @@ function Cryptid.next_voucher_stickers(booster)
456456
v["force"] = G.GAME.modifiers.cry_sticker_sheet_plus
457457
or (G.GAME.modifiers.cry_force_sticker and G.GAME.modifiers.cry_force_sticker == k)
458458
end
459-
if
460-
G.GAME.modifiers.cry_sticker_sheet_plus
461-
or G.GAME.modifiers.cry_force_sticker
462-
then
459+
if G.GAME.modifiers.cry_sticker_sheet_plus or G.GAME.modifiers.cry_force_sticker then
463460
if (G.GAME.modifiers.enable_eternals_in_shop and checks.eternal.poll > odds) or checks.eternal.force then
464461
ret.eternal = true
465462
end
466463
if
467464
(
468-
(
469-
G.GAME.modifiers.enable_perishables_in_shop
470-
and checks.eternal.poll > odds - rate
471-
and checks.eternal.poll <= odds
472-
)
465+
G.GAME.modifiers.enable_perishables_in_shop
466+
and checks.eternal.poll > odds - rate
467+
and checks.eternal.poll <= odds
473468
) or checks.perishable.force
474469
then
475470
ret.perishable = true

lib/overrides.lua

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ function get_current_pool(_type, _rarity, _legendary, _append, override_equilibr
3535
pool[i] = "tag_cry_triple"
3636
end
3737
-- Tag Printer: Turn Double tags and Triple Tags into Quadruple Tags
38-
if (pool[i] == "tag_double" or pool[i] == "tag_cry_triple") and G.GAME.used_vouchers.v_cry_clone_machine then
38+
if
39+
(pool[i] == "tag_double" or pool[i] == "tag_cry_triple") and G.GAME.used_vouchers.v_cry_clone_machine
40+
then
3941
pool[i] = "tag_cry_quadruple"
4042
end
4143
end
@@ -915,9 +917,7 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable
915917
card:set_eternal(true)
916918
end
917919
if G.GAME.modifiers.enable_perishables_in_shop then
918-
if
919-
((eternal_perishable_poll > 0.4) and (eternal_perishable_poll <= 0.7))
920-
then
920+
if (eternal_perishable_poll > 0.4) and (eternal_perishable_poll <= 0.7) then
921921
card:set_perishable(true)
922922
end
923923
end
@@ -2007,11 +2007,12 @@ function get_straight(hand, min_length, skip, wrap)
20072007
return get_straight_ref(hand, min_length + stones, skip, wrap)
20082008
end
20092009

2010-
20112010
local poll_editionref = poll_edition
20122011
function poll_edition(_key, _mod, _no_neg, _guaranteed)
20132012
if not _guaranteed and G.GAME.modifiers.cry_rarer_modifications then
2014-
if pseudorandom("cry_rarer_modifications") < G.GAME.modifiers.cry_rarer_modifications then return nil end
2013+
if pseudorandom("cry_rarer_modifications") < G.GAME.modifiers.cry_rarer_modifications then
2014+
return nil
2015+
end
20152016
end
20162017
return poll_editionref(_key, _mod, _no_neg, _guaranteed)
2017-
end
2018+
end

lib/pointerlib.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ function Cryptid.pointergetblist(target) -- "Is this card pointer banned?"
115115
results[1] = true
116116
end
117117
end
118-
local table = (G.P_CENTERS[target])
118+
local table = G.P_CENTERS[target]
119119
if not table and type(target) == "table" then
120120
table = G.P_CENTERS[target.key]
121-
end
121+
end
122122
for i, v in pairs(Cryptid.pointerblisttype.misc or {}) do
123123
if table and table[v] then
124124
results[1] = true

0 commit comments

Comments
 (0)