-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Main.cs
1981 lines (1911 loc) · 93.1 KB
/
_Main.cs
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
using BigDLL4221.Models;
using BigDLL4221.Utils;
using LOR_DiceSystem;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System;
using UnityEngine;
using LOR_XML;
using BigDLL4221.Enum;
using Sound;
using BigDLL4221.Buffs;
namespace AphoPassivePack
{
public static class AphoPassivePack_Params
{
public static string PackageId = "AphoPassivePack";
public static string Path;
public static string CategoryName = "Attribution Archives";
}
public class AphoPassivePackInit : ModInitializer
{
public override void OnInitializeMod()
{
OnInitParameters();
ArtUtil.GetArtWorks(new DirectoryInfo(AphoPassivePack_Params.Path + "/ArtWork"));
ArtUtil.PreLoadBufIcons();
CardUtil.ChangeCardItem(ItemXmlDataList.instance, AphoPassivePack_Params.PackageId);
KeypageUtil.ChangeKeypageItem(BookXmlList.Instance, AphoPassivePack_Params.PackageId);
PassiveUtil.ChangePassiveItem(AphoPassivePack_Params.PackageId);
LocalizeUtil.AddGlobalLocalize(AphoPassivePack_Params.PackageId);
LocalizeUtil.RemoveError();
CardUtil.InitKeywordsList(new List<Assembly> { Assembly.GetExecutingAssembly() });
ArtUtil.InitCustomEffects(new List<Assembly> { Assembly.GetExecutingAssembly() });
}
private static void OnInitParameters()
{
ModParameters.PackageIds.Add(AphoPassivePack_Params.PackageId);
AphoPassivePack_Params.Path = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
ModParameters.Path.Add(AphoPassivePack_Params.PackageId, AphoPassivePack_Params.Path);
OnInitRewards();
OnInitCards();
OnInitCategories();
OnInitKeypages();
OnInitSprites();
OnInitPassives();
}
private static void OnInitRewards()
{
ModParameters.StartUpRewardOptions.Add(new RewardOptions(keypages: new List<LorId>
{
new LorId(AphoPassivePack_Params.PackageId, 10000001),
new LorId(AphoPassivePack_Params.PackageId, 10000002),
new LorId(AphoPassivePack_Params.PackageId, 10000003),
new LorId(AphoPassivePack_Params.PackageId, 10000004),
new LorId(AphoPassivePack_Params.PackageId, 10000005),
new LorId(AphoPassivePack_Params.PackageId, 10000006),
new LorId(AphoPassivePack_Params.PackageId, 10000007),
new LorId(AphoPassivePack_Params.PackageId, 10000008),
new LorId(AphoPassivePack_Params.PackageId, 10000009),
new LorId(AphoPassivePack_Params.PackageId, 10000010),
}
));
}
private static void OnInitCards()
{
ModParameters.CardOptions.Add(AphoPassivePack_Params.PackageId, new List<CardOptions>
{
new CardOptions(1, cardColorOptions: new CardColorOptions(new Color(0.624f, 0.169f, 0.408f), customIconColor: new Color(0.898f, 0.169f, 0.314f), useHSVFilter: false)), //Mulligan
new CardOptions(2, cardColorOptions: new CardColorOptions(Color.white, customIconColor: Color.white, useHSVFilter: false)), //CarteBlanche
new CardOptions(3, cardColorOptions: new CardColorOptions(new Color(0.3f, 0.3f, 0.3f), customIconColor: Color.black, useHSVFilter: false)), //CarteBlanche
new CardOptions(4, cardColorOptions: new CardColorOptions(Color.red, customIconColor: Color.red, useHSVFilter: false)), //ExecutionBullet
new CardOptions(5, cardColorOptions: new CardColorOptions(new Color(0.973f, 0.859f, 0.184f), customIconColor: new Color(0.973f, 0.859f, 0.184f), useHSVFilter: false)), //SlowBullet
new CardOptions(6, cardColorOptions: new CardColorOptions(new Color(0.145f, 1, 0.337f), customIconColor: new Color(0.145f, 1, 0.337f), useHSVFilter: false)), //HPBullet
new CardOptions(7, cardColorOptions: new CardColorOptions(new Color(0.216f, 0.647f, 0.871f), customIconColor: new Color(0.216f, 0.647f, 0.871f), useHSVFilter: false)), //SPBullet
new CardOptions(8, cardColorOptions: new CardColorOptions(new Color(0.898f, 0.169f, 0.314f), customIconColor: new Color(0.898f, 0.169f, 0.314f), useHSVFilter: false)), //RShield
new CardOptions(9, cardColorOptions: new CardColorOptions(Color.white, customIconColor: Color.white, useHSVFilter: false)), //WShield
new CardOptions(10, cardColorOptions: new CardColorOptions(new Color(0.651f, 0.388f, 0.702f), customIconColor: new Color(0.651f, 0.388f, 0.702f), useHSVFilter: false)), //BShield
new CardOptions(11, cardColorOptions: new CardColorOptions(new Color(0.263f, 0.816f, 0.761f), customIconColor: new Color(0.263f, 0.816f, 0.761f), useHSVFilter: false)), //PShield
});
}
private static void OnInitCategories()
{
ModParameters.CategoryOptions.Add(AphoPassivePack_Params.PackageId, new List<CategoryOptions>
{
new CategoryOptions(AphoPassivePack_Params.PackageId, additionalValue: "_1", categoryBooksId:new List<int>{10000001, 10000002, 10000003, 10000004, 10000005, 10000006, 10000007, 10000008, 10000009, 10000010}, categoryName: AphoPassivePack_Params.CategoryName,customIconSpriteId:AphoPassivePack_Params.PackageId, bookDataColor: new CategoryColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f)), credenzaType: CredenzaEnum.ModifiedCredenza, chapter: 1, credenzaBooksId: new List<int> { 10000001, 10000002, 10000003 , 10000004, 10000005, 10000006, 10000007, 10000008, 10000009, 10000010}),
});
}
private static void OnInitKeypages()
{
ModParameters.KeypageOptions.Add(AphoPassivePack_Params.PackageId, new List<KeypageOptions>
{
new KeypageOptions(10000001, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000002, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000003, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000004, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000005, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000006, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000007, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000008, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000009, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
new KeypageOptions(10000010, keypageColorOptions: new KeypageColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.898f, 0.169f, 0.314f))),
});
}
private static void OnInitSprites()
{
ModParameters.SpriteOptions.Add(AphoPassivePack_Params.PackageId, new List<SpriteOptions>
{
new SpriteOptions(SpriteEnum.Custom, 10000001, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000002, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000003, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000004, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000005, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000006, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000007, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000008, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000009, "AphoPassivePack_Sprite"),
new SpriteOptions(SpriteEnum.Custom, 10000010, "AphoPassivePack_Sprite"),
});
}
private static void OnInitPassives()
{
ModParameters.PassiveOptions.Add(AphoPassivePack_Params.PackageId, new List<PassiveOptions>
{
//Dealer
new PassiveOptions(12, true, passiveColorOptions: new PassiveColorOptions(Color.white, Color.white)), //CarteBlanche
new PassiveOptions(13, true, passiveColorOptions: new PassiveColorOptions(Color.white, Color.gray)), //CarteNoir
new PassiveOptions(10, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(11, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(14, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(15, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
//Fairy
new PassiveOptions(20, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
new PassiveOptions(21, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
new PassiveOptions(22, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
new PassiveOptions(23, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
new PassiveOptions(24, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
new PassiveOptions(25, true, passiveColorOptions: new PassiveColorOptions(new Color(1f, 0.843f, 0f), new Color(1f, 0.843f, 0f))),
//Gunner
new PassiveOptions(30, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(31, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f)), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(AphoPassivePack_Params.PackageId, 32),
new LorId(AphoPassivePack_Params.PackageId, 33),
}), //APAmmo
new PassiveOptions(32, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f)), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(AphoPassivePack_Params.PackageId, 31),
new LorId(AphoPassivePack_Params.PackageId, 33),
}), //FrostAmmo
new PassiveOptions(33, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f)), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(AphoPassivePack_Params.PackageId, 31),
new LorId(AphoPassivePack_Params.PackageId, 32),
}), //FlameAmmo
new PassiveOptions(34, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(35, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
//Manager
new PassiveOptions(41, true, passiveColorOptions: new PassiveColorOptions(new Color(0.145f, 1, 0.337f), new Color(0.145f, 1, 0.337f))), //hp
new PassiveOptions(42, true, passiveColorOptions: new PassiveColorOptions(new Color(0.216f, 0.647f, 0.871f), new Color(0.216f, 0.647f, 0.871f))), //sp
new PassiveOptions(43, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Rshield
new PassiveOptions(44, true, passiveColorOptions: new PassiveColorOptions(Color.white, Color.white)), //Wshield
new PassiveOptions(45, true, passiveColorOptions: new PassiveColorOptions(new Color(0.651f, 0.388f, 0.702f), new Color(0.651f, 0.388f, 0.702f))), //Bshield
new PassiveOptions(46, true, passiveColorOptions: new PassiveColorOptions(new Color(0.263f, 0.816f, 0.761f), new Color(0.263f, 0.816f, 0.761f))), //Pshield
new PassiveOptions(47, true, passiveColorOptions: new PassiveColorOptions(new Color(0.973f, 0.859f, 0.184f), new Color(0.973f, 0.859f, 0.184f))), //Slow
new PassiveOptions(48, true, passiveColorOptions: new PassiveColorOptions(Color.red, Color.red)), //execute
//Gambler
new PassiveOptions(50, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(51, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(52, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(53, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(54, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
new PassiveOptions(55, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))),
//Martyr
new PassiveOptions(60, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //EdibleCorpse
//skip 61-66, those will use default colors
new PassiveOptions(67, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //IntoStarEmbrace
//BladeUnlocked
new PassiveOptions(70, true, cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 75),
new LorId(AphoPassivePack_Params.PackageId, 76),
}), //ProxyOfIndex
new PassiveOptions(71, true, passiveColorOptions: new PassiveColorOptions(Color.yellow, Color.yellow), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 75),
new LorId(AphoPassivePack_Params.PackageId, 76),
}), //Odd
new PassiveOptions(72, true, passiveColorOptions: new PassiveColorOptions(Color.yellow, Color.yellow), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 75),
new LorId(AphoPassivePack_Params.PackageId, 76),
}), //Even
new PassiveOptions(73, true, passiveColorOptions: new PassiveColorOptions(Color.red, Color.red), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 75),
}), //LowHP
new PassiveOptions(74, true, passiveColorOptions: new PassiveColorOptions(Color.red, Color.red), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 75),
new LorId(AphoPassivePack_Params.PackageId, 76),
}), //Kill
new PassiveOptions(75, true, passiveColorOptions: new PassiveColorOptions(new Color(1, 0.5f, 0.5f), new Color(1, 0.5f, 0.5f)), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 76),
}), //HighHP
new PassiveOptions(76, true, passiveColorOptions: new PassiveColorOptions(new Color(1, 0.5f, 0.5f), new Color(1, 0.5f, 0.5f)), cannotBeUsedWithPassives: new List<LorId>
{
new LorId(250115),
new LorId(AphoPassivePack_Params.PackageId, 70),
new LorId(AphoPassivePack_Params.PackageId, 71),
new LorId(AphoPassivePack_Params.PackageId, 72),
new LorId(AphoPassivePack_Params.PackageId, 73),
new LorId(AphoPassivePack_Params.PackageId, 74),
new LorId(AphoPassivePack_Params.PackageId, 75),
}), //NoDeath
//Perdition
new PassiveOptions(80, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
new PassiveOptions(81, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
new PassiveOptions(82, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
new PassiveOptions(83, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
new PassiveOptions(84, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
new PassiveOptions(85, true, passiveColorOptions: new PassiveColorOptions(new Color(0.624f, 0.169f, 0.408f), new Color(0.624f, 0.169f, 0.408f))),
//Breathing
new PassiveOptions(90, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Deeper
new PassiveOptions(91, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Deepest
new PassiveOptions(92, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Under
new PassiveOptions(93, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Deathly
new PassiveOptions(94, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Emergency
new PassiveOptions(95, true, passiveColorOptions: new PassiveColorOptions(new Color(0.898f, 0.169f, 0.314f), new Color(0.898f, 0.169f, 0.314f))), //Fire
});
}
}
//CombinationPassives
public class PassiveAbility_Apho_TheStrongestProwess : PassiveAbilityBase
{
public static string Name = "The Strongest's Prowess";
public static string Desc = "Choose the Speed dice with the lowest value; the Speed value of the dice change to the maximum possible value." +
"When using a Combat Page, all dice on the page gain Power against targets with slower Speed. (+1 Power per 2 points of difference, up to 5)";
public override void OnRollSpeedDice()
{
int minValue = 999;
foreach (SpeedDice speedDice in this.owner.speedDiceResult)
{
if (speedDice.value < minValue)
{
minValue = speedDice.value;
}
}
foreach (SpeedDice speedDice2 in this.owner.speedDiceResult.FindAll((SpeedDice x) => x.value == minValue))
{
speedDice2.value = 999;
}
this.owner.speedDiceResult.Sort(delegate (SpeedDice d1, SpeedDice d2)
{
if (d1.breaked && d2.breaked)
{
if (d1.value > d2.value)
{
return -1;
}
if (d1.value < d2.value)
{
return 1;
}
return 0;
}
else
{
if (d1.breaked && !d2.breaked)
{
return -1;
}
if (!d1.breaked && d2.breaked)
{
return 1;
}
if (d1.value > d2.value)
{
return -1;
}
if (d1.value < d2.value)
{
return 1;
}
return 0;
}
});
}
public override void OnUseCard(BattlePlayingCardDataInUnitModel curCard)
{
int speedDiceResultValue = curCard.speedDiceResultValue;
BattleUnitModel target = curCard.target;
int targetSlotOrder = curCard.targetSlotOrder;
if (targetSlotOrder >= 0 && targetSlotOrder < target.speedDiceResult.Count)
{
SpeedDice speedDice = target.speedDiceResult[targetSlotOrder];
if (speedDiceResultValue > speedDice.value)
{
int num = speedDiceResultValue - speedDice.value;
int num2 = Mathf.Min(5, num / 2);
if (num2 > 0)
{
curCard.ApplyDiceStatBonus(DiceMatch.AllDice, new DiceStatBonus
{
power = num2
});
}
}
}
}
}
public class PassiveAbility_Apho_DiscardPassive : PassiveAbilityBase
{
public static string Name = "Bottom Dealing the Best Choice of Stacked Decks";
public static string Desc = "Recover 3 HP whenever the character discards a page." +
"If the character discards a page, restore 1 Light at the end of the Scene, and draw 1 page at the start of the next Scene.";
public override void OnDiscardByAbility(List<BattleDiceCardModel> cards)
{
UnitUtil.SetPassiveCombatLog(this, owner);
this.owner.RecoverHP(cards.Count * 3);
this._triggeredDraw = true;
this._triggeredLight = true;
}
public override void OnRoundEnd()
{
base.OnRoundEnd();
if (this._triggeredLight)
{
this._triggeredLight = false;
this.LightAbility();
}
}
public override void OnRoundEndTheLast()
{
base.OnRoundEndTheLast();
if (this._triggeredDraw)
{
this._triggeredDraw = false;
this.DrawAbility();
}
}
private void DrawAbility()
{
this.owner.allyCardDetail.DrawCards(1);
}
private void LightAbility()
{
this.owner.cardSlotDetail.RecoverPlayPoint(1);
}
private bool _triggeredDraw, _triggeredLight;
}
public class PassiveAbility_Apho_BleedPassive : PassiveAbilityBase
{
public static string Name = "Twist Open & Rupture Wound";
public static string Desc = "Deal +4 damage and +1 Stagger damage against enemies with Bleed.";
public override void BeforeGiveDamage(BattleDiceBehavior behavior)
{
BattleUnitModel target = behavior.card.target;
if (target != null && target.bufListDetail.GetKewordBufStack(KeywordBuf.Bleeding) > 0)
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
behavior.ApplyDiceStatBonus(new DiceStatBonus
{
dmg = 4,
breakDmg = 1
});
}
}
}
public class PassiveAbility_Apho_FirstScene : PassiveAbilityBase
{
public static string Name = "Concentrated Blind Sniper Fire";
public static string Desc = "Gain +3 Power on the first Scene." +
"Offensive dice gain an additional +3 Power on the first Scene.";
public override void BeforeRollDice(BattleDiceBehavior behavior)
{
if (Singleton<StageController>.Instance.RoundTurn == 1 && base.IsAttackDice(behavior.Detail))
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
behavior.ApplyDiceStatBonus(new DiceStatBonus
{
power = 6
});
}
else if (Singleton<StageController>.Instance.RoundTurn == 1)
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
behavior.ApplyDiceStatBonus(new DiceStatBonus
{
power = 3
});
}
}
}
public class PassiveAbility_Apho_Solo : PassiveAbilityBase
{
public static string Name = "Remembrance of a Lone Fixer";
public static string Desc = "If an ally has died, gain 2 Strength at the end of each Scene." +
"At the end of each Scene, gain 3 Strength if no other allies are present.";
public override void OnRoundEnd()
{
if (BattleObjectManager.instance.GetList(this.owner.faction).Exists((BattleUnitModel x) => x.IsDead()))
{
this.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Strength, 2, this.owner);
}
if (!BattleObjectManager.instance.GetAliveList(this.owner.faction).Exists((BattleUnitModel x) => x != this.owner))
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
this.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Strength, 3, this.owner);
}
}
}
public class PassiveAbility_Apho_NotUse : PassiveAbilityBase
{
public static string Name = "Psyched-up Reaction Force";
public static string Desc = "If the character did not use any pages, restore 1 Light and draw 1 page at the end of the Scene, and gain 1 Strength and Endurance next scene.";
public override void OnRoundEnd()
{
if (this.owner.cardHistory.GetCurrentRoundCardList(Singleton<StageController>.Instance.RoundTurn).Count <= 0)
{
this.owner.cardSlotDetail.RecoverPlayPoint(1);
this.owner.allyCardDetail.DrawCards(1);
this.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Endurance, 1, this.owner);
this.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Strength, 1, this.owner);
}
}
}
//CustomPassives - DEALER
public class PassiveAbility_Apho_Mulligan : PassiveAbilityBase
{
public static string Name = "Mulligan";
public static string Desc = "At the start of the Act, add a special Combat Page that allows you to discard all pages and draw the same number of pages.";
public override void OnWaveStart()
{
this.owner.personalEgoDetail.AddCard(new LorId(AphoPassivePack_Params.PackageId, 1));
}
}
public class DiceCardSelfAbility_Apho_MulliganCard : DiceCardSelfAbilityBase
{
private int _handsize;
public static string Desc = "Discard all pages, draw the same number of pages.";
public override void OnUseInstance(BattleUnitModel unit, BattleDiceCardModel self, BattleUnitModel targetUnit)
{
this._handsize = unit.allyCardDetail.GetHand().Count;
unit.allyCardDetail.DiscardACardByAbility(unit.allyCardDetail.GetHand());
unit.allyCardDetail.DrawCards(_handsize);
UnitUtil.BattleAbDialog(unit.view.dialogUI, new List<AbnormalityCardDialog>
{
new AbnormalityCardDialog
{
//id = "MulliganDialog",
dialog = "Draw!!"
}
}, AbColorType.Positive);
}
}
public class PassiveAbility_Apho_DeckCycling : PassiveAbilityBase
{
public static string Name = "Cycling through the Deck";
public static string Desc = "At the start of the Scene, draw 1 page and discard 1 random page.";
public override void OnRoundStart()
{
this.owner.allyCardDetail.DrawCards(1);
this.owner.allyCardDetail.DiscardACardRandomlyByAbility(1);
}
}
public class PassiveAbility_Apho_CarteBlanche : PassiveAbilityBase
{
public static string Name = "Carte Blanche";
public static string Desc = "If 7 or fewer pages are in-hand at the end of the Scene, add a 'Carte Blanche' to hand: 'Cost 0 - [On Play, Single-use] No effect. Exhausts when used or discarded.'";
public override void OnRoundEnd()
{
if (this.owner.allyCardDetail.GetHand().Count <= 7)
{
this.owner.ShowPassiveTypo(this);
this.owner.allyCardDetail.AddNewCard(new LorId(AphoPassivePack_Params.PackageId, 2), false);
}
}
}
public class DiceCardSelfAbility_Apho_CarteBlanche : DiceCardSelfAbilityBase
{
public static string Desc = "No effect. Exhausts when used or discarded.";
public override void OnUseCard()
{
this.OnActivate(base.owner, this.card.card);
}
public override void OnDiscard(BattleUnitModel unit, BattleDiceCardModel self)
{
this.OnActivate(unit, self);
}
private void OnActivate(BattleUnitModel unit, BattleDiceCardModel self)
{
self.exhaust = true;
}
}
public class PassiveAbility_Apho_CarteNoir : PassiveAbilityBase
{
public static string Name = "Carte Noir";
public static string Desc = "At the start of the Act, add a 'Carte Noir' to all enemies' hands: '[On Play, Single-use] The cost of this page equals the user's Max Light. Exhausts when used or discarded; On Exhaust Lose all Light'.";
private void GiveCarteNoir()
{
List<BattleUnitModel> aliveList = BattleObjectManager.instance.GetAliveList((this.owner.faction == Faction.Player) ? Faction.Enemy : Faction.Player);
foreach (BattleUnitModel battleUnitModel in aliveList)
{
battleUnitModel.allyCardDetail.AddNewCard(new LorId(AphoPassivePack_Params.PackageId, 3), false);
}
}
public override void OnWaveStart()
{
this.GiveCarteNoir();
//this.owner.allyCardDetail.AddNewCard(new LorId(AphoPassivePack_Params.PackageId, 3), false); //Give card to self for testing purpose, remember to delete before release
}
}
public class DiceCardSelfAbility_Apho_CarteNoir : DiceCardSelfAbilityBase
{
public static string Desc = "The cost of this page equals the User's Max Light. Exhausts when used or discarded; On Exhaust Lose all Light.";
public override int GetCostLast(BattleUnitModel unit, BattleDiceCardModel self, int oldCost)
{
return unit.cardSlotDetail.GetMaxPlayPoint();
}
public override void OnUseCard()
{
this.OnActivate(base.owner, this.card.card);
}
public override void OnDiscard(BattleUnitModel unit, BattleDiceCardModel self)
{
this.OnActivate(unit, self);
}
private void OnActivate(BattleUnitModel unit, BattleDiceCardModel self)
{
int playPoint = unit.cardSlotDetail.GetMaxPlayPoint();
this.owner.cardSlotDetail.LoseWhenStartRound(playPoint);
this.owner.cardSlotDetail.LosePlayPoint(playPoint);
self.exhaust = true;
}
}
public class PassiveAbility_Apho_DealHand : PassiveAbilityBase
{
public static string Name = "Deal Hand";
public static string Desc = "All dice gain 1 Power per 2 pages in hand, up to 5.";
private int _bonus;
public override void BeforeRollDice(BattleDiceBehavior behavior)
{
base.BeforeRollDice(behavior);
_bonus = Mathf.Min(5, this.owner.allyCardDetail.GetHand().Count / 2);
if (_bonus > 0)
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
behavior.ApplyDiceStatBonus(new DiceStatBonus
{
power = _bonus
});
}
}
}
public class PassiveAbility_Apho_PageToss : PassiveAbilityBase
{
public static string Name = "Page Toss";
public static string Desc = "Deal 3 damage to a random enemy whenever the character discards a page.";
private int _hits;
public override void OnDiscardByAbility(List<BattleDiceCardModel> cards)
{
List<BattleUnitModel> aliveList = BattleObjectManager.instance.GetAliveList((this.owner.faction == Faction.Player) ? Faction.Enemy : Faction.Player);
_hits = cards.Count;
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
while (aliveList.Count > 0 && _hits > 0)
{
BattleUnitModel battleUnitModel = RandomUtil.SelectOne<BattleUnitModel>(aliveList);
battleUnitModel.TakeDamage(3, DamageType.Passive, this.owner, KeywordBuf.None);
_hits--;
}
}
}
//CustomPassives - FAIRY
public class PassiveAbility_Apho_FairyFalchion : PassiveAbilityBase
{
public static string Name = "Fairy Falchion";
public static string Desc = "Inflict 1 Fairy on hit.";
public override void OnSucceedAttack(BattleDiceBehavior behavior)
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
BattleUnitModel target = behavior.card.target;
if (target == null)
{
return;
}
target.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 1, this.owner);
}
}
public class PassiveAbility_Apho_ElvenEscutcheon : PassiveAbilityBase
{
public static string Name = "Elven Escutcheon";
public static string Desc = "When hit, inflict 1 Fairy to attacker.";
public override void OnTakeDamageByAttack(BattleDiceBehavior atkDice, int dmg)
{
BattleCardTotalResult battleCardResultLog = this.owner.battleCardResultLog;
if (battleCardResultLog != null)
{
battleCardResultLog.SetPassiveAbility(this);
}
atkDice.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 1, this.owner);
}
}
public class PassiveAbility_Apho_IgnisFatuus : PassiveAbilityBase
{
public static string Name = "Ignis Fatuus";
public static string Desc = "On a successful hit, if the target had 9 or more stacks of Fairy, inflict 1 Burn and 1 Fairy to a random enemy.";
public override void OnSucceedAttack(BattleDiceBehavior behavior)
{
if (behavior.card.target == null)
{
return;
}
if (behavior.card.target.bufListDetail.GetKewordBufAllStack(KeywordBuf.Fairy) >= 9)
{
UnitUtil.SetPassiveCombatLog(this, owner);
List<BattleUnitModel> aliveList_random = BattleObjectManager.instance.GetAliveList_random((this.owner.faction == Faction.Enemy) ? Faction.Player : Faction.Enemy, 1);
foreach (BattleUnitModel battleUnitModel in aliveList_random)
{
battleUnitModel.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, 1, this.owner);
battleUnitModel.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 1, this.owner);
}
}
}
}
public class PassiveAbility_Apho_LjosalfarLight : PassiveAbilityBase
{
public static string Name = "Ljosalfar Light";
public static string Desc = "At the start of the Scene, restore 1 Light and gain 3 Fairy.";
public override void OnRoundStart()
{
UnitUtil.SetPassiveCombatLog(this, owner);
this.owner.cardSlotDetail.RecoverPlayPoint(1);
this.owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 3, this.owner);
}
}
public class PassiveAbility_Apho_DokkalfarDirge : PassiveAbilityBase
{
public static string Name = "Dokkalfar Dirge";
public static string Desc = "When a character dies, inflict 4 Fairy to all enemies.";
public override void OnDie()
{
UnitUtil.SetPassiveCombatLog(this, owner);
List<BattleUnitModel> aliveList = BattleObjectManager.instance.GetAliveList((this.owner.faction == Faction.Player) ? Faction.Enemy : Faction.Player);
foreach (BattleUnitModel battleUnitModel in aliveList)
{
battleUnitModel.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 4, null);
}
}
public override void OnDieOtherUnit(BattleUnitModel unit)
{
UnitUtil.SetPassiveCombatLog(this, owner);
List<BattleUnitModel> aliveList = BattleObjectManager.instance.GetAliveList((this.owner.faction == Faction.Player) ? Faction.Enemy : Faction.Player);
foreach (BattleUnitModel battleUnitModel in aliveList)
{
battleUnitModel.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 4, null);
}
}
}
public class PassiveAbility_Apho_FickleFairy : PassiveAbilityBase
{
public static string Name = "Fickle Fairy";
public static string Desc = "At the start of the Scene, inflict 1 Fairy to a random enemy.";
public override void OnRoundStart()
{
List<BattleUnitModel> aliveList_random = BattleObjectManager.instance.GetAliveList_random((this.owner.faction == Faction.Enemy) ? Faction.Player : Faction.Enemy, 1);
this.owner.ShowPassiveTypo(this);
foreach (BattleUnitModel battleUnitModel in aliveList_random)
{
battleUnitModel.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Fairy, 1, this.owner);
}
}
}
//Gunner
public class PassiveAbility_Apho_PreloadedFirearm : PassiveAbilityBase
{
public static string Name = "Preloaded Firearm";
public static string Desc = "At the start of the Act, add 2 random Ammunition to hand.";
public override void OnWaveStart()
{
if (this.owner.passiveDetail.HasPassive<PassiveAbility_Apho_APAmmo>())
{
this.owner.allyCardDetail.AddNewCard(new LorId(602020), false);
this.owner.allyCardDetail.AddNewCard(new LorId(602020), false);
}
else if (this.owner.passiveDetail.HasPassive<PassiveAbility_Apho_FrostAmmo>())
{
this.owner.allyCardDetail.AddNewCard(new LorId(602021), false);
this.owner.allyCardDetail.AddNewCard(new LorId(602021), false);
}
else if (this.owner.passiveDetail.HasPassive<PassiveAbility_Apho_FlameAmmo>())
{
this.owner.allyCardDetail.AddNewCard(new LorId(602022), false);
this.owner.allyCardDetail.AddNewCard(new LorId(602022), false);
}
else
{
this.owner.allyCardDetail.AddNewCard(ThumbBulletClass.GetRandomBulletId(), false);
this.owner.allyCardDetail.AddNewCard(ThumbBulletClass.GetRandomBulletId(), false);
}
}
}
//Ammo IDs: AP - 602020, Frost - 602021, Flame - 602022
public class PassiveAbility_Apho_APAmmo : PassiveAbilityBase
{
public static string Name = "Armor-piercing Rounds";
public static string Desc = "All other Ammunition will be replaced with Armor-piercing Ammunition.";
private void ReplaceAmmo()
{
int _replacements = -1;
List<BattleDiceCardModel> FrostAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602021);
if (FrostAmmo != null)
{
_replacements = FrostAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel = RandomUtil.SelectOne<BattleDiceCardModel>(FrostAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel);
base.owner.allyCardDetail.AddNewCard(new LorId(602020), false);
_replacements--;
}
}
List<BattleDiceCardModel> FlameAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602022);
if (FlameAmmo != null)
{
_replacements = FlameAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel1 = RandomUtil.SelectOne<BattleDiceCardModel>(FlameAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel1);
base.owner.allyCardDetail.AddNewCard(new LorId(602020), false);
_replacements--;
}
}
}
public override void OnRoundStart()
{
ReplaceAmmo();
}
}
public class PassiveAbility_Apho_FrostAmmo : PassiveAbilityBase
{
public static string Name = "Frost Rounds";
public static string Desc = "All other Ammunition will be replaced with Frost Ammunition.";
private void ReplaceAmmo()
{
int _replacements = -1;
List<BattleDiceCardModel> APAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602020);
if (APAmmo != null)
{
_replacements = APAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel = RandomUtil.SelectOne<BattleDiceCardModel>(APAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel);
base.owner.allyCardDetail.AddNewCard(new LorId(602021), false);
_replacements--;
}
}
List<BattleDiceCardModel> FlameAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602022);
if (FlameAmmo != null)
{
_replacements = FlameAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel1 = RandomUtil.SelectOne<BattleDiceCardModel>(FlameAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel1);
base.owner.allyCardDetail.AddNewCard(new LorId(602021), false);
_replacements--;
}
}
}
public override void OnRoundStart()
{
ReplaceAmmo();
}
}
public class PassiveAbility_Apho_FlameAmmo : PassiveAbilityBase
{
public static string Name = "Flame Rounds";
public static string Desc = "All other Ammunition will be replaced with Flame Ammunition.";
private void ReplaceAmmo()
{
int _replacements = -1;
List<BattleDiceCardModel> APAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602020);
if (APAmmo != null)
{
_replacements = APAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel = RandomUtil.SelectOne<BattleDiceCardModel>(APAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel);
base.owner.allyCardDetail.AddNewCard(new LorId(602022), false);
_replacements--;
}
}
List<BattleDiceCardModel> FrostAmmo = base.owner.allyCardDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == 602021);
if (FrostAmmo != null)
{
_replacements = FrostAmmo.Count;
while (_replacements > 0)
{
BattleDiceCardModel battleDiceCardModel1 = RandomUtil.SelectOne<BattleDiceCardModel>(FrostAmmo);
base.owner.allyCardDetail.DiscardACardByAbility(battleDiceCardModel1);
base.owner.allyCardDetail.AddNewCard(new LorId(602022), false);
_replacements--;
}
}
}
public override void OnRoundStart()
{
ReplaceAmmo();
}
}
public class PassiveAbility_Apho_AmmoRecycling : PassiveAbilityBase
{
public static string Name = "Rounds Recycling";
public static string Desc = "After every three successful attacks with Ranged Combat Pages, add a random Ammunition to hand.";
public override void OnSucceedAttack(BattleDiceBehavior behavior)
{
if (behavior.card.card.GetSpec().Ranged == CardRange.Far)
{
this._count++;
if (this._count >= 3)
{
UnitUtil.SetPassiveCombatLog(this, owner);
this.owner.allyCardDetail.AddNewCard(ThumbBulletClass.GetRandomBulletId(), false);
this._count = 0;
}
}
}
private int _count;
}
public class PassiveAbility_Apho_AmmoOverTime : PassiveAbilityBase
{
public static string Name = "Ammo Delivery";
public static string Desc = "Starting from Scene 3, add a random ammunition to hand every 3 Scenes.";
public override void OnRoundStart()
{
if (Singleton<StageController>.Instance.RoundTurn % 3 == 0)
{
UnitUtil.SetPassiveCombatLog(this, owner);
this.owner.allyCardDetail.AddNewCard(ThumbBulletClass.GetRandomBulletId(), false);
}
}
}
//MANAGER
public class PassiveAbility_Apho_HPBullet : PassiveAbilityBase
{
public static string Name = "HP-N Bullet";
public static string Desc = "At the start of the Act, add a special Combat Page that can recover HP for an ally. When the emotion level rises, it can be used again.";
public override void OnWaveStart()
{
this.owner.personalEgoDetail.AddCard(new LorId(AphoPassivePack_Params.PackageId, 6));
}
public override void OnLevelUpEmotion()
{
List<BattleDiceCardModel> CheckHPBullet = base.owner.personalEgoDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == new LorId(AphoPassivePack_Params.PackageId, 6));
if (CheckHPBullet.Count <= 0)
{
this.owner.personalEgoDetail.AddCard(new LorId(AphoPassivePack_Params.PackageId, 6));
}
}
}
public class DiceCardSelfAbility_Apho_HPBullet : DiceCardSelfAbilityBase
{
public static string Desc = "Target ally recovers 8 HP";
public override void OnUseInstance(BattleUnitModel unit, BattleDiceCardModel self, BattleUnitModel targetUnit)
{
if (targetUnit != null)
{
targetUnit.RecoverHP(8); SingletonBehavior<BattleManagerUI>.Instance.ui_unitListInfoSummary.UpdateCharacterProfile(targetUnit, targetUnit.faction, targetUnit.hp, targetUnit.breakDetail.breakGauge, targetUnit.bufListDetail.GetBufUIDataList());
}
}
public override bool IsValidTarget(BattleUnitModel unit, BattleDiceCardModel self, BattleUnitModel targetUnit)
{
return targetUnit != null && targetUnit.faction == unit.faction;
}
public override bool IsOnlyAllyUnit()
{
return true;
}
}
public class PassiveAbility_Apho_SPBullet : PassiveAbilityBase
{
public static string Name = "SP-E Bullet";
public static string Desc = "At the start of the Act, add a special Combat Page that can recover Stagger Resist for an ally. When the emotion level rises, it can be used again.";
public override void OnWaveStart()
{
this.owner.personalEgoDetail.AddCard(new LorId(AphoPassivePack_Params.PackageId, 7));
}
public override void OnLevelUpEmotion()
{
List<BattleDiceCardModel> CheckSPBullet = base.owner.personalEgoDetail.GetHand().FindAll((BattleDiceCardModel x) => x.GetID() == new LorId(AphoPassivePack_Params.PackageId, 7));
if (CheckSPBullet.Count <= 0)
{
this.owner.personalEgoDetail.AddCard(new LorId(AphoPassivePack_Params.PackageId, 7));
}
}
}