forked from ScribbleIsError/Mossed
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmossed.lua
More file actions
1141 lines (1140 loc) · 34.9 KB
/
mossed.lua
File metadata and controls
1141 lines (1140 loc) · 34.9 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
SMODS.Atlas({
key = "atlasdeck",
path = "atlasdeck.png",
px = 71,
py = 95,
}):register()
SMODS.Atlas({
key = "atlasjokers",
path = "atlasjokers.png",
px = 71,
py = 95,
}):register()
SMODS.Atlas({
key = "atlasconsumable",
path = "atlasconsumable.png",
px = 65,
py = 95,
}):register()
SMODS.Atlas({
key = "atlastags",
path = "atlastags.png",
px = 34,
py = 34,
}):register()
if SMODS.Atlas then
SMODS.Atlas({
key = "modicon",
path = "modicon.png",
px = 34,
py = 34
})
end
SMODS.Sound{
key = "greensound",
path = "green.ogg"
}
SMODS.Back{
key = "henry",
config = { vouchers = { "v_overstock_norm", "v_overstock_plus" }, joker_slot = 2, ante_scaling = 2, hand_size = 2 },
pos = { x = 0, y = 0 },
atlas = "atlasdeck",
unlocked = true,
discovered = true,
}
SMODS.Back{
key = "fitzgerald",
config = { consumables = { "c_wheel_of_fortune" }},
pos = { x = 1, y = 0 },
atlas = "atlasdeck",
unlocked = true,
discovered = true,
calculate = function(self, card, context)
local hand_set
local discard_set
if context.setting_blind then
hand_set = (2 + ( round_number( pseudorandom("gambling") * ( ( G.GAME.current_round.discards_left + G.GAME.current_round.hands_left ) - 2 ) ) ) )
discard_set = ( ( G.GAME.current_round.discards_left + G.GAME.current_round.hands_left ) - hand_set )
G.E_MANAGER:add_event(Event({func = function()
if (discard_set - G.GAME.current_round.discards_left) ~= 0 then
ease_discard(discard_set - G.GAME.current_round.discards_left)
end
if (hand_set - G.GAME.current_round.hands_left) ~= 0 then
ease_hands_played(hand_set - G.GAME.current_round.hands_left)
end
return true end }))
end
end
}
SMODS.Shader{
key = "green",
path = "green.fs",
}
SMODS.Edition{
key = "green",
shader = "green",
loc_txt = { label = "Green" },
unlocked = true,
discovered = true,
in_shop = true,
weight = 3,
extra_cost = 4,
sound = { sound = "moss_greensound", per = 1.2, vol = 0.2 },
config = { extra = { upgrade = 5, sell_up = 2 } },
loc_vars = function(self, info_queue, card, area)
if card.area.config.collection then
return {
vars = {
card.edititon and card.edititon.extra and card.edition.extra.upgrade or self.config.extra.upgrade,
card.edititon and card.edition.extra and card.edition.extra.sell_up or self.config.extra.sell_up,
},
key = self.key.."alt2",
}
elseif card.ability.set == "Joker" then
return { vars = { card.edition.extra.upgrade, card.edition.extra.sell_up } }
else
return {
vars = {
card.edition.extra.upgrade,
card.edition.extra.sell_up,
},
key = self.key.."alt",
}
end
end,
calculate = function(self, card, context)
if context.main_scoring
and context.cardarea == G.play
then
card.ability.perma_bonus = card.ability.perma_bonus or 0
card.ability.perma_bonus = card.ability.perma_bonus + ( card.edition.extra.upgrade / 2.0 )
return {
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS
}
end
if context.cardarea == G.jokers
and context.end_of_round
then
card.ability.extra_value = card.ability.extra_value + card.edition.extra.sell_up
card:set_cost()
return {
message = localize('k_val_up'),
colour = G.C.MONEY
}
end
end
}
SMODS.Joker{
key = "mossy",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
config = { extra = { round_limit = 3, moss_rounds = 0 } },
loc_vars = function(self, info_queue, card, area, edition)
if not card.edition or (card.edition and not card.edition.moss_green) then
--info_queue[#info_queue + 1] = G.P_CENTERS.e_moss_green
--I'll figure out why this doesn't work later
end
return { vars = { card.ability.extra.round_limit, card.ability.extra.moss_rounds } }
end,
rarity = 2,
atlas = "atlasjokers",
pos = { x = 0, y = 0 },
cost = 7,
calculate = function(self, card, context)
if context.selling_self and (card.ability.extra.moss_rounds >= card.ability.extra.round_limit) and not context.blueprint then
local eval = function(card) return (card.ability.loyalty_remaining == 0) and not G.RESET_JIGGLES end
juice_card_until(card, eval, true)
local jokers = {}
for i=1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
jokers[#jokers+1] = G.jokers.cards[i]
end
end
if #jokers > 0 then
if G.STAGE == G.STAGES.RUN then
card.eligible_editionless_jokers = EMPTY(card.eligible_editionless_jokers)
for k, v in pairs(jokers) do
if v.ability.set == "Joker" and (not v.edition) then
table.insert(card.eligible_editionless_jokers, v)
end
end
end
if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or any_state then
if next(card.eligible_editionless_jokers) then
local temp_pool = card.eligible_editionless_jokers
local eligible_card = pseudorandom_element(temp_pool, pseudoseed("mossy joker"))
eligible_card:set_edition("e_moss_green", true)
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {message = localize("k_green_ex"), colour = G.C.GREEN })
if card.ability.extra.moss_rounds then card.ability.extra.moss_rounds = 0 end
else
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {message = localize("k_no_other_jokers"), colour = G.C.GREEN })
end
end
else
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {message = localize("k_no_other_jokers"), colour = G.C.GREEN })
end
end
if context.end_of_round and not context.repetition and not context.blueprint and not context.individual then
card.ability.extra.moss_rounds = card.ability.extra.moss_rounds + 1
if card.ability.extra.moss_rounds == card.ability.extra.round_limit then
local eval = function(card) return not card.REMOVED end
juice_card_until(card, eval, true)
end
return {
message = (card.ability.extra.moss_rounds < card.ability.extra.round_limit) and (card.ability.extra.moss_rounds.."/"..card.ability.extra.round_limit) or localize('k_active_ex'),
colour = G.C.GREEN
}
end
end
}
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.kitchen_card = { suit = "Spades" }
return ret
end
function SMODS.current_mod.reset_game_globals(run_start)
G.GAME.current_round.kitchen_card = { suit = "Spades" }
local kitchen_card = pseudorandom_element({"Spades","Hearts","Diamonds","Clubs"}, pseudoseed("kitchen" .. G.GAME.round_resets.ante))
G.GAME.current_round.kitchen_card.suit = kitchen_card
end
local kitchen_joker_active = false
local issuitref = Card.is_suit
function Card.is_suit(self, suit, bypass_debuff, flush_calc)
if not kitchen_joker_active then
return issuitref(self, suit, bypass_debuff, flush_calc)
end
if flush_calc then
if SMODS.has_no_suit(self) and ( G.GAME.current_round.kitchen_card.suit == G.GAME.current_round.kitchen_card.suit ) == ( suit == G.GAME.current_round.kitchen_card.suit ) and not ( G.GAME.current_round.kitchen_card.suit == G.GAME.current_round.kitchen_card.suit ) == ( suit ~= G.GAME.current_round.kitchen_card.suit ) then
return true
end
return issuitref(self, suit, bypass_debuff, flush_calc)
else
if self.debuff and not bypass_debuff then return end
if SMODS.has_no_suit(self) and ( G.GAME.current_round.kitchen_card.suit == G.GAME.current_round.kitchen_card.suit ) == ( suit == G.GAME.current_round.kitchen_card.suit ) and not ( G.GAME.current_round.kitchen_card.suit == G.GAME.current_round.kitchen_card.suit ) == ( suit ~= G.GAME.current_round.kitchen_card.suit ) then
return true
end
return issuitref(self, suit, bypass_debuff, flush_calc)
end
end
SMODS.Joker{
key = "kitchen",
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 3,
atlas = "atlasjokers",
pos = { x = 1, y = 0 },
cost = 8,
config = { extra = { } },
enhancement_gate = "m_stone",
add_to_deck = function(self, card, from_debuff)
kitchen_joker_active = true
end,
remove_from_deck = function(self, card, from_debuff)
kitchen_joker_active = false
end,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS.m_stone
return {
vars = {
localize(G.GAME.current_round.kitchen_card.suit, "suits_plural"),
colours = { G.C.SUITS[G.GAME.current_round.kitchen_card.suit] }
}
}
end,
}
SMODS.Joker{
key = "pixel",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 2, y = 0 },
cost = 6,
config = { extra = { chip_amount = 0, chip_gain = 2, eight_tally = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chip_amount, card.ability.extra.chip_gain, card.ability.extra.eight_tally } }
end,
calculate = function(self, card, context)
if G.STAGE == G.STAGES.RUN then
card.ability.extra.eight_tally = 0
for k, v in pairs(G.playing_cards) do
if v:get_id() == 8 then card.ability.extra.eight_tally = card.ability.extra.eight_tally + 1 end
end
end
if context.joker_main then
return {
chip_mod = card.ability.extra.chip_amount,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chip_amount } }
}
end
if context.end_of_round and not context.repetition and not context.blueprint and not context.individual then
card.ability.extra.chip_amount = card.ability.extra.chip_amount + (card.ability.extra.chip_gain * card.ability.extra.eight_tally)
return {
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS,
card = card
}
end
end
}
SMODS.Joker{
key = "fourfold",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 3, y = 0 },
cost = 6,
config = { extra = { chip_add = 51, mult_add = 15 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chip_add, card.ability.extra.mult_add } }
end,
calculate = function(self, card, context)
if context.joker_main then
if G.GAME.current_round.hands_left % 2 == 0 then
return {
chip_mod = card.ability.extra.chip_add,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chip_add } }
}
end
if G.GAME.current_round.hands_left % 2 == 1 then
return {
mult_mod = card.ability.extra.mult_add,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult_add } }
}
end
end
end
}
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.followsuit = { suit = "Spades" }
return ret
end
function SMODS.current_mod.reset_game_globals(run_start)
G.GAME.current_round.followsuit = { suit = "Spades" }
local valid_followsuit_cards = {}
for _, v in ipairs(G.playing_cards) do
if not SMODS.has_no_suit(v) then
valid_followsuit_cards[#valid_followsuit_cards + 1] = v
end
end
if valid_followsuit_cards[1] then
local followsuit = pseudorandom_element({"Spades","Hearts","Diamonds","Clubs"}, pseudoseed("follow_suit" .. G.GAME.round_resets.ante))
G.GAME.current_round.followsuit.suit = followsuit
end
end
SMODS.Joker{
key = "followsuit",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 3,
atlas = "atlasjokers",
pos = { x = 5, y = 0 },
cost = 10,
config = { extra = { cash = 0 } },
loc_vars = function(self, info_queue, card)
return {
vars = {
localize(G.GAME.current_round.followsuit.suit, "suits_singular"),
colours = { G.C.SUITS[G.GAME.current_round.followsuit.suit] },
card.ability.extra.cash
}
}
end,
calculate = function(self, card, context)
if G.STAGE == G.STAGES.RUN then
local heart_check = 0
local diamond_check = 0
local spade_check = 0
local club_check = 0
for k, v in pairs(G.playing_cards) do
if v:is_suit("Hearts") and heart_check == 0 then
heart_check = 1
end
if v:is_suit("Diamonds") and diamond_check == 0 then
diamond_check = 1
end
if v:is_suit("Spades") and spade_check == 0 then
spade_check = 1
end
if v:is_suit("Clubs") and club_check == 0 then
club_check = 1
end
end
card.ability.extra.cash = ( heart_check + diamond_check + spade_check + club_check )
end
if context.individual and context.cardarea == G.play then
local first_card = nil
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_suit(G.GAME.current_round.followsuit.suit) then
first_card = context.scoring_hand[i]; break
end
end
if context.other_card == first_card then
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.cash
G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
return {
dollars = card.ability.extra.cash
}
end
end
end
}
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.dvolt = 0
return ret
end
SMODS.Joker{
key = "d9volt",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 2,
atlas = "atlasjokers",
pos = { x = 4, y = 0 },
cost = 5,
config = { extra = { mult_add = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult_add, G.GAME.current_round.dvolt } }
end,
set_ability = function(self, card, initial, delay_sprites)
if G.GAME.current_round.dvolt == 0 then
G.GAME.current_round.dvolt = (4 + ( round_number( pseudorandom("d9volt") * 28 ) ) )
if card.ability.extra.mult_add == 0 then
card.ability.extra.mult_add = G.GAME.current_round.dvolt
end
end
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult_mod = card.ability.extra.mult_add,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult_add } }
}
end
end
}
SMODS.Joker{
key = "jeb",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pixel_size = { w = 71, h = 71 },
display_size = { w = 71, h = 95 },
rarity = 2,
atlas = "atlasjokers",
pos = { x = 6, y = 0 },
cost = 6,
config = { extra = { total = 0, add = 10 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.total, card.ability.extra.add } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult_mod = card.ability.extra.total,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.total } },
colour = G.C.MULT
}
end
if context.open_booster then
card.ability.extra.total = card.ability.extra.total + card.ability.extra.add
return {
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.total } },
colour = G.C.RED
}
end
if context.end_of_round and not context.blueprint and G.GAME.blind.boss and card.ability.extra.total > 0 then
card.ability.extra.total = 0
return {
message = localize('k_reset'),
clour = G.C.RED
}
end
end
}
SMODS.Joker{
key = "bittergiggle",
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 3,
atlas = "atlasjokers",
pos = { x = 1, y = 1 },
cost = 8,
config = { extra = { times_mult = 1.5 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.times_mult } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 12 and context.other_card.ability.effect ~= "Base"then
return {
x_mult = card.ability.extra.times_mult,
colour = G.C.MULT
}
end
end
end
}
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.blueberry = 0
return ret
end
SMODS.Joker{
key = "blueberry",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 2, y = 1 },
cost = 4,
config = { extra = { rounds_left = 5, add_chips = 10, one_time = 0 } },
in_pool = function(self, args)
allow_duplicates = true
return true
end,
add_to_deck = function(self, card, from_debuff)
if card.ability.extra.one_time == 0 then
G.GAME.current_round.blueberry = G.GAME.current_round.blueberry + card.ability.extra.add_chips
card.ability.extra.one_time = 1
end
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.rounds_left, card.ability.extra.add_chips, G.GAME.current_round.blueberry, card.ability.extra.one_time } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chip_mod = G.GAME.current_round.blueberry,
message = localize { type = 'variable', key = 'a_chips', vars = { G.GAME.current_round.blueberry } },
colour = G.C.BLUE
}
end
if context.end_of_round and not context.repetition and not context.blueprint and not context.individual and context.game_over == false then
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
if card.ability.extra.rounds_left == 0 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound("tarot1")
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true;
end
}))
return true
end
}))
return {
message = localize("k_destroyed"),
colour = G.C.BLUE
}
else
return {
message = (card.ability.extra.rounds_left.."/5"),
colour = G.C.BLUE
}
end
end
end
}
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.strawberry = 0
return ret
end
SMODS.Joker{
key = "strawberry",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 3, y = 1 },
cost = 4,
config = { extra = { rounds_left = 5, add_mult = 2, one_time = 0 } },
in_pool = function(self, args)
allow_duplicates = true
return true
end,
add_to_deck = function(self, card, from_debuff)
if card.ability.extra.one_time == 0 then
G.GAME.current_round.strawberry = G.GAME.current_round.strawberry + card.ability.extra.add_mult
card.ability.extra.one_time = 1
end
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.rounds_left, card.ability.extra.add_mult, G.GAME.current_round.strawberry, card.ability.extra.one_time } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult_mod = G.GAME.current_round.strawberry,
message = localize { type = 'variable', key = 'a_mult', vars = { G.GAME.current_round.strawberry } },
colour = G.C.RED
}
end
if context.end_of_round and not context.repetition and not context.blueprint and not context.individual and context.game_over == false then
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
if card.ability.extra.rounds_left == 0 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound("tarot1")
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true;
end
}))
return true
end
}))
return {
message = localize("k_destroyed"),
colour = G.C.RED
}
else
return {
message = (card.ability.extra.rounds_left.."/5"),
colour = G.C.RED
}
end
end
end
}
SMODS.Joker{
key = "impractical",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 4, y = 1 },
cost = 5,
config = { extra = { mult_add = 3, total = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult_add, card.ability.extra.total } }
end,
calculate = function(self, card, context)
if G.GAME.current_round.hands_left == 0 and context.cardarea == G.hand and context.individual and not context.end_of_round then
local temp_Mult, temp_ID = 15, 15
local raised_card = nil
for i=1, #G.hand.cards do
if temp_ID >= G.hand.cards[i].base.id and G.hand.cards[i].ability.effect ~= 'Stone Card' then
temp_Mult = G.hand.cards[i].base.nominal; temp_ID = G.hand.cards[i].base.id; raised_card = G.hand.cards[i]
end
end
if raised_card == context.other_card then
if context.other_card.debuff then
return {
message = localize('k_debuffed'),
colour = G.C.RED,
}
else
card.ability.extra.total = card.ability.extra.total + card.ability.extra.mult_add
return {
raised_card:start_dissolve(),
}
end
end
end
if context.joker_main and card.ability.extra.total > 0 then
return {
mult_mod = card.ability.extra.total,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.total } },
colour = G.C.RED
}
end
end
}
SMODS.Joker{
key = "lara",
unlocked = true,
discovered = false,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 4,
atlas = "atlasjokers",
pos = { x = 0, y = 1 },
soul_pos = { x = 0, y = 2 },
cost = 20,
config = { extra = { } },
calculate = function(self, card, context)
if context.cardarea == G.hand and not context.blueprint and context.individual and not context.end_of_round then
if context.other_card.edition then
if context.other_card.debuff then
return {
message = localize('k_debuffed'),
colour = G.C.RED,
card = self,
}
else
if context.other_card.edition.foil then
return {
chips = G.P_CENTERS.e_foil.config.extra,
}
end
if context.other_card.edition.holo then
return {
mult = G.P_CENTERS.e_holo.config.extra,
}
end
if context.other_card.edition.polychrome then
return {
x_mult = G.P_CENTERS.e_polychrome.config.extra,
}
end
if context.other_card.edition.moss_green then
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + ( context.other_card.edition.extra.upgrade )
return {
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS,
card = context.other_card,
chips = context.other_card.ability.perma_bonus
}
end
end
end
end
end
}
SMODS.Joker{
key = "luigi",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = true,
rarity = 2,
atlas = "atlasjokers",
pos = { x = 5, y = 1 },
cost = 6,
config = { extra = { death_chance = 6, total = 1, add_mult = 0.5 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.death_chance, card.ability.extra.total, card.ability.extra.add_mult, (G.GAME.probabilities.normal or 1) } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
x_mult = card.ability.extra.total,
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.total } },
colour = G.C.MULT
}
end
if context.using_consumeable then
if context.consumeable.ability.set == "Spectral" then
if pseudorandom("luigi") < G.GAME.probabilities.normal / card.ability.extra.death_chance then
G.E_MANAGER:add_event(Event({
func = function()
play_sound("tarot1")
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true;
end
}))
return true
end
}))
return {
message = localize("k_good_night"),
colour = G.C.PURPLE
}
else
card.ability.extra.total = card.ability.extra.total + card.ability.extra.add_mult
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.total } },
colour = G.C.MULT
}
end
end
end
end
}
SMODS.Joker{
key = "jet",
unlocked = true,
discovered = false,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 4,
atlas = "atlasjokers",
pos = { x = 1, y = 2 },
soul_pos = { x = 2, y = 2 },
cost = 20,
config = { extra = { times = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.times } }
end,
calculate = function(self, card, context)
if context.repetition and context.cardarea == G.play then
if context.other_card.ability.effect ~= "Base" then
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.times
}
end
end
end
}
SMODS.Joker{
key = "split",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 6, y = 1 },
cost = 4,
config = { extra = { chip_gain = 5, total = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chip_gain, card.ability.extra.total } }
end,
calculate = function(self, card, context)
if context.pre_discard and not context.blueprint and #context.full_hand <= 3 then
card.ability.extra.total = card.ability.extra.total + card.ability.extra.chip_gain
return {
message = localize("k_upgrade_ex"),
colour = G.C.CHIPS
}
end
if context.joker_main then
return {
message = localize{type="variable",key="a_chips",vars={card.ability.extra.total}},
chip_mod = card.ability.extra.total,
colour = G.C.CHIPS
}
end
end
}
SMODS.Joker{
key = "glamorous",
unlocked = true,
discovered = false,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
rarity = 1,
atlas = "atlasjokers",
pos = { x = 3, y = 2 },
cost = 5,
config = { },
in_pool = function(self, args)
if G.GAME.hands["moss_Queen Pair"].played > 0 then
return true
end
end,
}
SMODS.PokerHand {
key = "Queen Pair",
chips = 15,
mult = 2,
l_chips = 18,
l_mult = 1,
visible = false,
example = {
{ 'S_Q', true },
{ 'H_2', true },
{ 'D_2', true },
{ 'C_5', false },
{ 'H_7', false },
},
evaluate = function(parts, hand)
if next(parts._2)then
local queencheck = {}
local queens = 0
local rank = 0
local pair_rank = 0
local same_card = 0
for i = 1, #hand, 1 do
if #hand > 2 then
if hand[i].base.id == 12 and not next(SMODS.find_card("j_moss_glamorous")) then
table.insert(queencheck, hand[i])
queens = queens + 1
end
if hand[i].base.id > 10 and hand[i].base.id < 14 and next(SMODS.find_card("j_moss_glamorous")) and not next(SMODS.find_card("j_pareidolia")) then
if pair_rank == 0 then
same_card = hand[i]
for j = 1, #hand, 1 do
if hand[i].base.id == hand[j].base.id and hand[j] ~= same_card then
pair_rank = hand[i].base.id
end
end
end
if pair_rank < 13 then
if rank < hand[i].base.id and pair_rank ~= hand[i].base.id then
rank = hand[i].base.id
queencheck = {}
table.insert(queencheck, hand[i])
end
elseif pair_rank > 12 then
if hand[i].base.id < 13 and rank < hand[i].base.id and pair_rank ~= hand[i].base.id then
rank = hand[i].base.id
queencheck = {}
table.insert(queencheck, hand[i])
end
end
queens = queens + 1
end
if hand[i].base.id > 1 and next(SMODS.find_card("j_moss_glamorous")) and next(SMODS.find_card("j_pareidolia")) then
if pair_rank == 0 then
same_card = hand[i]
for j = 1, #hand, 1 do
if hand[i].base.id == hand[j].base.id and hand[j] ~= same_card then
pair_rank = hand[i].base.id
end
end
end
if pair_rank < 13 then
if rank < hand[i].base.id and pair_rank ~= hand[i].base.id then
rank = hand[i].base.id
queencheck = {}
table.insert(queencheck, hand[i])
end
elseif pair_rank > 12 then
if hand[i].base.id < 13 and rank < hand[i].base.id and pair_rank ~= hand[i].base.id then
rank = hand[i].base.id
queencheck = {}
table.insert(queencheck, hand[i])
end
end
queens = queens + 1
end
end
end
local _check = SMODS.merge_lists(parts._2, {queencheck})
if ( queens == 1 and not next(SMODS.find_card("j_moss_glamorous")) ) or ( queens > 0 and queens ~= 2 and next(SMODS.find_card("j_moss_glamorous")) and not next(SMODS.find_card("j_pareidolia")) ) or ( queens > 0 and next(SMODS.find_card("j_pareidolia")) ) then
return {_check}
end
end
end,
}
SMODS.Consumable {
set = "Planet",
key = "iris",
discovered = false,
config = { hand_type = "moss_Queen Pair", softlock = true },
cost = 3,
atlas = "atlasconsumable",
pos = { x = 0, y = 0 },
display_size = { w = 65, h = 95 },
set_card_type_badge = function(self, card, badges)
badges[1] = create_badge(localize("k_planet_q"), get_type_colour(self or card.config, card), nil, 1.2)
end,
loc_vars = function(self, info_queue, center)
local levelone = G.GAME.hands["moss_Queen Pair"].level or 1
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
if levelone == 1 then
planetcolourone = G.C.UI.TEXT_DARK
end
return {