Skip to content

Commit ceadd2a

Browse files
authored
Merge branch 'MathIsFun0:main' into bubble-m
2 parents e2cf49a + 81155cc commit ceadd2a

File tree

18 files changed

+163
-84
lines changed

18 files changed

+163
-84
lines changed

Cryptid.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--- MOD_DESCRIPTION: Adds unbalanced ideas to Balatro.
77
--- BADGE_COLOUR: 708b91
88
--- DEPENDENCIES: [Talisman>=2.0.9, Steamodded>=1.0.0~ALPHA-1312c]
9-
--- VERSION: 0.5.4
9+
--- VERSION: 0.5.5~dev
1010
--- PRIORITY: 2147483647
1111

1212
----------------------------------------------

items/code.lua

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ local code = {
2020
can_stack = true,
2121
can_divide = true,
2222
}
23+
local code_digital_hallucinations_compat = {
24+
colour = HEX("14b341"),
25+
loc_key = "cry_plus_code",
26+
create = function()
27+
local ccard = create_card("Code", G.consumeables, nil, nil, nil, nil, nil, "diha")
28+
ccard:set_edition({ negative = true }, true)
29+
ccard:add_to_deck()
30+
G.consumeables:emplace(ccard)
31+
end,
32+
}
2333
local pack1 = {
2434
dependencies = {
2535
items = {
@@ -51,6 +61,7 @@ local pack1 = {
5161
}
5262
end,
5363
group_key = "k_cry_program_pack",
64+
cry_digital_hallucinations = code_digital_hallucinations_compat,
5465
}
5566
local pack2 = {
5667
dependencies = {
@@ -83,6 +94,7 @@ local pack2 = {
8394
}
8495
end,
8596
group_key = "k_cry_program_pack",
97+
cry_digital_hallucinations = code_digital_hallucinations_compat,
8698
}
8799
local packJ = {
88100
dependencies = {
@@ -115,6 +127,7 @@ local packJ = {
115127
}
116128
end,
117129
group_key = "k_cry_program_pack",
130+
cry_digital_hallucinations = code_digital_hallucinations_compat,
118131
}
119132
local packM = {
120133
dependencies = {
@@ -147,6 +160,7 @@ local packM = {
147160
}
148161
end,
149162
group_key = "k_cry_program_pack",
163+
cry_digital_hallucinations = code_digital_hallucinations_compat,
150164
}
151165
local console = {
152166
dependencies = {
@@ -2091,7 +2105,7 @@ local delete = {
20912105
a = G.shop_vouchers
20922106
c = G.shop_vouchers.highlighted[1]
20932107
if c.shop_voucher then
2094-
G.GAME.current_round.voucher = nil
2108+
G.GAME.current_round.voucher.spawn[c.config.center.key] = nil
20952109
G.GAME.current_round.cry_voucher_edition = nil
20962110
G.GAME.current_round.cry_voucher_stickers =
20972111
{ eternal = false, perishable = false, rental = false, pinned = false, banana = false }
@@ -2225,7 +2239,7 @@ local machinecode = {
22252239
use = function(self, card, area, copier)
22262240
local card = create_card(
22272241
"Consumeables",
2228-
G.consumables,
2242+
G.consumeables,
22292243
nil,
22302244
nil,
22312245
nil,
@@ -2245,7 +2259,7 @@ local machinecode = {
22452259
a[b] = (a[b] or 0) + 1
22462260
end
22472261
for k, v in pairs(a) do
2248-
local card = create_card("Consumeables", G.consumables, nil, nil, nil, nil, k.key)
2262+
local card = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, k.key)
22492263
card:set_edition({ cry_glitched = true })
22502264
card:add_to_deck()
22512265
if Incantation then
@@ -2812,7 +2826,7 @@ local rework = {
28122826
cost = 4,
28132827
loc_vars = function(self, info_queue)
28142828
info_queue[#info_queue + 1] =
2815-
{ set = "Tag", key = "tag_cry_rework", specific_vars = { "[edition]", "[joker]" } }
2829+
{ set = "Tag", key = "tag_cry_rework", specific_vars = { "[edition]", "[joker]", "n" } }
28162830
return { vars = {} }
28172831
end,
28182832
can_use = function(self, card)
@@ -4362,7 +4376,7 @@ local CodeJoker = {
43624376
calculate = function(self, card, context)
43634377
if context.setting_blind and not (context.blueprint_card or self).getting_sliced then
43644378
play_sound("timpani")
4365-
local card = create_card("Code", G.consumables, nil, nil, nil, nil)
4379+
local card = create_card("Code", G.consumeables, nil, nil, nil, nil)
43664380
card:set_edition({
43674381
negative = true,
43684382
})
@@ -4608,7 +4622,7 @@ local blender = {
46084622
and not context.consumeable.beginning_end
46094623
then
46104624
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
4611-
local card = create_card("Consumeables", G.consumables, nil, nil, nil, nil, nil, "cry_blender")
4625+
local card = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, nil, "cry_blender")
46124626
card:add_to_deck()
46134627
G.consumeables:emplace(card)
46144628
end

items/deck.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,12 @@ local antimatter = {
472472
"set_cry_deck",
473473
},
474474
},
475+
loc_vars = function(self, info_queue, center)
476+
return {
477+
key = "b_cry_antimatter"
478+
.. (cry_get_gameset(G.P_CENTERS.b_cry_antimatter) == "madness" and "" or "_balanced"),
479+
}
480+
end,
475481
name = "cry-Antimatter",
476482
order = 76,
477483
key = "antimatter",

items/enhanced.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,16 +364,15 @@ return {
364364
ccl(self)
365365
if
366366
Galdur
367+
and safe_get(Galdur, "run_setup", "current_page") == 1
367368
and (self.edeck_select or (self.area == safe_get(Galdur, "run_setup", "selected_deck_area") and safe_get(
368369
self,
369370
"config",
370371
"center",
371372
"edeck_type"
372373
)))
373-
or (
374-
safe_get(G.GAME, "viewed_back", "effect", "center", "edeck_type")
375-
and (self.back == "viewed_back" or self.edeck_select)
376-
)
374+
or not Galdur
375+
and (safe_get(G.GAME, "viewed_back", "effect", "center", "edeck_type") and (self.back == "viewed_back" or self.edeck_select))
377376
then
378377
if self.edeck_select then
379378
G.PROFILES[G.SETTINGS.profile]["cry_edeck_" .. self.config.center.edeck_type] = self.edeck_select
@@ -382,6 +381,9 @@ return {
382381
end
383382
end
384383
function cry_enhancement_config_UI(center)
384+
if not center.edeck_type then
385+
return
386+
end
385387
G.SETTINGS.paused = true
386388
G.your_collection = {}
387389
G.your_collection[1] = CardArea(

items/exotic.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,19 @@ local scalae = {
704704
end
705705
end,
706706
loc_vars = function(self, info_queue, card)
707-
return { vars = { number_format(card.ability.extra.scale + 1), number_format(card.ability.extra.scale_mod) } }
707+
local example = { 2, 3, 4 }
708+
for i = 1, #example do
709+
example[i] = to_big(example[i]) ^ (card.ability.extra.scale + 1)
710+
end
711+
return {
712+
vars = {
713+
number_format(card.ability.extra.scale + 1),
714+
number_format(card.ability.extra.scale_mod),
715+
example[1],
716+
example[2],
717+
example[3],
718+
},
719+
}
708720
end,
709721
cry_credits = {
710722
idea = { "Mathguy" },

items/joker_display.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ if JokerDisplay then
18061806
{
18071807
border_nodes = {
18081808
{ text = "X" },
1809-
{ ref_table = "card.ability.extra", ref_value = "mult", retrigger_type = "exp" },
1809+
{ ref_table = "card.ability.extra", ref_value = "monster", retrigger_type = "exp" },
18101810
},
18111811
},
18121812
},

items/m.lua

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,29 +1403,25 @@ local longboi = {
14031403
name = "cry-longboi",
14041404
key = "longboi",
14051405
pos = { x = 5, y = 4 },
1406-
config = { extra = { mult = nil, bonus = 0.75 } },
1406+
config = { extra = { monster = 1, bonus = 0.75 } },
14071407
rarity = 1,
14081408
cost = 5,
14091409
order = 261,
14101410
pools = { ["M"] = true },
1411-
no_dbl = true,
14121411
blueprint_compat = true,
14131412
eternal_compat = false,
14141413
loc_vars = function(self, info_queue, center)
14151414
return {
14161415
vars = {
1417-
math.max(0.75, math.floor(center.ability.extra.bonus)),
1418-
(center.ability.extra.mult ~= nil and center.ability.extra.mult or (G.GAME.monstermult or 1)),
1416+
math.max(0.75, center.ability.extra.bonus),
1417+
center.ability.extra.monster,
14191418
},
14201419
}
14211420
end,
14221421
atlas = "atlasthree",
14231422
calculate = function(self, card, context)
14241423
if context.end_of_round and not context.individual and not context.repetition then
1425-
if not G.GAME.monstermult then
1426-
G.GAME.monstermult = 1
1427-
end
1428-
G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, math.floor(card.ability.extra.bonus))
1424+
G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, card.ability.extra.bonus)
14291425
if not context.retrigger_joker then
14301426
return {
14311427
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
@@ -1434,22 +1430,15 @@ local longboi = {
14341430
}),
14351431
}
14361432
end
1437-
elseif context.joker_main and ((card.ability.extra.mult or 1) > 1) then
1433+
elseif context.joker_main and card.ability.extra.monster > 1 then
14381434
return {
1439-
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.mult } }),
1440-
Xmult_mod = card.ability.extra.mult,
1435+
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.monster } }),
1436+
Xmult_mod = card.ability.extra.monster,
14411437
}
14421438
end
14431439
end,
1444-
add_to_deck = function(self, card, from_debuff)
1445-
if (not from_debuff and card.ability.extra.mult == nil) or card.checkmonster then
1446-
--Stops Things like Gemini from updating mult when it isn't supposed to
1447-
if card.checkmonster then
1448-
card.checkmonster = nil
1449-
end
1450-
1451-
card.ability.extra.mult = G.GAME.monstermult or 1
1452-
end
1440+
set_ability = function(self, card, from_debuff)
1441+
card.ability.extra.monster = G.GAME and G.GAME.monstermult or 1
14531442
end,
14541443
cry_credits = {
14551444
idea = {

items/misc.lua

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
-- Packs
2+
local meme_digital_hallucinations_compat = {
3+
colour = G.C.CRY_ASCENDANT,
4+
loc_key = "k_plus_joker",
5+
create = function()
6+
local ccard = create_card("Meme", G.jokers, nil, nil, true, true, nil, "diha")
7+
ccard:set_edition({ negative = true }, true)
8+
ccard:add_to_deck()
9+
G.jokers:emplace(ccard) --Note: Will break if any non-Joker gets added to the meme pool
10+
end,
11+
}
212
local meme1 = {
313
object_type = "Booster",
414
dependencies = {
@@ -43,6 +53,7 @@ local meme1 = {
4353
SMODS.Booster.update_pack(self, dt)
4454
end,
4555
group_key = "k_cry_meme_pack",
56+
cry_digital_hallucinations = meme_digital_hallucinations_compat,
4657
}
4758
local meme2 = {
4859
object_type = "Booster",
@@ -89,6 +100,7 @@ local meme2 = {
89100
SMODS.Booster.update_pack(self, dt)
90101
end,
91102
group_key = "k_cry_meme_pack",
103+
cry_digital_hallucinations = meme_digital_hallucinations_compat,
92104
}
93105
local meme3 = {
94106
object_type = "Booster",
@@ -136,6 +148,7 @@ local meme3 = {
136148
SMODS.Booster.update_pack(self, dt)
137149
end,
138150
group_key = "k_cry_meme_pack",
151+
cry_digital_hallucinations = meme_digital_hallucinations_compat,
139152
}
140153

141154
if not AurinkoAddons then
@@ -1796,7 +1809,7 @@ local blessing = {
17961809
local forced_key = get_random_consumable("blessing", nil, "c_cry_blessing")
17971810
local _card = create_card(
17981811
"Consumeables",
1799-
G.consumables,
1812+
G.consumeables,
18001813
nil,
18011814
nil,
18021815
nil,

0 commit comments

Comments
 (0)