-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMikasModCollection.lua
More file actions
6176 lines (5681 loc) · 213 KB
/
Copy pathMikasModCollection.lua
File metadata and controls
6176 lines (5681 loc) · 213 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
--- STEAMODDED HEADER
--- MOD_NAME: Mika's Mod Collection
--- MOD_ID: MikasMods
--- MOD_AUTHOR: [Mikadoe]
--- MOD_DESCRIPTION: A collection of Mika's Mods. Check the mod description on GitHub for more information :)
--- DISPLAY_NAME: Mika's Mod
--- BADGE_COLOUR: FD5DA8
----------------------------------------------
------------MOD CODE -------------------------
-- Config: DISABLE UNWANTED MODS HERE
local config = {
-- Decks
evenStevenDeck = true,
oddToddDeck = true,
fibonacciDeck = true,
primeDeck = true, -- Do not enable without primeTimeJoker
midasDeck = true,
jokersForHireDeck = true,
perfectPrecisionDeck = true, -- Do not enable without sniperJoker
-- Tarot Cards
aceOfPentaclesTarot = true,
pageOfPentaclesTarot = true,
kingOfCupsTarot = false, -- In Development, do not enable
commonTarot = false, -- In Development, do not enable
uncommonTarot = false, -- In Development, do not enable
chipsTarot = false, -- In Development, do not enable
multTarot = false, -- In Development, do not enable
moneyTarot = false, -- In Development, do not enable
supportTarot = false, -- In Development, do not enable
cardChipsTarot = false, -- In Development, do not enable
cardMultTarot = false, -- In Development, do not enable
-- Spectral Cards
incenseSpectral = true,
-- Jokers
primeTimeJoker = true,
straightNateJoker = true,
fishermanJoker = true,
impatientJoker = true,
cultistJoker = true,
sealCollectorJoker = true,
camperJoker = true,
scratchCardJoker = true,
delayedJoker = true,
showoffJoker = true,
sniperJoker = true,
blackjackJoker = true,
batmanJoker = true,
bombJoker = true,
eyeChartJoker = true,
grudgefulJoker = true,
finishingBlowJoker = true,
auroraBorealisJoker = true,
historicalJoker = true,
suitAlleyJoker = true,
printerJoker = true,
trainingWheelsJoker = true,
horseshoeJoker = true,
incompleteJoker = true,
abbeyRoadJoker = true,
fishingLicenseJoker = true,
goldBarJoker = true,
riggedJoker = true,
commanderJoker = true,
blueMoonJoker = true,
dagonetJoker = true,
glueJoker = true,
harpSealJoker = true,
footballCardJoker = true,
specialEditionJoker = true,
stockpilerJoker = true,
studentLoansJoker = true,
brokeJoker = true,
goForBrokeJoker = true,
streetFighterJoker = true,
checklistJoker = true,
oneOfUsJoker = true,
investorJoker = true,
mountainClimberJoker = true,
shacklesJoker = true,
buyOneGetOneJoker = true,
packAPunchJoker = true,
sealStealJoker = true,
taxCollectorJoker = true,
glassCannonJoker = true,
scoringTestJoker = true,
ciceroJoker = true,
dawnJoker = true,
savingsJoker = true,
monopolistJoker = true,
nebulaJoker = true,
cheapskateJoker = true,
psychicJoker = true,
cheatJoker = true,
plusOneJoker = true,
}
-- Helper functions
local function init_joker(joker, no_sprite)
no_sprite = no_sprite or false
local new_joker = SMODS.Joker:new(
joker.ability_name,
joker.slug,
joker.ability,
{ x = 0, y = 0 },
joker.loc,
joker.rarity,
joker.cost,
joker.unlocked,
joker.discovered,
joker.blueprint_compat,
joker.eternal_compat,
joker.effect,
joker.atlas,
joker.soul_pos
)
new_joker:register()
if not no_sprite then
local sprite = SMODS.Sprite:new(
new_joker.slug,
SMODS.findModByID("MikasMods").path,
new_joker.slug .. ".png",
71,
95,
"asset_atli"
)
sprite:register()
end
end
local function init_tarot(tarot, no_sprite)
no_sprite = no_sprite or false
local new_tarot = SMODS.Tarot:new(
tarot.name,
tarot.slug,
tarot.config,
{ x = 0, y = 0 },
tarot.loc,
tarot.cost,
tarot.cost_mult,
tarot.effect,
tarot.consumeable,
tarot.discovered,
tarot.atlas
)
new_tarot:register()
if not no_sprite then
local sprite = SMODS.Sprite:new(
new_tarot.slug,
SMODS.findModByID("MikasMods").path,
new_tarot.slug .. ".png",
71,
95,
"asset_atli"
)
sprite:register()
end
end
local function init_spectral(spectral, no_sprite)
no_sprite = no_sprite or false
local new_spectral = SMODS.Spectral:new(
spectral.name,
spectral.slug,
spectral.config,
{ x = 0, y = 0 },
spectral.loc,
spectral.cost,
spectral.consumeable,
spectral.discovered,
spectral.atlas
)
new_spectral:register()
if not no_sprite then
local sprite = SMODS.Sprite:new(
new_spectral.slug,
SMODS.findModByID("MikasMods").path,
new_spectral.slug .. ".png",
71,
95,
"asset_atli"
)
sprite:register()
end
end
local function create_tarot(joker, seed)
-- Check consumeable space
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
-- Add card
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = (function()
local card = create_card("Tarot", G.consumeables, nil, nil, nil, nil, nil, seed)
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end)
}))
-- Show message
card_eval_status_text(joker, "extra", nil, nil, nil, {
message = localize("k_plus_tarot"),
colour = G.C.PURPLE
})
else
card_eval_status_text(joker, "extra", nil, nil, nil, {
message = localize("k_no_space_ex")
})
end
end
local function create_planet(joker, seed, edition, other_joker)
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit or (edition and edition["negative"]) then
local card_type = "Planet"
if not (edition and edition["negative"]) then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
end
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = (function()
if G.GAME.last_hand_played then
local _planet = 0
for _, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == G.GAME.last_hand_played then
_planet = v.key
end
end
local card = create_card(card_type, G.consumeables, nil, nil, nil, nil, _planet, seed)
if edition then
card:set_edition(edition, true)
end
card:add_to_deck()
G.consumeables:emplace(card)
if not (edition and edition["negative"]) then
G.GAME.consumeable_buffer = 0
end
if other_joker then
other_joker:juice_up(0.5, 0.5)
end
end
return true
end)
}))
-- Show message
card_eval_status_text(joker, "extra", nil, nil, nil, {
message = localize("k_plus_planet"),
colour = G.C.SECONDARY_SET.Planet
})
else
card_eval_status_text(joker, "extra", nil, nil, nil, {
message = localize("k_no_space_ex")
})
end
end
local function is_even(card)
local id = card:get_id()
return id <= 10 and id % 2 == 0
end
local function is_odd(card)
local id = card:get_id()
return (id % 2 ~= 0 and id < 10) or id == 14
end
local function is_fibo(card)
local id = card:get_id()
return id == 2 or id == 3 or id == 5 or id == 8 or id == 14
end
local function is_prime(card)
local id = card:get_id()
return id == 2 or id == 3 or id == 5 or id == 7 or id == 14
end
local function is_face(card)
local id = card:get_id()
return id == 11 or id == 12 or id == 13
end
local function remove_prefix(name, prefix)
local start_pos, end_pos = string.find(name, prefix)
if start_pos == 1 then
return string.sub(name, end_pos + 1)
else
return name
end
end
local letters = { "a", "b", "c", "d", "e", "é", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x", "y", "z" }
local function count_letters(str, letter)
local count = 0
for _ in str:gmatch(letter) do
count = count + 1
end
return count
end
local enhancements = {
G.P_CENTERS.m_bonus,
G.P_CENTERS.m_mult,
G.P_CENTERS.m_wild,
G.P_CENTERS.m_glass,
G.P_CENTERS.m_steel,
G.P_CENTERS.m_stone,
G.P_CENTERS.m_gold,
G.P_CENTERS.m_lucky
}
local seals = {
"Gold",
"Red",
"Blue",
"Purple"
}
local function tables_equal(a, b)
return table.concat(a) == table.concat(b)
end
local function tables_copy(t)
local t2 = {}
for k, v in pairs(t) do
t2[k] = v
end
return t2
end
-- Save attributes
local attributes = {
mult = {
key = "mult_dagonet",
prev_key = "prev_mult_dagonet",
min = 0
},
mult_mod = {
key = "mult_mod_dagonet",
prev_key = "prev_mult_mod_dagonet",
min = 0
},
chips = {
key = "chips_dagonet",
prev_key = "prev_chips_dagonet",
min = 0
},
chip_mod = {
key = "chip_mod_dagonet",
prev_key = "prev_chips_mod_dagonet",
min = 0
},
Xmult = {
key = "Xmult_dagonet",
prev_key = "prev_Xmult_dagonet",
min = 1
},
Xmult_mod = {
key = "Xmult_mod_dagonet",
prev_key = "prev_Xmult_mod_dagonet",
min = 0
},
x_mult = {
key = "x_mult_dagonet",
prev_key = "prev_x_mult_dagonet",
min = 1
},
t_mult = {
key = "t_mult_dagonet",
prev_key = "prev_t_mult_dagonet",
min = 0
},
t_chips = {
key = "t_chips_dagonet",
prev_key = "prev_t_chips_dagonet",
min = 0
},
s_mult = {
key = "s_mult_dagonet",
prev_key = "prev_s_mult_dagonet",
min = 0
},
dollars = {
key = "dollars_dagonet",
prev_key = "prev_dollars_dagonet",
min = 0
},
hand_add = {
key = "hand_add_dagonet",
prev_key = "prev_hand_add_dagonet",
min = 0
},
discard_sub = {
key = "discard_sub_dagonet",
prev_key = "prev_discard_sub_dagonet",
min = 0
},
odds = {
key = "odds_dagonet",
prev_key = "prev_odds_dagonet",
min = 0
},
faces = {
key = "faces_dagonet",
prev_key = "prev_faces_dagonet",
min = 0
},
max = {
key = "max_dagonet",
prev_key = "prev_max_dagonet",
min = 0
},
min = {
key = "min_dagonet",
prev_key = "prev_min_dagonet",
min = 0
},
every = {
key = "every_dagonet",
prev_key = "prev_every_dagonet",
min = 0
},
increase = {
key = "increase_dagonet",
prev_key = "prev_increase_dagonet",
min = 0
},
d_size = {
key = "d_size_dagonet",
prev_key = "prev_d_size_dagonet",
min = 0
},
h_mod = {
key = "h_mod_dagonet",
prev_key = "prev_h_mod_dagonet",
min = 0
},
h_plays = {
key = "h_plays_dagonet",
prev_key = "prev_h_plays_dagonet",
min = 0
},
discards = {
key = "discards_dagonet",
prev_key = "prev_discards_dagonet",
min = 0
},
req = {
key = "req_dagonet",
prev_key = "prev_req_dagonet",
min = 0
},
percentage = {
key = "percentage_dagonet",
prev_key = "prev_percentage_dagonet",
min = 0
},
base = {
key = "base_dagonet",
prev_key = "prev_base_dagonet",
min = 0
},
extra = {
key = "extra_dagonet",
prev_key = "prev_extra_dagonet",
min = 0
}
}
local dagonet_blacklist = {
"Credit Card",
"Juggler",
"Turtle Bean",
"Drunkard",
"Troubadour",
"Merry Andy"
}
-- Increase base attributes
local function increase_attributes(k, v, place, multiplier)
local attr = attributes[k]
if not attr or type(v) == "string" then
return
end
-- Handle extra seperately
if type(v) == "table" then
for k2, v2 in pairs(place.extra) do
increase_attributes(k2, v2, place.extra, multiplier)
end
elseif v > attr.min then
if place[attr.prev_key] == nil then
place[attr.prev_key] = multiplier
end
if place[attr.key] == nil then
-- Save base value
place[attr.key] = v
else
if not (v / multiplier == place[attr.key] and place[attr.prev_key] == multiplier) then
if not (v / multiplier == place[attr.key] or v / place[attr.prev_key] == place[attr.key]) then
if v / multiplier ~= place[attr.key] and place[attr.prev_key] == multiplier then
-- Update base based on current multiplier
local increase = (v / multiplier - place[attr.key]) * multiplier
place[attr.key] = place[attr.key] + increase
else
-- Update base based on previous multiplier
local increase = (v / place[attr.prev_key] - place[attr.key]) * place[attr.prev_key]
place[attr.key] = place[attr.key] + increase
end
end
end
end
-- Multiply attribute
place[k] = place[attr.key] * multiplier
place[attr.prev_key] = multiplier
end
end
local cicero_blacklist = {
["Misprint"] = true,
}
local cicero_whitelist = {
["Mr. Bones"] = true,
["MMC Printer"] = true,
}
-- Initialize joker type lists
local mikas_jokers = {}
local chips_jokers = {}
local mult_jokers = {}
local xmult_jokers = {}
local money_jokers = {}
local support_jokers = {}
-- Get lists of different joker types
local function get_mikas_jokers()
if next(mikas_jokers) ~= nil then
return mikas_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_mmc") and v.rarity ~= 4 then
table.insert(mikas_jokers, k)
end
end
return mikas_jokers
end
local function get_chips_jokers()
if next(chips_jokers) ~= nil then
return chips_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_") and v.rarity ~= 4 then
local chips = false
for _, v2 in ipairs(G.localization.descriptions.Joker[k].text) do
chips = chips or string.find(v2:lower(), "chips")
end
if chips and v.rarity ~= 4 then
table.insert(chips_jokers, k)
end
end
end
return chips_jokers
end
local function get_mult_jokers()
if next(mult_jokers) ~= nil then
return mult_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_") and v.rarity ~= 4 then
local mult = false
for _, v2 in ipairs(G.localization.descriptions.Joker[k].text) do
mult = mult or (string.find(v2:lower(), "mult") and not string.find(v2:lower(), "x"))
end
if mult or v.ability.name == "Misprint" then
table.insert(mult_jokers, k)
end
end
end
return mult_jokers
end
local function get_xmult_jokers()
if next(xmult_jokers) ~= nil then
return xmult_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_") and v.rarity ~= 4 then
local xmult = false
for _, v2 in ipairs(G.localization.descriptions.Joker[k].text) do
xmult = xmult or (string.find(v2:lower(), "mult") and string.find(v2:lower(), "x"))
end
if xmult then
table.insert(xmult_jokers, k)
end
end
end
return xmult_jokers
end
local function get_money_jokers()
if next(money_jokers) ~= nil then
return money_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_") and v.rarity ~= 4 then
local money = false
for _, v2 in ipairs(G.localization.descriptions.Joker[k].text) do
money = money or string.find(v2:lower(), "$")
end
if money then
table.insert(money_jokers, k)
end
end
end
return money_jokers
end
local function get_support_jokers()
if next(support_jokers) ~= nil then
return support_jokers
end
for k, v in pairs(G.P_CENTERS) do
if string.find(k, "j_") and v.rarity ~= 4 then
local support = true
for _, v2 in ipairs(G.localization.descriptions.Joker[k].text) do
support = support and
not (string.find(v2:lower(), "chips") or string.find(v2:lower(), "mult" or string.find(v2:lower(), "$")))
end
if cicero_whitelist[v.ability.name] ~= nil or (support and cicero_blacklist[v.ability.name] == nil) then
table.insert(money_jokers, k)
end
end
end
return support_jokers
end
-- Create Decks
local decks = {
evenStevenDeck = {
loc = {
name = "Even Steven's Deck",
text = {
"Start run with only",
"{C:attention}even cards{} and",
"the {C:attention}Even Steven{} joker"
}
},
name = "Even Steven's Deck",
config = {
mmc_only_evens = true
},
sprite = {
x = 5,
y = 2
}
},
oddToddDeck = {
loc = {
name = "Odd Todd's Deck",
text = {
"Start run with only",
"{C:attention}odd cards{} and",
"the {C:attention}Odd Todd{} joker"
}
},
name = "Odd Todd's Deck",
config = {
mmc_only_odds = true
},
sprite = {
x = 5,
y = 2
}
},
fibonacciDeck = {
loc = {
name = "Fibonacci Deck",
text = {
"Start run with only",
"{C:attention}Fibonacci cards{} and",
"the {C:attention}Fibonacci{} joker"
}
},
name = "Fibonacci Deck",
config = {
mmc_only_fibo = true
},
sprite = {
x = 5,
y = 2
}
},
primeDeck = {
loc = {
name = "Prime Deck",
text = {
"Start run with",
"only {C:attention}prime cards{} and",
"the {C:attention}Prime Time{} joker"
}
},
name = "Prime Deck",
config = {
mmc_only_prime = true
},
sprite = {
x = 5,
y = 2
}
},
midasDeck = {
loc = {
name = "Midas's Deck",
text = {
"Start run with only",
"{C:attention}Gold Face cards{} and",
"the {C:attention}Midas Mask{} joker"
}
},
name = "Midas's Deck",
config = {
mmc_gold = true
},
sprite = {
x = 6,
y = 0
}
},
jokersForHireDeck = {
loc = {
name = "\"Jokers for Hire\" Deck",
text = {
"All Jokers give {C:dark_edition}+1{}",
"Joker slot. Price of",
"{C:attention}Jokers{} and {C:attention}Buffoon Packs",
"{C:red}increases{} per Joker"
}
},
name = "Jokers for Hire",
config = {
mmc_for_hire = true
},
sprite = {
x = 6,
y = 0
}
},
perfectPrecisionDeck = {
loc = {
name = "Perfect Precision Deck",
text = {
"+1 {C:blue}hands{}, {C:red}discards{} and",
"{C:attention}hand size{}. Start with",
"a {C:dark_edition}negative {C:attention}The Sniper{}",
"Joker. Ante scales {C:attention}X1.5{}",
"as fast"
}
},
name = "Perfect Precision",
config = {
mmc_precision = true,
ante_scaling = 1.5,
discards = 1,
hands = 1,
hand_size = 1
},
sprite = {
x = 5,
y = 2
},
}
}
-- Local variables
local for_hire_counter = 1
-- Initialize deck effect
local Backapply_to_runRef = Back.apply_to_run
function Back.apply_to_run(arg_56_0)
Backapply_to_runRef(arg_56_0)
if arg_56_0.effect.config.mmc_only_evens then
G.E_MANAGER:add_event(Event({
func = function()
-- Loop over all cards
for i = #G.playing_cards, 1, -1 do
-- Remove odd cards
if not is_even(G.playing_cards[i]) then
G.playing_cards[i]:start_dissolve(nil, true)
end
end
-- Add Even Steven Joker
add_joker("j_even_steven", nil, true, false)
-- Return
G.GAME.starting_deck_size = 20
return true
end
}))
end
if arg_56_0.effect.config.mmc_only_odds then
G.E_MANAGER:add_event(Event({
func = function()
-- Loop over all cards
for i = #G.playing_cards, 1, -1 do
-- Remove even cards
if not is_odd(G.playing_cards[i]) then
G.playing_cards[i]:start_dissolve(nil, true)
end
end
-- Add Odd Todd Joker
add_joker("j_odd_todd", nil, true, false)
-- Return
G.GAME.starting_deck_size = 20
return true
end
}))
end
if arg_56_0.effect.config.mmc_only_fibo then
G.E_MANAGER:add_event(Event({
func = function()
-- Loop over all cards
for i = #G.playing_cards, 1, -1 do
-- Remove non fibonacci cards
if not is_fibo(G.playing_cards[i]) then
G.playing_cards[i]:start_dissolve(nil, true)
end
end
-- Add Fibonacci Joker
add_joker("j_fibonacci", nil, true, false)
-- Return
G.GAME.starting_deck_size = 20
return true
end
}))
end
if arg_56_0.effect.config.mmc_only_prime then
G.E_MANAGER:add_event(Event({
func = function()
-- Loop over all cards
for i = #G.playing_cards, 1, -1 do
-- Remove non prime cards
if not is_prime(G.playing_cards[i]) then
G.playing_cards[i]:start_dissolve(nil, true)
end
end
-- Add Prime Joker
add_joker("j_mmc_prime_time", nil, true, false)
-- Return
G.GAME.starting_deck_size = 20
return true
end
}))
end
if arg_56_0.effect.config.mmc_gold then
G.E_MANAGER:add_event(Event({
func = function()
-- Loop over all cards
for i = #G.playing_cards, 1, -1 do
if not is_face(G.playing_cards[i]) then
-- Remove non face cards
G.playing_cards[i]:start_dissolve(nil, true)
else
-- Set to gold
G.playing_cards[i]:set_ability(G.P_CENTERS.m_gold)
end
end
-- Add Midas Mask Joker
add_joker("j_midas_mask", nil, true, false)
-- Return
G.GAME.starting_deck_size = 12
return true
end
}))
end
if arg_56_0.effect.config.mmc_for_hire then
G.E_MANAGER:add_event(Event({
func = function()
-- Set joker slots to 1
G.jokers.config.card_limit = 1
-- Add effect to starting params
G.GAME.starting_params.mmc_for_hire = true
-- Reset counter
for_hire_counter = 1
return true
end
}))
end
if arg_56_0.effect.config.mmc_precision then
G.E_MANAGER:add_event(Event({
func = function()
-- Add The Sniper Joker
add_joker("j_mmc_sniper", "negative", true, false)
return true
end
}))
end
end
function SMODS.INIT.MikasModCollection()
-- Localization
G.localization.descriptions.Other.card_extra_mult = { text = { "{C:mult}+#1#{} extra Mult" } }
G.localization.misc.dictionary.k_mmc_charging = "Charging..."
G.localization.misc.dictionary.k_mmc_bonus = "Bonus!"
G.localization.misc.dictionary.k_mmc_hand_up = "+ Hand Size!"
G.localization.misc.dictionary.k_mmc_hand_down = "- Hand Size!"
G.localization.misc.dictionary.k_mmc_tick = "Tick..."
G.localization.misc.dictionary.k_mmc_plus_card = "Card!"
G.localization.misc.dictionary.k_mmc_luck = "+ Luck!"
G.localization.misc.dictionary.k_mmc_destroy = "Destroy!"
init_localization()
-- Initialize Decks
for k, v in pairs(decks) do
if config[k] then
local newDeck = SMODS.Deck:new(v.name, k, v.config, v.sprite, v.loc)
newDeck:register()
end
end
-- Tarot Cards
if config.aceOfPentaclesTarot then
-- Create Tarot
local ace_of_pentacles = {
loc = {
name = "Ace Of Pentacles",
text = {
"{C:red}#2# in #1#{} chance",
"to set money to",
"{C:money}$0{}, otherwise",
"{C:attention}double{} your money",
"{C:inactive}Art by {C:green,E:1,S:1.1}Grassy"
}
},
ability_name = "MMC Ace Of Pentacles",
slug = "mmc_ace_of_pentacles",
config = { extra = { odds = 4 } },
cost = 4,
cost_mult = 1,
discovered = true
}
-- Initialize Tarot
init_tarot(ace_of_pentacles)
-- Set local variables
function SMODS.Tarots.c_mmc_ace_of_pentacles.loc_def(card)
return { card.config.extra.odds, "" .. (G.GAME and G.GAME.probabilities.normal or 1) }
end
-- Set can_use
function SMODS.Tarots.c_mmc_ace_of_pentacles.can_use(card)
return true