Skip to content

Commit bc49cd4

Browse files
Merge pull request #530 from bobjoe400/Big-Num-support
Weiwd thwings hwappen in gwit wepo OwO, fwixed
2 parents 7ed4c52 + 6a78fbd commit bc49cd4

File tree

16 files changed

+811
-803
lines changed

16 files changed

+811
-803
lines changed

README.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
2-
# Cryptid
3-
An unbalanced Balatro mod.
4-
5-
Note: Cryptid requires [Steamodded **1.0.0~BETA-0314c**](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip) and [Talisman](https://github.com/MathIsFun0/Talisman/releases/latest).
6-
7-
Cryptid currently adds:
8-
![image](https://github.com/user-attachments/assets/4a06c3ba-6df4-48af-a3b3-fdba4dd3125d)
9-
![image](https://github.com/user-attachments/assets/2bf58a78-7af9-45c5-930f-f8ac988c2126)
10-
11-
12-
### [Official Discord](https://discord.gg/cryptid)
13-
### [Mac Video Installation Guide](https://youtu.be/l5ni7fHgwTE?si=GAN5t5-y_IuEv8uA)
14-
### [Not Mac Video Installation Guide](https://www.youtube.com/watch?v=aUr0gXE77rk)
15-
16-
### Frequently asked questions
17-
* Credit to @jenwalter666 for creating this FAQ (forwarded from Cryptid Discord)
18-
19-
## General
20-
21-
> *My game is crashing on startup/something doesn't appear to be loading!*
22-
23-
Make sure everything is properly installed.
24-
For Talisman, the folder that contains Talisman should be named `Talisman`. If you've downloaded the source code from GitHub (by clicking on [Code] and then [Download ZIP]), the folder within the ZIP may be called `Talisman-main`, which will cause a problem. Simply rename the folder(s) so that the `-main` part of the name is removed, so that the folder is just called `Talisman`.
25-
Whenever you are manually updating Talisman or Cryptid, or any other mod for that matter, it's a good approach to instead delete the contents of the folder, then install the contents of the folder from the ZIP into the existing folder to avoid having to constantly rename the folder over and over.
26-
For automatic updates, try using the [automatic update script](https://discord.com/channels/1264429948970733782/1268911536638787625).
27-
It could also be that Steamodded is out of date, sometimes mods may use features of a new version that's absent in an older version, but don't change the version that they ask for.
28-
You can grab the latest Steamodded by [clicking here](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip).
29-
30-
> *I can't see any new jokers/content!*
31-
32-
If you've installed everything correctly, but no new jokers, blinds, etc. are ingame, check the Mods list by clicking on [MODS] in the main menu, and look for Cryptid/Talisman.
33-
If they show up red, that means there's a problem. Hover over the mod icon (which should be an exclamation mark) to see what said problem is. It could be an outdated dependency in most cases.
34-
35-
> *What's up with all the "M" jokers/references to Jolly Joker?*
36-
37-
"M" is a reference to an incident in the official Balatro Discord where a user named mjiojio was spamming the letter "m" in various channels. When asked what their least favourite joker was, they answered with Jolly Joker, and that's how the "M" joke became a thing!
38-
39-
> *There's some content in the mod I don't like! Is there any way to remove them?*
40-
41-
You can disable some features of the mod by opening your Settings, going over to the Spectral Pack tab, clicking [Cryptid], then checking/unchecking what you want.
42-
You can also enable/disable certain music tracks. If you're a streamer, consider disabling the Jimball music for your safety!
43-
44-
> *I'm hitting infinity very often, is there any way to raise the limit of the scoring system?*
45-
46-
Talisman may be configured to be on **BigNum** mode, which has a maximum limit of ee308. You can make the limit virtually disappear by changing it to **OmegaNum**, which can handle e10##1000. You can configure it the same way; going into Settings, then the Spectral Pack tab, then Talisman. Be careful; if you have a saved run that was on a different number system, you won't be able to load it (unless if you switch back)!
47-
48-
49-
> *I've experienced a crash/bug!*
50-
51-
Be sure to give us as much information about the bug/crash as possible. A way to reproduce the bug/crash is also especially useful information to help us fix it.
52-
Remember; just saying you're crashing doesn't tell us anything. We need to know the details!
1+
2+
# Cryptid
3+
An unbalanced Balatro mod.
4+
5+
Note: Cryptid requires [Steamodded **1.0.0~BETA-0314c**](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip) and [Talisman](https://github.com/MathIsFun0/Talisman/releases/latest).
6+
7+
Cryptid currently adds:
8+
![image](https://github.com/user-attachments/assets/4a06c3ba-6df4-48af-a3b3-fdba4dd3125d)
9+
![image](https://github.com/user-attachments/assets/2bf58a78-7af9-45c5-930f-f8ac988c2126)
10+
11+
12+
### [Official Discord](https://discord.gg/cryptid)
13+
### [Mac Video Installation Guide](https://youtu.be/l5ni7fHgwTE?si=GAN5t5-y_IuEv8uA)
14+
### [Not Mac Video Installation Guide](https://www.youtube.com/watch?v=aUr0gXE77rk)
15+
16+
### Frequently asked questions
17+
* Credit to @jenwalter666 for creating this FAQ (forwarded from Cryptid Discord)
18+
19+
## General
20+
21+
> *My game is crashing on startup/something doesn't appear to be loading!*
22+
23+
Make sure everything is properly installed.
24+
For Talisman, the folder that contains Talisman should be named `Talisman`. If you've downloaded the source code from GitHub (by clicking on [Code] and then [Download ZIP]), the folder within the ZIP may be called `Talisman-main`, which will cause a problem. Simply rename the folder(s) so that the `-main` part of the name is removed, so that the folder is just called `Talisman`.
25+
Whenever you are manually updating Talisman or Cryptid, or any other mod for that matter, it's a good approach to instead delete the contents of the folder, then install the contents of the folder from the ZIP into the existing folder to avoid having to constantly rename the folder over and over.
26+
For automatic updates, try using the [automatic update script](https://discord.com/channels/1264429948970733782/1268911536638787625).
27+
It could also be that Steamodded is out of date, sometimes mods may use features of a new version that's absent in an older version, but don't change the version that they ask for.
28+
You can grab the latest Steamodded by [clicking here](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip).
29+
30+
> *I can't see any new jokers/content!*
31+
32+
If you've installed everything correctly, but no new jokers, blinds, etc. are ingame, check the Mods list by clicking on [MODS] in the main menu, and look for Cryptid/Talisman.
33+
If they show up red, that means there's a problem. Hover over the mod icon (which should be an exclamation mark) to see what said problem is. It could be an outdated dependency in most cases.
34+
35+
> *What's up with all the "M" jokers/references to Jolly Joker?*
36+
37+
"M" is a reference to an incident in the official Balatro Discord where a user named mjiojio was spamming the letter "m" in various channels. When asked what their least favourite joker was, they answered with Jolly Joker, and that's how the "M" joke became a thing!
38+
39+
> *There's some content in the mod I don't like! Is there any way to remove them?*
40+
41+
You can disable some features of the mod by opening your Settings, going over to the Spectral Pack tab, clicking [Cryptid], then checking/unchecking what you want.
42+
You can also enable/disable certain music tracks. If you're a streamer, consider disabling the Jimball music for your safety!
43+
44+
> *I'm hitting infinity very often, is there any way to raise the limit of the scoring system?*
45+
46+
Talisman may be configured to be on **BigNum** mode, which has a maximum limit of ee308. You can make the limit virtually disappear by changing it to **OmegaNum**, which can handle e10##1000. You can configure it the same way; going into Settings, then the Spectral Pack tab, then Talisman. Be careful; if you have a saved run that was on a different number system, you won't be able to load it (unless if you switch back)!
47+
48+
49+
> *I've experienced a crash/bug!*
50+
51+
Be sure to give us as much information about the bug/crash as possible. A way to reproduce the bug/crash is also especially useful information to help us fix it.
52+
Remember; just saying you're crashing doesn't tell us anything. We need to know the details!

items/blind.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ local clock = {
349349
if G.SETTINGS.paused then
350350
return 0
351351
else
352-
return 0.1 * (dt * G.SETTINGS.GAMESPEED / 4) / 3
352+
return 0.1 * (dt * math.min(G.SETTINGS.GAMESPEED, 4) / 4) / 3
353353
end
354354
end,
355355
}
@@ -676,7 +676,7 @@ local lavender_loop = {
676676
if G.SETTINGS.paused or G.STATE == G.STATES.HAND_PLAYED then
677677
return 1
678678
else
679-
return 1.25 ^ (dt / (1.5 / G.SETTINGS.GAMESPEED * 4))
679+
return 1.25 ^ (dt / (1.5 / math.min(G.SETTINGS.GAMESPEED, 4) * 4))
680680
end
681681
end,
682682
}

items/code.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5153,7 +5153,7 @@ local python = {
51535153
and context.consumeable.ability.set == "Code"
51545154
and not context.consumeable.beginning_end
51555155
then
5156-
card.ability.extra.Xmult = lenient_bignum(card.ability.extra.Xmult + card.ability.extra.Xmult_mod)
5156+
card.ability.extra.Xmult = lenient_bignum(to_big(card.ability.extra.Xmult) + card.ability.extra.Xmult_mod)
51575157
G.E_MANAGER:add_event(Event({
51585158
func = function()
51595159
card_eval_status_text(card, "extra", nil, nil, nil, {

items/epic.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ local membershipcardtwo = {
128128
number_format(card.ability.extra.chips),
129129
number_format(
130130
lenient_bignum(
131-
card.ability.extra.chips * math.floor(Cryptid.member_count / card.ability.immutable.chips_mod)
131+
to_big(card.ability.extra.chips) * math.floor(Cryptid.member_count / card.ability.immutable.chips_mod)
132132
)
133133
),
134134
},
@@ -143,14 +143,14 @@ local membershipcardtwo = {
143143
vars = {
144144
number_format(
145145
lenient_bignum(
146-
card.ability.extra.chips
146+
to_big(card.ability.extra.chips)
147147
* math.floor(Cryptid.member_count / card.ability.immutable.chips_mod)
148148
)
149149
),
150150
},
151151
}),
152152
chip_mod = lenient_bignum(
153-
card.ability.extra.chips * math.floor(Cryptid.member_count / card.ability.immutable.chips_mod)
153+
to_big(card.ability.extra.chips) * math.floor(Cryptid.member_count / card.ability.immutable.chips_mod)
154154
),
155155
}
156156
end
@@ -752,7 +752,7 @@ local m = {
752752
}
753753
end
754754
if context.selling_card and context.card:is_jolly() and not context.blueprint then
755-
card.ability.extra.x_mult = lenient_bignum(card.ability.extra.x_mult + card.ability.extra.extra)
755+
card.ability.extra.x_mult = lenient_bignum(to_big(card.ability.extra.x_mult) + card.ability.extra.extra)
756756
if not context.retrigger_joker then
757757
--This doesn't display the correct amount of mult if retriggered it display the amount from the first retrigger instead of the final one
758758
--But I would rather have this than constant card_eval_status_text spam
@@ -1011,7 +1011,7 @@ local double_scale = {
10111011
if Cryptid.gameset(self) == "exp_modest" then
10121012
return lenient_bignum(to_big(true_base) * 2)
10131013
end
1014-
return lenient_bignum(orig_scale_scale + true_base)
1014+
return lenient_bignum(orig_scale_scale + to_big(true_base))
10151015
end,
10161016
cry_credits = {
10171017
idea = {
@@ -1450,7 +1450,7 @@ local bonusjoker = {
14501450
card.ability.immutable.check = lenient_bignum(card.ability.immutable.check + 1)
14511451
end
14521452
G.consumeables.config.card_limit =
1453-
lenient_bignum(G.consumeables.config.card_limit + card.ability.extra.add)
1453+
lenient_bignum(G.consumeables.config.card_limit + to_big(card.ability.extra.add))
14541454
end
14551455
return {
14561456
extra = { focus = card, message = localize("k_upgrade_ex") },
@@ -1601,7 +1601,7 @@ local goldjoker = {
16011601
calculate = function(self, card, context)
16021602
if context.cardarea == G.play and context.individual and not context.blueprint then
16031603
if SMODS.has_enhancement(context.other_card, "m_gold") then
1604-
card.ability.extra.percent = lenient_bignum(card.ability.extra.percent + card.ability.extra.percent_mod)
1604+
card.ability.extra.percent = lenient_bignum(to_big(card.ability.extra.percent) + card.ability.extra.percent_mod)
16051605
return {
16061606
extra = { focus = card, message = localize("k_upgrade_ex") },
16071607
card = card,
@@ -1611,7 +1611,7 @@ local goldjoker = {
16111611
end
16121612
if context.individual and context.cardarea == G.play then
16131613
if SMODS.has_enhancement(context.other_card, "m_gold") then
1614-
card.ability.extra.percent = lenient_bignum(card.ability.extra.percent + card.ability.extra.percent_mod)
1614+
card.ability.extra.percent = lenient_bignum(to_big(card.ability.extra.percent) + card.ability.extra.percent_mod)
16151615
return {
16161616
message = localize("k_upgrade_ex"),
16171617
card = card,
@@ -2124,7 +2124,7 @@ local clockwork = { -- Steel Support: The Joker
21242124
card.ability.immutable.counters.c2 =
21252125
clamp(card.ability.immutable.counters.c2, card.ability.immutable.limits.l2) -- ticker 2
21262126
if card.ability.immutable.counters.c2 == 0 then
2127-
card.ability.extra.xmult = lenient_bignum(card.ability.extra.xmult + card.ability.extra.xmult_mod)
2127+
card.ability.extra.xmult = lenient_bignum(to_big(card.ability.extra.xmult) + card.ability.extra.xmult_mod)
21282128
end
21292129

21302130
card.ability.immutable.counters.c3 =
@@ -2134,7 +2134,7 @@ local clockwork = { -- Steel Support: The Joker
21342134
clamp(card.ability.immutable.counters.c4, card.ability.immutable.limits.l4) -- ticker 4
21352135
if card.ability.immutable.counters.c4 == 0 then
21362136
card.ability.extra.steelenhc =
2137-
lenient_bignum(card.ability.extra.steelenhc + card.ability.extra.steel_mod)
2137+
lenient_bignum(to_big(card.ability.extra.steelenhc) + card.ability.extra.steel_mod)
21382138
end
21392139
end
21402140
if context.repetition and context.cardarea == G.hand and card.ability.immutable.counters.c1 == 0 then -- effect 1

items/exotic.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ local exponentia = {
342342
then
343343
for _, v in pairs(find_joker("cry-Exponentia")) do
344344
local old = v.ability.extra.Emult
345-
v.ability.extra.Emult = lenient_bignum(v.ability.extra.Emult + v.ability.extra.Emult_mod)
345+
v.ability.extra.Emult = lenient_bignum(to_big(v.ability.extra.Emult) + v.ability.extra.Emult_mod)
346346
card_eval_status_text(v, "extra", nil, nil, nil, {
347347
message = localize({
348348
type = "variable",
@@ -458,7 +458,7 @@ local redeo = {
458458
card.ability.extra.money_remaining =
459459
lenient_bignum(to_big(card.ability.extra.money_remaining) - card.ability.extra.money_req)
460460
card.ability.extra.money_req =
461-
lenient_bignum(card.ability.extra.money_req + card.ability.extra.money_mod)
461+
lenient_bignum(to_big(card.ability.extra.money_req) + card.ability.extra.money_mod)
462462
card.ability.extra.money_mod = lenient_bignum(math.ceil(to_big(card.ability.extra.money_mod) * 1.06))
463463
ante_mod = lenient_bignum(ante_mod - to_big(card.ability.extra.ante_reduction))
464464
end
@@ -610,7 +610,7 @@ local crustulum = {
610610
end,
611611
calculate = function(self, card, context)
612612
if context.reroll_shop and not context.blueprint then
613-
card.ability.extra.chips = lenient_bignum(card.ability.extra.chips + card.ability.extra.chip_mod)
613+
card.ability.extra.chips = lenient_bignum(to_big(card.ability.extra.chips) + card.ability.extra.chip_mod)
614614
card_eval_status_text(card, "extra", nil, nil, nil, {
615615
message = localize({
616616
type = "variable",
@@ -691,7 +691,7 @@ local primus = {
691691
end
692692
end
693693
if check then
694-
card.ability.extra.Emult = lenient_bignum(card.ability.extra.Emult + card.ability.extra.Emult_mod)
694+
card.ability.extra.Emult = lenient_bignum(to_big(card.ability.extra.Emult) + card.ability.extra.Emult_mod)
695695
return {
696696
card_eval_status_text(card, "extra", nil, nil, nil, {
697697
message = localize("k_upgrade_ex"),
@@ -776,7 +776,7 @@ local scalae = {
776776
) ^ to_big(card.ability.extra.scale)
777777
)
778778
)
779-
if Cryptid.is_card_big(joker) and to_big(new_scale) >= to_big(1e300) then
779+
if not Cryptid.is_card_big(joker) and to_big(new_scale) >= to_big(1e300) then
780780
new_scale = 1e300
781781
end
782782
return new_scale
@@ -1217,7 +1217,7 @@ local energia = {
12171217
if context.cry_add_tag then
12181218
local value = #G.GAME.tags or 0
12191219
local t = to_number(math.min(card.ability.immutable.max_tags - value, card.ability.extra.tags))
1220-
card.ability.extra.tags = lenient_bignum(card.ability.extra.tags + card.ability.extra.tag_mod)
1220+
card.ability.extra.tags = lenient_bignum(to_big(card.ability.extra.tags) + card.ability.extra.tag_mod)
12211221
if t > 0 then
12221222
card_eval_status_text(card, "extra", nil, nil, nil, {
12231223
message = localize({
@@ -1271,7 +1271,7 @@ local verisimile = {
12711271
or context.other_joker.ability.name == "Hallucination"
12721272
then
12731273
local variable = context.other_joker
1274-
card.ability.extra.xmult = lenient_bignum(card.ability.extra.xmult + variable.ability.extra)
1274+
card.ability.extra.xmult = lenient_bignum(to_big(card.ability.extra.xmult) + variable.ability.extra)
12751275
card_eval_status_text(card, "extra", nil, nil, nil, {
12761276
message = localize({
12771277
type = "variable",
@@ -1289,7 +1289,7 @@ local verisimile = {
12891289
or context.other_joker.ability.name == "cry-scrabble"
12901290
then
12911291
local variable = context.other_joker
1292-
card.ability.extra.xmult = lenient_bignum(card.ability.extra.xmult + variable.ability.extra.odds)
1292+
card.ability.extra.xmult = lenient_bignum(to_big(card.ability.extra.xmult) + variable.ability.extra.odds)
12931293
card_eval_status_text(card, "extra", nil, nil, nil, {
12941294
message = localize({
12951295
type = "variable",
@@ -1300,7 +1300,7 @@ local verisimile = {
13001300
elseif context.other_joker.ability.name == "cry-notebook" then
13011301
--This also triggers at notebook's end of round which isn't intentional but i'm not bothered enough about this to find a workaround
13021302
local variable = context.other_joker
1303-
card.ability.extra.xmult = lenient_bignum(card.ability.extra.xmult + variable.ability.extra.odds)
1303+
card.ability.extra.xmult = lenient_bignum(to_big(card.ability.extra.xmult) + variable.ability.extra.odds)
13041304
card_eval_status_text(card, "extra", nil, nil, nil, {
13051305
message = localize({
13061306
type = "variable",
@@ -1313,7 +1313,7 @@ local verisimile = {
13131313
elseif context.consumeable and not context.blueprint then
13141314
if context.consumeable.ability.name == "The Wheel of Fortune" and context.consumeable.cry_wheel_success then
13151315
local variable = context.consumeable
1316-
card.ability.extra.xmult = lenient_bignum(card.ability.extra.xmult + variable.ability.extra) --Doesn't account for misprintizing for some reason
1316+
card.ability.extra.xmult = lenient_bignum(to_big(card.ability.extra.xmult) + variable.ability.extra) --Doesn't account for misprintizing for some reason
13171317
card_eval_status_text(card, "extra", nil, nil, nil, {
13181318
message = localize({
13191319
type = "variable",
@@ -1372,7 +1372,7 @@ local duplicare = {
13721372
or (context.individual and context.cardarea == G.play)
13731373
)
13741374
then
1375-
card.ability.extra.Xmult = lenient_bignum(card.ability.extra.Xmult + card.ability.extra.Xmult_mod)
1375+
card.ability.extra.Xmult = lenient_bignum(to_big(card.ability.extra.Xmult) + card.ability.extra.Xmult_mod)
13761376
card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_upgrade_ex") })
13771377
end
13781378
if context.joker_main and (to_big(card.ability.extra.Xmult) > to_big(1)) then

0 commit comments

Comments
 (0)