-
Notifications
You must be signed in to change notification settings - Fork 8
/
lovely.toml
3158 lines (2643 loc) · 88 KB
/
lovely.toml
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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Exotics toggle
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = 'G.GAME.hands[text].played = G.GAME.hands[text].played + 1'
position = 'after'
match_indent = true
payload = '''
if text == 'bunc_Spectrum'
or text == 'bunc_Straight Spectrum'
or text == 'bunc_Spectrum House'
or text == 'bunc_Spectrum Five' then
enable_exotics()
unlock_card(G.P_CENTERS.b_bunc_fairy)
end
'''
# Exotic color, part 1/2
[[patches]]
[patches.pattern]
target = 'globals.lua'
pattern = "RENTAL = HEX('b18f43'),"
position = 'after'
match_indent = true
payload = '''BUNCO_EXOTIC = HEX('ef9ae7'),'''
# Exotic color, part 2/2
[[patches]]
[patches.pattern]
target = 'functions/misc_functions.lua'
pattern = "legendary = G.C.RARITY[4],"
position = 'after'
match_indent = true
payload = '''bunco_exotic = G.C.BUNCO_EXOTIC,'''
# Colorful Finishers, part 1/4
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "function ease_background_colour_blind(state, blind_override)"
position = 'before'
match_indent = true
payload = '''
local function invert_color(color, invert_red, invert_green, invert_blue)
local inverted_color = {
1 - (color[1] or 0),
1 - (color[2] or 0),
1 - (color[3] or 0),
color[4] or 1
}
if invert_red then
inverted_color[1] = color[1] or 0
end
if invert_green then
inverted_color[2] = color[2] or 0
end
if invert_blue then
inverted_color[3] = color[3] or 0
end
return inverted_color
end
local function increase_saturation(color, value)
-- Extract RGB components
local r = color[1] or 0
local g = color[2] or 0
local b = color[3] or 0
-- Convert RGB to HSL
local max_val = math.max(r, g, b)
local min_val = math.min(r, g, b)
local delta = max_val - min_val
local h, s, l = 0, 0, (max_val + min_val) / 2
if delta ~= 0 then
if l < 0.5 then
s = delta / (max_val + min_val)
else
s = delta / (2 - max_val - min_val)
end
if r == max_val then
h = (g - b) / delta
elseif g == max_val then
h = 2 + (b - r) / delta
else
h = 4 + (r - g) / delta
end
h = h * 60
if h < 0 then
h = h + 360
end
end
-- Increase saturation
s = math.min(s + value, 1)
-- Convert back to RGB
local c = (1 - math.abs(2 * l - 1)) * s
local x = c * (1 - math.abs((h / 60) % 2 - 1))
local m = l - c / 2
local r_new, g_new, b_new = 0, 0, 0
if h < 60 then
r_new, g_new, b_new = c, x, 0
elseif h < 120 then
r_new, g_new, b_new = x, c, 0
elseif h < 180 then
r_new, g_new, b_new = 0, c, x
elseif h < 240 then
r_new, g_new, b_new = 0, x, c
elseif h < 300 then
r_new, g_new, b_new = x, 0, c
else
r_new, g_new, b_new = c, 0, x
end
-- Adjust RGB values
r_new, g_new, b_new = (r_new + m), (g_new + m), (b_new + m)
return {r_new, g_new, b_new, color[4] or 1}
end
'''
# Colorful Finishers, part 2/4
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "if v.name == blindname then"
position = 'after'
match_indent = true
payload = '''
boss_col = v.boss_colour
'''
# Colorful Finishers, part 3/4
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "ease_background_colour{new_colour = G.C.BLUE, special_colour = G.C.RED, tertiary_colour = darken(G.C.BLACK, 0.4), contrast = 3}"
position = 'at'
match_indent = true
payload = '''
if BUNCOMOD.content.config.colorful_finishers then
ease_background_colour{new_colour = increase_saturation(mix_colours(boss_col, invert_color(boss_col), 0.3), 1),
special_colour = boss_col,
tertiary_colour = darken(increase_saturation(mix_colours(boss_col, invert_color(boss_col, true, false, false), 0.3), 0.6), 0.4), contrast = 1.7}
else
ease_background_colour{new_colour = G.C.BLUE, special_colour = G.C.RED, tertiary_colour = darken(G.C.BLACK, 0.4), contrast = 3}
end
'''
# Colorful Finishers, part 4/4
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'elseif G.GAME.won then'
position = 'at'
match_indent = true
payload = '''elseif G.GAME.won and not BUNCOMOD.content.config.colorful_finishers then'''
# Luchador Rework
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "elseif self.ability.name == 'Luchador' then"
position = 'at'
match_indent = true
payload = '''elseif self.ability.name == 'Luchador' and not BUNCOMOD.content.config.gameplay_reworks then'''
# Red Card Rework
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "if self.ability.name == 'Red Card' and not context.blueprint then"
position = 'at'
match_indent = true
payload = '''if self.ability.name == 'Red Card' and not context.blueprint and not BUNCOMOD.content.config.gameplay_reworks then'''
# Boss Tag Rework
[[patches]]
[patches.pattern]
target = 'tag.lua'
pattern = "if self.name == 'Boss Tag' then"
position = 'at'
match_indent = true
payload = '''if self.name == 'Boss Tag' and not BUNCOMOD.content.config.gameplay_reworks then'''
# # Shiny Blinds
# [[patches]]
# [patches.pattern]
# target = 'blind.lua'
# pattern = "self.children.animatedSprite:draw_shader('dissolve', 0.1)"
# position = 'at'
# match_indent = true
# payload = '''
# self.ARGS.send_to_shader = self.ARGS.send_to_shader or {}
# self.ARGS.send_to_shader[1] = self.children.animatedSprite.VT.r*10 + G.TIMERS.REAL/(28) + (self.children.animatedSprite.juice and self.children.animatedSprite.juice.r*10 or 0) + self.tilt_var.amt
# self.ARGS.send_to_shader[2] = G.TIMERS.REAL
# self.children.animatedSprite:draw_shader('polychrome', 0.1, self.ARGS.send_to_shader)
# '''
# # Shiny Blinds
# [[patches]]
# [patches.pattern]
# target = 'blind.lua'
# pattern = "self.children.animatedSprite:draw_shader('dissolve')"
# position = 'at'
# match_indent = true
# payload = '''
# self.children.animatedSprite:draw_shader('polychrome', nil, self.ARGS.send_to_shader)
# '''
# # Shiny Blinds
# [[patches]]
# [patches.pattern]
# target = 'functions\UI_definitions.lua'
# pattern = "{shader = 'dissolve', shadow_height = 0.05}"
# position = 'at'
# match_indent = true
# payload = '''
# {shader = 'polychrome', shadow_height = 0.05}
# '''
# function generate_card_ui() (Temporary extra chips)
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if main_end then"
position = "before"
match_indent = true
payload = '''
if (_c.set == 'Default' or _c.set == 'Enhanced') and card and card.ability and type(card.ability) == 'table' and card.ability.temporary_extra_chips and not card.debuff then
localize{type = 'other', key = 'temporary_extra_chips', nodes = desc_nodes, vars = {card.ability.temporary_extra_chips}}
end'''
# Linked cards selection 1/2
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = 'function CardArea:can_highlight(card)'
position = 'after'
match_indent = true
payload = '''
-- Making so the player can't choose a group of linked cards if it'd bypass highlighted limit
if card and card.ability.group then
local group_amount = 0 -- Amount of cards in the same group
local highlighted_amount = 0 -- Amount of cards already highlighted
local highlighted_group_amount = 0 -- Amount of cards already highlighted in the same group
for i = 1, #self.cards do
if self.cards[i].ability.group and self.cards[i].ability.group.id == card.ability.group.id then
if not self.cards[i].highlighted then
group_amount = group_amount + 1
else
highlighted_group_amount = highlighted_group_amount + 1
end
end
if self.cards[i].highlighted then
highlighted_amount = highlighted_amount + 1
end
end
-- If you select a group that has more cards than the game allows
if (not card.highlighted) and (group_amount > self.config.highlighted_limit) then
-- Check if there's already cards selected
if highlighted_amount ~= 0 then
return false
end
return true
end
-- If you select a normal amount of cards but the amount of cards in the group and already highlighted will bypass the limit
if (not card.highlighted) and (self.config.highlighted_limit < (group_amount + highlighted_amount)) then
return false
end
-- If you want to unselect cards that already bypassed the limit
if card.highlighted then
return true
end
end
'''
# Linked cards selection 2/2
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = 'if #self.highlighted >= self.config.highlighted_limit then'
position = 'at'
match_indent = true
payload = '''if (#self.highlighted >= self.config.highlighted_limit) and (not card.ability.group) then'''
# Linked cards destruction 1/2
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'self.removed = true'
position = 'before'
match_indent = true
payload = '''
local grouped, grouped_area_cards
if self.ability.group then
grouped = self
grouped_area_cards = self.area and self.area.cards or nil
end
'''
# Linked cards destruction 2/2
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'Moveable.remove(self)'
position = 'after'
match_indent = true
payload = '''
G.E_MANAGER:add_event(Event({blocking = false, trigger = 'after', func = function()
if grouped and grouped_area_cards and #grouped_area_cards > 0 then
local next_card
local destroyed_cards = {}
for i=1, #grouped_area_cards do
if grouped_area_cards[i].ability.group and grouped_area_cards[i].ability.group then
if grouped_area_cards[i].ability.group.id == grouped.ability.group.id then
table.insert(destroyed_cards, grouped_area_cards[i])
end
end
end
next_card = destroyed_cards[1]
if next_card then
if next_card.ability.name == 'Glass Card' then
next_card:shatter()
else
next_card:start_dissolve()
end
for i = 1, #G.jokers.cards do
eval_card(G.jokers.cards[i], {
cardarea = G.jokers,
remove_playing_cards = true,
removed = {next_card}
})
end
end
end
return true end}))
'''
# Linked cards description
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if main_end then"
position = "before"
match_indent = true
payload = '''
if (_c.set == 'Default' or _c.set == 'Enhanced') and card and card.ability and type(card.ability) == 'table' and card.ability.group then
localize{type = 'other', key = card.greyed and 'drawn_linked_cards' or 'linked_cards', nodes = desc_nodes, vars = {}}
if not (card.area.config.type == 'title' and card.greyed) then
main_end = main_end or {}
local all_cards_from_group = {}
if card and card.area then
if card.area.config.type == 'title' then
for i = 1, #G.deck.cards do
local check_card = G.deck.cards[i]
if check_card.ability and type(check_card.ability) == 'table' and check_card.ability.group then
if check_card.ability.group.id == card.ability.group.id then
table.insert(all_cards_from_group, check_card)
end
end
end
else
for i = 1, #card.area.cards do
local check_card = card.area.cards[i]
if check_card.ability and type(check_card.ability) == 'table' and check_card.ability.group then
if check_card.ability.group.id == card.ability.group.id then
table.insert(all_cards_from_group, check_card)
end
end
end
end
end
local cardarea = CardArea(
0,
0,
2.85 * G.CARD_W,
0.75 * G.CARD_H,
{card_limit = #all_cards_from_group, type = 'title', highlight_limit = 0}
)
for k, v in ipairs(all_cards_from_group) do
local group_card = copy_card(v, nil, 0.5)
group_card.states.hover.can = false
group_card:juice_up(0.3, 0.2)
if k == 1 then play_sound('paper1', 0.95 + math.random() * 0.1, 0.3) end
ease_value(group_card.T, 'scale', 0.25, nil, 'REAL', true, 0.2)
cardarea:emplace(group_card)
end
table.insert(main_end, {n=G.UIT.R, config = {align = "cm", colour = G.C.CLEAR, r = 0.0}, nodes={
{n=G.UIT.C, config = {align = "cm"}, nodes={
{n=G.UIT.O, config = {object = cardarea}}
}}
}})
end
end'''
# Linked cards undiscovered sprite
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''local shared_sprite = (self.ability.set == 'Edition' or self.ability.set == 'Joker') and G.shared_undiscovered_joker or G.shared_undiscovered_tarot'''
position = 'after'
match_indent = true
payload = '''
if not G.shared_undiscovered_polymino then G.shared_undiscovered_polymino = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS['bunc_bunco_polyminoes_undiscovered'], {x = 1, y = 0}) end
if self.ability.set == 'Polymino' then
shared_sprite = G.shared_undiscovered_polymino
end
'''
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = 'if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > 5 then'
position = 'at'
match_indent = true
payload = '''
local group_size = 0
if G.hand and G.hand.highlighted then
for i = 1, #G.hand.highlighted do
if G.hand.highlighted[i].ability.group then
group_size = group_size + 1
end
end
end
if #G.hand.highlighted <= (G.GAME.blind and G.GAME.blind.name == 'cry-Sapphire Stamp' and not G.GAME.blind.disabled and 1 or 0) or G.GAME.blind.block_play or (#G.hand.highlighted > G.hand.config.highlighted_limit and group_size <= G.hand.config.highlighted_limit) then
'''
# Linked cards visual cue
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''if self.greyed then'''
position = 'before'
match_indent = true
payload = '''
if self.ability.group then
if not self.children.link then
local variant = self.ability.group.id
variant = 1 + (variant - 1) % 5
self.children.link = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS['bunc_bunco_link'], {x = variant - 1, y = 0})
self.children.link.states.visible = false
end
self.children.link:draw_shader('dissolve', nil, nil, nil, self.children.center, 0, 0)
self.children.link.role.draw_major = self
end
'''
# Virtual pack deck alignment
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = '''if self.children.view_deck then'''
position = 'before'
match_indent = true
payload = '''
if self.config.type == 'hand' and G.hand and G.STATE == G.STATES.SMODS_BOOSTER_OPENED and SMODS.OPENED_BOOSTER.config.center.type == 'bunc_virtual' then
G.hand:sort()
for i = 1, #G.hand.cards do
local card = G.hand.cards[i]
card.states.drag.can = false
local offset_mult = 0.4
card.T.y = card.T.y - (
card.base.suit == 'Spades' and offset_mult * 2
or card.base.suit == 'Hearts' and offset_mult * 1
or card.base.suit == 'Clubs' and offset_mult * 0
or card.base.suit == 'Diamonds' and offset_mult * -1
or card.base.suit == 'bunc_Fleurons' and offset_mult * -2
or card.base.suit == 'bunc_Halberds' and offset_mult * -3
or offset_mult * -4)
local align_mult = 0.2
card.T.x = card.T.x - (
card.base.suit == 'Spades' and 0.0
or card.base.suit == 'Hearts' and align_mult
or card.base.suit == 'Clubs' and align_mult * 2
or card.base.suit == 'Diamonds' and align_mult * 3
or card.base.suit == 'bunc_Fleurons' and align_mult * 4
or card.base.suit == 'bunc_Halberds' and align_mult * 5
or align_mult * 6)
card.T.r = card.T.r / 3.0
if card.highlighted then
card.T.y = card.T.y + 0.5
card.greyed = false
else
card.greyed = true
end
end
end
'''
# Linked cards saving (experimental)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''play_sound('card1', 0.85 + percent*0.2/100, 0.6*(vol or 1))'''
position = 'after'
match_indent = true
payload = '''
G.E_MANAGER:add_event(Event({blocking = false, trigger = 'after', func = function()
if card and card.ability and card.ability.group then
save_run()
end
return true
end}))
'''
# function Card:flip() (Cassette)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "self.facing='back'"
position = 'after'
match_indent = true
payload = '''
if self.config.center.key == 'j_bunc_cassette' then
self:flip()
self:calculate_joker({flip = true})
end
'''
# function CardArea:emplace() (X-Ray)
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = 'if #self.cards > self.config.card_limit then'
position = 'before'
match_indent = true
payload = '''
if G.jokers ~= nil and self == G.hand then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_xray' then
v:calculate_joker({emplaced_card = card})
end
end
end
'''
# function copy_card (Dread)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'if not strip_edition then'
position = 'before'
match_indent = true
payload = '''
if new_card.config.center.key == 'j_bunc_dread' then
new_card.ability.extra.level_up_list = {}
end
'''
# function Card:set_cost() (Loan Shark)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'if self.area and self.ability.couponed and (self.area == G.shop_jokers or self.area == G.shop_booster) then self.cost = 0 end'
position = 'after'
match_indent = true
payload = '''
if self.config.center.key == 'j_bunc_loan_shark' and self.added_to_deck then
self.sell_cost = self.ability.extra.cost + (self.ability.extra_value or 0)
end
'''
# Joker Knight variables
[[patches]]
[patches.pattern]
target = 'engine/node.lua'
pattern = 'function Node:drag()'
position = 'before'
match_indent = true
payload = '''
local break_table = {before = nil, after = nil, node = nil}
'''
# function Node:drag() (Joker Knight 1/2)
[[patches]]
[patches.pattern]
target = 'engine/node.lua'
pattern = 'function Node:drag()'
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil and self:is(Card) and self.area == G.jokers then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_knight' and not v.debuff then
if break_table.before == nil then
break_table.before = {}
for _, v in ipairs(G.jokers.cards) do
table.insert(break_table.before, v.ability.name)
end
break_table.after = break_table.before
break_table.node = self
end
end
end
end
'''
# function Node:stop_drag() (Joker Knight 2/2)
[[patches]]
[patches.pattern]
target = 'engine/node.lua'
pattern = 'function Node:stop_drag()'
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil and self == break_table.node then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_knight' and not v.debuff then
function do_tables_match(a, b)
return table.concat(a) == table.concat(b)
end
if break_table.before ~= nil then
break_table.before = {}
for _, v in ipairs(G.jokers.cards) do
table.insert(break_table.before, v.ability.name)
end
if not do_tables_match(break_table.before, break_table.after) then
v:calculate_joker({ break_positions = true })
end
break_table.before = nil
break_table.after = nil
end
end
end
end
'''
# function create_card() (JMJB)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'card:set_edition(edition)'
position = 'before'
match_indent = true
payload = '''if card.config.center.key == 'j_bunc_jmjb' then edition = poll_edition(nil, nil, true, true) end'''
# function ease_dollars() (Fiendish)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'function ease_dollars(mod, instant)'
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_fiendish' and not v.debuff then
if mod > 0 then
if pseudorandom('fiendish'..G.SEED) < G.GAME.probabilities.normal / v.ability.extra.odds then
mod = 1
card_eval_status_text(
v,
'extra',
nil, nil, nil,
{message = '$'..(mod or '1'), colour = G.C.RED, instant = true})
else
mod = mod * 2
card_eval_status_text(
v,
'extra',
nil, nil, nil,
{message = '$'..mod, colour = G.C.ORANGE, instant = true})
end
end
end
end
end
'''
# function create_card() (Doorhanger)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'local _pool, _pool_key = get_current_pool(_type, _rarity, legendary, key_append)'
position = 'before'
match_indent = true
payload = '''
if G.jokers ~= nil then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_doorhanger' and not v.debuff then
if _rarity == nil or _rarity < 0.9 then
_rarity = 0.9
if pseudorandom('doorhanger'..G.SEED) > 0.98 then
_rarity = 1
end
end
end
end
end
'''
# function evaluate_play (Nil Bill, Neon)
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "card_eval_status_text(scoring_hand[i], 'debuff')"
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil then
for _, v in ipairs(G.jokers.cards) do
if (v.config.center.key == 'j_bunc_nil_bill' or v.config.center.key == 'j_bunc_neon') and not v.debuff then
v:calculate_joker({debuffed_card = scoring_hand[i]})
end
end
end
'''
# function CardArea:parse_highlighted (Registration Plate 1/3)
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = "update_hand_text({immediate = true, nopulse = nil, delay = 0}, {handname=disp_text, level=G.GAME.hands[text].level, mult = G.GAME.hands[text].mult, chips = G.GAME.hands[text].chips})"
position = 'at'
match_indent = true
payload = '''
if text == 'bunc_Deal' then
update_hand_text({immediate = true, nopulse = nil, delay = 0}, {handname=disp_text, level='0', mult = G.GAME.hands[text].mult, chips = G.GAME.hands[text].chips})
else
update_hand_text({immediate = true, nopulse = nil, delay = 0}, {handname=disp_text, level=G.GAME.hands[text].level, mult = G.GAME.hands[text].mult, chips = G.GAME.hands[text].chips})
end
'''
# function Game:set_globals (Registration Plate 2/3)
[[patches]]
[patches.pattern]
target = 'globals.lua'
pattern = "G.C.HAND_LEVELS[0] = G.C.RED"
position = 'at'
match_indent = true
payload = '''
G.C.HAND_LEVELS[0] = G.C.JOKER_GREY
'''
# function level_up_hand (Registration Plate 3/3)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "function level_up_hand(card, hand, instant, amount)"
position = 'after'
match_indent = true
payload = '''
if hand == 'bunc_Deal' then return end
'''
# function level_up_hand (Head in the Clouds)
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "function level_up_hand(card, hand, instant, amount)"
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_head_in_the_clouds' and not v.debuff then
if (amount == nil) or not (amount <= 0) then
v:calculate_joker({level_up_hand = hand})
end
end
end
end
if hand == 'Head in the Clouds' then hand = 'High Card' end
'''
# function Card:highlight (Trigger Finger)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'self.highlighted = is_higlighted'
position = 'after'
match_indent = true
payload = '''
if G.jokers ~= nil then
for _, v in ipairs(G.jokers.cards) do
if v.config.center.key == 'j_bunc_trigger_finger' and not v.debuff and is_higlighted and self.area == G.hand then
if pseudorandom('trigger_finger'..G.SEED) < G.GAME.probabilities.normal / v.ability.extra.odds then
v:calculate_joker({highlight_card = true})
break
end
end
end
end
'''
# function Card:draw (Vandalism 1/7)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.children.center.states.hover = self.states.hover'''
position = 'before'
match_indent = true
payload = '''
if _center.name == 'Vandalism' and (_center.discovered or self.bypass_discovery_center) then
self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[(G.GAME.viewed_back or G.GAME.selected_back) and ((G.GAME.viewed_back or G.GAME.selected_back)[G.SETTINGS.colourblind_option and 'hc_atlas' or 'lc_atlas'] or (G.GAME.viewed_back or G.GAME.selected_back).atlas) or 'centers'], self.params.bypass_back or (self.playing_card and G.GAME[self.back].pos or G.P_CENTERS['b_red'].pos))
end
'''
# function Card:draw (Vandalism 2/7 - Vanilla)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''if (self.edition and self.edition.negative) or (self.ability.name == 'Antimatter' and (self.config.center.discovered or self.bypass_discovery_center)) then'''
position = 'before'
match_indent = true
payload = '''
if self.config.center.key == 'j_bunc_vandalism' and (self.config.center.discovered or self.bypass_discovery_center) then
self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, 0, 0)
if self.edition then
for k, v in pairs(G.P_CENTER_POOLS.Edition) do
if self.edition[v.key:sub(3)] and v.shader then
self.children.floating_sprite:draw_shader(v.shader, nil, self.ARGS.send_to_shader, nil, self.children.center, 0, 0)
end
end
end
end
'''
# function Card:draw (Vandalism 2/7 - Cryptid Compat)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''if (self.edition and (self.edition.negative or self.edition.cry_oversat)) or (self.ability.name == 'Antimatter' and (self.config.center.discovered or self.bypass_discovery_center)) then'''
position = 'before'
match_indent = true
payload = '''
if self.config.center.key == 'j_bunc_vandalism' and (self.config.center.discovered or self.bypass_discovery_center) then
self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, 0, 0)
if self.edition then
for k, v in pairs(G.P_CENTER_POOLS.Edition) do
if self.edition[v.key:sub(3)] and v.shader then
self.children.floating_sprite:draw_shader(v.shader, nil, self.ARGS.send_to_shader, nil, self.children.center, 0, 0)
end
end
end
end
'''
# function Card:draw (Vandalism 3/7)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.children.center:draw_shader('negative_shine', nil, self.ARGS.send_to_shader)'''
position = 'after'
match_indent = true
payload = '''
if self.config.center.key == 'j_bunc_vandalism' and (self.config.center.discovered or self.bypass_discovery_center) then
self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, 0, 0)
if self.edition then
for k, v in pairs(G.P_CENTER_POOLS.Edition) do
if self.edition[v.key:sub(3)] and v.shader then
self.children.floating_sprite:draw_shader(v.shader, nil, self.ARGS.send_to_shader, nil, self.children.center, 0, 0)
end
end
end
end
'''
# function Card:draw (Vandalism 4/7)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod)'''
position = 'at'
match_indent = true
payload = '''
if self.ability.name ~= 'Vandalism' then
self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod)
end
'''
# function Card:draw (Vandalism 5/7)
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''self.children.floating_sprite:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6)'''
position = 'at'
match_indent = true
payload = '''
if self.ability.name ~= 'Vandalism' then
self.children.floating_sprite:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6)
end
'''
# function Blind:stay_flipped (Vandalism 6/7)
[[patches]]
[patches.pattern]
target = 'blind.lua'
pattern = '''if self.name == 'The Wheel' and pseudorandom(pseudoseed('wheel')) < G.GAME.probabilities.normal/7 then'''
position = 'before'
match_indent = true
payload = '''