-
Notifications
You must be signed in to change notification settings - Fork 2
/
generator.js
1413 lines (1375 loc) · 41.6 KB
/
generator.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 powerLevelSelect = document.getElementById("powerLevelSelect");
const playerClassSelect = document.getElementById("playerClassSelect");
const weaponSlotSelect = document.getElementById("weaponSlotSelect");
const generateBtn = document.getElementById("generateBtn");
const generatedWeaponArea = document.getElementById("generatedWeaponArea");
generateBtn.addEventListener("click", () => {
const playerClass = playerClassSelect.value;
const weaponSlot = weaponSlotSelect.value;
const powerLevel = powerLevelSelect.value;
const weapon = generateWeapon(
parseInt(playerClass) || getRandom(1, 9),
parseInt(weaponSlot) || getRandom(1, 3),
parseInt(powerLevel)
);
window.location.hash = Base64.encode(JSON.stringify(weapon));
});
window.onhashchange = function () {
tryLoadWeaponFromUrl();
};
function tryLoadWeaponFromUrl() {
const hash = window.location.hash;
if (!hash) return;
const decoded = Base64.decode(hash.substring(1));
const weapon = JSON.parse(decoded);
generatedWeaponArea.innerHTML = formatWeaponAsHtml(weapon);
document.title = `New ${weapon.weaponSlotName} for the ${weapon.playerClassName}`;
}
tryLoadWeaponFromUrl();
const strings = {
classes: [
"Any",
"Scout",
"Soldier",
"Pyro",
"Demoman",
"Heavy",
"Engineer",
"Medic",
"Sniper",
"Spy",
],
slots: ["Any", "Primary", "Secondary", "Melee"],
};
const weaponTypes = {
// Burst Bullets
Scattergun: { name: "Scattergun" },
Shotgun: { name: "Shotgun" },
// Single Bullet
Spy_Revolver: { name: "Spy_Revolver" },
Sniper_Rifle: { name: "Sniper_Rifle" },
// Continuous Bullets
Minigun: { name: "Minigun" },
Pistol: { name: "Pistol" },
Submachine_Gun: { name: "Submachine_Gun" },
// Continuous Short Ranged
Flamethrower: { name: "Flamethrower" },
// Projectile
Bow_and_Arrows: { name: "Bow_and_Arrows" },
Flare_Gun: { name: "Flare_Gun", needsBoost: 2 },
// Continuous Projectiles
Syringe_Gun: { name: "Syringe_Gun" },
// Consumable Projectile
Throwable_AoE: { name: "Throwable_AoE" },
Throwable_Weapon: { name: "Throwable_Weapon" },
// Explosive Projectile
Rocket_Launcher: { name: "Rocket_Launcher" },
Pipe_Launcher: { name: "Pipe_Launcher" },
Sticky_Launcher: { name: "Sticky_Launcher" },
// Medigun with Uber
Medi_Gun: { name: "Medi_Gun" },
// Sapper
Sapper: { name: "Sapper" },
// Consumable Passive
Drink_Can: { name: "Drink_Can" },
Heavy_Food: { name: "Heavy_Food" },
// Chargeable Passive
Demoknight_Shield: { name: "Demoknight_Shield", needsBoost: 2 },
Banner: { name: "Banner" },
Invis_Watch: { name: "Invis_Watch" },
// Passive
Sniper_Shield: { name: "Sniper_Shield", needsBoost: 2 },
Backpack: { name: "Backpack", needsBoost: 2 },
Shoes: { name: "Shoes", needsBoost: 2 },
Demoknight_Booties: { name: "Demoknight_Booties", needsBoost: 4 },
// Melee
Melee: { name: "Melee" },
Demoknight_Melee: { name: "Demoknight_Melee" },
Explosive_Melee: { name: "Explosive_Melee" },
Medic_Melee: { name: "Medic_Melee" },
Pybro_Melee: { name: "Pybro_Melee" },
Melee_with_Projectile: { name: "Melee_with_Projectile" },
Wrench_Melee: { name: "Wrench_Melee" },
Backstabbing_Melee: { name: "Backstabbing_Melee" },
};
const weaponTypesByClass = [
[
// Scout
{ slot: 1, type: weaponTypes.Scattergun },
{ slot: 2, type: weaponTypes.Pistol },
{ slot: 2, type: weaponTypes.Throwable_Weapon },
{ slot: 2, type: weaponTypes.Throwable_AoE },
{ slot: 2, type: weaponTypes.Drink_Can },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Melee_with_Projectile },
],
[
// Soldier
{ slot: 1, type: weaponTypes.Rocket_Launcher },
{ slot: 2, type: weaponTypes.Shotgun },
{ slot: 2, type: weaponTypes.Banner },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Shoes },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Explosive_Melee },
],
[
// Pyro
{ slot: 1, type: weaponTypes.Flamethrower },
{ slot: 2, type: weaponTypes.Shotgun },
{ slot: 2, type: weaponTypes.Flare_Gun },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Shoes },
{ slot: 2, type: weaponTypes.Throwable_AoE },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Pybro_Melee },
],
[
// Demoman
{ slot: 1, type: weaponTypes.Pipe_Launcher },
{ slot: 1, type: weaponTypes.Demoknight_Booties },
{ slot: 1, type: weaponTypes.Shoes },
{ slot: 1, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Shoes },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Sticky_Launcher },
{ slot: 2, type: weaponTypes.Demoknight_Shield },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Demoknight_Melee },
{ slot: 3, type: weaponTypes.Explosive_Melee },
],
[
// Heavy
{ slot: 1, type: weaponTypes.Minigun },
{ slot: 2, type: weaponTypes.Shotgun },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Heavy_Food },
{ slot: 3, type: weaponTypes.Melee },
],
[
// Engineer
{ slot: 1, type: weaponTypes.Shotgun },
{ slot: 2, type: weaponTypes.Pistol },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 2, type: weaponTypes.Shoes },
{ slot: 3, type: weaponTypes.Wrench_Melee },
],
[
// Medic
{ slot: 1, type: weaponTypes.Syringe_Gun },
{ slot: 1, type: weaponTypes.Backpack },
{ slot: 1, type: weaponTypes.Shoes },
{ slot: 2, type: weaponTypes.Medi_Gun },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Medic_Melee },
],
[
// Sniper
{ slot: 1, type: weaponTypes.Sniper_Rifle },
{ slot: 1, type: weaponTypes.Bow_and_Arrows },
{ slot: 2, type: weaponTypes.Submachine_Gun },
{ slot: 2, type: weaponTypes.Throwable_AoE },
{ slot: 2, type: weaponTypes.Throwable_Weapon },
{ slot: 2, type: weaponTypes.Sniper_Shield },
{ slot: 2, type: weaponTypes.Backpack },
{ slot: 3, type: weaponTypes.Melee },
{ slot: 3, type: weaponTypes.Melee_with_Projectile },
],
[
// Spy
{ slot: 1, type: weaponTypes.Spy_Revolver },
{ slot: 1, type: weaponTypes.Shoes },
{ slot: 2, type: weaponTypes.Sapper },
{ slot: 2, type: weaponTypes.Invis_Watch },
{ slot: 3, type: weaponTypes.Backstabbing_Melee },
],
];
const weaponTypeGroups = {
// BASIC GROUPS //
BurstBullet: ["Scattergun", "Shotgun"],
SingleBullet: ["Sniper_Rifle"],
SemiAutomaticBullet: ["Spy_Revolver", "Pistol"],
AutomaticBullet: ["Minigun", "Submachine_Gun"],
Flamethrower: ["Flamethrower"],
SingleShotProjectile: ["Bow_and_Arrows", "Flare_Gun"],
AutomaticProjectiles: ["Syringe_Gun"],
ConsumableProjectile: ["Throwable_AoE", "Throwable_Weapon"],
ExplosiveProjectile: ["Rocket_Launcher", "Pipe_Launcher", "Sticky_Launcher"],
Medi_Gun: ["Medi_Gun"],
Sapper: ["Sapper"],
ConsumablePassive: ["Drink_Can", "Heavy_Food"],
ChargeablePassive: ["Demoknight_Shield", "Banner", "Invis_Watch"],
Passive: ["Sniper_Shield", "Backpack", "Shoes", "Demoknight_Booties"],
Melee: [
"Melee",
"Demoknight_Melee",
"Explosive_Melee",
"Medic_Melee",
"Pybro_Melee",
"Melee_with_Projectile",
"Wrench_Melee",
"Backstabbing_Melee",
],
};
// ABSTRACT GROUPS //
weaponTypeGroups.AllBullet = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
...weaponTypeGroups.AutomaticBullet,
];
weaponTypeGroups.AllExplosive = [
...weaponTypeGroups.ExplosiveProjectile,
"Explosive_Melee",
];
weaponTypeGroups.AllReflectableDamageProjectile = [
"Bow_and_Arrows",
"Throwable_Weapon",
"Rocket_Launcher",
"Pipe_Launcher",
"Melee_with_Projectile",
];
weaponTypeGroups.AllProjectile = [
...weaponTypeGroups.SingleShotProjectile,
...weaponTypeGroups.AutomaticProjectiles,
...weaponTypeGroups.ConsumableProjectile,
...weaponTypeGroups.ExplosiveProjectile,
"Melee_with_Projectile",
];
weaponTypeGroups.AllReloading = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
"Submachine_Gun",
...weaponTypeGroups.AutomaticProjectiles,
...weaponTypeGroups.ExplosiveProjectile,
];
weaponTypeGroups.AllHasClip = [
...weaponTypeGroups.SemiAutomaticBullet,
"Submachine_Gun",
"Syringe_Gun",
...weaponTypeGroups.ExplosiveProjectile,
];
weaponTypeGroups.AllWithAmmo = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
...weaponTypeGroups.AutomaticBullet,
...weaponTypeGroups.Flamethrower,
...weaponTypeGroups.SingleShotProjectile,
...weaponTypeGroups.AutomaticProjectiles,
];
weaponTypeGroups.AllAutomatic = [
...weaponTypeGroups.AutomaticBullet,
...weaponTypeGroups.Flamethrower,
...weaponTypeGroups.AutomaticProjectiles,
];
weaponTypeGroups.AllPassive = [
...weaponTypeGroups.ConsumablePassive,
...weaponTypeGroups.ChargeablePassive,
...weaponTypeGroups.Passive,
];
weaponTypeGroups.AllCanHit = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
...weaponTypeGroups.AutomaticBullet,
...weaponTypeGroups.Flamethrower,
...weaponTypeGroups.SingleShotProjectile,
...weaponTypeGroups.AutomaticProjectiles,
...weaponTypeGroups.ConsumableProjectile,
...weaponTypeGroups.ExplosiveProjectile,
...weaponTypeGroups.Melee,
];
weaponTypeGroups.AllDoesDamage = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
...weaponTypeGroups.AutomaticBullet,
...weaponTypeGroups.Flamethrower,
...weaponTypeGroups.SingleShotProjectile,
...weaponTypeGroups.AutomaticProjectiles,
...weaponTypeGroups.ExplosiveProjectile,
...weaponTypeGroups.Melee,
];
weaponTypeGroups.AllAfterburn = ["Flamethrower", "Flare_Gun"];
weaponTypeGroups.All = [
...weaponTypeGroups.BurstBullet,
...weaponTypeGroups.SingleBullet,
...weaponTypeGroups.SemiAutomaticBullet,
...weaponTypeGroups.AutomaticBullet,
...weaponTypeGroups.Flamethrower,
...weaponTypeGroups.SingleShotProjectile,
...weaponTypeGroups.AutomaticProjectiles,
...weaponTypeGroups.ConsumableProjectile,
...weaponTypeGroups.ExplosiveProjectile,
...weaponTypeGroups.Medi_Gun,
...weaponTypeGroups.Sapper,
...weaponTypeGroups.ConsumablePassive,
...weaponTypeGroups.ChargeablePassive,
...weaponTypeGroups.Passive,
...weaponTypeGroups.Melee,
];
weaponTypeGroups.AllDemoknight = [
"Demoknight_Shield",
"Demoknight_Booties",
"Demoknight_Melee",
];
weaponTypeGroups.AllScout = weaponTypesByClass[0].map((w) => w.type.name);
weaponTypeGroups.AllSoldier = weaponTypesByClass[1].map((w) => w.type.name);
weaponTypeGroups.AllPyro = weaponTypesByClass[2].map((w) => w.type.name);
weaponTypeGroups.AllDemoman = weaponTypesByClass[3].map((w) => w.type.name);
weaponTypeGroups.AllHeavy = weaponTypesByClass[4].map((w) => w.type.name);
weaponTypeGroups.AllEngineer = weaponTypesByClass[5].map((w) => w.type.name);
weaponTypeGroups.AllMedic = weaponTypesByClass[6].map((w) => w.type.name);
weaponTypeGroups.AllSniper = weaponTypesByClass[7].map((w) => w.type.name);
weaponTypeGroups.AllSpy = weaponTypesByClass[8].map((w) => w.type.name);
const mandatoryPros = {
Flare_Gun: [
{ pointCost: 0, text: "100% mini-crits vs burning players" },
{ pointCost: -1, text: "On Hit: Makes enemy wet and slows them down" },
{ pointCost: 0, text: "100% mini-crits vs wet players" },
],
Throwable_AoE: [
{
pointCost: 0,
text: "On Hit: Covered teammates receive temporary 20% damage resistance",
},
{
pointCost: 0,
text: "On Hit: Covered enemies cannot swap weapons for a few seconds",
},
{
pointCost: 0,
text: "On Hit: Covered engineer buildings get disabled for 5 seconds",
},
{
pointCost: 0,
text: "On Hit: Covered enemies reload time is doubled for 10 seconds",
},
{
pointCost: 0,
text: "On Hit: Covered enemies can be seen through walls by your teammates for 4 seconds",
},
{
pointCost: 0,
text: "On Hit: Covered enemies cannot attack for 2 seconds",
},
],
Throwable_Weapon: [
{
pointCost: 0,
text: "Throw at your enemy to deal damage and make them bleed",
},
{
pointCost: 0,
text: "Throw at your enemy to deal damage and mark them for death",
},
{
pointCost: 0,
text: "Throw at your enemy to deal damage and slow them down",
},
{
pointCost: 0,
text: "Throw at your enemy to deal damage and set them on fire",
},
],
Medi_Gun: [
{
pointCost: -1,
text: "ÜberCharge grants +100% speed of movement and attack",
},
{
pointCost: -1,
text: "ÜberCharge grants +300% faster control point capture rate",
},
{ pointCost: -1, text: "ÜberCharge grants invisibility" },
{ pointCost: -1, text: "ÜberCharge grants the ability to fly" },
],
Sapper: [
{
pointCost: 0,
text: "Place on enemy buildings to disable and slowly drain away its health",
},
{
pointCost: 0,
text: "Place on enemy buildings to disable for 10 seconds. Deals no damage",
},
{
pointCost: 0,
text: "Place on enemy buildings to drain their health faster than regular sapper. Does not disable the building",
},
{
pointCost: 0,
text: "Place on friendly buildings to improve their performance by 20% at the cost of 30% of their health. Lasts 20 seconds",
},
],
Drink_Can: [
{
pointCost: 0,
text: "While effect is active: All attacks cause additional explosive damage",
},
{
pointCost: 0,
text: "While effect is active: All attacks cause additional bleed damage",
},
{
pointCost: 0,
text: "While effect is active: 30% of all inflicted damage is returns as healing",
},
{
pointCost: 0,
text: "While effect is active: User can air-jump 2 more times",
},
{
pointCost: 0,
text: "While effect is active: Grants 35% resistance to all damage",
},
],
Heavy_Food: [
{
pointCost: -1,
text: "Eat to receive 15% damage resistance for 10 seconds. Alt-fire: Share with a friend (Small Health Kit)",
},
{
pointCost: -1,
text: "Eat to receive 25% walking speed boost for 15 seconds. Alt-fire: Share with a friend (Small Health Kit)",
},
{
pointCost: -1,
text: "A box of ammunition. Refills your ammo when used. Alt-fire: Share with a friend (Medium Ammo Kit)",
},
],
Demoknight_Shield: [
{
pointCost: 0,
text: "Alt-Fire: Charge toward your enemies and remove debuffs. Gain a critical melee strike after impacting an enemy at distance",
},
{
pointCost: 0,
text: "Alt-Fire: Charge toward your enemies and remove debuffs. Restore health after impacting an enemy",
},
{
pointCost: 0,
text: "Alt-Fire: Charge toward your enemies and remove debuffs. Slows enemies on impact",
},
{
pointCost: 0,
text: "Alt-Fire: Charge toward your enemies and remove debuffs. On impact enemies receive great knockback",
},
],
Banner: [
{
pointCost: -1,
text: "While active: Provides group buff that slowly heals nearby teammates",
},
{
pointCost: -1,
text: "While active: Provides group buff that increases the attack rate of nearby teammates",
},
{
pointCost: -1,
text: "While active: Provides group debuff that makes nearby enemies 20% more vulnerable to all damage",
},
],
Explosive_Melee: [
{ pointCost: 1, text: "The first hit will cause an explosion" },
{
pointCost: 1,
text: "The first hit will apply great knockback on the enemy",
},
{
pointCost: 1,
text: "The first hit will attach the enemy to you. Neither will be able to move far from the other",
},
],
Wrench_Melee: [
{
pointCost: 0,
text: "Upgrades, repairs and speeds up construction of friendly buildings on hit.",
},
{
pointCost: 1,
text: "Hitting an enemy building a single time instantly reverts it to a lower level version of itself",
},
{
pointCost: 1,
text: "Removes sappers in a single hit",
},
{
pointCost: 1,
text: "As a team player, you spend -50% less metal when upgrading the buildings of your teammates",
},
{
pointCost: 1,
text: "Alt-Fire: Takes away metal from the ammo pool of your own sentry",
},
],
Pybro_Melee: [
{ pointCost: 1, text: "Damage removes Sappers" },
{
pointCost: 1,
text: "Hitting friendly buildings helps them deploy faster",
},
{
pointCost: 1,
text: "Hitting friendly buildings makes them immune to sappers for 5 seconds",
},
{
pointCost: 1,
text: "Hitting friendly buildings makes them operate 15% faster for 5 seconds",
},
],
Melee_with_Projectile: [
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that makes enemies bleed",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that slows enemies",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that applies knockback on enemies",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that heals teammates",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that makes teammates faster",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that deals mini-crit damage",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that explodes on impact",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that disables sentries for 2 seconds",
},
{
pointCost: 1,
text: "Alt-Fire: Launches a projectile that forces enemy to reload",
},
],
};
const weaponEffects = [
//// AllReloading ////
{
for: weaponTypeGroups.AllReloading,
pro: "<value>% faster reload speed",
con: "<value>% slower reload speed",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.AllReloading,
pro: "On Hit: Makes enemies unable to reload weapons for <value> seconds",
con: "On Miss: Makes you unable to reload weapons for <value> seconds",
valuePro: 2,
valueCon: 2,
},
//// AllBullet ////
{
for: weaponTypeGroups.AllBullet,
pro: "On Headshot: +<value>% damage",
con: "On Hit: -<value>% damage if the hit wasn't a headshot",
valuePro: 30,
valueCon: 10,
},
{
for: weaponTypeGroups.AllBullet,
pro: "On Headshot: +<value>% damage",
con: "On Hit: -<value>% damage if the hit wasn't a headshot",
valuePro: 30,
valueCon: 10,
},
{
for: weaponTypeGroups.AllBullet.filter(
(i) => i !== weaponTypes.Sniper_Rifle.name
),
pro: "<value>% less bullet spread",
con: "<value>% more bullet spread",
valuePro: 30,
valueCon: 30,
},
{
for: weaponTypeGroups.AllBullet,
pro: "Bullets pass through enemies",
con: "Bullets cannot pass through allies",
},
{
for: weaponTypeGroups.AllBullet.filter(
(i) => i !== weaponTypes.Sniper_Rifle.name
),
pro: "Less damage reduction on faraway enemies",
con: "Increased damage reduction on faraway enemies",
},
//// AllAutomatic ////
{
for: weaponTypeGroups.AllAutomatic,
pro: "Weapon firing speed increases as it gets fired for longer",
con: "Weapon firing speed decreases as it gets fired for longer",
},
//// AllExplosive ////
{
for: weaponTypeGroups.AllExplosive,
pro: "<value>% larger explosion radius",
con: "<value>% smaller explosion radius",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.AllExplosive,
pro: "<value>% stronger explosion knockback",
con: "<value>% weaker explosion knockback",
valuePro: 50,
valueCon: 50,
},
{
for: weaponTypeGroups.AllExplosive,
pro: "<value>% less damage to self",
con: "<value>% more damage to self",
valuePro: 35,
valueCon: 35,
},
//// AllCanHit ////
{
for: weaponTypeGroups.AllCanHit.filter((i) =>
weaponTypeGroups.AllAutomatic.includes(i)
),
pro: "On Hit: +<value> HP",
con: "On Miss: -<value> HP",
valuePro: 15,
valueCon: 15,
},
{
for: weaponTypeGroups.AllCanHit,
pro: "On Hit Teammate: Grant <value>% faster firing rate to both for 4 seconds",
con: "On Miss: <value>% slower firing rate for the next 4 seconds",
valuePro: 30,
valueCon: 15,
},
{
for: weaponTypeGroups.AllCanHit,
pro: "On Hit: Enemy moves <value>% slower for 3 seconds",
con: "On Miss: You move <value>% slower for 3 seconds",
valuePro: 20,
valueCon: 20,
},
//// All ////
{
for: weaponTypeGroups.All,
pro: "+<value> Max HP",
con: "-<value> Max HP",
valuePro: 25,
valueCon: 25,
},
{
for: weaponTypeGroups.All,
pro: "Increased air-strafing control",
con: "Decreased air-strafing control",
},
{
for: weaponTypeGroups.All,
pro: "+<value>% ammo on all weapons",
con: "-<value>% ammo on all weapons",
valuePro: 30,
valueCon: 30,
},
{
for: weaponTypeGroups.All,
pro: "Heals up to +<value> HP per second, while not taking damage",
con: "Bleeds up to -2 HP per second after not healing or not killing an enemy for <value> seconds",
valuePro: 3,
valueCon: 30,
},
{
for: weaponTypeGroups.All,
pro: "<value>% faster running speed",
con: "<value>% slower running speed",
valuePro: 10,
valueCon: 10,
},
{
for: [...weaponTypeGroups.All].filter(
(i) => !weaponTypeGroups.Passive.includes(i)
),
pro: "This weapon deploys <value>% faster",
con: "This weapon deploys <value>% slower",
valuePro: 40,
valueCon: 40,
},
{
for: [...weaponTypeGroups.All].filter(
(i) =>
i !== "Spy_Revolver" &&
i !== "Sapper" &&
i !== "Backstabbing_Melee" &&
i !== "Invis_Watch"
),
pro: "Can see the HP of enemies",
con: "Enemies can see your HP",
},
//// AllDoesDamage ////
{
for: weaponTypeGroups.AllDoesDamage,
pro: "+<value>% damage increase",
con: "-<value>% damage penalty",
valuePro: 15,
valueCon: 20,
},
{
for: weaponTypeGroups.AllDoesDamage,
pro: "On Hit: Causes enemy to bleed for <value> seconds",
con: "On Miss: Causes you to bleed for <value> seconds",
valuePro: 5,
valueCon: 2,
},
{
for: weaponTypeGroups.AllDoesDamage,
pro: "On Hit: Makes enemies unable to switch weapons for <value> seconds",
con: "On Miss: Makes you unable to switch weapons for <value> seconds",
valuePro: 5,
valueCon: 3,
},
{
for: weaponTypeGroups.AllDoesDamage,
pro: "Crits whenever it would normally mini-crit",
con: "Mini-crits whenever it would normally crit",
},
{
for: weaponTypeGroups.AllDoesDamage.filter(
(i) =>
i !== weaponTypes.Sniper_Rifle.name &&
i !== weaponTypes.Bow_and_Arrows.name
),
pro: "Increased chance of random critical hit",
con: "No random critical hits",
},
{
for: weaponTypeGroups.AllDoesDamage,
pro: "On Hit: +<value>% more damage when attacking from behind the enemy",
con: "On Hit: -<value>% less damage when not attacking from behind the enemy",
valuePro: 10,
valueCon: 10,
},
//// AllHasClip ////
{
for: weaponTypeGroups.AllHasClip,
pro: "+<value>% larger clip size",
con: "-<value>% smaller clip size",
valuePro: 20,
valueCon: 20,
},
//// BurstBullet ////
{
for: weaponTypeGroups.BurstBullet,
pro: "Bullets fire in a fixed pattern",
con: "Bullets fire with increased random spread",
},
{
for: weaponTypeGroups.BurstBullet,
pro: "On Hit: Do +<value>% damage if every single bullet connects to the same enemy",
con: "On Hit: -<value>% damage if even one bullet missed the enemy",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.BurstBullet,
pro: "On Hit: Heal <value> HP per connecting bullet",
con: "The bullet shell explodes in your hands each time you fire, causing you to lose <value> HP",
valuePro: 2,
valueCon: 3,
},
{
for: weaponTypeGroups.BurstBullet,
pro: "+<value>% more bullets per shot",
con: "-<value>% less bullets per shot",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.BurstBullet,
pro: "On Hit: If all bullets connect, deals additional bleed damage as strong as <value>% of the attack",
con: "On Miss: Bleed losing -<value> HP",
valuePro: 30,
valueCon: 10,
},
//// SingleBullet ////
{
for: weaponTypeGroups.SingleBullet,
pro: "On Headshot: Next reload will be <value>% faster",
con: "On Miss: Next reload will be <value>% slower",
valuePro: 50,
valueCon: 50,
},
{
for: weaponTypeGroups.SingleBullet,
pro: "On Headshot: Deal +<value>% damage",
con: "On Hit: Deal -<value>% damage if hit was not a headshot",
valuePro: 20,
valueCon: 20,
},
//// Pistol, Submachine_Gun ////
{
for: ["Pistol", "Submachine_Gun"],
pro: "+<value>% faster firing rate when shooting bullets individually (1-press, 1-bullet)",
con: "-<value>% slower firing rate when shooting bullets by holding the trigger (1-press, many bullets)",
valuePro: 20,
valueCon: 20,
},
//// Minigun ////
{
for: ["Minigun"],
pro: "Weapon slowly restores ammo when revved up without shooting. (But produces louder noise)",
con: "Weapon cannot be revved up without shooting",
},
{
for: ["Minigun"],
pro: "+<value>% increased walking speed while revved up",
con: "-<value>% decreased walking speed while revved up",
valuePro: 20,
valueCon: 20,
},
//// Flamethrower ////
{
for: weaponTypeGroups.Flamethrower,
pro: "Deals +<value>% more damage when burning the enemy from behind",
con: "Deals -<value>% more damage when not burning the enemy from behind",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.Flamethrower,
pro: "Flames linger in the air for <value> second(s)",
con: "Flames linger in the air for <value> second(s), but passing through them deals mini-crit damage to you",
valuePro: 1,
valueCon: 1,
},
{
for: weaponTypeGroups.Flamethrower,
pro: "Flames reach is +<value>% farther",
con: "Flames reach is -<value>% shorter",
valuePro: 20,
valueCon: 20,
},
//// AllAfterburn ////
{
for: weaponTypeGroups.AllAfterburn,
pro: "+<value>% increased afterburn damage",
con: "-<value>% decreased afterburn damage",
valuePro: 20,
valueCon: 20,
},
{
for: weaponTypeGroups.AllAfterburn,
pro: "+<value>% increased afterburn duration",
con: "-<value>% decreased afterburn duration",
valuePro: 50,
valueCon: 50,
},
//// AllProjectile ////
{
for: weaponTypeGroups.AllProjectile,
pro: "<value>% faster projectile speed",
con: "<value>% slower projectile speed",
valuePro: 40,
valueCon: 40,
},
//// SingleShotProjectile ////
{
for: weaponTypeGroups.SingleShotProjectile,
pro: "On Hit: Loading next shot will be +<value>% faster",
con: "On Miss: Loading next shot will be -<value>% slower",
valuePro: 50,
valueCon: 50,
},
//// AllReflectableDamageProjectile ////
{
for: weaponTypeGroups.AllReflectableDamageProjectile,
pro: "Projectile cannot be reflected",
con: "Projectile deals 100% crit damage when reflected",
valuePro: 30,
valueCon: 30,
},
//// AutomaticProjectiles ////
{
for: weaponTypeGroups.AutomaticProjectiles,
pro: "Consecutive hits deal +<value> more damage than the previous hit",
con: "Consecutive hits deal -<value> less damage than the previous hit",
valuePro: 1,
valueCon: 1,
},
//// ConsumableProjectile ////
{
for: weaponTypeGroups.ConsumableProjectile,
pro: "+<value>% faster recharge time",
con: "-<value>% slower recharge time",
valuePro: 40,
valueCon: 40,
},
{
for: weaponTypeGroups.ConsumableProjectile,
pro: "+<value>% increased movement speed after firing for 4 seconds",
con: "-<value>% decreased movement speed after firing for 4 seconds",
valuePro: 15,
valueCon: 15,
},
//// Rocket_Launcher, Pipe_Launcher ////
{
for: ["Rocket_Launcher", "Pipe_Launcher"],
pro: "Projectile explodes on direct hit, but also bounces off from the enemy to explode again when hitting any surface, dealing <value>% damage",
con: "Projectile does not explode on direct hit, but instead bounces off from the enemy to explode when hitting any surface, dealing <value>% damage",
valuePro: 40,
valueCon: 60,
},
{
for: ["Rocket_Launcher", "Pipe_Launcher"],
pro: "Projectile can bounce on terrain once and still direct hit the enemy. It breaks apart if it touches terrain for a second time",
con: "Projectile breaks apart if it touches terrain",
valuePro: 50,
valueCon: 50,
},
//// Medi_Gun ////
{
for: ["Medi_Gun"],
pro: "Accumulate ÜberCharge +<value>% faster",
con: "Accumulate ÜberCharge -<value>% slower",
valuePro: 15,
valueCon: 15,
},
{
for: ["Medi_Gun"],
pro: "Heal +<value>% more HP per second",
con: "Heal -<value>% less HP per second",
valuePro: 10,
valueCon: 10,
},
{
for: ["Medi_Gun"],
pro: "Heals teammates near to the Medi Gun target for <value>% of the target healing",
con: "Drains HP from teammates (with health more than 50) near to the Medi Gun target for <value>% of the health delivered to the Medi Gun target.",
valuePro: 10,
valueCon: 10,
},
//// Sapper ////
{
for: ["Sapper"],
pro: "Sapped buildings are disabled for <value> seconds after the sapper is removed",
con: "Sapped buildings are not disabled for <value> seconds after the sapper is placed",
valuePro: 2,
valueCon: 2,
},
{
for: ["Sapper"],
pro: "Alt-Fire: Can throw sapper from a distance, but cannot apply sapper for 4 seconds after that",
con: "After applying sapper, cannot apply again for 2 seconds",
},
{
for: ["Sapper"],
pro: "Can apply sapper while invisible",
con: "Cannot apply sapper while disguised",
},
//// ConsumablePassive ////