-
Notifications
You must be signed in to change notification settings - Fork 12
/
script-json_data.js
4605 lines (4551 loc) · 177 KB
/
script-json_data.js
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
const dataSourceList = [ //几个不同的游戏服务区
{
code:"ja",
source:"パズル&ドラゴンズ"
},
{
code:"en",
source:"Puzzle & Dragons"
},
{
code:"ko",
source:"퍼즐앤드래곤"
},
];
let localTranslating = {
webpage_title: `P&D ${teamsCount}P Formation Maker`,
addition_display: "💬",
has_sub_filter: "📁",
title_blank: "Input Formation Title",
detail_blank: "Input Detail",
force_reload_data: `Force refresh data`,
request_input: tp`Please Input ${'info'}`,
status_message: {
loading_check_version: "Checking the data version, please wait...",
loading_mon_info: "Loading monster data, please wait...",
loading_skill_info: "Loading skill data, please wait...",
prepare_capture: "Preparing a screenshot, please wait...",
},
active_skill_title: "Skill",
evolved_skill_title: "Evoveld Skill",
leader_skill_title: "Leader Skill",
link_read_message: {
success: tp`Find the ${'type'} format.`,
need_user_script: `Because PADDB is cross-domain, you need to install helper script within the User Script Manager to support this feature.`,
user_script_link: `Link to the helper script`,
type: {
"PADDF": "PADDF",
"PDC": "PDC",
"PADDB": "PADDB",
"DADDB": "DADDB",
},
error: {
0: "Unknown Error",
1: "Unsupported format",
2: "No formation data",
3: "The illegal JSON format",
4: "The illegal URL format",
},
paddb_success: `Sucess`,
paddb_unauthorized: `Certification Faild (ID or password is incorrect)`,
},
sort_name:{
sort_none: "Nope",
sort_id: "Cards Id",
sort_attrs : "Attribute",
sort_evoRootId: "Cards Evolution Root",
sort_evoRoot_Attrs : "Cards Evolution Root's Attribute",
sort_rarity: "Rarity",
sort_cost: "Cost",
sort_skillLv1: "Maximum Skill Turn",
sort_skillLvMax: "Minimum Skill Turn",
sort_evoSkillLastCD: "Minimum Skill Turn(latest in Evo Skill)",
sort_hpMax120: "Max HP",
sort_atkMax120: "Max ATK",
sort_rcvMax120: "Max RCV",
sort_hpMax120_awoken: "Max HP (+Awoken)",
sort_atkMax120_awoken: "Max ATK (+Awoken)",
sort_rcvMax120_awoken: "Max RCV (+Awoken)",
sort_abilityIndex_awoken: "Maximum Weighted Ability Index (+Awakening)",
},
skill_parse: {
skill: {
error: tp`😫An error occurred in skill parsing, please feedback the Card ID to the developer.`,
unknown: tp`Unkonwn skill type: ${'type'}`,
active_turns: tp`Within ${'turns'} turns, ${'skills'}`,
delay_active_turns: tp`${`icon`}[Activated after ${'turns'} turns]:${'skills'}`,
random_skills: tp`Random Activates these skills:${'skills'}`,
evolved_skills: tp`Skills evolve to the next stage when used:${'skills'}`,
evolved_skills_loop: tp`${`icon`}Returns to the first stage after use`,
damage_enemy: tp`Inflicts ${'times'}${'damage'} ${'attr'} attack on ${'target'}${'totalDamage'}`,
damage_enemy_times: tp`${'times'} `,
damage_enemy_count: tp` (${'damage'} in total)`,
//Inflicts a 50x attack to 1 enemy and recover 100% of the damage. Reduces unmatchable orb status by 9999 turns. 9999 turn awoken bind recovery.
vampire: tp`${'damage_enemy'} and ${'icon'}recover ${'heal'} of the damage`,
delay: tp`${'icon'}Delays enemies' next move`,
mass_attack: tp`${'icon'}Mass attacks`,
leader_change: tp`${'icon'}Switches ${'target'} with Leader Monster, use again to switch back`,
no_skyfall: tp`${'icon'}No Skyfall Combos`,
self_harm: tp`${'icon'}Reduces ${'stats'} by ${'value'}`,
heal: tp`${'icon'}Recover ${'value'} ${'stats'}`,
unbind: tp`Recovery ${'stats'} by ${'turns'} turns`,
unbind_normal: tp`${'icon'}Bind`,
unbind_awakenings: tp`${'icon'}Awoken bind`,
unbind_matches: tp`${'icon'}Unmatchable orb`,
bind_skill: tp`${'icon'}Unable to use skills`,
defense_break: tp`${'icon'}Reduce enemy defense by ${'value'}`,
poison: tp`${'icon'}Poisons ${'target'}, reduce ${'stats'} with ${'belong_to'} ${'value'} per turns`,
time_extend: tp`${'icon'}Orb move time ${'value'}`,
follow_attack: tp`${'icon'}Bonus attack equal to ${'belong_to'} ${'value'} when matching Orbs (Consider the ${'target'}'s defense)`,
follow_attack_fixed: tp`inflicts ${'damage'} ${'attr'} damage`,
auto_heal_buff: tp`${'icon'}Heal ${'value'} ${'stats'} every turn`,
auto_heal: tp`${'icon'}Heal ${'stats'} by ${'belong_to'} ${'value'} after matching orbs`,
ctw: tp`${'icon'}Move orbs freely for ${'time'}${'addition'}`,
ctw_addition: tp`, ${'cond'} is achieved, ${'skill'}`,
gravity: tp`Reduce ${'target'} ${'icon'}${'value'}`,
resolve: tp`${'icon'}Survive a single hit when ${'stats'}≧${'min'}`,
board_change: tp`Change all orbs to ${'orbs'}`,
skill_boost: tp`Team's skills charge ${'icon'}${'turns_min'}${'turns_max'}`,
skill_boost_range: tp`~${'turns'}`,
add_combo: tp`Adds ${'value'} combos${'icon'}`,
fixed_time: tp`[${'icon'}Fixed orb move time: ${'value'}]`,
min_match_length: tp`[Only able to erase ≥${'matchable'} orbs]`, //matchable, unmatchable
drop_refresh: tp`${'icon'}Replaces all orbs`,
drum: tp`Plus a drumming sound is made when Orbs are moved`,
auto_path: tp`Shows ${'matchesNumber'} ${'icon'}combo path guidance`,
counter_attack: tp`When attacked by an ${'target'}, ${'chance'}${'value'} ${'attr'} ${'icon'}counterattack`,
change_orbs: tp`Changes ${'from'} to ${'to'} orbs`,
generate_orbs: tp`Creates ${'value'} ${'orbs'} orbs each at random ${'exclude'}`,
fixed_orbs: tp`Changes the ${'position'} to ${'orbs'} orbs`,
orb_drop_increase: tp`Increases the skyfall of ${'orbs'} to ${'prob'}`,
orb_drop_increase_flag: tp`${'orbs'} skyfall ${'prob'} chance for ${'flag'}${'value'}`,
orb_thorn: tp`, reduces ${'value'} per encounter`,
attr_absorb: tp`${'icon'}Attribute absorption`,
combo_absorb: tp`${'icon'}Combo absorption`,
damage_absorb: tp`${'icon'}Damage absorption`,
damage_void: tp`${'icon'}Damage void`,
void_enemy_buff: tp`Voids enemies' ${'buff'}`,
change_attribute: tp`${'target'} Att. changes to ${'attrs'}`,
set_orb_state_enhanced: tp`${'orbs'} ${'icon'}enhanced (${'value'} per orb)`,
set_orb_state_locked: tp`${'icon'}Locks ${'value'}${'orbs'}`,
set_orb_state_unlocked: tp`${'icon'}Unlocks ${'orbs'}`,
set_orb_state_bound: tp`${'orbs'} are unmatchable`,
set_orb_state_combo_drop: tp`Add ${'value'} ${'icon'}combo drop on ${'orbs'}`,
set_orb_state_nail: tp`Add ${'value'} ${'icon'}nail on ${'orbs'}`,
rate_multiply: tp`${'rate'} ${'value'} when entering as leader`,
rate_multiply_drop: tp`${'icon'}Drop rate`,
rate_multiply_coin: tp`${'icon'}Coins`,
rate_multiply_exp: tp`${'icon'}Rank EXP`,
reduce_damage: tp`${'condition'}${'chance'}${'icon'}Reduces ${'attrs'} damage taken by ${'value'}`,
power_up: tp`${'condition'}${'targets'}${'each_time'}${'value'}${'reduceDamage'}${'additional'}`,
power_up_targets: tp`[${'attrs_types'}]'s `, //attrs, types, attrs_types
henshin: tp`Changes to ${'cards'}`,
random_henshin: tp`Random changes to ${'cards'}`,
void_poison: tp`Voids ${'poison'} damage`,
skill_proviso: tp`The follow-up effect can only be activates ${'condition'}`,
impart_awoken: tp`Impart ${'attrs_types'} additional ${'awakenings'}`,
obstruct_opponent: tp`Apply obstruct skill effect to ${'target'}: ${'skills'}`,
obstruct_opponent_after_me: tp`The opponent ranked lower than me`,
obstruct_opponent_before_me: tp`The opponent ranked higher than me`,
obstruct_opponent_designated_position: tp`No.${'positions'} ranked opponents`,
slot_power_up: tp`The slot of ${'targets'} ${'icon'}${'value'}`,
increase_damage_cap: tp`The ${'icon'}damage cap of ${'targets'} is change to ${'cap'}`,
board_jamming_state: tp`Creates ${'count'} ${'icon'}${'state'} ${'size'} at ${'position'}${'comment'}`,
board_size_change: tp`Board size changed to ${'icon'}${'size'}`,
remove_assist: tp`${'icon'}Remove this assist card (until end of dungeon)`,
prediction_falling: tp`${'icon'}Prediction of falling on board`,
play_voice: tp`Play voice of the phase ${'stage'} of active skill ${'icon'}`,
},
power: {
unknown: tp`[ Unkonwn power up: ${'type'} ]`,
scale_attributes: tp`When matching ${'min'} attr. of ${'orbs'} ${'stats'}${'bonus'}`,
scale_attributes_bonus: tp`, ${'bonus'} per attr. additional, up to ${'stats_max'} for ${'max'} attr.`,
scale_combos: tp`When ${'min'} combos ${'stats'}${'bonus'}`,
scale_combos_bonus: tp`, ${'bonus'} per combos additional, up to ${'stats_max'} for ${'max'} combos`,
scale_match_attrs: tp`When matching ${'min'} combos in [${'matches'}] ${'stats'}${'bonus'}`,
scale_match_attrs_bonus: tp`, ${'bonus'} per matches additional,up to ${'stats_max'} for ${'max'} matches`,
scale_match_length: tp`When matching ${'min'} of ${'orbs'} ${'in_once'}${'stats'}${'bonus'}`,
scale_match_length_bonus: tp`, ${'bonus'} per orbs additional,up to ${'stats_max'} for ${'max'} orbs`,
scale_remain_orbs: tp`When ≤ ${'max'} orbs remain on the board ${'stats'}${'bonus'}`,
scale_remain_orbs_bonus: tp`, ${'bonus'} for each fewer orb, up to ${'stats_max'} for ${'min'} orbs`,
scale_cross: tp`When matching cross of 5 ${'orbs'} ${'each_time'}${'stats'}`,
scale_state_kind: tp`${'stats'} for each [${'awakenings'}${'attrs'}${'types'}] in team`,
},
cond: {
unknown: tp`[ Unknown condition ]`,
hp_equal: tp`When ${'hp'} == ${'min'} `,
hp_less_or_equal: tp`When ${'hp'} ≤ ${'max'} `,
hp_greater_or_equal: tp`When ${'hp'} ≥ ${'min'} `,
hp_belong_to_range: tp`When ${'hp'} ∈ [${'min'},${'max'}] `,
use_skill: tp`When skills used `,
multi_player: tp`When in Multiplayer Mode `,
remain_orbs: tp`When ≤ ${'value'} Orbs on the board `,
exact_combo: tp`When exactly ${'value'} combos `,
exact_length: tp`exactly of ${'value'} `,
exact_match_length: tp`When matching ${'length'}${'value'}${'orbs'}, `,
exact_match_enhanced: tp` orbs including enhanced`,
compo_type_card: tp`When ${'ids'} are all on team, `,
compo_type_series: tp`When all subs from ${'ids'} collab (Needs at least 1 sub), `,
compo_type_evolution: tp`When all monsters in team are ${'ids'}, `,
compo_type_team_total_rarity: tp`When the total ★ rarity of the team is ≤${'rarity'}, `,
compo_type_team_same_rarity: tp`When the ★ rarity of the team is ${'rarity'}, `,
stage_less_or_equal: tp`When ${'stage'} ≤ ${'max'}, `,
stage_greater_or_equal: tp`When ${'stage'} ≥ ${'min'}, `,
orbs_less_or_equal: tp`When ${'orbs'} ≤ ${'max'} on board, `,
orbs_greater_or_equal: tp`When ${'orbs'} ≥ ${'min'} on board, `,
L_shape: tp`When matching an L shape of 5 ${'orbs'} `,
heal: tp`When healing at least ${'heal'} ${'stats'} with ${'orbs'} `,
},
position: {
top: tp`${'pos'} of top rows`,
bottom: tp`${'pos'} of bottom rows`,
left: tp`${'pos'} of left columns`,
right: tp`${'pos'} of right columns`,
random: tp`random location`,
shape: tp`specified location`,
},
value: {
unknown: tp`[ Unknown value: ${'type'}]`, //type
const: tp`${'value'} ${'unit'}`,
const_to: tp`to ${'value'}`,
mul_percent: tp`${'value'}%`,
mul_times: tp`×${'value'}`,
mul_of_percent: tp`${'stats'}'s ${'value'}%`,
mul_of_times: tp`${'stats'} ×${'value'}`,
hp_scale: tp`when ${'hp'} == 100% is ${'min'} and ${'hp'} == 1 is ${'max'}`,
random_atk: tp`${'atk'} ×${'min'}${'max'}`,
prob: tp`${'value'} chance for `,
x_awakenings: tp`count of ${'awakenings'} ×${'value'}`,
size: tp`${'width'}×${'height'}`,
pos: tp`${'x'}×${'y'}`,
},
target: {
unknown: tp`Unkown Target`,
self: tp`card self`,
team: tp`team`,
team_last: tp`the lastest member`,
team_leader: tp`leader`,
sub_members: tp`sub-members`,
leader_self: tp`left leader`,
leader_helper: tp`right leader`,
collab_id: tp`Cards with Collaboration ID of ${'id'} `,
gacha_id: tp`Cards with Egg Machine ID of ${'id'} `,
enemy: tp`Enemy`,
enemy_all: tp`all enemys`,
enemy_one: tp`1 enemy`,
enemy_attr: tp`${'attr'} enemy`,
the_attr: tp`attr of the matched Orbs`,
},
stats: {
unknown: tp`[ Unknown: ${'type'}]`, //type
maxhp: tp`${'icon'}Max HP`,
hp: tp`HP`,
chp: tp`current HP`,
shield: tp`shield`,
atk: tp`ATK`,
rcv: tp`RCV`,
teamhp: tp`Team HP`,
teamatk: tp`Team ${'attrs'} ATK`,
teamrcv: tp`Team RCV`,
cstage: tp`current Stage of Dungeon`,
state_is: tp`${'state'}: ${'num'}`,
},
unit: {
orbs: tp``,
times: tp`times`,
seconds: tp`seconds`,
point: tp`point`,
turns: tp`turns`,
},
word: {
comment: tp`(${'content'}) `,
comma: tp`, `,
semicolon: tp`; `,
slight_pause: tp`, `,
range_hyphen: tp`~`,
in_once: tp`in once `,
evo_type_pixel: tp`Pixel Evo`,
evo_type_reincarnation: tp`Reinc. or Super Reinc. Evo`,
evo_type_unknow: tp`Unknown Evo: ${'type'}`,
affix_attr: tp`${'cotent'} attr.`,
affix_orb: tp`${'cotent'} orbs`,
affix_type: tp`${'cotent'} types`,
affix_awakening: tp`${'cotent'} awoken`,
affix_exclude: tp`, exclude ${'cotent'}`,
each_time: tp`each time `,
different: tp`different`,
same: tp`the same`,
},
attrs: {
[0]: tp`${'icon'}Fire`,
[1]: tp`${'icon'}Water`,
[2]: tp`${'icon'}Wood`,
[3]: tp`${'icon'}Light`,
[4]: tp`${'icon'}Dark`,
[5]: tp`${'icon'}Recover`,
[6]: tp`${'icon'}Null`,
all: tp`All`,
self: tp`${'icon'}Self's Attr`,
fixed: tp`${'icon'}Fixed`,
},
orbs: {
[0]: tp`${'icon'}Fire`,
[1]: tp`${'icon'}Water`,
[2]: tp`${'icon'}Wood`,
[3]: tp`${'icon'}Light`,
[4]: tp`${'icon'}Dark`,
[5]: tp`${'icon'}Heal`,
[6]: tp`${'icon'}Jammer`,
[7]: tp`${'icon'}Poison`,
[8]: tp`${'icon'}Lethal Poison`,
[9]: tp`${'icon'}Bomb`,
enhanced: tp`${'icon'}Enhanced`,
locked: tp`${'icon'}Locked`,
nail: tp`${'icon'}Nail`,
thorn: tp`${'icon'}Thorn`,
_5color: tp`${'icon'}5 Att.`,
_6color: tp`${'_5color'}+${'orb_rcv'}`,
all: tp`All`,
any: tp`Any ${'cotent'}`,
},
board: {
clouds: tp`${'icon'}Clouds`,
immobility: tp`${'icon'}Immobility`,
roulette: tp`${'icon'}Roulette`,
deep_dark: tp`${'icon'}Deep Dark`,
roulette_time: tp`transforms every ${'duration'}`,
roulette_attrs: tp`only ${'orbs'} will appear`,
},
types: {
[0]: tp`${'icon'}Evo Material`,
[1]: tp`${'icon'}Balanced`,
[2]: tp`${'icon'}Physical`,
[3]: tp`${'icon'}Healer`,
[4]: tp`${'icon'}Dragon`,
[5]: tp`${'icon'}God`,
[6]: tp`${'icon'}Attacker`,
[7]: tp`${'icon'}Devil`,
[8]: tp`${'icon'}Machine`,
[9]: tp`${'icon'}Special Protection`,
[12]: tp`${'icon'}Awaken`,
[14]: tp`${'icon'}Enhance Material`,
[15]: tp`${'icon'}Redeemable`,
},
awokens: {
[0]: tp`${'icon'}Unknown awoken`,
[1]: tp`${'icon'}Enhanced HP`,
[2]: tp`${'icon'}Enhanced Attack`,
[3]: tp`${'icon'}Enhanced Recovery`,
[4]: tp`${'icon'}Reduce Fire Damage`,
[5]: tp`${'icon'}Reduce Water Damage`,
[6]: tp`${'icon'}Reduce Wood Damage`,
[7]: tp`${'icon'}Reduce Light Damage`,
[8]: tp`${'icon'}Reduce Dark Damage`,
[9]: tp`${'icon'}Auto-Recover`,
[10]: tp`${'icon'}Resistance-Bind`,
[11]: tp`${'icon'}Resistance-Blind`,
[12]: tp`${'icon'}Resistance-Jammers`,
[13]: tp`${'icon'}Resistance-Poison`,
[14]: tp`${'icon'}Enhanced Fire Orbs`,
[15]: tp`${'icon'}Enhanced Water Orbs`,
[16]: tp`${'icon'}Enhanced Wood Orbs`,
[17]: tp`${'icon'}Enhanced Water Orbs`,
[18]: tp`${'icon'}Enhanced Dark Orbs`,
[19]: tp`${'icon'}Extend Time`,
[20]: tp`${'icon'}Recover Bind`,
[21]: tp`${'icon'}Skill Boost`,
[22]: tp`${'icon'}Enhanced Fire Rows`,
[23]: tp`${'icon'}Enhanced Water Rows`,
[24]: tp`${'icon'}Enhanced Wood Rows`,
[25]: tp`${'icon'}Enhanced Water Rows`,
[26]: tp`${'icon'}Enhanced Dark Rows`,
[27]: tp`${'icon'}Two-Pronged Attack`,
[28]: tp`${'icon'}Resistance-Skill Bind`,
[29]: tp`${'icon'}Enhanced Heal Orbs`,
[30]: tp`${'icon'}Multi Boost`,
[31]: tp`${'icon'}Dragon Killer`,
[32]: tp`${'icon'}God Killer`,
[33]: tp`${'icon'}Devil Killer`,
[34]: tp`${'icon'}Machine Killer`,
[35]: tp`${'icon'}Balanced Killer`,
[36]: tp`${'icon'}Attacker Killer`,
[37]: tp`${'icon'}Physical Killer`,
[38]: tp`${'icon'}Healer Killer`,
[39]: tp`${'icon'}Evo Killer`,
[40]: tp`${'icon'}Awaken Killer`,
[41]: tp`${'icon'}Enhance Killer`,
[42]: tp`${'icon'}Redeemable Killer`,
[43]: tp`${'icon'}Enhanced Combos`,
[44]: tp`${'icon'}Guard Break`,
[45]: tp`${'icon'}Bonus Attack`,
[46]: tp`${'icon'}Enhanced Team HP`,
[47]: tp`${'icon'}Enhanced Team Recovery`,
[48]: tp`${'icon'}Damage Void Piercer`,
[49]: tp`${'icon'}Awoken Assist`,
[50]: tp`${'icon'}Super Bonus Attack`,
[51]: tp`${'icon'}Skill Charge`,
[52]: tp`${'icon'}Resistance-Bind+`,
[53]: tp`${'icon'}Extend Time+`,
[54]: tp`${'icon'}Resistance-Clouds`,
[55]: tp`${'icon'}Resistance-Immobility`,
[56]: tp`${'icon'}Skill Boost+`,
[57]: tp`${'icon'}50% or more HP Enhanced`,
[58]: tp`${'icon'}50% or less HP Enhanced`,
[59]: tp`${'icon'}[L] Heal Matching`,
[60]: tp`${'icon'}[L] Increased Attack`,
[61]: tp`${'icon'}Super Enhanced Combos`,
[62]: tp`${'icon'}Combo Orbs`,
[63]: tp`${'icon'}Skill Voice`,
[64]: tp`${'icon'}Dungeon Bonus`,
[65]: tp`${'icon'}Reduced HP`,
[66]: tp`${'icon'}Reduced Attack`,
[67]: tp`${'icon'}Reduced RCV`,
[68]: tp`${'icon'}Resistance-Blind+`,
[69]: tp`${'icon'}Resistance-Jammers+`,
[70]: tp`${'icon'}Resistance-Poison+`,
[71]: tp`${'icon'}Blessing of Jammers`,
[72]: tp`${'icon'}Blessing of Poison Orbs`,
[73]: tp`${'icon'}Enhanced Fire Combos`,
[74]: tp`${'icon'}Enhanced Water Combos`,
[75]: tp`${'icon'}Enhanced Wood Combos`,
[76]: tp`${'icon'}Enhanced Light Combos`,
[77]: tp`${'icon'}Enhanced Dark Combos`,
[78]: tp`${'icon'}Cross Attack`,
[79]: tp`${'icon'}3 Att. Enhanced Attack`,
[80]: tp`${'icon'}4 Att. Enhanced Attack`,
[81]: tp`${'icon'}5 Att. Enhanced Attack`,
[82]: tp`${'icon'}Super Enhanced Matching`,
[83]: tp`${'icon'}Add Dragon Type`,
[84]: tp`${'icon'}Add God Type`,
[85]: tp`${'icon'}Add Devil Type`,
[86]: tp`${'icon'}Add Machine Type`,
[87]: tp`${'icon'}Add Balanced Type`,
[88]: tp`${'icon'}Add Attacker Type`,
[89]: tp`${'icon'}Add Physical Type`,
[90]: tp`${'icon'}Add Healer Type`,
[91]: tp`${'icon'}Change Sub Attribute: Fire`,
[92]: tp`${'icon'}Change Sub Attribute: Water`,
[93]: tp`${'icon'}Change Sub Attribute: Wood`,
[94]: tp`${'icon'}Change Sub Attribute: Water`,
[95]: tp`${'icon'}Change Sub Attribute: Dark`,
[96]: tp`${'icon'}Two-Pronged Attack+`,
[97]: tp`${'icon'}Skill Charge+`,
[98]: tp`${'icon'}Auto-Recover+`,
[99]: tp`${'icon'}Enhanced Fire Orbs+`,
[100]: tp`${'icon'}Enhanced Water Orbs+`,
[101]: tp`${'icon'}Enhanced Wood Orbs+`,
[102]: tp`${'icon'}Enhanced Water Orbs+`,
[103]: tp`${'icon'}Enhanced Dark Orbs+`,
[104]: tp`${'icon'}Enhanced Heal Orbs+`,
[105]: tp`${'icon'}Anti-Skill Boost`,
[106]: tp`${'icon'}Levitation`,
[107]: tp`${'icon'}Enhanced Combos+`,
[108]: tp`${'icon'}[L] Increased Attack+`,
[109]: tp`${'icon'}Damage Void Piercer+`,
[110]: tp`${'icon'}Cross Attack+`,
[111]: tp`${'icon'}Super Enhanced Combos+`,
[112]: tp`${'icon'}3 Att. Enhanced Attack+`,
[113]: tp`${'icon'}4 Att. Enhanced Attack+`,
[114]: tp`${'icon'}5 Att. Enhanced Attack+`,
[115]: tp`${'icon'}Recover Bind+`,
[116]: tp`${'icon'}Triple Enhanced Fire Rows`,
[117]: tp`${'icon'}Triple Enhanced Water Rows`,
[118]: tp`${'icon'}Triple Enhanced Wood Rows`,
[119]: tp`${'icon'}Triple Enhanced Water Rows`,
[120]: tp`${'icon'}Triple Enhanced Dark Rows`,
[121]: tp`${'icon'}Enhanced Fire Combos+`,
[122]: tp`${'icon'}Enhanced Water Combos+`,
[123]: tp`${'icon'}Enhanced Wood Combos+`,
[124]: tp`${'icon'}Enhanced Light Combos+`,
[125]: tp`${'icon'}Enhanced Dark Combos+`,
[126]: tp`${'icon'}[T] Increased Attack`,
[127]: tp`${'icon'}Enhanced Stats`,
[128]: tp`${'icon'}Yang Protection`,
[129]: tp`${'icon'}Yin Protection`,
[130]: tp`${'icon'}Aging`,
[131]: tp`${'icon'}Part Break`,
}
},
};
//类型和觉醒杀和潜觉杀的对应编号,还有类型可以打什么类型的潜觉杀
const typekiller_for_type = [
{type:0,awoken:39,latent:16,typeKiller:[]}, //0进化
{type:12,awoken:40,latent:17,typeKiller:[]}, //12觉醒
{type:14,awoken:41,latent:18,typeKiller:[]}, //14强化
{type:15,awoken:42,latent:19,typeKiller:[]}, //15卖钱
{type:5,awoken:32,latent:20,typeKiller:[7]}, //5神
{type:4,awoken:31,latent:21,typeKiller:[8,3]}, //4龙
{type:7,awoken:33,latent:22,typeKiller:[5]}, //7恶魔
{type:8,awoken:34,latent:23,typeKiller:[5,1]}, //8机械
{type:1,awoken:35,latent:24,typeKiller:[5,4,7,8,1,6,2,3]}, //1平衡
{type:6,awoken:36,latent:25,typeKiller:[7,2]}, //6攻击
{type:2,awoken:37,latent:26,typeKiller:[8,3]}, //2体力
{type:3,awoken:38,latent:27,typeKiller:[4,6]}, //3回复
{type:9,awoken:null,latent:null,typeKiller:[]}, //特殊保护
];
//类型允许的潜觉杀
typekiller_for_type.forEach(t=>
{
t.allowableLatent = t.typeKiller.concat([0,12,14,15]) //补充4种特殊杀
.map(tn=>
typekiller_for_type.find(_t=>_t.type == tn).latent
);
}
);
const allowable_latent = {
common: [ //一般能打的潜觉
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
28,29,30,31,32,33,34,35,36,37,38
],
killer: [16,17,18,19,20,21,22,23,24,25,26,27], //杀潜觉
v120: [42,43,44,45,49], //120才能打的潜觉,3倍上限潜觉需要特殊处理
needAwoken: [ //需要觉醒才能打的潜觉
{latent:39,awoken:62}, //C珠破吸
{latent:40,awoken:20}, //心横解转转
{latent:41,awoken:27}, //U解禁消
{latent:46,awoken:45}, //心追解云封
{latent:47,awoken:59}, //心L大SB
{latent:48,awoken:60}, //L解禁武器
],
}
//等效觉醒列表
const equivalent_awoken = [
{small:10,big:52,times:2}, //防封
{small:11,big:68,times:5}, //防暗
{small:12,big:69,times:5}, //防废
{small:13,big:70,times:5}, //防毒
{small:19,big:53,times:2}, //手指
{small:21,big:56,times:2}, //SB
{small:27,big:96,times:2}, //U
{small:51,big:97,times:2}, //5色溜
{small:9,big:98,times:2}, //自回
{small:14,big:99,times:2}, //火+
{small:15,big:100,times:2},//水+
{small:16,big:101,times:2},//木+
{small:17,big:102,times:2},//光+
{small:18,big:103,times:2},//暗+
{small:29,big:104,times:2},//心+
{small:43,big:107,times:2},//7c
{small:60,big:108,times:2},//L
{small:48,big:109,times:2},//破无效
{small:78,big:110,times:2},//十字
{small:61,big:111,times:2},//10c
{small:79,big:112,times:2},//3色
{small:80,big:113,times:2},//4色
{small:81,big:114,times:2},//5色
{small:20,big:115,times:2},//心解
{small:22,big:116,times:3},//火横
{small:23,big:117,times:3},//水横
{small:24,big:118,times:3},//木横
{small:25,big:119,times:3},//光横
{small:26,big:120,times:3},//暗横
{small:73,big:121,times:2},//火串
{small:74,big:122,times:2},//水串
{small:75,big:123,times:2},//木串
{small:76,big:124,times:2},//光串
{small:77,big:125,times:2},//暗串
];
const PAD_PASS_BADGE = 1<<7 | 1; //本程序的月卡徽章编号,129
//官方的徽章排列顺序
const official_badge_sorting = [ //20是没有启用的全属性徽章,现在也不在游戏内显示了
1, 22, 23, 2, 3, 4, 5, 6,
7, 8, 9, 11, 17, 18, 19, 21,
10, 12, 13, 14, 24, 25, 26, 27,
28, 29, 30, 31, 15, 16, 32, 33,
34, 35, 36, 37, 38, 39, 40,
PAD_PASS_BADGE,
]
//官方的觉醒排列顺序
const official_awoken_sorting = [
21, 43, 61, 10, 54, 11, 12, 13, 49,
56,107,111, 52, 55, 68, 69, 70, 28,
19, 48, 27, 78, 60,126, 59, 45, 50,
53,109, 96,110,108, 79, 80, 81, 51,
106, 57, 58, 82, 62,112,113,114, 97,
14, 15, 16, 17, 18, 29, 9, 20, 44,
99,100,101,102,103,104, 98,115, 71,
22, 23, 24, 25, 26, 46, 47, 30, 72,
116,117,118,119,120, 1, 2, 3,127,
4, 5, 6, 7, 8, 32, 31, 33, 34,
73, 74, 75, 76, 77, 35, 36, 37, 38,
121,122,123,124,125, 39, 40, 41, 42,
91, 92, 93, 94, 95, 65, 66, 67,105,
84, 83, 85, 86, 87, 88, 89, 90, 63,
128,129,130, 64,131,
];
//排序程序列表
const sort_function_list = [
{tag:"sort_none",name:"无",function:()=>0},
{tag:"sort_id",name:"怪物ID",function:(a,b)=>a.id-b.id},
{tag:"sort_attrs",name:"属性",function:(a,b)=>{
let num = a.attrs[0] - b.attrs[0];
if (num === 0) num = a.attrs[1] - b.attrs[1];
return num;
}
},
{tag:"sort_evoRootId",name:"进化树",function:(a,b)=>a.evoRootId-b.evoRootId},
{tag:"sort_evoRoot_Attrs",name:"进化根怪物的属性",function:(a,b)=>{
const card_a = Cards[a.evoRootId],card_b = Cards[b.evoRootId];
let num = card_a.attrs[0] - card_b.attrs[0];
if (num === 0) num = card_a.attrs[1] - card_b.attrs[1];
return num;
}
},
{tag:"sort_rarity",name:"稀有度",function:(a,b)=>a.rarity-b.rarity},
{tag:"sort_cost",name:"消耗",function:(a,b)=>a.cost-b.cost},
{tag:"sort_mp",name:"MP",function:(a,b)=>a.sellMP-b.sellMP},
{tag:"sort_skillLv1",name:"技能最大冷却时间",function:(a,b)=>Skills[a.activeSkillId].initialCooldown-Skills[b.activeSkillId].initialCooldown},
{tag:"sort_skillLvMax",name:"技能最小冷却时间",function:(a,b)=>{
const skill_a = Skills[a.activeSkillId],skill_b = Skills[b.activeSkillId];
return (skill_a.initialCooldown - skill_a.maxLevel) - (skill_b.initialCooldown - skill_b.maxLevel);
}
},
{tag:"sort_evoSkillLastCD",name:"技能最小冷却时间(进化后)",function:(a,b)=>{
function getEvoSkill(skill) {
//232为进化后不循环技能,233为循环技能
if (skill.type === 232 || skill.type === 233) return Skills[skill.params[skill.params.length-1]];
else return skill;
}
const skill_a = getEvoSkill(Skills[a.activeSkillId]),skill_b = getEvoSkill(Skills[b.activeSkillId]);
return (skill_a.initialCooldown - skill_a.maxLevel) - (skill_b.initialCooldown - skill_b.maxLevel);
}
},
{tag:"sort_hpMax120",name:"Lv120最大HP",function:(a,b)=>a.hp.max * (a.limitBreakIncr ? (1 + a.limitBreakIncr/100) * 1.1 : 1) - b.hp.max * (b.limitBreakIncr ? (1 + b.limitBreakIncr/100) * 1.1 : 1)},
{tag:"sort_atkMax120",name:"Lv120最大攻击",function:(a,b)=>a.atk.max * (a.limitBreakIncr ? (1 + a.limitBreakIncr/100) * 1.05 : 1) - b.atk.max * (b.limitBreakIncr ? (1 + b.limitBreakIncr/100) * 1.05 : 1)},
{tag:"sort_rcvMax120",name:"Lv120最大回复",function:(a,b)=>a.rcv.max * (a.limitBreakIncr ? (1 + a.limitBreakIncr/100) * 1.05 : 1) - b.rcv.max * (b.limitBreakIncr ? (1 + b.limitBreakIncr/100) * 1.05 : 1)},
{tag:"sort_atkMax120_awoken",name:"Lv120最大攻击(+觉醒)",function:(a,b)=>
{
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount, 120),
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount, 120);
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.atk : 0,
abB = abilities_2statusB ? abilities_2statusB.withAwoken.atk : 0;
return abA - abB;
}
},
{tag:"sort_hpMax120_awoken",name:"Lv120最大HP(+觉醒)",function:(a,b)=>
{
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount, 120),
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount, 120);
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.hp : 0,
abB = abilities_2statusB ? abilities_2statusB.withAwoken.hp : 0;
return abA - abB;
}
},
{tag:"sort_rcvMax120_awoken",name:"Lv120最大回复(+觉醒)",function:(a,b)=>
{
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount, 120),
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount, 120);
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.rcv : 0,
abB = abilities_2statusB ? abilities_2statusB.withAwoken.rcv : 0;
return abA - abB;
}
},
{tag:"sort_abilityIndex_awoken",name:"Lv120最大加权能力指数(+觉醒)",function:(a,b)=>
{
const abilities_2statusA = calculateAbility_max(a.id, solo, teamsCount, 120),
abilities_2statusB = calculateAbility_max(b.id, solo, teamsCount, 120);
const abA = abilities_2statusA ? abilities_2statusA.withAwoken.hp / 10 + abilities_2statusA.withAwoken.atk / 5 + abilities_2statusA.withAwoken.rcv / 3 : 0,
abB = abilities_2statusB ? abilities_2statusB.withAwoken.hp / 10 + abilities_2statusB.withAwoken.atk / 5 + abilities_2statusB.withAwoken.rcv / 3 : 0;
return abA - abB;
}
},
];
//增加特殊搜索模式
const specialSearchFunctions = (function() {
'use strict';
//返回卡片的队长技能
function getCardLeaderSkill(card, skillTypes, searchRandom = true)
{
return getActuallySkills(Skills[card.leaderSkillId], skillTypes, searchRandom)?.[0];
}
//返回卡片的技能
function getCardActiveSkill(card, skillTypes, searchRandom = true)
{
return getActuallySkills(Skills[card.activeSkillId], skillTypes, searchRandom)?.[0];
}
//获取血倍率
function getHPScale(ls)
{
const sk = ls.params;
let scale = 1;
switch (ls.type)
{
case 23: case 30: case 62: case 77: case 63: case 65:
case 29: case 114: case 45: case 111: case 46: case 48: case 67:
scale = sk[sk.length-1]/100;
break;
case 73: case 76:
case 121: case 129: case 163: case 177: case 186:
case 155:
scale = sk[2]/100;
break;
case 106: case 107: case 108:
scale = sk[0]/100;
break;
case 125:
scale = sk[5]/100;
break;
case 136:
case 137:
scale = (sk[1]/100 || 1) * (sk[5]/100 || 1);
break;
case 158:
scale = sk[4]/100;
break;
case 175:
case 178: case 185:
scale = sk[3]/100;
break;
case 203: case 217:
scale = sk[1]/100;
break;
case 245:
scale = sk[3]/100;
break;
case 138: //调用其他队长技
scale = sk.reduce((pmul,skid)=>pmul * getHPScale(Skills[skid]),1);
break;
default:
}
return scale || 1;
}
//获取盾减伤比例
function getReduceScale(ls, allAttr = false, noHPneed = false)
{
const sk = ls.params;
let scale = 0;
switch (ls.type)
{
case 16: //无条件盾
scale = sk[0]/100;
break;
case 17: //单属性盾
scale = allAttr ? 0 : sk[1]/100;
break;
case 36: //2个属性盾
scale = allAttr ? 0 : sk[2]/100;
break;
case 38: //血线下 + 几率
case 43: //血线上 + 几率
scale = (noHPneed || allAttr) ? 0 : sk[2]/100;
break;
case 129: //无条件盾,属性个数不固定
case 163: //无条件盾,属性个数不固定
scale = (allAttr && (sk[5] & 31) != 31) ? 0 : sk[6]/100;
break;
case 178: //无条件盾,属性个数不固定
scale = (allAttr && (sk[6] & 31) != 31) ? 0 : sk[7]/100;
break;
case 130: //血线下 + 属性个数不固定
case 131: //血线上 + 属性个数不固定
scale = (noHPneed || allAttr && (sk[5] & 31) != 31) ? 0 : sk[6]/100;
break;
case 151: //十字心触发
case 169: //C触发
case 198: //回血触发
scale = sk[2]/100;
break;
case 170: //多色触发
case 182: //长串触发
case 193: //L触发
scale = sk[3]/100;
break;
case 171: //多串触发
scale = sk[6]/100;
break;
case 183: //又是个有两段血线的队长技
scale = noHPneed ? 0 : sk[4]/100;
break;
case 210: //十字触发
scale = sk[1]/100;
break;
case 235: { //可多次触发
scale = (sk[4] || 0) / 100;
break;
}
case 138: //调用其他队长技
scale = sk.reduce((pmul,skid)=> 1 - (1-pmul) * (1-getReduceScale(Skills[skid], allAttr, noHPneed)),0);
break;
default:
}
return scale || 0;
}
//获取无条件盾减伤比例
function getReduceScale_unconditional(ls)
{
const sk = ls.params;
let scale = 0;
switch (ls.type)
{
case 16: //无条件盾
{
scale = sk[0]/100;
break;
}
case 129: //无条件盾,属性个数不固定
case 163: //无条件盾,属性个数不固定
{
scale = (sk[5] & 31) != 31 ? 0 : sk[6]/100;
break;
}
case 178: //无条件盾,属性个数不固定
{
scale = (sk[6] & 31) != 31 ? 0 : sk[7]/100;
break;
}
case 138: //调用其他队长技
scale = sk.reduce((pmul,skid)=> 1 - (1-pmul) * (1-getReduceScale_unconditional(Skills[skid])),0);
break;
default:
}
return scale || 0;
}
function getCannonAttr(skill)
{
const sk = skill.params;
switch(skill.type)
{
case 0:
case 1:
case 37:
case 58:
case 59:
case 84:
case 85:
case 86:
case 87:
case 115:
return sk[0];
case 110:
case 143:
return sk[1];
case 42:
return sk[1];
case 144:
return sk[3] ?? 0;
default:
return -1;
}
}
function sortByParams(a,b,searchTypeArray,...pidxs)
{
const a_s = getCardLeaderSkill(a, searchTypeArray) || getCardActiveSkill(a, searchTypeArray),
b_s = getCardLeaderSkill(b, searchTypeArray) || getCardActiveSkill(b, searchTypeArray);
if (pidxs.length==0) pidxs.push(0);
let newPos = 0;
//按所有顺序依次比较大小,凡是有一次比出来就使用,否则继续比较下一个大小
for (let pidx of pidxs) {
newPos = a_s.params[pidx] - b_s.params[pidx];
if (newPos !== 0) break;
}
return newPos;
}
function sortByHPScal(a,b)
{
const a_s = Skills[a.leaderSkillId], b_s = Skills[b.leaderSkillId];
return getHPScale(a_s) - getHPScale(b_s);
}
function HPScal_Addition(card)
{
const skill = Skills[card.leaderSkillId];
return `💟${Math.round(getHPScale(skill) * 100)}%`;
}
function sortByReduceScale(a,b)
{
const a_s = Skills[a.leaderSkillId], b_s = Skills[b.leaderSkillId];
return getReduceScale(a_s) - getReduceScale(b_s);
}
function ReduceScale_Addition(card)
{
const skill = Skills[card.leaderSkillId];
return `🛡️${Math.round(getReduceScale(skill) * 100)}%`;
}
function directParseSkills(skillDataArr) {
return skillDataArr.flatMap(skill=>skillObjectParsers?.[skill.type]?.apply({ parser: skillParser }, skill.params))
}
function voidsAbsorption_Turns(card) {
const outObj = {
"attr-absorb": 0,
"combo-absorb": 0,
"damage-absorb": 0,
"damage-void": 0,
};
const searchTypeArray = [
173,
191
];
const skills = getCardActiveSkills(card, searchTypeArray);
skills.reduce((pre,skill)=>{
if (skill.type === 173) {
if(skill.params[1]) pre["attr-absorb"] ||= skill.params[0];
if(skill.params[2]) pre["combo-absorb"] ||= skill.params[0];
if(skill.params[3]) pre["damage-absorb"] ||= skill.params[0];
} else if (skill.type === 191) {
pre["damage-void"] ||= skill.params[0];
}
return pre
}, outObj);
return outObj;
}
function voidsAbsorption_Addition(card)
{
const turnsObj = voidsAbsorption_Turns(card);
const namesArr = ["attr-absorb", "combo-absorb", "damage-absorb", "damage-void"];
const turns = namesArr.map(name=>turnsObj[name]);
const turnsSet = new Set(turns.filter(Boolean));
const turnsCount = turnsSet.size;
const fragment = document.createDocumentFragment();
for (let i = 0; i < namesArr.length; i++) {
if (turns[i] > 0) {
fragment.append(createSkillIcon(namesArr[i]));
if (turnsCount > 1)
fragment.append(`-${turns[i]>=9999 ? '全' : `${turns[i]}T` }`);
}
}
if (turnsCount === 1) {
const turn = Array.from(turnsSet)[0];
fragment.append(`-${turn>=9999 ? '全' : `${turn}T` }`);
}
return fragment;
}
function unbind_Turns(card)
{
const outObj = {
normal: 0,
awakenings: 0,
matches: 0
};
const searchTypeArray = [
117, 179,
196
];
const skills = getCardActiveSkills(card, searchTypeArray);
const parsedSkills = directParseSkills(skills);
parsedSkills.reduce((pre,cur)=>{
pre.normal ||= cur.normal;
pre.awakenings ||= cur.awakenings;
pre.matches ||= cur.matches;
return pre
}, outObj);
return outObj;
}
function unbind_Addition(card)
{
const turnsObj = unbind_Turns(card);
const namesArr = ["normal", "awakenings", "matches"];
const turns = namesArr.map(name=>turnsObj[name]);
const turnsSet = new Set(turns.filter(Boolean));
const turnsCount = turnsSet.size;
const fragment = document.createDocumentFragment();
for (let i = 0; i < namesArr.length; i++) {
if (turns[i] > 0) {
fragment.append(createSkillIcon(`unbind-${namesArr[i]}`));
if (turnsCount > 1)
fragment.append(`-${turns[i]>=9999 ? '全' : `${turns[i]}T` }`);
}
}
if (turnsCount === 1) {
const turn = Array.from(turnsSet)[0];
fragment.append(`-${turn>=9999 ? '全' : `${turn}T` }`);
}
return fragment;
}
function boardChange_ColorTypes(skill)
{
if (!skill) return [];
const sk = skill.params;
const colors = sk.slice(0, sk.includes(-1)?sk.indexOf(-1):undefined);
return colors;
}
function boardChange_Addition(card)
{
const searchTypeArray = [71];
const skill = getCardActiveSkill(card, searchTypeArray);
const colors = boardChange_ColorTypes(skill);
return createOrbsList(colors);
}
function orbsChangeParse(skill)
{
function changes(from, to)
{
return {from:from,to:to};
}
let outArr = [];
if (!skill) return outArr;
const sk = skill.params;
switch (skill.type)
{
case 9:{
outArr.push(changes([sk[0] || 0], [sk[1] || 0]));
break;
}
case 20:{
if (sk.length >= 3 && sk[1] == (sk[3] || 0))
{