-
Notifications
You must be signed in to change notification settings - Fork 25
/
skills.lua
7522 lines (6814 loc) · 223 KB
/
skills.lua
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 floor,ceil,min,max = math.floor, math.ceil, math.min, math.max
local abs = math.abs
local random = math.random
local refresh = function(player, my_idx, my_card)
my_card:refresh()
end
local lesprit = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local removed = pred.skill(other_card)
other_card.skills = {}
if removed then
OneBuff(player, my_idx, {atk={"+",2}, def={"+",0}, sta={"+",2}}):apply()
end
end
local esprit = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local removed = pred.skill(other_card)
other_card.skills = {}
if removed then
OneBuff(player, my_idx, {atk={"+",1}, def={"+",1}, sta={"+",1}}):apply()
end
end
local dressup_skill = function(dressup_id, player, my_idx)
local dressup = function(card) return floor(card.id) == floor(dressup_id) end
local field_idxs = player:field_idxs_with_preds({dressup})
for _,idx in ipairs(field_idxs) do
player:field_to_grave(idx)
end
local dressup_target = player:deck_idxs_with_preds({dressup})[1]
if dressup_target and player:first_empty_field_slot() then
player:deck_to_field(dressup_target)
dressup_target = player:field_idxs_with_preds({dressup})[1]
OneBuff(player, dressup_target, {size={"=",5}, atk={"+",3}, sta={"+",3}}):apply()
player:field_to_grave(my_idx)
end
end
local heartful_catch = function(dressup_id, player, my_idx, other_idx, buff_type)
local dressup = function(card) return floor(card.id) == floor(dressup_id) end
local buff = false
local field_targets = player:field_idxs_with_preds({dressup})
for _,idx in ipairs(field_targets) do
if idx ~= my_idx then
player:field_to_grave(idx)
buff = true
end
end
local hand_target = player:hand_idxs_with_preds(pred.dress_up)[1]
if hand_target then
player:hand_to_grave(hand_target)
buff = true
end
local grave_target = player:grave_idxs_with_preds(pred.dress_up)[1]
if grave_target and not buff then
player:grave_to_exile(grave_target)
buff = true
end
if buff then
if buff_type == "-" then
if not player.opponent.field[other_idx] then
return
end
OneBuff(player.opponent, other_idx, {atk={"-",1}, sta={"-",2}}):apply()
elseif buff_type == "+" then
OneBuff(player, my_idx, {atk={"+",1}, sta={"+",2}}):apply()
end
end
end
local blue_cross_skill = function(player, my_idx, my_card, skill_idx, buff)
if #player.hand <=2 then
OneBuff(player, my_idx, buff):apply()
elseif #player.hand >= 4 then
my_card:remove_skill(skill_idx)
end
end
local council_scoop = function(group_pred)
return function(player, my_idx, my_card, skill_idx, other_idx, other_card)
local target = player:deck_idxs_with_preds(pred.follower, group_pred)[1]
if target and #player.hand < 5 then
player:deck_to_hand(target)
end
end
end
local member_use = function(group_pred)
return function(player, my_idx, my_card, skill_idx, other_idx, other_card)
local target = player:hand_idxs_with_preds(group_pred)[1]
if target then
player:hand_to_bottom_deck(target)
OneBuff(player, my_idx, {atk={"+",1},sta={"+",2}}):apply()
end
end
end
skill_func = {
-- new cook club student, may i see?
[1001] = function(player)
local target_idx = uniformly(player:field_idxs_with_preds({pred.cook_club,pred.follower}))
if target_idx then
local buff = GlobalBuff(player)
buff.field[player][target_idx] = {atk={"+",1}, sta={"+",1}}
buff:apply()
end
end,
-- cook club katie, best taste ever!
[1002] = function(player, my_idx, my_card)
if my_card.sta > 1 then
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {def={"+",1}, sta={"-",1}}
buff:apply()
end
end,
-- cook club sylphie, 25 assistant asmis, crescent elder riesling, best attack
[1003] = function(player, my_idx)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",1}}
buff:apply()
end,
-- prefect layna, proper behavior
[1004] = function(player, my_idx)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {sta={"+",#player.hand + 1}}
buff:apply()
end,
-- lib. serie, wrath of the book!
[1005] = function(player, my_idx)
local libs = #player:hand_idxs_with_preds({pred.library_club})
if libs > 0 then
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",libs}}
buff:apply()
end
end,
-- lib vernika, sita's friend rosie, 25 agent nine, seeker luthera, lost doll, best defense
[1006] = function(player, my_idx)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {sta={"+",2}}
buff:apply()
end,
-- guard maid, maid cross
[1007] = function(player)
local target_idx = uniformly(player:field_idxs_with_preds({pred.maid,pred.follower}))
if target_idx then
local buff = GlobalBuff(player)
buff.field[player][target_idx] = {atk={"+",1}, sta={"+",1}}
buff:apply()
end
end,
-- chief maid, maid wisdom
[1008] = function(player, my_idx)
local spell_idx = player:hand_idxs_with_preds({pred.spell})[1]
if spell_idx then
player:hand_to_grave(spell_idx)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",2}}
buff:apply()
end
end,
-- mop maid, mop slash
[1009] = function(player, my_idx)
local buff = GlobalBuff(player)
local idxs = player:field_idxs_with_preds({pred.follower})
for _,idx in ipairs(idxs) do
if math.abs(my_idx - idx) <= 1 then
buff.field[player][idx] = {atk={"+",1}}
end
end
buff:apply()
end,
-- aristocrat girl, noblesse
[1010] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if other_card and other_card.def >= 2 then
local buff = GlobalBuff(player)
buff.field[player.opponent][other_idx] = {sta={"-",3}}
buff:apply()
end
end,
--private maid, true caring
[1011] = function(player)
local target_idx = uniformly(player.opponent:field_idxs_with_preds(pred.follower))
if target_idx then
local buff = GlobalBuff(player)
buff.field[player.opponent][target_idx] = {atk={"-",1}}
buff:apply()
end
end,
--senpai maid, i'll try my best
[1012] = function(player, my_idx)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",1}, sta={"+",2}}
buff:apply()
end,
--striker, fireball!
[1013] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local buff = GlobalBuff(player)
buff.field[player.opponent][other_idx] = {sta={"-",1}}
buff:apply()
end,
-- flag knight frett, flag return
[1014] = function(player)
if player.field[3] and player.field[3].type == "follower" then
local buff = GlobalBuff(player)
buff.field[player][3] = {atk={"+",1}, sta={"+",1}}
buff:apply()
end
end,
-- knight adjt. sarisen, sisters in arms
[1015] = function(player, my_idx, my_card)
local idxs = player:field_idxs_with_preds({pred.knight, pred.follower,
function(card) return card ~= my_card end})
if #idxs > 0 then
local buff = OnePlayerBuff(player)
for _,idx in ipairs(idxs) do
buff[idx] = {atk={"+",1}, sta={"+",1}}
end
buff:apply()
end
end,
-- crux knight pintail, contract witch, surprise!
[1016] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if other_card and other_card.size < my_card.size then
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",1}, def={"+",1}}
buff:apply()
end
end,
-- priestess, healing prayer
[1017] = function(player)
local buff = OnePlayerBuff(player)
buff[0] = {life={"+",1}}
buff:apply()
end,
-- seeker amethystar, holy heal
[1018] = function(player, my_idx)
if player.game.turn % 2 == 1 then
OneBuff(player, my_idx, {sta={"+",3}}):apply()
end
end,
-- seeker lydia, cross
[1019] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if #player:field_idxs_with_preds(pred.C) >= 2 and other_card then
OneBuff(player.opponent, other_idx, {atk={"-",1}, def={"-",2}, sta={"-",1}}):apply()
end
end,
-- acolyte, holy peace
[1020] = function(player)
if player.game.turn % 2 == 0 then
local target_idxs = player:field_idxs_with_preds({pred.faction.C, pred.follower})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",2}, sta={"+",2}}
end
buff:apply()
end
end,
-- scardel sion flina, sion attack!
[1021] = function(player)
local target_idxs = player:field_idxs_with_preds({pred.union(pred.shion_flina, pred.rion_flina), pred.follower})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",1}}
end
buff:apply()
end,
-- scardel rion flina, rion defense!
[1022] = function(player)
local target_idxs = player:field_idxs_with_preds({pred.union(pred.shion_flina, pred.rion_flina), pred.follower})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {sta={"+",1}}
end
buff:apply()
end,
-- moondancer kata flina, moonlight dancer!
[1023] = function(player)
local target_idxs = shuffle(player.opponent:field_idxs_with_preds({pred.follower}))
if #target_idxs >= 1 then
local buff = OnePlayerBuff(player.opponent)
for i=1,min(2,#target_idxs) do
buff[target_idxs[i]] = {atk={"-",1}, sta={"-",1}}
end
buff:apply()
end
end,
-- scardel shiraz, night's place
[1024] = function(player)
if #player:field_idxs_with_preds({pred.faction.D,pred.follower}) >= 2 then
local target_idx = uniformly(player.opponent:field_idxs_with_preds({pred.follower}))
if target_idx then
OneBuff(player.opponent, target_idx, {sta={"-",2}}):apply()
end
end
end,
-- master luna flina, moon guardian
[1025] = function(player, my_idx)
local new_def = #player:field_idxs_with_preds({pred.faction.D})
OneBuff(player, my_idx, {def={"=",new_def}, sta={"+",new_def}}):apply()
end,
-- red moon aka flina, cook club ace, silent maid, seeker director, lantern witch,
-- coin lady, reverse defense
[1026] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local diff = min(9,abs(other_card.def))
OneBuff(player, my_idx, {atk={"+",diff}, def={"=",0}, sta={"+",diff}}):apply()
end,
-- blue moon becky flina, chilly blood
[1027] = function(player, my_idx)
local target_idxs = shuffle(player:get_follower_idxs())
local buff = OnePlayerBuff(player)
buff[my_idx] = {atk={"+",1}, sta={"+",1}}
if #target_idxs >= 2 then
if target_idxs[1] == my_idx then
buff[target_idxs[2]] = {atk={"+",1}, sta={"+",1}}
else
buff[target_idxs[1]] = {atk={"+",1}, sta={"+",1}}
end
end
buff:apply()
end,
-- episode 2 follower skills
-- lib. milka, book return
[1028] = function(player)
local target_idx = uniformly(player:field_idxs_with_preds({pred.library_club, pred.follower}))
if target_idx then
OneBuff(player, target_idx, {sta={"+",2}}):apply()
end
end,
-- council casey, fanatic sarah, seeker irene, reading witch, valor strike!
[1029] = function(player, my_idx, my_card, skill_idx)
OneBuff(player, my_idx, {atk={"+",2}}):apply()
my_card:remove_skill(skill_idx)
end,
-- council treas. amy, budget time!
[1030] = function(player, my_idx, my_card, skill_idx)
local buff = OnePlayerBuff(player)
local target_idxs = player:field_idxs_with_preds({pred.student_council, pred.follower})
for _,idx in ipairs(target_idxs) do
buff[idx] = {sta={"+",2}}
end
buff:apply()
my_card:remove_skill(skill_idx)
end,
-- council pres. celine, presidential power
[1031] = function(player, my_idx)
local target_idx = uniformly(player:hand_idxs_with_preds({pred.student_council}))
if target_idx then
player:hand_to_top_deck(target_idx)
OneBuff(player, my_idx, {atk={"+",1}, sta={"+",2}}):apply()
end
end,
-- The Power of All Creation!
-- Genius Student Nanai
[1032] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local size = other_card.size
local mag = 0
local check = true
local pred_size = function(card) return card.size == size end
local idx = player:grave_idxs_with_preds(pred_size)[1]
while idx do
player:grave_to_exile(idx)
mag = mag + 1
idx = player:grave_idxs_with_preds(pred_size)[1]
end
idx = player.opponent:grave_idxs_with_preds(pred_size)[1]
while idx do
player.opponent:grave_to_exile(idx)
mag = mag + 1
idx = player.opponent:grave_idxs_with_preds(pred_size)[1]
end
OneBuff(player.opponent, other_idx, {atk={"-",mag},sta={"-",mag}}):apply()
end,
-- insomniac nanasid, insomnia
[1033] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"+",2}, def={"-", 1}}
if other_card then
buff.field[player.opponent][other_idx] = {atk={"-",2}}
end
buff:apply()
my_card:remove_skill(skill_idx)
end,
-- traumatized hilde, sad memory
[1034] = function(player, my_idx, my_card)
if my_card.atk > 0 then
local target_idxs = shuffle(player:get_follower_idxs())
local buff = OnePlayerBuff(player)
buff[my_idx] = {atk={"-",1}}
for i=1,math.min(2, #target_idxs) do
if buff[target_idxs[i]] then
buff[target_idxs[i]].sta = {"+",2}
else
buff[target_idxs[i]] = {sta={"+",2}}
end
end
buff:apply()
end
end,
-- stigma flint, stigma
[1035] = function(player)
local ally_target_idx = player:field_idxs_with_preds(
function(card) return floor(card.id) == 300090 end)[1]
local opp_target_idx = uniformly(player.opponent:get_follower_idxs())
if ally_target_idx and opp_target_idx then
OneImpact(player, ally_target_idx):apply()
player:field_to_bottom_deck(ally_target_idx)
OneImpact(player.opponent, opp_target_idx):apply()
player.opponent:destroy(opp_target_idx)
end
end,
-- fated rival seven, brilliant idea
[1036] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
local grave_target_idxs = player:grave_idxs_with_preds(pred.A)
if #grave_target_idxs > 0 then
for i=1,2 do
local grave_target_idx = grave_target_idxs[i]
if grave_target_idx then
player:grave_to_exile(grave_target_idx)
end
end
local opp_target_idx = uniformly(player.opponent:field_idxs_with_preds(pred.follower,
function(card) return card ~= other_card end))
local buff = OnePlayerBuff(player.opponent)
if other_card then
buff[other_idx] = {atk={"-",1}, def={"-",1}, sta={"-",2}}
end
if opp_target_idx then
buff[opp_target_idx] = {atk={"-",1}, def={"-",1}, sta={"-",2}}
end
buff:apply()
end
end,
-- stigma witness felicia, proof of stigma
[1037] = function(player)
local target_idxs = player:field_idxs_with_preds(
function(card) return floor(card.id) == 300087 end)
if #target_idxs > 0 then
local buffsize = #player:field_idxs_with_preds({pred.A})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",buffsize}, sta={"+",buffsize}}
end
buff:apply()
end
end,
-- seeker lucia, take cover!
[1038] = function(player, my_idx, my_card)
local buffsize = math.min(#player:field_idxs_with_preds({pred.seeker}) + #player:hand_idxs_with_preds({pred.seeker}), my_card.sta - 1)
OneBuff(player, my_idx, {atk={"+",buffsize}, sta={"-",buffsize}}):apply()
end,
-- seeker melissa, research results
[1039] = function(player, my_idx, my_card, skill_idx)
local target_idxs = shuffle(player:field_idxs_with_preds({pred.seeker, pred.follower}))
local buff = OnePlayerBuff(player)
for i=1,math.min(2,#target_idxs) do
buff[target_idxs[i]] = {atk={"+",2}, sta={"+",2}}
end
buff:apply()
my_card:remove_skill(skill_idx)
end,
-- crux knight sinclair, grace of the goddess
[1040] = function(player, my_idx)
local grave_idxs = shuffle(player:grave_idxs_with_preds({pred.C}))
if #grave_idxs > 0 then
local target_idxs = player:get_follower_idxs()
for i=1,2 do
local grave_idx = uniformly(player:grave_idxs_with_preds(pred.C))
if grave_idx then
player:grave_to_exile(grave_idx)
end
end
local buff = OnePlayerBuff(player)
buff[my_idx] = {atk={"+",2}, sta={"+",2}}
if target_idxs[1] ~= my_idx then
buff[target_idxs[1]] = {atk={"+",1}, sta={"+",1}}
elseif target_idxs[2] then
buff[target_idxs[2]] = {atk={"+",1}, sta={"+",1}}
end
buff:apply()
end
end,
-- cauldron witch, cauldron!
[1041] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if #player:field_idxs_with_preds(pred.follower, pred.D) > 1 and other_card then
local buffsize = math.ceil(other_card.atk / 2)
OneBuff(player, my_idx, {sta={"+",buffsize}}):apply()
my_card:remove_skill(skill_idx)
end
end,
-- tea party witch, pumpkin!
[1042] = function(player)
local target_idxs = player:field_idxs_with_preds(pred.witch, pred.follower)
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {sta={"+",1}}
end
buff:apply()
end,
-- heart stone witch, magic of the heart
[1043] = function(player, my_idx, my_card, skill_idx)
local target_idxs = player:field_idxs_with_preds(pred.witch, pred.follower)
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",2}, sta={"+",2}}
end
buff:apply()
my_card:remove_skill(skill_idx)
end,
-- undertaker, undertaker
[1044] = function(player, my_idx)
local buffsize = 0
local my_grave_idx = player:grave_idxs_with_preds(pred.follower)[1]
local op_idx = player.opponent:grave_idxs_with_preds(pred.follower)[1]
if my_grave_idx then
player:grave_to_exile(my_grave_idx)
buffsize = buffsize + 1
end
if op_idx then
player.opponent:grave_to_exile(op_idx)
buffsize = buffsize + 1
end
if buffsize > 0 then
OneBuff(player, my_idx, {atk={"+",buffsize}, sta={"+",buffsize}}):apply()
end
end,
-- visitor ophelia, first visit
[1045] = function(player, my_idx)
OneBuff(player, my_idx, {size={"-",1}}):apply()
end,
-- visitor ophelia, academic curiosity
[1046] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local mag = math.min(math.abs(my_card.size - my_card.def), 5)
OneBuff(player.opponent, other_idx, {atk={"-", mag}, def={"-", mag}, sta={"-", mag}}):apply()
end,
-- episode 3 follower skills
-- genius student nanai, great power!
[1047] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local buffsize = 0
for _,p in ipairs({player, player.opponent}) do
for i=#p.grave,1,-1 do
if p.grave[i].size == other_card.size then
p:grave_to_exile(i)
buffsize = buffsize + 1
end
end
end
assert(#player:grave_idxs_with_preds({function(card)
return card.size == other_card.size end}) == 0)
assert(#player.opponent:grave_idxs_with_preds(
function(card) return card.size == other_card.size end) == 0)
if buffsize > 0 then
OneBuff(player.opponent, other_idx, {atk={"-",buffsize}, sta={"-",buffsize}}):apply()
end
end,
-- lib. daisy, agent maid, arcana i magician, crescent maze, null defense!
[1048] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if other_card and other_card.def >= 1 then
OneBuff(player.opponent, other_idx, {def={"=",0}}):apply()
my_card:remove_skill_until_refresh(skill_idx)
end
end,
-- lib. manager lotte, cultist maid, seeker ruth, dollmaster elfin rune, amnesia
[1049] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if other_card and pred.skill(other_card) then
other_card.skills = {}
my_card:remove_skill(skill_idx)
OneImpact(player.opponent, other_idx):apply()
end
end,
-- mediator cabernet, two and one
[1050] = function(player)
local target_idxs = player:field_idxs_with_preds({pred.D, pred.follower})
if target_idxs then
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",2}, sta={"+",2}}
end
buff:apply()
end
end,
-- linia pacifica, master's command
[1051] = function(player, my_idx, my_card)
local buffsize = math.ceil(my_card.size / 2)
local target_idxs = player:field_idxs_with_preds({pred.follower})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
if math.abs(idx - my_idx) <= 1 then
buff[idx] = {atk={"+",buffsize}, sta={"+",buffsize}}
end
end
buff:apply()
end,
-- vanguard knight, orders from above
[1052] = function(player, my_idx)
while #player.deck > 0 and #player.hand < 4 do
player:draw_a_card()
end
local buffsize = #player:hand_idxs_with_preds({pred.C})
OneBuff(player, my_idx, {atk={"+",buffsize}, sta={"+",buffsize}}):apply()
end,
-- lib. ace, book's wisdom
[1053] = function(player, my_idx, my_card)
local buffsize = my_card.size
local target_idxs = player:field_idxs_with_preds({pred.V, pred.follower})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",buffsize}, sta={"+",buffsize}}
end
buff:apply()
end,
-- sage esprit, hidden truth
[1054] = esprit,
-- council event inspector, guidance
[1055] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
OneBuff(player, my_idx, {sta={"+",1}}):apply()
end,
-- space fold
[1056] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
local slot = player.opponent:first_empty_field_slot()
if slot then
player.opponent.field[slot] = my_card
player.field[my_idx] = nil
my_card:remove_skill(skill_idx)
end
end,
-- sage esprit, coin lady, hidden truth
[1057] = esprit,
-- episode EX1 follower skills
-- council maron, dress up!
[1058] = function(player, my_idx, my_card)
return dressup_skill(300143, player, my_idx) end,
-- dressup maron, heartful catch!
[1059] = function(player, my_idx, my_card, skill_idx, other_idx)
return heartful_catch(300143, player, my_idx, other_idx, "-") end,
-- sleep club president, fortune lady, lancer knight, magic circle witch, recycle
[1060] = function(player)
if #player.grave >= 2 then
local target = uniformly(player:grave_idxs_with_preds())
if target then
player:grave_to_exile(target)
end
target = uniformly(player:grave_idxs_with_preds())
if target then
player:grave_to_bottom_deck(target)
end
end
end,
-- sister vermet vilosa, hidden wind slash
[1061] = function(player, my_idx)
OneBuff(player, my_idx, {sta={"+",2}}):apply()
local target = uniformly(player.opponent:hand_idxs_with_preds({pred.spell}))
if target then
player.opponent:hand_to_grave(target)
end
end,
-- sanctuary hunter asmis, quest for truth
[1062] = function(player, my_idx, my_card, skill_idx)
if my_card.faction == player.character.faction then
local amt = 5
if player.character.life < player.opponent.character.life then
amt = 8
end
OneBuff(player, 0, {life={"+",amt}}):apply()
my_card:remove_skill(skill_idx)
end
end,
-- unlucky lady, value of misfortune
[1063] = function(player)
if player.game.turn % 2 == 0 then
local targets = player:field_idxs_with_preds({pred.follower, pred.faction.A})
local buff = OnePlayerBuff(player)
for _,idx in ipairs(targets) do
buff[idx] = {atk={"+",2}, sta={"+",2}}
end
buff:apply()
end
end,
-- 2s agent fourteen, mission accomplished
[1064] = function(player, my_idx)
while #player.opponent.hand < 5 and #player.opponent.deck > 0 do
player.opponent:draw_from_bottom_deck()
end
OneBuff(player, my_idx, {sta={"+",2}}):apply()
end,
-- arbiter rivelta answer, friendly advice
[1065] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if my_card.faction == player.character.faction then
local sent = math.min(#player.grave, 5)
if sent > 0 then
for i=1,sent do
player:grave_to_bottom_deck(math.random(#player.grave))
end
if other_card then
OneBuff(player.opponent, other_idx, {atk={"-",math.ceil(sent/2)}}):apply()
end
end
my_card:remove_skill(skill_idx)
end
end,
-- seeker smartylane, dress up!
[1066] = function(player, my_idx, my_card)
return dressup_skill(300157, player, my_idx) end,
-- dressup smartylane, heartful catch!
[1067] = function(player, my_idx, my_card, skill_idx, other_idx)
return heartful_catch(300157, player, my_idx, other_idx, "+") end,
-- medic knight, recycle
[1068] = function(player, my_idx)
player.opponent:mill(1)
OneBuff(player, my_idx, {sta={"+",2}}):apply()
end,
-- crux knight fleta, hesistation of justice
[1069] = function(player, my_idx, my_card, skill_idx)
if my_card.faction == player.character.faction then
local target_idxs = player:field_idxs_with_preds(pred.follower)
local buff = OnePlayerBuff(player)
for _,idx in ipairs(target_idxs) do
buff[idx] = {atk={"+",3}, def={"+",1}, sta={"+",4}}
end
buff:apply()
my_card:remove_skill(skill_idx)
end
end,
-- vampire hunter ire flina, vampire killer
[1070] = function(player, my_idx)
local target_idx = uniformly(player.opponent:hand_idxs_with_preds({pred.follower}))
if target_idx then
player.opponent:hand_to_grave(target_idx)
end
OneBuff(player, my_idx, {sta={"+",2}}):apply()
end,
-- scardel elder barbera, elder scroll
[1071] = function(player, my_idx, my_card, skill_idx)
if my_card.faction == player.character.faction then
local target_idx = player:grave_idxs_with_most_and_preds(
pred.size, {pred.follower, pred.faction.D})[1]
if target_idx then
local target_card = player.grave[target_idx]
player:grave_to_exile(target_idx)
local field_idx = player:first_empty_field_slot()
if field_idx then
player.field[field_idx] = deepcpy(target_card)
local buff_size = my_card.def
OneBuff(player, field_idx, {size={"=",my_card.size+1},
atk={"+",buff_size}, sta={"+",buff_size}}):apply()
end
end
my_card:remove_skill(skill_idx)
end
end,
-- sweet lady isfeldt, energy supplement
[1072] = function(player, my_idx)
OneBuff(player, my_idx, {sta={"+",2}}):apply()
end,
-- sweet lady isfeldt, sweet spell
[1073] = function(player, my_idx, my_card, skill_idx)
my_card.skills[skill_idx] = 1074
end,
-- sweet lady isfeldt, sweet count
[1074] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
if other_card.size <= my_card.size then
player.opponent:field_to_top_deck(other_idx)
my_card:remove_skill_until_refresh(skill_idx)
end
end,
-- lib. student, dispatch maid, blue cross member, gs recon, heavy burden
[1075] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
OneBuff(player.opponent, other_idx, {size={"+",1}}):apply()
my_card:remove_skill(skill_idx)
end,
[1076] = refresh,
-- council student, meeting prep!
[1077] = function(player, my_idx, my_card, skill_idx)
local target_idx = player:field_idxs_with_preds({pred.follower, pred.student_council})[1]
if target_idx then
OneBuff(player, target_idx, {sta={"+",3}}):apply()
my_card:remove_skill(skill_idx)
end
end,
-- sleep club advisor, time for bed
[1078] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if other_card then
other_card.active = false
end
my_card:remove_skill(skill_idx)
end,
-- council weekly help, seize
[1079] = function(player, my_idx, my_card, skill_idx, other_idx, other_card)
if not other_card then
return
end
local buff = GlobalBuff(player)
buff.field[player][my_idx] = {atk={"=",other_card.atk}}
buff.field[player.opponent][other_idx] = {atk={"=",my_card.atk}}
buff:apply()
end,
-- lib. milty, book management?
[1080] = function(player, my_idx)
local sta_buff, atk_buff = #player:hand_idxs_with_preds({pred.library_club}), 0
if sta_buff >= 3 then
atk_buff = 1
end
OneBuff(player, my_idx, {atk={"+",atk_buff}, sta={"+",sta_buff}}):apply()
end,
-- council vp tieria, campaign prep
[1081] = function(player, my_idx, my_card, skill_idx)
local buff_size = 1 + #player:field_idxs_with_preds({pred.student_council})
OneBuff(player, my_idx, {atk={"+",buff_size}, sta={"+",buff_size}}):apply()
my_card:remove_skill_until_refresh(skill_idx)
end,
-- lib. lotte & serie, fruits of friendship!
[1082] = function(player)
if player.character.faction == "V" then
if #player.hand >= 2 then
for i=1,2 do
player:hand_to_bottom_deck(1)
end
local target1_idx = uniformly(player:field_idxs_with_preds({pred.follower,
function(card) return not card.active end}))
local target2_idx = uniformly(player:get_follower_idxs())
if target1_idx then
player.field[target1_idx].active = true
end
OneBuff(player, target2_idx, {size={"-",1}, atk={"+",1}, def={"+",1}}):apply()
end
end
end,
-- peace lady, master's heart
[1083] = function(player, my_idx)
local target_idx = uniformly(player:hand_idxs_with_preds({pred.maid}))
if target_idx then
player:hand_to_top_deck(target_idx)
OneBuff(player, my_idx, {atk={"+",1}, sta={"+",2}}):apply()
end
end,
-- justice lady, dress up rise
[1084] = function(player, my_idx)
local lucerrie = function(card) return floor(card.id) == 300181 end
local deck_idx = player:deck_idxs_with_preds({lucerrie})[1]
local field_idx = player:first_empty_field_slot()
if deck_idx and field_idx then
player:deck_to_field(deck_idx)
player:field_to_grave(my_idx)
OneBuff(player, field_idx, {size={"=",5}, atk={"+",3}, sta={"+",2}}):apply()
end
end,
-- dress up lucerrie, rising attack
[1085] = function(player, my_idx)
local lucerrie = function(card) return floor(card.id) == 300181 end
local buff = false
local field_targets = player:field_idxs_with_preds({lucerrie})
for _,idx in ipairs(field_targets) do
if idx ~= my_idx then
player:field_to_grave(idx)
buff = true
end
end
local hand_target = player:hand_idxs_with_preds({pred.dress_up})[1]
if hand_target then
player:hand_to_grave(hand_target)
buff = true
end
local grave_target = player:grave_idxs_with_preds({pred.dress_up})[1]
if grave_target then
player:grave_to_exile(grave_target)
buff = true
end
if buff and #player.opponent.hand > 0 then
local opp_target = math.random(#player.opponent.hand)
player.opponent:hand_to_grave(opp_target)
end
end,
-- meteor call lady, meteor call
[1086] = function(player, my_idx, my_card, skill_idx)
local op_idx = uniformly(player.opponent:get_follower_idxs())
local buff_size = 1 + #player:field_idxs_with_preds(pred.lady)
if op_idx then
OneBuff(player.opponent, op_idx, {sta={"-",buff_size}}):apply()
end
my_card:remove_skill_until_refresh(skill_idx)
end,
-- picnic maid, faith and trust
[1087] = function(player, my_idx, my_card, skill_idx)