-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathcode.lua
More file actions
5630 lines (5552 loc) · 156 KB
/
code.lua
File metadata and controls
5630 lines (5552 loc) · 156 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local Config = SMODS.current_mod.config
local code = {
object_type = "ConsumableType",
key = "Code",
primary_colour = HEX("14b341"),
secondary_colour = HEX("12f254"),
collection_rows = { 4, 4 }, -- 4 pages for all code cards
shop_rate = 0.0,
loc_txt = {},
default = "c_cry_crash",
can_stack = true,
can_divide = true,
select_card = "consumeables",
select_button_text = "b_pull",
}
local code_digital_hallucinations_compat = {
colour = HEX("14b341"),
loc_key = "cry_plus_code",
create = function()
local ccard = create_card("Code", G.consumeables, nil, nil, nil, nil, nil, "diha")
ccard:set_edition({ negative = true }, true)
ccard:add_to_deck()
G.consumeables:emplace(ccard)
end,
}
-- Program Pack, 1/2
local pack1 = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Booster",
key = "code_normal_1",
kind = "Code",
atlas = "pack",
pos = { x = 0, y = 0 },
config = { extra = 2, choose = 1 },
cost = 4,
order = 805,
weight = 0.96,
create_card = function(self, card)
return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_1")
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.C.SET.Code)
ease_background_colour({ new_colour = G.C.SET.Code, special_colour = G.C.BLACK, contrast = 2 })
end,
loc_vars = function(self, info_queue, card)
return {
vars = {
card and card.ability.choose or self.config.choose,
card and card.ability.extra or self.config.extra,
},
}
end,
group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
}
-- Program Pack Alt, 1/2
local pack2 = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Booster",
key = "code_normal_2",
kind = "Code",
atlas = "pack",
pos = { x = 1, y = 0 },
config = { extra = 2, choose = 1 },
cost = 4,
order = 806,
weight = 0.96,
create_card = function(self, card)
return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_2")
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.C.SET.Code)
ease_background_colour({ new_colour = G.C.SET.Code, special_colour = G.C.BLACK, contrast = 2 })
end,
loc_vars = function(self, info_queue, card)
return {
vars = {
card and card.ability.choose or self.config.choose,
card and card.ability.extra or self.config.extra,
},
}
end,
group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
}
-- Jumbo Program Pack, 1/4
local packJ = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Booster",
key = "code_jumbo_1",
kind = "Code",
atlas = "pack",
pos = { x = 2, y = 0 },
config = { extra = 4, choose = 1 },
cost = 6,
order = 807,
weight = 0.48,
create_card = function(self, card)
return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_j")
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.C.SET.Code)
ease_background_colour({ new_colour = G.C.SET.Code, special_colour = G.C.BLACK, contrast = 2 })
end,
loc_vars = function(self, info_queue, card)
return {
vars = {
card and card.ability.choose or self.config.choose,
card and card.ability.extra or self.config.extra,
},
}
end,
group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
}
-- Mega Program Pack, 2/4
local packM = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Booster",
key = "code_mega_1",
kind = "Code",
atlas = "pack",
pos = { x = 3, y = 0 },
config = { extra = 4, choose = 2 },
cost = 8,
order = 808,
weight = 0.12,
create_card = function(self, card)
return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_m")
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, G.C.SET.Code)
ease_background_colour({ new_colour = G.C.SET.Code, special_colour = G.C.BLACK, contrast = 2 })
end,
loc_vars = function(self, info_queue, card)
return {
vars = {
card and card.ability.choose or self.config.choose,
card and card.ability.extra or self.config.extra,
},
}
end,
group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
}
-- Console Tag
-- Gives a free Program Pack
local console = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"p_cry_code_normal_1",
"set_cry_code",
},
},
object_type = "Tag",
atlas = "tag_cry",
name = "cry-Console Tag",
order = 609,
pos = { x = 3, y = 2 },
config = { type = "new_blind_choice" },
key = "console",
min_ante = 2,
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = { set = "Other", key = "p_cry_code_normal_1", specific_vars = { 1, 2 } }
return { vars = {} }
end,
apply = function(self, tag, context)
if context.type == "new_blind_choice" then
tag:yep("+", G.C.SECONDARY_SET.Code, function()
local key = "p_cry_code_normal_1"
local card = Card(
G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2,
G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2,
G.CARD_W * 1.27,
G.CARD_H * 1.27,
G.P_CARDS.empty,
G.P_CENTERS[key],
{ bypass_discovery_center = true, bypass_discovery_ui = true }
)
card.cost = 0
card.from_tag = true
G.FUNCS.use_card({ config = { ref_table = card } })
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
card:set_edition(nil, true, true)
elseif G.GAME.modifiers.cry_force_random_edition then
local edition = Cryptid.poll_random_edition()
card:set_edition(edition, true, true)
end
card:start_materialize()
return true
end)
tag.triggered = true
return true
end
end,
}
-- ://Crash
-- 1/6 to ACE, otherwise crash; determined by run seed rather than current seed
local crash = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Consumable",
set = "Code",
name = "cry-Crash",
key = "crash",
pos = { x = 7, y = 0 },
no_collection = true,
cost = 4,
atlas = "atlasnotjokers",
order = 400,
can_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
if not G.PROFILES[G.SETTINGS.profile].consumeable_usage["c_cry_crash"] then
set_consumeable_usage(card)
end
-- I'm being VERY safe here, game gets really weird and sometimes does and doesn't save ://CRASH use
G:save_settings()
G:save_progress()
local f = pseudorandom_element(crashes, pseudoseed("cry_crash"))
f(self, card, area, copier)
end,
demicoloncompat = true,
force_use = function(self, card, area)
self:use(card, area)
end,
set_ability = function(self, center)
center.ability.cry_multiuse = math.ceil(1 + (G.GAME.extra_multiuse or 0))
end,
init = function(self)
function create_UIBox_crash(card)
G.E_MANAGER:add_event(Event({
blockable = false,
func = function()
G.REFRESH_ALERTS = true
return true
end,
}))
local t = create_UIBox_generic_options({
no_back = true,
colour = HEX("04200c"),
outline_colour = G.C.SECONDARY_SET.Code,
contents = {
{
n = G.UIT.R,
nodes = {
create_text_input({
colour = G.C.SET.Code,
hooked_colour = darken(copy_table(G.C.SET.Code), 0.3),
w = 4.5,
h = 1,
max_length = 2500,
extended_corpus = true,
prompt_text = "???",
ref_table = G,
ref_value = "ENTERED_ACE",
keyboard_offset = 1,
}),
},
},
{
n = G.UIT.R,
config = { align = "cm" },
nodes = {
UIBox_button({
colour = G.C.SET.Code,
button = "ca",
label = { localize("cry_code_execute") },
minw = 4.5,
focus_args = { snap_to = true },
}),
},
},
},
})
return t
end
G.FUNCS.ca = function()
G.GAME.USING_CODE = false
loadstring(G.ENTERED_ACE)() --Scary!
glitched_intensity = 0
G.SETTINGS.GRAPHICS.crt = 0
check_for_unlock({ type = "ach_cry_used_crash" })
G.CHOOSE_ACE:remove()
G.ENTERED_ACE = nil
end
crashes = {
function()
G:save_settings()
G:save_progress()
--instantly quit the game, no error log
function love.errorhandler() end
print(crash.crash.crash)
end,
function()
G:save_settings()
G:save_progress()
--removes draw loop, you're frozen and can still weirdly interact with the game a bit
function love.draw() end
end,
function()
G:save_settings()
G:save_progress()
--by WilsonTheWolf and MathIsFun_, funky error screen with random funny message
messages = {
"Oops.",
not Cryptid_config.family_mode and "Why don't you buy more jonkers? Are you stupid?" or "Oops.",
not Cryptid_config.family_mode and "Peter? What are you doing? Cards. WHAT THE FUCK?" or "Oops.",
not Cryptid_config.family_mode
and "what if instead of rush hour it was called kush hour and you just smoked a massive blunt"
or "Oops.",
not Cryptid_config.family_mode and "you are an idiot" or "Oops.",
not Cryptid_config.family_mode and "fuck you" or "Oops.",
not Cryptid_config.family_mode and "Nah fuck off" or "Oops.",
"Your cards have been TOASTED, extra crispy for your pleasure.",
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"What we have here is a certified whoopsidaisy",
"lmao",
"How about a game of YOU MUST DIE?",
"Sorry, I was in the bathroom. What'd I mi'Where'd... Where is everyone?",
"what if it was called freaklatro",
"4",
"I SAWED THIS GAME IN HALF!",
"is this rush hour 4",
"You missed a semicolon on line 19742, you buffoon",
"You do not recognise the cards in the deck.",
":( Your P",
"Assertion failed",
"Play ULTRAKILL",
"Play Nova Drift",
"Play Balatro- wait",
"death.fell.accident.water",
"Balatro's innards were made outards",
"i am going to club yrou",
"But the biggest joker of them all, it was you all along!",
"fission mailed successfully",
"table index is nil",
"index is nil table",
"nil is index table",
"nildex is in table",
"I AM THE TABLE",
"I'm never going back this casino agai-",
"what did you think would happen?",
"DO THE EARTHQUAKE! [screams]",
"Screaming in the casino prank! AAAAAAAAAAAAAAAAAA",
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"You musn't tear or crease it.",
"Sure, but the point is to do it without making a hole.",
"The end of all things! As was foretold in the prophecy!",
"Do it again. It'd be funny",
"",
":3",
"Looks like a skill issue to me.",
"it turns out that card was ligma",
"YouJustLostTheCasinoGame",
"attempt to call global your_mom (value too large)",
"Killed by intentional game design",
"attempt to index field 'attempt to call global to_big (too big)' (a nil value)",
"what.avi",
"The C",
"Shoulda kept Chicot",
"Maybe next time don't do that?",
"[recursion]",
"://SHART",
"It's converging time.",
"Demitrigger!",
"This is the last error message.",
}
function corruptString(str)
-- replace each character with a random valid ascii character
local newStr = ""
local len
if type(str) == "string" then
len = #str
else
len = str
end
for i = 1, len do
-- newStr = newStr .. string.char(math.random(33, 122))
local c = math.random(33, 122)
newStr = newStr .. string.char(c)
if c == 92 then -- backslash
newStr = newStr .. string.char(c)
end
end
return newStr
end
function getDebugInfoForCrash()
local info = "Additional Context:\nBalatro Version: "
.. VERSION
.. "\nModded Version: "
.. MODDED_VERSION
local major, minor, revision, codename = love.getVersion()
info = info
.. "\nLove2D Version: "
.. corruptString(string.format("%d.%d.%d", major, minor, revision))
local lovely_success, lovely = pcall(require, "lovely")
if lovely_success then
info = info .. "\nLovely Version: " .. corruptString(lovely.version)
end
if SMODS.mod_list then
info = info .. "\nSteamodded Mods:"
local enabled_mods = {}
for _, v in ipairs(SMODS.mod_list) do
if v.can_load then
table.insert(enabled_mods, v)
end
end
for k, v in ipairs(enabled_mods) do
info = info
.. "\n "
.. k
.. ": "
.. v.name
.. " by "
.. table.concat(v.author, ", ")
.. " [ID: "
.. v.id
.. (v.priority ~= 0 and (", Priority: " .. v.priority) or "")
.. (v.version and v.version ~= "0.0.0" and (", Version: " .. v.version) or "")
.. "]"
local debugInfo = v.debug_info
if debugInfo then
if type(debugInfo) == "string" then
if #debugInfo ~= 0 then
info = info .. "\n " .. debugInfo
end
elseif type(debugInfo) == "table" then
for kk, vv in pairs(debugInfo) do
if type(vv) ~= "nil" then
vv = tostring(vv)
end
if #vv ~= 0 then
info = info .. "\n " .. kk .. ": " .. vv
end
end
end
end
end
end
return info
end
VERSION = corruptString(VERSION)
MODDED_VERSION = corruptString(MODDED_VERSION)
if SMODS.mod_list then
for i, mod in ipairs(SMODS.mod_list) do
mod.can_load = true
mod.name = corruptString(mod.name)
mod.id = corruptString(mod.id)
mod.author = { corruptString(20) }
mod.version = corruptString(mod.version)
mod.debug_info = corruptString(math.random(5, 100))
end
end
do
local utf8 = require("utf8")
local linesize = 100
-- Modifed from https://love2d.org/wiki/love.errorhandler
function love.errorhandler(msg)
msg = tostring(msg)
if not love.window or not love.graphics or not love.event then
return
end
if not love.graphics.isCreated() or not love.window.isOpen() then
local success, status = pcall(love.window.setMode, 800, 600)
if not success or not status then
return
end
end
-- Reset state.
if love.mouse then
love.mouse.setVisible(true)
love.mouse.setGrabbed(false)
love.mouse.setRelativeMode(false)
if love.mouse.isCursorSupported() then
love.mouse.setCursor()
end
end
if love.joystick then
-- Stop all joystick vibrations.
for i, v in ipairs(love.joystick.getJoysticks()) do
v:setVibration()
end
end
if love.audio then
love.audio.stop()
end
love.graphics.reset()
local font = love.graphics.setNewFont("resources/fonts/m6x11plus.ttf", 20)
local background = { math.random() * 0.3, math.random() * 0.3, math.random() * 0.3 }
love.graphics.clear(background)
love.graphics.origin()
local sanitizedmsg = {}
for char in msg:gmatch(utf8.charpattern) do
table.insert(sanitizedmsg, char)
end
sanitizedmsg = table.concat(sanitizedmsg)
local err = {}
table.insert(err, "Oops! The game crashed:")
table.insert(err, sanitizedmsg)
if #sanitizedmsg ~= #msg then
table.insert(err, "Invalid UTF-8 string in error message.")
end
local success, msg = pcall(getDebugInfoForCrash)
if success and msg then
table.insert(err, "\n" .. msg)
else
table.insert(err, "\n" .. "Failed to get additional context :/")
end
local p = table.concat(err, "\n")
p = p:gsub("\t", "")
p = p:gsub('%[string "(.-)"%]', "%1")
local scrollOffset = 0
local endHeight = 0
love.keyboard.setKeyRepeat(true)
local function scrollDown(amt)
if amt == nil then
amt = 18
end
scrollOffset = scrollOffset + amt
if scrollOffset > endHeight then
scrollOffset = endHeight
end
end
local function scrollUp(amt)
if amt == nil then
amt = 18
end
scrollOffset = scrollOffset - amt
if scrollOffset < 0 then
scrollOffset = 0
end
end
local pos = 70
local arrowSize = 20
local function calcEndHeight()
local font = love.graphics.getFont()
local rw, lines = font:getWrap(p, love.graphics.getWidth() - pos * 2)
local lineHeight = font:getHeight()
local atBottom = scrollOffset == endHeight and scrollOffset ~= 0
endHeight = #lines * lineHeight - love.graphics.getHeight() + pos * 2
if endHeight < 0 then
endHeight = 0
end
if scrollOffset > endHeight or atBottom then
scrollOffset = endHeight
end
end
local function draw()
if not love.graphics.isActive() then
return
end
love.graphics.clear(background)
calcEndHeight()
local time = love.timer.getTime()
if not G.SETTINGS.reduced_motion then
background = { math.random() * 0.3, math.random() * 0.3, math.random() * 0.3 }
p = p
.. "\n"
.. corruptString(math.random(linesize - linesize / 2, linesize + linesize * 2))
linesize = linesize + linesize / 25
end
love.graphics.printf(p, pos, pos - scrollOffset, love.graphics.getWidth() - pos * 2)
if scrollOffset ~= endHeight then
love.graphics.polygon(
"fill",
love.graphics.getWidth() - (pos / 2),
love.graphics.getHeight() - arrowSize,
love.graphics.getWidth() - (pos / 2) + arrowSize,
love.graphics.getHeight() - (arrowSize * 2),
love.graphics.getWidth() - (pos / 2) - arrowSize,
love.graphics.getHeight() - (arrowSize * 2)
)
end
if scrollOffset ~= 0 then
love.graphics.polygon(
"fill",
love.graphics.getWidth() - (pos / 2),
arrowSize,
love.graphics.getWidth() - (pos / 2) + arrowSize,
arrowSize * 2,
love.graphics.getWidth() - (pos / 2) - arrowSize,
arrowSize * 2
)
end
love.graphics.present()
end
local fullErrorText = p
local function copyToClipboard()
if not love.system then
return
end
love.system.setClipboardText(fullErrorText)
p = p .. "\nCopied to clipboard!"
end
if G then
-- Kill threads (makes restarting possible)
if G.SOUND_MANAGER and G.SOUND_MANAGER.channel then
G.SOUND_MANAGER.channel:push({
type = "kill",
})
end
if G.SAVE_MANAGER and G.SAVE_MANAGER.channel then
G.SAVE_MANAGER.channel:push({
type = "kill",
})
end
if G.HTTP_MANAGER and G.HTTP_MANAGER.channel then
G.HTTP_MANAGER.channel:push({
type = "kill",
})
end
end
return function()
love.event.pump()
for e, a, b, c in love.event.poll() do
if e == "quit" then
return 1
elseif e == "keypressed" and a == "escape" then
return 1
elseif e == "keypressed" and a == "c" and love.keyboard.isDown("lctrl", "rctrl") then
copyToClipboard()
elseif e == "keypressed" and a == "r" then
return "restart"
elseif e == "keypressed" and a == "down" then
scrollDown()
elseif e == "keypressed" and a == "up" then
scrollUp()
elseif e == "keypressed" and a == "pagedown" then
scrollDown(love.graphics.getHeight())
elseif e == "keypressed" and a == "pageup" then
scrollUp(love.graphics.getHeight())
elseif e == "keypressed" and a == "home" then
scrollOffset = 0
elseif e == "keypressed" and a == "end" then
scrollOffset = endHeight
elseif e == "wheelmoved" then
scrollUp(b * 20)
elseif e == "gamepadpressed" and b == "dpdown" then
scrollDown()
elseif e == "gamepadpressed" and b == "dpup" then
scrollUp()
elseif e == "gamepadpressed" and b == "a" then
return "restart"
elseif e == "gamepadpressed" and b == "x" then
copyToClipboard()
elseif e == "gamepadpressed" and (b == "b" or b == "back" or b == "start") then
return 1
elseif e == "touchpressed" then
local name = love.window.getTitle()
if #name == 0 or name == "Untitled" then
name = "Game"
end
local buttons = { "OK", localize("cry_code_cancel"), "Restart" }
if love.system then
buttons[4] = "Copy to clipboard"
end
local pressed = love.window.showMessageBox("Quit " .. name .. "?", "", buttons)
if pressed == 1 then
return 1
elseif pressed == 3 then
return "restart"
elseif pressed == 4 then
copyToClipboard()
end
end
end
draw()
if love.timer then
love.timer.sleep(0.1)
end
end
end
end
load("error(messages[math.random(1, #messages)])", corruptString(30), "t")()
end,
function()
check_for_unlock({ type = "ach_cry_used_crash" })
--fills screen with Crash cards
glitched_intensity = 100
G.SETTINGS.GRAPHICS.crt = 101
G.E_MANAGER:add_event(
Event({
trigger = "immediate",
blockable = false,
no_delete = true,
func = function()
G.GAME.accel = G.GAME.accel or 1.1
for i = 1, G.GAME.accel do
local c = create_card("Code", nil, nil, nil, nil, nil, "c_cry_crash")
c.T.x = math.random(-G.CARD_W, G.TILE_W)
c.T.y = math.random(-G.CARD_H, G.TILE_H)
end
G.GAME.accel = G.GAME.accel ^ (1.005 + G.GAME.accel / 20000)
return false
end,
}),
"other"
)
end,
function()
G:save_settings()
G:save_progress()
-- Fake lovely panic
love.window.showMessageBox(
"lovely-injector",
'lovely-injector has crashed:\npanicked at crates/lovely-core/src/lib.rs:420:69:\nFailed to parse patch at "C:\\\\users\\\\jimbo\\\\AppData\\\\Roaming\\\\Balatro\\\\Mods\\\\Cryptid\\\\lovely.toml":\nError { inner: TomlError { message: "expected `.`, `=`", original: Some("'
.. "\"According to all known laws of aviation, there is no way a bee should be able to fly.\\nIts wings are too small to get its fat little body off the ground.\\nThe bee, of course, flies anyway because bees don't care what humans think is impossible.\\nYellow, black. Yellow, black. Yellow, black. Yellow, black.\\nOoh, black and yellow!\\nLet's shake it up a little.\\nBarry! Breakfast is ready!\\nComing!\\nHang on a second.\\nHello?\\nBarry?\\nAdam?\\nCan you believe this is happening?\\nI can't.\\nI'll pick you up.\\nLooking sharp.\\nUse the stairs, Your father paid good money for those.\\nSorry. I'm excited.\\nHere's the graduate.\\nWe're very proud of you, son.\\nA perfect report card, all B's.\\nVery proud.\\nMa! I got a thing going here.\\nYou got lint on your fuzz.\\nOw! That's me!\\nWave to us! We'll be in row 118,000.\\nBye!\\nBarry, I told you, stop flying in the house!\\nHey, Adam.\\nHey, Barry.\\nIs that fuzz gel?\\nA little. Special day, graduation.\\nNever thought I'd make it.\\nThree days grade school, three days high school.\\nThose were awkward.\\nThree days college. I'm glad I took a day and hitchhiked around The Hive.\\nYou did come back different.\\nHi, Barry. Artie, growing a mustache? Looks good.\\nHear about Frankie?\\nYeah.\\nYou going to the funeral?\\nNo, I'm not going.\\nEverybody knows, sting someone, you die.\\nDon't waste it on a squirrel.\\nSuch a hothead.\\nI guess he could have just gotten out of the way.\\nI love this incorporating an amusement park into our day.\\nThat's why we don't need vacations.\\nBoy, quite a bit of pomp under the circumstances.\\nWell, Adam, today we are men.\\nWe are!\\nBee-men.\\nAmen!\\nHallelujah!\\nStudents, faculty, distinguished bees,\\nplease welcome Dean Buzzwell.\\nWelcome, New Hive City graduating class of 9:15.\\nThat concludes our ceremonies And begins your career at Honex Industries!\\nWill we pick our job today?\\nI heard it's just orientation.\\nHeads up! Here we go.\\nKeep your hands and antennas inside the tram at all times.\\nWonder what it'll be like?\\nA little scary.\\nWelcome to Honex, a division of Honesco and a part of the Hexagon Group.\\nThis is it!\\nWow.\\nWow.\\nWe know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life.\\nHoney begins when our valiant Pollen Jocks bring the nectar to The Hive.\\nOur top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey!\\nThat girl was hot.\\nShe's my cousin!\\nShe is?\\nYes, we're all cousins.\\nRight. You're right.\\nAt Honex, we constantly strive to improve every aspect of bee existence.\\nThese bees are stress-testing a new helmet technology.\\nWhat do you think he makes?\\nNot enough.\\nHere we have our latest advancement, the Krelman.\\nWhat does that do?\\nCatches that little strand of honey that hangs after you pour it.\\nSaves us millions.\\nCan anyone work on the Krelman?\\nOf course. Most bee jobs are small ones.\\nBut bees know that every small job, if it's done well, means a lot.\\nBut choose carefully because you'll stay in the job you pick for the rest of your life.\\nThe same job the rest of your life? I didn't know that.\\nWhat's the difference?\\nYou'll be happy to know that bees, as a species, haven't had one day off in 27 million years.\\nSo you'll just work us to death?\\nWe'll sure try.\\nWow! That blew my mind!\\n\\\"What's the difference?\\\"\\nHow can you say that?\\nOne job forever?\\nThat's an insane choice to have to make.\\nI'm relieved. Now we only have to make one decision in life.\\nBut, Adam, how could they never have told us that?\\nWhy would you question anything? We're bees.\\nWe're the most perfectly functioning society on Earth.\\nYou ever think maybe things work a little too well here?\\nLike what? Give me one example.\\nI don't know. But you know what I'm talking about.\\nPlease clear the gate. Royal Nectar Force on approach.\\nWait a second. Check it out.\\nHey, those are Pollen Jocks!\\nWow.\\nI've never seen them this close.\\nThey know what it's like outside The Hive.\\nYeah, but some don't come back.\\nHey, Jocks!\\nHi, Jocks!\\nYou guys did great!\\nYou're monsters!\\nYou're sky freaks! I love it! I love it!\\nI wonder where they were.\\nI don't know.\\nTheir day's not planned.\\nOutside The Hive, flying who knows where, doing who knows what.\\nYou can't just decide to be a Pollen Jock. You have to be bred for that.\\nRight.\\nLook. That's more pollen than you and I will see in a lifetime.\\nIt's just a status symbol.\\nBees make too much of it.\\nPerhaps. Unless you're wearing it and the ladies see you wearing it.\\nThose ladies?\\nAren't they our cousins too?\\nDistant. Distant.\\nLook at these two.\\nCouple of Hive Harrys.\\nLet's have fun with them.\\nIt must be dangerous being a Pollen Jock.\\nYeah. Once a bear pinned me against a mushroom!\\nHe had a paw on my throat, and with the other, he was slapping me!\\nOh, my!\\nI never thought I'd knock him out.\\nWhat were you doing during this?\\nTrying to alert the authorities.\\nI can autograph that.\\nA little gusty out there today, wasn't it, comrades?\\nYeah. Gusty.\\nWe're hitting a sunflower patch six miles from here tomorrow.\\nSix miles, huh?\\nBarry!\\nA puddle jump for us, but maybe you're not up for it.\\nMaybe I am.\\nYou are not!\\nWe're going 0900 at J-Gate.\\nWhat do you think, buzzy-boy?\\nAre you bee enough?\\nI might be. It all depends on what 0900 means.\\nHey, Honex!\\nDad, you surprised me.\\nYou decide what you're interested in?\\nWell, there's a lot of choices.\\nBut you only get one.\\nDo you ever get bored doing the same job every day?\\nSon, let me tell you about stirring.\\nYou grab that stick, and you just move it around, and you stir it around.\\nYou get yourself into a rhythm.\\nIt's a beautiful thing.\\nYou know, Dad, the more I think about it,\\nmaybe the honey field just isn't right for me.\\nYou were thinking of what, making balloon animals?\\nThat's a bad job for a guy with a stinger.\\nJanet, your son's not sure he wants to go into honey!\\nBarry, you are so funny sometimes.\\nI'm not trying to be funny.\\nYou're not funny! You're going into honey. Our son, the stirrer!\\nYou're gonna be a stirrer?\\nNo one's listening to me!\\nWait till you see the sticks I have.\\nI could say anything right now.\\nI'm gonna get an ant tattoo!\\nLet's open some honey and celebrate!\\nMaybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody \\\"dawg\\\"!\\nI'm so proud.\\nWe're starting work today!\\nToday's the day.\\nCome on! All the good jobs will be gone.\\nYeah, right.\\nPollen counting, stunt bee, pouring, stirrer, front desk, hair removal...\\nIs it still available?\\nHang on. Two left!\\nOne of them's yours! Congratulations!\\nStep to the side.\\nWhat'd you get?\\nPicking crud out. Stellar!\\nWow!\\nCouple of newbies?\\nYes, sir! Our first day! We are ready!\\nMake your choice.\\nYou want to go first?\\nNo, you go.\\nOh, my. What's available?\\nRestroom attendant's open, not for the reason you think.\\nAny chance of getting the Krelman?\\nSure, you're on.\\nI'm sorry, the Krelman just closed out.\\nWax monkey's always open.\\nThe Krelman opened up again.\\nWhat happened?\\nA bee died. Makes an opening. See? He's dead. Another dead one.\\nDeady. Deadified. Two more dead.\\nDead from the neck up. Dead from the neck down. That's life!\\nOh, this is so hard!\\nHeating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler.\\nBarry, what do you think I should... Barry?\\nBarry!\\nAll right, we've got the sunflower patch in quadrant nine...\\nWhat happened to you?\\nWhere are you?\\nI'm going out.\\nOut? Out where?\\nOut there.\\nOh, no!\\nI have to, before I go to work for the rest of my life.\\nYou're gonna die! You're crazy! Hello?\\nAnother call coming in.\\nIf anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today.\\nHey, guys.\\nLook at that.\\nIsn't that the kid we saw yesterday?\\nHold it, son, flight deck's restricted.\\nIt's OK, Lou. We're gonna take him up.\\nReally? Feeling lucky, are you?\\nSign here, here. Just initial that.\\nThank you.\\nOK.\\nYou got a rain advisory today, and as you all know, bees cannot fly in rain.\\nSo be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats.\\nAlso, I got a couple of reports of root beer being poured on us.\\nMurphy's in a home because of it, babbling like a cicada!\\nThat's awful.\\nAnd a reminder for you rookies, bee law number one, absolutely no talking to humans!\\n All right, launch positions!\\nBuzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz!\\nBlack and yellow!\\nHello!\\nYou ready for this, hot shot?\\nYeah. Yeah, bring it on.\\nWind, check.\\nAntennae, check.\\nNectar pack, check.\\nWings, check.\\nStinger, check.\\nScared out of my shorts, check.\\nOK, ladies,\\nlet's move it out!\\nPound those petunias, you striped stem-suckers!\\nAll of you, drain those flowers!\\nWow! I'm out!\\nI can't believe I'm out!\\nSo blue.\\nI feel so fast and free!\\nBox kite!\\nWow!\\nFlowers!\\nThis is Blue Leader, We have roses visual.\\nBring it around 30 degrees and hold.\\nRoses!\\n30 degrees, roger. Bringing it around.\\nStand to the side, kid.\\nIt's got a bit of a kick.\\nThat is one nectar collector!\\nEver see pollination up close?\\nNo, sir.\\nI pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one.\\nSee that? It's a little bit of magic.\\nThat's amazing. Why do we do that?\\nThat's pollen power. More pollen, more flowers, more nectar, more honey for us.\\nCool.\\nI'm picking up a lot of bright yellow, Could be daisies, Don't we need those?\\nCopy that visual.\\nWait. One of these flowers seems to be on the move.\\nSay again? You're reporting a moving flower?\\nAffirmative.\\nThat was on the line!\\nThis is the coolest. What is it?\\nI don't know, but I'm loving this color.\\nIt smells good.\\nNot like a flower, but I like it.\\nYeah, fuzzy.\\nChemical-y.\\nCareful, guys. It's a little grabby.\\nMy sweet lord of bees!\\nCandy-brain, get off there!\\nProblem!\\nGuys!\\nThis could be bad.\\nAffirmative.\\nVery close.\\nGonna hurt.\\nMama's little boy.\\nYou are way out of position, rookie!\\nComing in at you like a missile!\\nHelp me!\\nI don't think these are flowers.\\nShould we tell him?\\nI think he knows.\\nWhat is this?!\\nMatch point!\\nYou can start packing up, honey, because you're about to eat it!\\nYowser!\\nGross.\\nThere's a bee in the car!\\nDo something!\\nI'm driving!\\nHi, bee.\\nHe's back here!\\nHe's going to sting me!\\nNobody move. If you don't move, he won't sting you. Freeze!\\nHe blinked!\\nSpray him, Granny!\\nWhat are you doing?!\\nWow... the tension level out here is unbelievable.\\nI gotta get home.\\nCan't fly in rain. Can't fly in rain. Can't fly in rain.\\nMayday! Mayday! Bee going down!\\nKen, could you close the window please?\\nKen, could you close the window please?\\nCheck out my new resume. I made it into a fold-out brochure. You see? Folds out.\\nOh, no. More humans. I don't need this.\\nWhat was that?\\nMaybe this time. This time. This time. This time! This time! This... Drapes!\\nThat is diabolical.\\nIt's fantastic. It's got all my special skills, even my top-ten favorite movies.\\nWhat's number one? Star Wars?\\nNah, I don't go for that... kind of stuff.\\nNo wonder we shouldn't talk to them. They're out of their minds.\\nWhen I leave a job interview, they're flabbergasted, can't believe what I say.\\nThere's the sun. Maybe that's a way out.\\nI don't remember the sun having a big 75 on it.\\nI predicted global warming. I could feel it getting hotter. At first I thought it was just me.\\nWait! Stop! Bee!\\nStand back. These are winter boots.\\nWait!\\nDon't kill him!\\nYou know I'm allergic to them! This thing could kill me!\\nWhy does his life have less value than yours?\\nWhy does his life have any less value than mine? Is that your statement?\\nI'm just saying all life has value. You don't know what he's capable of feeling.\\nMy brochure!\\nThere you go, little guy.\\nI'm not scared of him.It's an allergic thing.\\n Put that on your resume brochure.\\nMy whole face could puff up.\\nMake it one of your special skills.\\nKnocking someone out is also a special skill.\\nRight. Bye, Vanessa. Thanks.\\nVanessa, next week? Yogurt night?\\nSure, Ken. You know, whatever.\\nYou could put carob chips on there.\\nBye.\\nSupposed to be less calories.\\nBye.\\nI gotta say something. She saved my life. I gotta say something.\\nAll right, here it goes.\\nNah.\\nWhat would I say?\\nI could really get in trouble. It's a bee law. You're not supposed to talk to a human.\\nI can't believe I'm doing this. I've got to.\\nOh, I can't do it. Come on!\\nNo. Yes. No. Do it. I can't.\\nHow should I start it? \\\"You like jazz?\\\" No, that's no good.\\nHere she comes! Speak, you fool!\\nHi!\\nI'm sorry. You're talking.\\nYes, I know.\\nYou're talking!\\nI'm so sorry.\\nNo, it's OK. It's fine.\\nI know I'm dreaming. But I don't recall going to bed.\\nWell, I'm sure this is very disconcerting.\\nThis is a bit of a surprise to me. I mean, you're a bee!\\nI am. And I'm not supposed to be doing this, but they were all trying to kill me.\\nAnd if it wasn't for you... I had to thank you. It's just how I was raised.\\nThat was a little weird. I'm talking with a bee.\\nYeah.\\nI'm talking to a bee. And the bee is talking to me!\\nI just want to say I'm grateful.\\nI'll leave now.\\nWait! How did you learn to do that?\\nWhat?\\nThe talking thing.\\nSame way you did, I guess. \\\"Mama, Dada, honey.\\\" You pick it up.\\nThat's very funny.\\nYeah.\\nBees are funny. If we didn't laugh, we'd cry with what we have to deal with.\\nAnyway... Can I... get you something?\\nLike what?\\nI don't know. I mean... I don't know. Coffee?\\nI don't want to put you out.\\nIt's no trouble. It takes two minutes.\\nIt's just coffee.\\nI hate to impose.\\nDon't be ridiculous!\\nActually, I would love a cup.\\nHey, you want rum cake?\\nI shouldn't.\\nHave some.\\nNo, I can't.\\nCome on!\\nI'm trying to lose a couple micrograms.\\nWhere?\\nThese stripes don't help.\\nYou look great!\\nI don't know if you know anything about fashion.\\nAre you all right?\\nNo.\\nHe's making the tie in the cab as they're flying up Madison.\\nHe finally gets there.\\nHe runs up the steps into the church.\\nThe wedding is on.\\nAnd he says, \\\"Watermelon?\\nI thought you said Guatemalan.\\nWhy would I marry a watermelon?\\\"\\nIs that a bee joke?\\nThat's the kind of stuff we do.\\nYeah, different.\\nSo, what are you gonna do, Barry?\\nAbout work? I don't know.\\nI want to do my part for The Hive, but I can't do it the way they want.\\nI know how you feel.\\nYou do?\\nSure.\\nMy parents wanted me to be a lawyer or a doctor, but I wanted to be a florist.\\nReally?\\nMy only interest is flowers.\\nOur new queen was just elected with that same campaign slogan.\\nAnyway, if you look... There's my hive right there. See it?\\nYou're in Sheep Meadow!\\nYes! I'm right off the Turtle Pond!\\nNo way! I know that area. I lost a toe ring there once.\\nWhy do girls put rings on their toes?\\nWhy not?\\nIt's like putting a hat on your knee.\\nMaybe I'll try that.\\nYou all right, ma'am?\\nOh, yeah. Fine.\\nJust having two cups of coffee!\\nAnyway, this has been great.\\nThanks for the coffee.\\nYeah, it's no trouble.\\nSorry I couldn't finish it. If I did, I'd be up the rest of my life.\\nAre you...?\\nCan I take a piece of this with me?\\nSure! Here, have a crumb.\\nThanks!\\nYeah.\\nAll right. Well, then... I guess I'll see you around. Or not.\\nOK, Barry.\\nAnd thank you so much again... for before.\\nOh, that? That was nothing.\\nWell, not nothing, but... Anyway...\\nThis can't possibly work.\\nHe's all set to go.\\nWe may as well try it.\\nOK, Dave, pull the chute.\\nSounds amazing.\\nIt was amazing!\\nIt was the scariest, happiest moment of my life.\\nHumans! I can't believe you were with humans!\\nGiant, scary humans!\\nWhat were they like?\\nHuge and crazy. They talk crazy.\\nThey eat crazy giant things.\\nThey drive crazy.\\nDo they try and kill you, like on TV?\\nSome of them. But some of them don't.\\nHow'd you get back?\\nPoodle.\\nYou did it, and I'm glad. You saw whatever you wanted to see.\\nYou had your \\\"experience.\\\" Now you can pick out yourjob and be normal.\\nWell...\\nWell?\\nWell, I met someone.\\nYou did? Was she Bee-ish?\\nA wasp?! Your parents will kill you!\\nNo, no, no, not a wasp.\\nSpider?\\nI'm not attracted to spiders.\\nI know it's the hottest thing, with the eight legs and all. I can't get by that face.\\nSo who is she?\\nShe's... human.\\nNo, no. That's a bee law. You wouldn't break a bee law.\\nHer name's Vanessa.\\nOh, boy.\\nShe's so nice. And she's a florist!\\nOh, no! You're dating a human florist!\\nWe're not dating.\\nYou're flying outside The Hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite!\\nShe saved my life! And she understands me.\\nThis is over!\\nEat this.\\nThis is not over! What was that?\\nThey call it a crumb.\\nIt was so stingin' stripey!\\nAnd that's not what they eat.\\nThat's what falls off what they eat!\\nYou know what a Cinnabon is?\\nNo.\\nIt's bread and cinnamon and frosting. They heat it up...\\nSit down!\\n...really hot!\\nListen to me!\\nWe are not them! We're us.\\nThere's us and there's them!\\n\"), keys: [], span: Some(10..11)}}}",
"error"
)
love.window.showMessageBox(
"lovely-injector",
"lovely-injector has crashed:\npanicked at library/cors/src/panicking.rs:221:5:\npanic in a function that cannot unwind",
"error"
)
function love.errorhandler() end
print(crash.crash.crash)
end,
function()
--Arbitrary Code Execution
glitched_intensity = 100
G.SETTINGS.GRAPHICS.crt = 100
G.GAME.USING_CODE = true
G.ENTERED_ACE = ""
G.CHOOSE_ACE = UIBox({
definition = create_UIBox_crash(card),
config = {
align = "bmi",
offset = { x = 0, y = G.ROOM.T.y + 29 },
major = G.jokers,
bond = "Weak",
instance_type = "POPUP",
},
})
end,
}
end,
}
-- ://Keygen,
-- Create a Perishable Banana voucher, destroy the previous Keygen voucher if exists
local keygen = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"SMG9000",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Consumable",
set = "Code",
name = "cry-Keygen",
key = "keygen",
pos = { x = 12, y = 5 },
cost = 4,
atlas = "atlasnotjokers",
order = 401,
can_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
local area
if G.STATE == G.STATES.HAND_PLAYED then
if not G.redeemed_vouchers_during_hand then
G.redeemed_vouchers_during_hand =
CardArea(G.play.T.x, G.play.T.y, G.play.T.w, G.play.T.h, { type = "play", card_limit = 5 })
end
area = G.redeemed_vouchers_during_hand
else
area = G.play
end
for i = 1, #G.vouchers.cards do
if G.vouchers.cards[i].ability.keygen then
local unredeemed_voucher = G.vouchers.cards[i]
local card = copy_card(unredeemed_voucher)
card.ability.extra = copy_table(unredeemed_voucher.ability.extra)
if card.facing == "back" then
card:flip()
end
card:start_materialize()
area:emplace(card)
card.cost = 0
card.shop_voucher = false
local current_round_voucher = G.GAME.current_round.voucher
card:unredeem()
G.GAME.current_round.voucher = current_round_voucher
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0,
func = function()
card:start_dissolve()
unredeemed_voucher:start_dissolve()
return true
end,
}))
end
end
local _pool = get_current_pool("Voucher", nil, nil, nil, true)
local center = pseudorandom_element(_pool, pseudoseed("cry_keygen_redeem"))
local it = 1
while center == "UNAVAILABLE" do
it = it + 1
center = pseudorandom_element(_pool, pseudoseed("cry_keygen_redeem_resample" .. it))
end
local card = create_card("Voucher", area, nil, nil, nil, nil, center)
card:start_materialize()
area:emplace(card)
card:set_perishable(true)
card.ability.perishable = true
card.ability.banana = true
card.ability.keygen = true
card.cost = 0
card.shop_voucher = false
local current_round_voucher = G.GAME.current_round.voucher
card:redeem()
G.GAME.current_round.voucher = current_round_voucher
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0,
func = function()
card:start_dissolve()
return true
end,
}))
end,
demicoloncompat = true,
force_use = function(self, card, area)
self:use(card, area)
end,
set_ability = function(self, center)
center.ability.cry_multiuse = math.ceil(1 + (G.GAME.extra_multiuse or 0))
end,
}
-- ://Payload
-- Triple interest gained on next cash out, stacks exponentially (multiplicative on modest)
local payload = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = {
items = {
"set_cry_code",
},
},
object_type = "Consumable",
set = "Code",
name = "cry-Payload",
key = "payload",
pos = { x = 8, y = 0 },
config = { interest_mult = 3 },
loc_vars = function(self, info_queue, card)
if not card then
return { vars = { self.config.interest_mult } }
end
return { vars = { card.ability.interest_mult } }
end,
cost = 4,
atlas = "atlasnotjokers",
order = 402,