-
Notifications
You must be signed in to change notification settings - Fork 0
/
zf_perk.inc
5920 lines (5509 loc) · 210 KB
/
zf_perk.inc
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
////////////////////////////////////////////////////////////////////////////////
//
// Z O M B I E - F O R T R E S S - [TF2]
//
// ZF Perk File
//
////////////////////////////////////////////////////////////////////////////////
//
// Perk / Perk Bonus Descriptions
//
////////////////////////////////////////
//
// Survivor Perks
//
// Athletic
// You have innate speed and rate of fire bonuses. You have innate attack and crit penalties.
//
// Carpenter
// You have an innate defense bonus. You have an innate attack penalty. Call for medic to place a barricade. Barricades have 350 health and can be destroyed by anyone. Ability has a cooldown of 25s.
//
// Charitable
// Each kill or assist grants 'gift points.' Call for medic to redeem these points and toss out a gift for other survivors. Gifts grant various temporary bonuses.
//
// Cowardly
// You have a passive 'panic' ability. When hit, you gain temporary speed and defense bonuses. Panic ability lasts 10s and has a cooldown of 25s.
//
// Friend
// Call for medic to select a friend (must be looking at target, setup time only). Friend is randomly selected otherwise. When near your friend, you have attack and regen bonuses. You gain crit time for each kill or assist with your friend. Crit time is activated when your friend dies.
//
// Heroic
// You have innate attack and defense bonuses. You gain crit time for each kill or assist. Crit time is activated when you're the last remaining survivor.
//
// Holy
// You have an innate attack penalty. When crouched and not moving, you heal yourself and nearby survivors.
//
// Juggernaut
// You have innate attack and defense bonuses. You have an innate speed penalty. You are immune to self and fall damage. You knockback and stun zombies with melee hits or fall damage impacts.
//
// Leader
// You have an innate crit bonus. You grant attack and defense bonuses to nearby survivors. Call for medic to place a rally point. You gain attack and defense bonuses for each survivor near your rally point, and survivors gain attack and defense bonuses when they are near your rally point. Rally lasts 60s and has a cooldown of 120s.
//
// Ninja
// You have an innate speed bonus and defense penalty. Call for medic to place a decoy retreat point. When hit, you will retreat to that point. Decoy ability lasts 15s and has a cooldown of 30s. You can perform a high jump every 5s.
//
// Nonlethal
// You have an innate attack penalty when using bullet-based weapons. Bullet damage causes knockback.
//
// Resourceful
// You receive ammo, health, and metal from kills. You receive temporary attack bonuses from ammopacks and temporary defense bonuses from medpacks.
//
// Selfless
// You have an innate attack bonus and defense penalty. Other survivors near you gain a defense bonus. You explode on death.
//
// Stash
// Call for medic to place a secret stash. Stash can't be placed near other survivors or stashes. Stash becomes active after 40s and grants ammo, health, and a temporary attack bonus. Ability has a cooldown of 30s.
//
// Stir-Crazy
// You have innate attack and defense penalties. You receive an attack bonus proportional to how much distance you travel.
//
// Supplier
// Your reserve ammo is resupplied periodically, and can hold twice the normal limit. Call for medic to place supply boxes. Other survivors can resupply ammo from these boxes. Supply ability has a cooldown of 10s.
//
// Tantrum
// Call for medic to throw a tantrum. Tantrum grants 100% crits and lasts 15s. Ability has a cooldown of 30s, during which you have a speed penalty.
//
// Traitor
// You have an innate crit penalty. You grant a crit bonus to nearby zombies. When you are one of the last two survivors, you poison the other survivor.
//
// Trapper
// Call for medic to place proximity mines. You can place up to 3 mines. Ability has a cooldown of 15s.
//
// Turtle
// You have an innate defense bonus. You have innate attack and speed penalties. You are immune to backstabs.
//
// Wise
// You gain a permanent attack bonus for each kill or assist. You gain a permanent defense bonus for each melee hit received.
//
// Zenlike
// When crouched and not moving, you regenerate health and accumulate a crit bonus. Crit bonus decreases after each attack.
//
////////////////////////////////////////
//
// Zombie Perks
//
// Alpha
// You acquire minions by killing survivors or assisting existing minions in killing survivors. You receive attack and regen bonuses when near other zombies or minions. Call for medic to summon up to 4 minions. Ability has a cooldown of 15s per minion summoned.
//
// Combustible
// You have an innate defense penalty. You explode on death (unless hit by a melee weapon). You have reduced respawn times. Can't cloak or use Bonk!.
//
// Horrifying
// Each melee hit causes temporary attack, defense, and rate of fire penalties. Survivors' temporary penalties are reduced when you're killed.
//
// Hunter
// Call for medic to place your next spawnpoint. You gain a temporary attack bonus when spawning on your spawnpoint. You have reduced respawn times. Ability can be used once per spawn.
//
// Leap
// You have innate attack and defense penalties. You are immune to fall damage. Call for medic to perform a long jump. Ability has a cooldown of 4s.
//
// Magnetic
// You can't be targeted by and disable nearby sentries. [Synergy] You disable nearby trapper mines.
//
// Marked
// One survivor is randomly selected as your mark. You gain an attack bonus when attacking your mark and an attack penalty otherwise. New mark is chosen after current mark dies and there are more than 2 remaining survivors.
//
// Rage
// Call for medic to activate rage. Rage grants 150% health and a speed bonus. Below 80% health, rage can't be activated and fades if already active.
//
// Roar
// Call for medic to execute a powerful roar. Roar causes knockback and temporary defense penalties. Ability has a cooldown of 15s.
//
// Scorching
// You have an innate speed bonus. You have an innate attack penalty. You are immune to fire damage and ignite survivors on touch or melee hit. Can't use Bonk!.
//
// Sick
// You have an innate defense penalty. Call for medic to spit acid. Acid lasts for 25s or until you die. Acid causes more damage the longer survivors stand in it.
//
// Swarming
// You have an innate speed bonus. You have innate attack and defense penalties. You have instant respawn, and zombies that die near you have instant respawn.
//
// Tarred
// Call for medic to spit tar. Tar slicks last for 20s or until you die. You slow survivors with melee hits or when hit with melee.
//
// Thieving
// You have an innate attack penalty. You steal ammo, metal, and ubercharge with each melee hit. If target has no reserve ammo for their primary weapon, you steal it and a limited amount of ammo.
//
// Toxic
// You have an innate attack penalty. You poison survivors with melee hits or when hit with melee. When not moving, you cause damage to nearby survivors.
//
// Vampiric
// You have an innate regen bonus. You leech health when dealing damage.
//
// Vindictive
// You gain permanent attack and defense bonuses for each kill or assist.
//
////////////////////////////////////////
// CRASHES (Confirmed)
// + On map X, server change to zf_fortress_v4, then client crash (no server crash). Occurs between OnClientConnect and OnClientPostAdminCheck. Likely map-related.
// FEATURES
// + CVAR: Zombies can't pick new perk, or can only switch once every X seconds.
// + Radial damage : no damage, but indicators required.
// + Translation hooks?
// + Temporary bonus / penalty overhaul? Diminishing returns, percentage increases in str / dur.
// + Cripple option : More damage on initial stab, instakill on already crippled?
// + Katana : Too powerful for ZF?
// + Zombie melee-resistant perk
// + Zombie defense perk
// + Call4Med = place rock totem
// + Near totem = defense bonus.
// + Totems can be destroyed by anyone.
// + Zombie parasite perk
// + Melee hit = inject parasite (unless parasite currently active).
// + Parasite causes icon / glow
// + Parasite causes low damage (1/s)
// + Parasite lasts Xs, can't be healed.
// + If survivor dies with parasite, infector spawns on death point with extra health/power (or something).
// + Alpha : Message to minions about upcoming summon?
// + Charitable : Presents disappear after Xs?
// + Combustible : 'E' to immobilze + larger explosion?
// + Holy: negative stat penalties for nearby zombies while praying?
// + Hunter: Make spawn point damageable?
// + Leader : Rally purges stat penalties
// + Leader : Prevent rally and/or prox bonuses from stacking?
// + Magnetic : High gravity for nearby survivors?
// + Marked : Change mark after X seconds?
// + Marked : Notification when you're no longer marked?
// + Nonlethal : Useless
// + Sick : More damage to buildings
// + Sick/Tarred : Change position of where radial damage is emitted?
// + Stash : Allow multiple.
// + Stash : Becomes more powerful the longer you wait to grab.
// + Supplier : Allow pyro double max reserve ammo (250).
// + Tarred : Change oil slick speed penalty to -150 when near it, 0 otherwise (i.e. strong but limited).
// + Thieving : Recover weapon by killing stealer.
// + Thieving : Passive visual?
// + Toxic : Prevent passive damage if in respawn room.
// + Traitor : Zombies can see traitor icon?
// + Turtle: Hunker ability (toggle for large defense bonus, rof/speed penalty)
// BUGS (Confirmed)
// + Traitor, then next round choose Selfless - initial "Betrayed message" appears - looks like periodic logic applies once before moving to correct state. Why?
// + Lugermorph ammo incorrectly drained in a few cases.
// + Damage : Victims pushed away from current damage inflictor's position (slightly)
// + Damage : DamagePost values do not take into account Fists of Steel ranged damage reduction.
// + Melee-only : Engineers can build sentries with console commands.
// + Going spectator : Going spectator does not count as a team switch, and it should.
// + Sick : Acid kills attributed to currently held weapon.
// + Supplier : Why is ammo picked up? (Select weapon w/no ammo, its reserve ammo get set to 0, causing ammo pickup)
// BUGS (Can't reproduce)
// + Razorback : Does not block backstab attempts?
// + Resourceful : Standing on kit as pyro causes massive def bonus buildup?
// + Thieving : Stealing weapon causes 'T' pose? Why does forced weapon switch not work?
#if defined _ZF_PERK_INC
#endinput
#endif
#define _ZF_PERK_INC
#include "zf_util_base.inc"
#include "zf_util_fx.inc"
#include "zf_util_pref.inc"
//
// Perk Objects
//
#define ZF_PERK_NONE 0
// Survivor perks
#define TOTAL_SUR_PERKS 23
#define ZF_PERK_ATHLETIC 1
#define ZF_PERK_CARPENTER 2
#define ZF_PERK_CHARITABLE 3
#define ZF_PERK_COWARDLY 4
#define ZF_PERK_FRIEND 5
#define ZF_PERK_HEROIC 6
#define ZF_PERK_HOLY 7
#define ZF_PERK_JUGGERNAUT 8
#define ZF_PERK_LEADER 9
#define ZF_PERK_NINJA 10
#define ZF_PERK_NONLETHAL 11
#define ZF_PERK_RESOURCEFUL 12
#define ZF_PERK_SELFLESS 13
#define ZF_PERK_STASH 14
#define ZF_PERK_STIRCRAZY 15
#define ZF_PERK_SUPPLIER 16
#define ZF_PERK_TANTRUM 17
#define ZF_PERK_TRAITOR 18
#define ZF_PERK_TRAPPER 19
#define ZF_PERK_TURTLE 20
#define ZF_PERK_WISE 21
#define ZF_PERK_ZENLIKE 22
new String:ZF_SURPERK_NAME[TOTAL_SUR_PERKS][] =
{ "None",
"Athletic", "Carpenter", "Charitable", "Cowardly", "Friend", "Heroic", "Holy",
"Juggernaut", "Leader", "Ninja", "Nonlethal", "Resourceful", "Selfless",
"Stash", "Stir-Crazy", "Supplier", "Tantrum", "Traitor", "Trapper", "Turtle",
"Wise", "Zenlike" };
new String:ZF_SURPERK_SHORTDESC[TOTAL_SUR_PERKS][] =
{
"None",
"Athletic: Fast moving, fast shooting.",
"Carpenter: Build barricades.",
"Charitable: Turn kills into gifts.",
"Cowardly: Flee when attacked.",
"Friend: Form a dynamic duo.",
"Heroic: Powerful last stand.",
"Holy: Pray for health.",
"Juggernaut: Slow moving, hard hitting.",
"Leader: Rally and inspire the troops.",
"Ninja: Agile and deceptive.",
"Nonlethal: Rubber bullets.",
"Resourceful: Resupply from kills, pickups.",
"Selfless: Sacrifice on death.",
"Stash: Hide supply cache for later.",
"Stir-Crazy: Movement is power.",
"Supplier: Place resupply crates.",
"Tantrum: Throw tantrums.",
"Traitor: Betray your teammates.",
"Trapper: Place proximity mines.",
"Turtle: Slow moving, hard shell.",
"Wise: Improve through combat.",
"Zenlike: Wellness through meditation."
};
//"0xxxxxxxxxxxxxxx1xxxxxxxxxxxxxxx2xxxxxxxxxxxxxxx\n3xxxxxxxxxxxxxxx4xxxxxxxxxxxxxxx5xxxxxxxxxxxxxxx\n6xxxxxxxxxxxxxxx7xxxxxxxxxxxxxxx8xxxxxxxxxxxxxxx\n9xxxxxxxxxxxxxxxAxxxxxxxxxxxxxxxBxxxxxxxxxxxxxxx\nCxxxxxxxxxxxxxxxDxxxxxxxxxxxxxxxExxxxxxxxxxxxxxx\nFxxxxxxxxxxxxxxxGxxxxxxxxxxxxxxxHxxxxxxxxxxxxxxx\nIxxxxxxxxxxxxxxxJxxxxxxxxxxxxxxxKxxxxxxxxxxxxxxx\nLxxxxxxxxxxxxxxxMxxxxxxxxxxxxxxxNxxxxxxxxxxxxxxx\n",
new String:ZF_SURPERK_LONGDESC[TOTAL_SUR_PERKS][] =
{
"",
"You have innate speed and rate of fire bonuses. \nYou have innate attack and crit penalties.",
"You have an innate defense bonus. You have an \ninnate attack penalty. Call for medic to place a\nbarricade. Barricades have 350 health and can be\ndestroyed by anyone. Ability has a cooldown of 25s.",
"Each kill or assist grants 'gift points.' Call \nfor medic to redeem these points and toss out a \ngift for other survivors. When picked up, gifts \ngive you and the recipient various temporary \nbonuses and heal you.",
"You have a passive 'panic' ability. When hit, \nyou gain temporary speed and defense bonuses. \nPanic ability lasts 10s and has a cooldown of 35s.",
"Call for medic to select a friend (must be \nlooking at target, setup time only). Friend is \nrandomly selected otherwise. When near your \nfriend, you have attack and regen bonuses. You \ngain crit time for each kill or assist with your\nfriend. Crit time is activated when your friend \ndies.",
"You have innate attack and defense bonuses. You \ngain crit time for each kill or assist. Crit \ntime is activated when you're the last remaining\nsurvivor.",
"You have an innate attack penalty. When crouched\nand not moving, you heal yourself and nearby \nsurvivors.",
"You have innate attack and defense bonuses. You \nhave an innate speed penalty. You are immune to \nself and fall damage. You knockback zombies with\nmelee hits and stun them with fall damage \nimpacts.",
"You have an innate crit bonus. You grant attack \nand defense bonuses to nearby survivors. Call \nfor medic to place a rally point. You gain \nattack and defense bonuses for each survivor \nnear your rally point, and survivors gain attack\nand defense bonuses when they are near your \nrally point. Rally lasts 60s and has a cooldown \nof 120s.",
"You have an innate speed bonus and defense \npenalty. Call for medic to place a decoy retreat\npoint. When hit, you will retreat to that point.\nDecoy ability lasts 15s and has a cooldown of \n25s. You can perform a high jump every 5s.",
"You have an innate attack penalty when using \nbullet-based weapons. Bullet damage causes \nknockback.",
"You receive ammo, health, and metal from kills. \nYou receive temporary attack bonuses from \nammopacks and temporary defense bonuses from \nmedpacks.",
"You have an innate attack bonus and defense \npenalty. Other survivors near you gain a defense\nbonus. You explode on death.",
"Call for medic to place a secret stash. Stash \ncan't be placed near other survivors or stashes.\nStash becomes active after 40s and grants ammo, \nhealth, and a temporary attack bonus. Ability \nhas a cooldown of 30s.",
"You have innate attack and defense penalties. \nYou receive an attack bonus proportional to how \nmuch distance you travel.",
"Your reserve ammo is resupplied periodically, \nand can hold twice the normal limit. Call for \nmedic to place supply boxes. Other survivors can\nresupply ammo from these boxes. Supply ability \nhas a cooldown of 10s.",
"Call for medic to throw a tantrum. Tantrum \ngrants 100% crits and lasts 15s. Ability has a \ncooldown of 30s, during which you have a speed \npenalty.",
"You have an innate crit penalty. You grant a \ncrit bonus to nearby zombies. When you are one \nof the last two survivors, you poison the other \nsurvivor.",
"Call for medic to place proximity mines. You can\nplace up to 3 mines. Ability has a cooldown of \n15s.",
"You have an innate defense bonus. You have \ninnate attack and speed penalties. You are \nimmune to backstabs.",
"You gain a permanent attack bonus for each kill \nor assist. You gain a permanent defense bonus \nfor each melee hit received.",
"When crouched and not moving, you regenerate \nhealth and accumulate a crit bonus. Crit bonus \ndecreases after each attack."
};
// Zombie perks
#define TOTAL_ZOM_PERKS 18
#define ZF_PERK_ALPHA 1
#define ZF_PERK_COMBUSTIBLE 2
#define ZF_PERK_HORRIFYING 3
#define ZF_PERK_HUNTER 4
#define ZF_PERK_LEAP 5
#define ZF_PERK_MAGNETIC 6
#define ZF_PERK_MARKED 7
#define ZF_PERK_RAGE 8
#define ZF_PERK_ROAR 9
#define ZF_PERK_SCORCHING 10
#define ZF_PERK_SICK 11
#define ZF_PERK_SWARMING 12
#define ZF_PERK_TARRED 13
#define ZF_PERK_THIEVING 14
#define ZF_PERK_TOXIC 15
#define ZF_PERK_VAMPIRIC 16
#define ZF_PERK_VINDICTIVE 17
new String:ZF_ZOMPERK_NAME[TOTAL_ZOM_PERKS][] =
{ "None",
"Alpha", "Combustible", "Horrifying", "Hunter", "Leap", "Magnetic", "Marked",
"Rage", "Roar", "Scorching", "Sick", "Swarming", "Tarred", "Thieving",
"Toxic", "Vampiric", "Vindictive" };
new String:ZF_ZOMPERK_SHORTDESC[TOTAL_ZOM_PERKS][] =
{
"None",
"Alpha: Create and summon minions.",
"Combustible: Explode on death.",
"Horrifying: Weaken enemies on hit.",
"Hunter: Place your spawnpoint.",
"Leap: Jump far, jump often.",
"Magnetic: Disable sentries and mines.",
"Marked: Stalk a single target.",
"Rage: Gain power, ignore damage.",
"Roar: Toss away your enemies.",
"Scorching: Fire. Lots of fire.",
"Sick: Hurl acidic bombs.",
"Swarming: Instant respawn.",
"Tarred: Spit tar, slow enemies.",
"Thieving: Steal from enemies.",
"Toxic: Poison enemies.",
"Vampiric: Leech health.",
"Vindictive: Everlasting power from kills."
};
//"0xxxxxxxxxxxxxxx1xxxxxxxxxxxxxxx2xxxxxxxxxxxxxxx\n3xxxxxxxxxxxxxxx4xxxxxxxxxxxxxxx5xxxxxxxxxxxxxxx\n6xxxxxxxxxxxxxxx7xxxxxxxxxxxxxxx8xxxxxxxxxxxxxxx\n9xxxxxxxxxxxxxxxAxxxxxxxxxxxxxxxBxxxxxxxxxxxxxxx\nCxxxxxxxxxxxxxxxDxxxxxxxxxxxxxxxExxxxxxxxxxxxxxx\nFxxxxxxxxxxxxxxxGxxxxxxxxxxxxxxxHxxxxxxxxxxxxxxx\nIxxxxxxxxxxxxxxxJxxxxxxxxxxxxxxxKxxxxxxxxxxxxxxx\nLxxxxxxxxxxxxxxxMxxxxxxxxxxxxxxxNxxxxxxxxxxxxxxx\n",
new String:ZF_ZOMPERK_LONGDESC[TOTAL_ZOM_PERKS][] =
{
"",
"You acquire minions by killing survivors or \nassisting existing minions in killing survivors.\nYou receive attack and regen bonuses when near \nother zombies or minions. Call for medic to \nsummon up to 4 minions. Ability has a cooldown \nof 15s per minion summoned.",
"You have an innate defense penalty. You explode \non death (unless hit by a melee weapon). You \nhave reduced respawn times. Can't cloak or use \nBonk!.",
"Each melee hit causes temporary attack, defense,\nand rate of fire penalties. Survivors' temporary\npenalties are reduced when you're killed.",
"Call for medic to place your next spawnpoint. \nYou gain a temporary attack bonus when spawning \non your spawnpoint. You have reduced respawn \ntimes. Ability can be used once per spawn.",
"You have innate attack and defense penalties. \nYou are immune to fall damage. Call for medic to\nperform a long jump. Ability has a cooldown of 4s.",
"You can't be targeted by and disable nearby \nsentries. [Synergy] You disable nearby trapper \nmines.",
"One survivor is randomly selected as your mark. \nYou gain an attack bonus when attacking your \nmark and an attack penalty otherwise. New mark \nis chosen after current mark dies and there are \nmore than 2 remaining survivors.",
"Call for medic to activate rage. Rage grants \n150% health and a speed bonus. Below 80% health,\nrage can't be activated and fades if already \nactive. While cooling down you suffer -33% attack.",
"Call for medic to execute a powerful roar. Roar \ncauses knockback and temporary defense \npenalties. Ability has a cooldown of 15s.",
"You have an innate speed bonus. You have an \ninnate attack penalty. You are immune to fire \ndamage and ignite survivors on touch or melee \nhit. Can't use \nBonk!.",
"You have an innate defense penalty. Call for \nmedic to spit acid. Acid lasts for 25s or until \nyou die. Acid causes more damage the longer \nsurvivors stand in it. Can't use Bonk!.",
"You have an innate speed bonus. You have innate \nattack and defense penalties. You have instant \nrespawn, and zombies that die near you have \ninstant respawn.",
"Call for medic to spit tar. Tar slicks last for \n20s or until you die. You slow survivors with \nmelee hits or when hit with melee.",
"You have an innate attack penalty. You steal \nammo, metal, and ubercharge with each melee hit.\nIf target has no reserve ammo for their primary \nweapon, you steal it and a limited amount of ammo.",
"You have an innate attack penalty. You poison \nsurvivors with melee hits or when hit with \nmelee. When not moving, you cause damage to \nnearby survivors.",
"You have an innate regen bonus. You leech health\nwhen dealing damage.",
"You gain permanent attack and defense bonuses \nfor each kill or assist."
};
//
// Perk Bonus Objects
//
//
// Perk Gameplay Objects
//
const Float:ZF_POW_STUNTIME = 8.0; // Duration of stun from POW! taunt.
const Float:ZF_POW_DAMAGE = 100.0; // Damage done by POW! taunt.
const ZF_CRIPPLE_DURATION = 30; // Amount of time crippled/tracked condition lasts. (cannot heal, glow to all players)
const Float:ZF_CRIPPLE_MIN_PCT = 0.5; // Minimum percentage of victim's max health done on backstab.
const ZF_CRIPPLE_BASEHEALTH = 50; // Base crippled health - 0% Att Spy stabbing 0% Def victim gives this much crippled health.
const ZF_CRIPPLE_MAXHEALTH = 80; // Max value for crippled health.
const ZF_CRIPPLE_MINHEALTH = 30; // Min value for crippled health.
//const ZF_DAZE_DEFENSE = -40; // Defense penalty when dazed. (no longer used)
const ZF_POISON_DAMAGE = 5; // Amount of poison damage (per sec).
const ZF_POISON_HEAL_MEDIC = 3; // Amount of poison healed (per sec) by medic healing.
const ZF_POISON_HEAL_MEDPACK = 5; // Amount of poison healed by medpack pickup.
const ZF_POISON_HEAL_UBER = 100; // Amount of poison healed when ubered.
const Float:ZF_STILL_VELMAX = 50.0; // Maximum velocity for perk detection of no movement, to allow for bumping from others.
const ZF_SENT_AMMO_COST = 4; // Metal per shell refilled on sentries.
const ZF_SENT_AMMO_MAX = 15; // Max ammo on normal sentries.
const ZF_SENT_AMMO_MINI = 50; // Max ammo on minisentries (can't be refilled, decays 2/sec)
const ZF_SENT_RELOAD_TIME = 2; // Disabled time on normal sentries when refilled.
// Survivor perks
const ZF_ATHLETIC_ATTACK = -33; // Innate attack penalty.
const ZF_ATHLETIC_CRIT = -100; // Innate crit penalty.
const ZF_ATHLETIC_ROF = 100; // Innate rate of fire bonus.
const ZF_ATHLETIC_SPEED = 75; // Innate speed bonus.
const CARPENTER_ATTACK = -25; // Innate attack penalty.
const CARPENTER_DEFENSE = 25; // Innate defense bonus.
const CARPENTER_BARRICADE_HEALTH = 350; // Health of each barricade.
const CARPENTER_COOLDOWN = 25; // Duration after barricade is placed before a new one can be placed.
const CARPENTER_MAX_ITEMS = 3; // Maximum number of barricades that can be active at one time.
const CARPENTER_DROP_RADSQ_BARRICADE = (250 * 250); // Radius (squared) inwhich no barricades must be to place barricade.
const CARPENTER_DROP_RADSQ_CLIENT = (150 * 150); // Radius (squared) inwhich no other players must be to place barricade.
const ZF_CHARITABLE_MAX_ITEMS = 5; // Maximum number of gifts that can be active at one time.
const ZF_CHARITABLE_POINTS_ASSIST = 1; // Points earned per assist.
const ZF_CHARITABLE_POINTS_KILL = 2; // Points earned per kill.
const ZF_CHARITABLE_POINTS_GIFT = 3; // Points needed to toss gift.
const ZF_CHARITABLE_GIFT_HEALTH = 75; // Health gained by gift owner when gift is picked up.
const ZF_CHARITABLE_GIFT_ATTACK_LIM = 50; // Attack bonus limit for gift recipients.
const ZF_CHARITABLE_GIFT_DEFENSE_LIM = 30; // Defense bonus limit for gift recipients.
const ZF_CHARITABLE_GIFT_REGEN_LIM = 10; // Regen bonus limit for gift recipients.
const Float:ZF_CHARITABLE_GIFT_MIN_PCT = 0.5; // Gift bonus is randomly between (pct * lim) and lim.
const Float:ZF_CHARITABLE_BONUS_SELF = 0.5; // Percent of gift bonus given to self when picked up by teammate.
const ZF_CHARITABLE_GIFT_DURATION = 30; // Duration of gift bonuses.
const ZF_COWARDLY_DEFENSE = 85; // Defense bonus when scared.
const ZF_COWARDLY_SPEED = 100; // Speed bonus when scared.
const ZF_COWARDLY_DURATION_SCARED = 10; // Duration of scared state after being hit.
const ZF_COWARDLY_DURATION_COOLDOWN = 35; // Duration after scared state ends before scared state is again possible.
const ZF_FRIEND_ATTACK_LIM = 75; // Attack bonus limit for perk.
const ZF_FRIEND_REGEN_LIM = 15; // Regen bonus limit for perk.
const Float:ZF_FRIEND_BONUS_PCT = 0.66; // Attack/Regen bonus percent per nearby friend.
const ZF_FRIEND_CRITTIME_INIT = 5; // Starting crit time.
const ZF_FRIEND_CRITTIME_KILL = 8; // Crit time added per kill.
const ZF_FRIEND_CRITTIME_ASSIST = 5; // Crit time added per assist.
const ZF_FRIEND_RADIUSSQ = (400 * 400); // Radius (squared) inwhich passive bonuses apply.
const HEROIC_COMBAT = 15; // Attack and defense bonus when using perk.
const HEROIC_CRITTIME_INIT = 20; // Starting crit time.
const HEROIC_CRITTIME_KILL = 5; // Crit time added per kill.
const HEROIC_CRITTIME_KILL_ACTIVE = 2; // Crit time added per kill when crittime is active.
const HEROIC_CRITTIME_ASSIST = 5; // Crit time added per assist.
const HEROIC_CRITTIME_ASSIST_ACTIVE = 1; // Crit time added per assist when crittime is active.
const ZF_HOLY_RADIUSSQ = (400 * 400); // Radius (squared) inwhich regen bonuses apply.
const ZF_HOLY_REGEN_MIN = 5; // Regen bonus for nearby survivors.
const ZF_HOLY_REGEN_INCTIME = 5; // Time continuously crouched after which regen increases. (1/sec^2)
const ZF_HOLY_REGEN_MAX = 12; // Maximum regen amount.
const ZF_JUGGERNAUT_ATTACK = 15; // Attack bonus when using perk.
const ZF_JUGGERNAUT_DEFENSE = 25; // Defense bonus when using perk.
const Float:ZF_JUGGERNAUT_FORCE = 500.0; // Knockback force for nearby zombies when fall damage taken / on melee hit.
const ZF_JUGGERNAUT_RADIUS = 250; // Radius inwhich fall damage causes stun.
//const ZF_JUGGERNAUT_ROF = -25; // Rate of fire penalty when using perk. (inactive)
const ZF_JUGGERNAUT_SPEED = -100; // Speed penalty when using perk.
const Float:ZF_JUGGERNAUT_STUN_DURATION = 2.0; // Duration of stun when fall damage taken.
const Float:ZF_JUGGERNAUT_STUN_SLOWDOWN = 0.5; // Slowdown of stun when fall damage taken.
const ZF_LEADER_SELF_CRIT = 25; // Crit bonus when using perk.
const ZF_LEADER_OTHERS_ATTACK_LIM = 50; // Attack bonus limit for applied buff.
const Float:ZF_LEADER_OTHERS_ATTACK_PCT = 0.5; // Attack bonus percent for survivors near user.
const ZF_LEADER_OTHERS_RADIUSSQ = (350 * 350); // Radius (squared) inwhich passive bonuses are applied.
const ZF_LEADER_RALLY_SELF_ATTACK_LIM = 100; // Attack bonus limit for self from rally.
const ZF_LEADER_RALLY_SELF_DEFENSE_LIM = 50; // Defense bonus limit for self from rally.
const Float:ZF_LEADER_RALLY_SELF_BONUS_PCT = 0.1; // Bonus percent of each Attack/Defense gained for each survivor near rally.
const ZF_LEADER_RALLY_OTHERS_ATTACK_LIM = 50; // Attack bonus for survivors near rally point.
const ZF_LEADER_RALLY_OTHERS_DEFENSE_LIM = 40; // Defense bonus for survivors near rally point.
const Float:ZF_LEADER_RALLY_OTHERS_BONUS_PCT = 0.5; // Bonus percent applied to each survivor near rally.
const ZF_LEADER_RALLY_DURATION = 60; // Duration after rally is placed before it expires.
const ZF_LEADER_RALLY_COOLDOWN = 120; // Duration after rally is placed before it can be replaced.
const ZF_LEADER_RALLY_RADIUSSQ = (400 * 400); // Radius (squared) inwhich rally bonuses apply.
const ZF_NINJA_DEFENSE = -15; // Defense penalty while using perk.
const ZF_NINJA_SPEED = 50; // Speed bonus using perk.
const ZF_NINJA_DURATION_DECOY_ACTIVE = 10; // Duration of decoy retreat point lifetime.
const ZF_NINJA_DURATION_DECOY_DECAY = 5; // Duration of decoy before it poofs.
const ZF_NINJA_DURATION_COOLDOWN = 25; // Duration after decoy before new decoy can be used.
const ZF_NINJA_FALLDMG_RESIST = 50; // Percentage of fall damage resistance.
const ZF_NINJA_JUMP_COOLDOWN = 5; // Cooldown for high jump ability.
const Float:ZF_NINJA_FORCE = 600.0; // Jump force.
const ZF_NONLETHAL_ATTACK_BULLET = -75; // Attack penalty when using perk and bullet-based weapon.
const Float:ZF_NONLETHAL_FORCE = 25.0; // Base force applied per bullet-based attack.
const Float:ZF_RESOURCEFUL_AMMOPCT = 0.20; // Percent of ammo received per kill.
const ZF_RESOURCEFUL_ATTACK_LIM = 25; // Attack bonus (temporary) when grabbing an ammopack.
const ZF_RESOURCEFUL_DEFENSE_LIM = 25; // Defense bonus (temporary) when grabbing a medpack.
const Float:ZF_RESOURCEFUL_BONUS_PCT = 1.0; // Percent bonus given on ammo/health pickup.
const ZF_RESOURCEFUL_HEALTH = 25; // Health gained per kill (up to max).
const ZF_RESOURCEFUL_HEALTH_OVERHEAL = 15; // Additional health gained per kill (overheal possible).
const ZF_RESOURCEFUL_METAL = 25; // Amount of metal received per kill.
const ZF_RESOURCEFUL_PICKUP_DURATION = 10; // Duration of temporary bonuses from pickups.
const ZF_SELFLESS_DAMAGE = 1000; // Explosion damage applied to zombies on death.
const ZF_SELFLESS_RADIUS = 500; // Radius of explosion.
const ZF_SELFLESS_SELF_DEFENSE = -20; // Defense penalty for user.
const ZF_SELFLESS_SELF_ATTACK = 20; // Attack bonus for user.
const ZF_SELFLESS_OTHERS_DEFENSE_LIM = 30; // Defense bonus limit for nearby survivors.
const Float:ZF_SELFLESS_OTHERS_DEFENSE_PCT = 0.66; // Percent bonus applied to nearby survivors.
const ZF_SELFLESS_OTHERS_RADIUSSQ = (350 * 350); // Radius (squared) in which defense bonus is applied.
const ZF_STASH_GRAB_ATTACK_DURATION = 45; // Duration of temporary bonuses from grabbing stash.
const ZF_STASH_GRAB_ATTACK_PERM = 10; // Permanent attack bonus from grabbing stash.
const ZF_STASH_GRAB_ATTACK_TEMP_LIM = 100; // Attack bonus limit from grabbing stash.
const Float:ZF_STASH_GRAB_ATTACK_TEMP_PCT = 1.0;//
const ZF_STASH_GRAB_HEALTH = 200; // Health bonus from grabbing stash.
const ZF_STASH_COOLDOWN = 30; // Duration after stash becomes ready before a new stash can be placed.
const ZF_STASH_WARMUP = 40; // Duration after placing stash before it becomes ready.
const ZF_STASH_GRAB_RADSQ = (50 * 50); // Radius (squared) inwhich you must be to grab stash.
const ZF_STASH_DROP_RADSQ_STASH = (200 * 200); // Radius (squared) inwhich no other stashes must exist in order to place new stash.
const ZF_STASH_DROP_RADSQ_CLIENT = (800 * 800);// Radius (squared) inwhich no other survivors must exist in order to place new stash.
const ZF_STIRCRAZY_MAX_POINTS = 5; // Number of previous positions used to calculate average position.
const ZF_STIRCRAZY_DIST_MIN = 200; // Minimum distance from average of last X positions overwhich bonuses apply.
const ZF_STIRCRAZY_DIST_MAX = 750; // Maximum distance from average of last X positions overwhich no further bonuses apply.
const ZF_STIRCRAZY_ATTACK = 120; // Attack bonus when ZF_STIRCRAZY_DIST_MAX is reached.
const ZF_STIRCRAZY_COMBAT = -10; // Base attack and defense penalty.
const ZF_SUPPLIER_MAX_ITEMS = 2; // Maximum number of supply boxes that can be active at once.
const ZF_SUPPLIER_TIMER = 10; // Duration after supplies are placed before supplies can be placed again.
const ZF_SUPPLIER_RADIUSSQ = (75 * 75); // Radius (squared) inwhich supplies are picked up.
const ZF_SUPPLIER_UPDATERATE = 10; // Period (in s) of self-resupply.
const Float:ZF_SUPPLIER_AMMOPCT_RESLIMIT = 2.0; // Primary and secondary ammo reserve limit.
const Float:ZF_SUPPLIER_AMMOPCT_SELF = 0.10; // Percent of ammo (of standard maximum) received per self-resupply.
const Float:ZF_SUPPLIER_AMMOPCT_OTHER = 0.25; // Percent of ammo (of standard maximum) received per resupply.
const ZF_SUPPLIER_RESUPPLY_COUNT = 4; // Number of resupplies from each supply box.
const ZF_SUPPLIER_ATTACK_LIM = 100; // Attack bonus limit for supplier on supply use.
const Float:ZF_SUPPLIER_ATTACK_PCT = 0.25; // Percent bonus given to supplier on supply use.
const ZF_SUPPLIER_DURATION = 10; // Duration of bonuses for suppliers when supplies picked up.
const ZF_TANTRUM_ACTIVE = 15; // Duration of anger (100% crit) state.
const ZF_TANTRUM_COOLDOWN = 30; // Duration of tired (speed penalty) state.
const ZF_TANTRUM_SPEED = -100; // Speed penalty given after perk use.
const ZF_TRAITOR_CRIT = -100; // Crit penalty when using this perk.
const ZF_TRAITOR_CRIT_ZOM = 25; // Crit bonus for nearby zombies.
const ZF_TRAITOR_POISON = 3; // Poison damage applied per/s to other remaining survivor.
const ZF_TRAITOR_RADIUSSQ = (500 * 500); // Radius (squared) inwhich zombie crit bonus applies.
const ZF_TRAPPER_MAX_ITEMS = 3; // Maximum number of mines that can be active at once.
const ZF_TRAPPER_DAMAGE = 50; // Damage done by trapper mines.
const ZF_TRAPPER_RADIUS = 200; // Radius inwhich mines trigger and cause damage.
const ZF_TRAPPER_RADIUSSQ = (200 * 200); // Radius (squared) inwhich mines trigger and cause damage.
const ZF_TRAPPER_TIMER = 15; // Time between use of perk.
const ZF_TURTLE_ATTACK = -50; // Attack penalty when using this perk.
const ZF_TURTLE_DEFENSE = 50; // Defense bonus when using this perk.
const ZF_TURTLE_SPEED = -100; // Speed penalty when using perk.
const Float:ZF_TURTLE_STUN_DURATION = 0.5; // Stun time when zombie backstabs perk user.
const ZF_WISE_ATTACK_LIM = 100; // Attack bonus limit for perk.
const Float:ZF_WISE_ATTACK_KILL_PCT = 0.04; // Percent bonus given for kill.
const Float:ZF_WISE_ATTACK_ASSIST_PCT = 0.02;// Percent bonus given for assist.
const ZF_WISE_DEFENSE_LIM = 75; // Defense bonus limit for perk.
const Float:ZF_WISE_DEFENSE_PCT = 0.03; // Percent bonus given when hit.
const ZF_ZENLIKE_CRIT_INC = 10; // Crit bonus gained when crouched and not moving.
const ZF_ZENLIKE_CRIT_DEC = 50; // Crit bonus lost per shot.
const ZF_ZENLIKE_CRIT_MAX = 200; // Maximum crit bonus.
const ZF_ZENLIKE_HEAL = 5; // Poison healed when crouched and not moving.
const ZF_ZENLIKE_REGEN = 15; // Health regen bonus when crouched and not moving.
// Zombie perks
const ZF_ALPHA_RADIUSSQ = (500 * 500); // Radius (squared) in which zombies provide attack and regen bonuses.
const ZF_ALPHA_ATTACK_LIM = 80; // Attack bonus limit gained from nearby zombies.
const ZF_ALPHA_REGEN_LIM = 20; // Regen bonus gained from nearby zombies.
const Float:ZF_ALPHA_ZOMBIE_PCT = 0.15; // Bonus percent gained per nearby non-minioned zombie.
const Float:ZF_ALPHA_MINION_PCT = 0.3; // Bonus percent gained per nearby zombie minion.
const ZF_ALPHA_SUMMON_LIMIT = 4; // Maximum number of minions that can be summoned at once.
const ZF_ALPHA_TIMER_MINION = 15; // Time between use of perk per zombie summoned.
const ZF_COMBUSTIBLE_DAMAGE = 100; // Explosion damage done on death.
const ZF_COMBUSTIBLE_DAMAGE_HEAVY = 150; // Explosion damage done on death for heavies.
const ZF_COMBUSTIBLE_DEFENSE = -200; // Defense penalty for using perk.
const ZF_COMBUSTIBLE_RADIUS = 250; // Radius of explosion.
const Float:ZF_COMBUSTIBLE_RESPAWNTIME = 4.5; // Respawn time when using perk.
const HORRIFYING_ATTACK_LIM = -30; // Attack penalty limit for targets.
const HORRIFYING_DEFENSE_LIM = -15; // Defense penalty limit for targets.
const Float:HORRIFYING_PENALTY_PCT = 0.33; // Penalty percent applied per hit.
const Float:HORRIFYING_REDUCTION_KILL = 0.75; // Temp stat penalty reduction when killing perk user.
const Float:HORRIFYING_REDUCTION_ASSIST = 0.25; // Temp stat penalty reduction when assisting in killing perk user.
const HORRIFYING_DURATION = 15; // Duration of per-hit penalties.
const ZF_HUNTER_ATTACK = 66; // Attack bonus given when spawning on mark.
const ZF_HUNTER_DURATION = 10; // Duration of spawn bonuses.
const ZF_HUNTER_RADIUSSQ = (100 * 100); // Radius (squared) inwhich survivors will destroy a spawn mark.
const Float:ZF_HUNTER_RESPAWNTIME = 5.5; // Respawn time when using perk.
const ZF_LEAP_COMBAT = -33; // Combat penalty when using perk.
const ZF_LEAP_COOLDOWN = 4; // Duration after leap before ability is ready.
const Float:ZF_LEAP_FORCE = 800.0; // Leap force.
const Float:ZF_LEAP_FORCE_SCOUT = 1500.0; // Leap force for scouts.
const ZF_MAGNETIC_RADIUSSQ = (500 * 500); // Radius (squared) inwhich sentries are disabled.
const ZF_MARKED_ATTACK_ON_MARK = 100; // Attack bonus when hitting marked target.
const ZF_MARKED_ATTACK_OFF_MARK = -25; // Attack penalty when hitting non-marked target.
const ZF_MARKED_MIN_SURVIVORS = 3; // The minimum amount of survivors that must be alive to select a mark.
const ZF_MARKED_TIMER = 15; // Time between old target death and new target selection.
const ZF_RAGE_COOLDOWN = 20; // Duration after rage ends before ability is ready.
const ZF_RAGE_ATTACK_PENALTY = -33; // Attack penalty when rage ends until ready.
const ZF_RAGE_SPEED = 100; // Speed bonus when ability is active.
const Float:ZF_RAGE_HEALTHPCT_TOUSE = 0.80; // Percent of health above which ability can be activated.
const Float:ZF_RAGE_HEALTHPCT_ONUSE = 0.50; // Percent of health added when ability is activated.
const ZF_ROAR_COOLDOWN = 15; // Time between use of perk.
const ZF_ROAR_DURATION = 15; // Base duration of DAZED condition (non-heavies).
const ZF_ROAR_DURATION_HEAVY = 30; // Base duration of DAZED condition (heavies).
const ZF_ROAR_DEFENSE_LIM = -40; // Defense penalty limit for Roared targets.
const Float:ZF_ROAR_DEFENSE_PCT = 1.0; // Penalty percent applied on Roar.
const Float:ZF_ROAR_FORCE = 600.0; // Knockback force for nearby survivors (non-heavies).
const Float:ZF_ROAR_FORCE_HEAVY = 1000.0; // Knockback force for nearby survivors (heavies).
const ZF_ROAR_RADIUS = 450; // Radius inwhich knockback and defense penalties are applied.
const ZF_SCORCHING_ATTACK = -50; // Attack penalty when using perk.
const ZF_SCORCHING_SPEED = 50; // Speed bonus when using perk.
const ZF_SICK_MAX_ITEMS = 5; // Maximum number of acid projectiles / puddles active at once.
const ZF_SICK_DEFENSE = -50; // Defense penalty when using perk.
const ZF_SICK_DAMAGE = 15; // Base acid damage done to buildings. Survivor damage should be calculated separately.
const ZF_SICK_DAMAGE_RADIUS = 75; // Radius inwhich acid causes damage.
const ZF_SICK_TIMER = 25; // Time between use of perk.
const ZF_SWARMING_COMBAT = -33; // Combat penalty when using perk.
const ZF_SWARMING_RADIUSSQ = (200 * 200); // Radius (squared) inwhich nearby zombies, when killed, get instant respawn.
const ZF_SWARMING_SPEED = 75; // Speed bonus when using perk.
const Float:ZF_SWARMING_RESPAWNTIME = 0.5; // Respawn time when using perk.
const ZF_TARRED_MAX_ITEMS = 5; // Maximum number of oil projectiles / slicks active at once.
const ZF_TARRED_DURATION_MELEE = 10; // Duration of slowing penalties for melee hits.
const ZF_TARRED_DURATION_SLICK = 2; // Duration of slowing penalties for oil slick hits.
const ZF_TARRED_ROF = -20; // Rate of fire penalty when hit.
const ZF_TARRED_SPEED_MELEE = -50; // Speed penalty on hit / when hit.
const ZF_TARRED_SPEED_SLICK = -75; // Speed penalty on oil slick hit.
const ZF_TARRED_SPEED_LIMIT = 100; // Minimum movement speed for any Tarred survivor.
const ZF_TARRED_TIMER = 20; // Time between use of perk.
const ZF_TARRED_RADIUS = 75; // Radius inwhich oil causes slowing effects.
const Float:ZF_THIEVING_AMMOPCT = 0.30; // Percent of current ammo reserve stolen per hit.
const Float:ZF_THIEVING_AMMOPCT_SPY = 0.40; // Percent of current ammo reserve stolen per hit as Spy.
const ZF_THIEVING_ATTACK = -66; // Attack penalty when using perk.
const ZF_THIEVING_METAL = 75; // Metal stolen per hit.
const Float:ZF_THIEVING_UBERPCT = 0.33; // Percent of ubercharge stolen per hit.
const ZF_TOXIC_ATTACK = -100; // Attack penalty when using perk.
const ZF_TOXIC_DURATION_POISON = 10; // Time each regen penalty lasts.
const ZF_TOXIC_DAMAGE_PASSIVE = 3; // Damage per/s for survivors nearby stationary zombie.
const ZF_TOXIC_RADIUSSQ = (400 * 400); // Radius (squared) inwhich toxic passive poison is applied.
const Float:ZF_VAMPIRIC_HEALTHPCT = 0.5; // Percent of damage leeched on hit.
const ZF_VAMPIRIC_REGEN = 10; // Regeneration bonus when using perk.
const ZF_VINDICTIVE_ATTACK_LIM = 60; // Attack bonus limit for perk.
const ZF_VINDICTIVE_DEFENSE_LIM = 30; // Defense bonus limit for perk.
const Float:ZF_VINDICTIVE_KILL_PCT = 0.25; // Bonus percent given per kill.
const Float:ZF_VINDICTIVE_ASSIST_PCT = 0.1; // Bonus percent given per assist.
//
// Perk Vars
//
// State
new zf_frameCounter;
new zf_surPerksEnabled;
new zf_zomPerksEnabled;
new zf_surPerksLimit[TOTAL_SUR_PERKS];
new zf_zomPerksLimit[TOTAL_ZOM_PERKS];
new zf_perkMode;
new zf_perkPendingMode;
new zf_perkRandSurPerk;
new zf_perkRandZomPerk;
new zf_perkTeamSurPerk;
new zf_perkTeamZomPerk;
new zf_crippleMode = 1;
new bool:zf_powStunMode = true;
new zf_menuPerk[MAXPLAYERS+1];
new zf_clientCount = 0;
new zf_surCount = 0;
new zf_zomCount = 0;
// Logic
new zf_lastAttack[MAXPLAYERS+1];
new zf_lastButtons[MAXPLAYERS+1];
new zf_lastHealth[MAXPLAYERS+1];
new zf_lastKiller[MAXPLAYERS+1];
new zf_lastPoison[MAXPLAYERS+1];
new zf_lastSick[MAXPLAYERS+1];
new zf_lastTeam[MAXPLAYERS+1];
new zf_perkTimer[MAXPLAYERS+1]; // Timer shared by many perks
new zf_perkState[MAXPLAYERS+1]; // State shared by many perks
new zf_perkState2[MAXPLAYERS+1]; // Second integer value for some perks
new zf_alphaMaster[MAXPLAYERS+1]; // Determines who is the master of the player (zombies only).
new Float:zf_perkPos[MAXPLAYERS+1][5][3]; // Position array shared by many perks
new String:zf_perkStr[MAXPLAYERS+1][32]; // String shared by many perks
// Entities
new zf_sentLastAmmo[MAXPLAYERS+1] = -1;
new zf_sentDisabled[MAXPLAYERS+1] = 0;
// Stats
#define TOTAL_ZFSTATS 6
#define TOTAL_ZFSTAT_TYPES 4
#define TOTAL_ZFCONDS 4
enum ZFStat {
ZFStatAtt = 0, // TODO Desc
ZFStatCrit, // TODO Desc
ZFStatDef, // TODO Desc
ZFStatRof, // TODO Desc
ZFStatSpeed, // TODO Desc
ZFStatRegen
}
enum ZFStatType {
ZFStatTypePerm = 0, // TODO Desc
ZFStatTypeCond, // TODO Desc
ZFStatTypeTemp, // TODO Desc
ZFStatTypeTempDuration // TODO Desc
}
enum ZFCond {
ZFCondCrippled = 0, // Stops survivor healing above zf_lastHealth for Crippling backstab.
ZFCondPoisoned, // For (Z) Toxic: time remaining for active Toxic damage.
ZFCondTracked, // Sets survivor glow for Crippling backstab.
ZFCondCorroded // For (Z) Sick: damage increase for standing in acid.
}
new zf_stat[MAXPLAYERS+1][ZFStat][ZFStatType];
new zf_cond[MAXPLAYERS+1][ZFCond];
// FX.Entities
new zf_aura[MAXPLAYERS+1];
#define ICON_SPR 0
#define ICON_ANC 1
new zf_icon[MAXPLAYERS+1][MAXPLAYERS+1][2];
#define MAX_ITEMS 5
new zf_item[MAXPLAYERS+1][MAX_ITEMS];
// FX.HUD
new Handle:zf_hudLine0;
new Handle:zf_hudLine1;
new Handle:zf_hudLine2;
// Menus
new Handle:zf_menuSurPerkList;
new Handle:zf_menuZomPerkList;
// CVARS
new Handle:zf_cvCripple;
new Handle:zf_cvPowStun;
////////////////////////////////////////////////////////////
//
// Perk Init
//
////////////////////////////////////////////////////////////
public perkInit()
{
// Initialize game state
zf_frameCounter = 0;
zf_surPerksEnabled = 0xFFFF_FFFF;
zf_zomPerksEnabled = 0xFFFF_FFFF;
for(new i = 0; i < TOTAL_SUR_PERKS; i++)
zf_surPerksLimit[i] = -1;
for(new i = 0; i < TOTAL_ZOM_PERKS; i++)
zf_zomPerksLimit[i] = -1;
zf_perkMode = 0;
zf_perkPendingMode = 0;
zf_perkRandSurPerk = ZF_PERK_NONE;
zf_perkRandZomPerk = ZF_PERK_NONE;
zf_perkTeamSurPerk = ZF_PERK_NONE;
zf_perkTeamZomPerk = ZF_PERK_NONE;
// Initialize client perk state
resetAllClients();
// Initialize HUD synchronizers
zf_hudLine0 = CreateHudSynchronizer();
zf_hudLine1 = CreateHudSynchronizer();
zf_hudLine2 = CreateHudSynchronizer();
// Initialize menu handles
zf_menuSurPerkList = perk_buildSurPerkListMenu();
zf_menuZomPerkList = perk_buildZomPerkListMenu();
// Admin Commands
// [0|normal|1|randplayer|2|randteam|3|cvarteam]
RegAdminCmd("sm_zf_perk_setmode", command_zfPerkSetMode, ADMFLAG_KICK, "Sets ZF perk mode. 0 = Normal, 1 = Random per player, 2 = Random per team, 3 = CVAR per team.");
// [<surperk>]
RegAdminCmd("sm_zf_perk_setteamsurperk", command_zfPerkSetTeamSurPerk, ADMFLAG_KICK, "Sets survivor perk for CVAR per team mode.");
// [<zomperk>]
RegAdminCmd("sm_zf_perk_setteamzomperk", command_zfPerkSetTeamZomPerk, ADMFLAG_KICK, "Sets zombie perk for CVAR per team mode.");
// [all|allsur|allzom]
RegAdminCmd("sm_zf_perk_list", command_zfPerkList, ADMFLAG_KICK, "Lists current perks and status.");
// [all|allsur|allzom|<perk>]
RegAdminCmd("sm_zf_perk_enable", command_zfPerkEnable, ADMFLAG_KICK, "Enables specified perk. Changes apply on new round.");
// [all|allsur|allzom|<perk>]
RegAdminCmd("sm_zf_perk_disable", command_zfPerkDisable, ADMFLAG_KICK, "Disables specified perk. Changes apply on new round.");
// [all|allsur|allzom|<perk>] [<limit>]
RegAdminCmd("sm_zf_perk_limit", command_zfPerkLimit, ADMFLAG_KICK, "Sets limit for specified perk. -1 = Unlimited, 0 = None, >0 = Limit. Changes fully apply on new round.");
// [0|disabled|1|crippling|2|stunning]
RegAdminCmd("sm_zf_setcripple", command_zfSetCripple, ADMFLAG_KICK, "Sets Crippling backstab mode, usable by any admin. 0 = Disabled, 1 = Crippling, 2 = Stunning.");
// [0|normal|1|stun]
RegAdminCmd("sm_zf_setpowstun", command_zfSetPowStun, ADMFLAG_KICK, "Sets Pow! taunt effects, usable by any admin. 0 = 500 damage, 1 = 100 damage and 8 second stun.");
// Client Commands
// [<perk>]
AddCommandListener(hook_zfSelectPerk, "zf_perk_select");
// Register CVARS
zf_cvCripple = CreateConVar("sm_zf_cripple", "1", "0 = Crippling backstab disabled, 1 = Crippling backstab enabled, 2 = Stunning backstab enabled.", FCVAR_PLUGIN, true, 0.0, true, 2.0);
zf_cvPowStun = CreateConVar("sm_zf_powstun", "1", "0 = Pow does 500 damage, 1 = Pow does 100 damage and 8 second stun.", FCVAR_PLUGIN, true, 0.0, true, 1.0);
}
////////////////////////////////////////////////////////////
//
// Admin Command Handlers
//
///////////////////////////////////////////////////////////
public Action:command_zfPerkSetMode(client, args)
{
decl String:cmd[32];
if(args == 0)
{
//
// Display current mode.
//
ReplyToCommand(client, "Current game mode: %d", zf_perkMode);
return Plugin_Handled;
}
else if(args == 1)
{
//
// Set game mode for next round.
//
GetCmdArg(1, cmd, sizeof(cmd));
if(StrEqual(cmd, "0", false) || StrEqual(cmd, "normal", false))
{
zf_perkPendingMode = 0;
ReplyToCommand(client, "Game mode set to 0 (Normal). Changes apply on new round.");
PrintToChatAll("\x05[ZF ADMIN]\x01 Game mode set to 0 (Normal). Changes apply on new round.");
return Plugin_Handled;
}
if(StrEqual(cmd, "1", false) || StrEqual(cmd, "randplayer", false))
{
zf_perkPendingMode = 1;
ReplyToCommand(client, "Game mode set to 1 (Random perks per player). Changes apply on new round.");
PrintToChatAll("\x05[ZF ADMIN]\x01 Game mode set to 1 (Random perks per player). Changes apply on new round.");
return Plugin_Handled;
}
if(StrEqual(cmd, "2", false) || StrEqual(cmd, "randteam", false))
{
zf_perkPendingMode = 2;
ReplyToCommand(client, "Game mode set to 2 (Random perks per team). Changes apply on new round.");
PrintToChatAll("\x05[ZF ADMIN]\x01 Game mode set to 2 (Random perks per team). Changes apply on new round.");
return Plugin_Handled;
}
if(StrEqual(cmd, "3", false) || StrEqual(cmd, "cvarteam", false))
{
zf_perkPendingMode = 3;
ReplyToCommand(client, "Game mode set to 3 (CVAR perks per team). Changes apply on new round.");
PrintToChatAll("\x05[ZF ADMIN]\x01 Game mode set to 3 (CVAR perks per team). Changes apply on new round.");
return Plugin_Handled;
}
}
//
// Error in command format, display usage.
//
GetCmdArg(0, cmd, sizeof(cmd));
ReplyToCommand(client, "Usage: %s [0|normal|1|randplayer|2|randteam|3|cvarteam]", cmd);
return Plugin_Handled;
}
public Action:command_zfPerkSetTeamSurPerk(client, args)
{
decl String:cmd[32];
if(args == 1)
{
GetCmdArg(1, cmd, sizeof(cmd));
for(new i = 0; i < TOTAL_SUR_PERKS; i++)
{
if(StrEqual(cmd, ZF_SURPERK_NAME[i], false))
{
zf_perkTeamSurPerk = i;
ReplyToCommand(client, "Selected %s as survivor perk for CVAR per team mode.", ZF_SURPERK_NAME[i]);
return Plugin_Handled;
}
}
}
//
// Error in command format, display usage.
//
GetCmdArg(0, cmd, sizeof(cmd));
ReplyToCommand(client, "Usage: %s [<surperk>]", cmd);
return Plugin_Handled;
}
public Action:command_zfPerkSetTeamZomPerk(client, args)
{
decl String:cmd[32];
if(args == 1)
{
GetCmdArg(1, cmd, sizeof(cmd));
for(new i = 0; i < TOTAL_ZOM_PERKS; i++)
{
if(StrEqual(cmd, ZF_ZOMPERK_NAME[i], false))
{
zf_perkTeamZomPerk = i;
ReplyToCommand(client, "Selected %s as zombie perk for CVAR per team mode.", ZF_ZOMPERK_NAME[i]);
return Plugin_Handled;
}
}
}
//
// Error in command format, display usage.
//
GetCmdArg(0, cmd, sizeof(cmd));
ReplyToCommand(client, "Usage: %s [<zomperk>]", cmd);
return Plugin_Handled;
}
public Action:command_zfPerkList(client, args)
{
decl String:cmd[32];
if(args == 1)
{
GetCmdArg(1, cmd, sizeof(cmd));
new bool:listSur = StrEqual(cmd, "all", false) || StrEqual(cmd, "allsur", false);
new bool:listZom = StrEqual(cmd, "all", false) || StrEqual(cmd, "allzom", false);
if(listSur)
{
ReplyToCommand(client, "Survivor Perks (enabled unless specified):");
for(new i = 1; i < TOTAL_SUR_PERKS; i++)
if(surPerkEnabled(i))
ReplyToCommand(client, " > %s (Limit: %d)", ZF_SURPERK_NAME[i], zf_surPerksLimit[i]);
else
ReplyToCommand(client, " [Disabled] > %s (Limit: %d)", ZF_SURPERK_NAME[i], zf_surPerksLimit[i]);
}
if(listZom)
{
ReplyToCommand(client, "Zombie Perks (enabled unless specified):");
for(new i = 1; i < TOTAL_ZOM_PERKS; i++)
if(zomPerkEnabled(i))
ReplyToCommand(client, " > %s (Limit: %d)", ZF_ZOMPERK_NAME[i], zf_zomPerksLimit[i]);
else
ReplyToCommand(client, " [Disabled] > %s (Limit: %d)", ZF_ZOMPERK_NAME[i], zf_zomPerksLimit[i]);
}
if(listSur | listZom)
return Plugin_Handled;
}
//
// Error in command format, display usage.
//
GetCmdArg(0, cmd, sizeof(cmd));
ReplyToCommand(client, "Usage: %s [all|allsur|allzom]", cmd);
return Plugin_Handled;
}
public Action:command_zfPerkEnable(client, args)
{
command_perkUpdate(client, args, true);
return Plugin_Handled;
}
public Action:command_zfPerkDisable(client, args)
{
command_perkUpdate(client, args, false);
return Plugin_Handled;
}
public Action:command_perkUpdate(client, args, bool:doEnable)
{
decl String:cmd[32];
if(args == 1)
{
GetCmdArg(1, cmd, sizeof(cmd));
new bool:setSur = StrEqual(cmd, "all", false) || StrEqual(cmd, "allsur", false);
new bool:setZom = StrEqual(cmd, "all", false) || StrEqual(cmd, "allzom", false);
decl String:strState[16];
strState = doEnable ? "Enabled" : "Disabled";
//
// Enable/Disable groups of perks.
//
if(setSur)
{
zf_surPerksEnabled = doEnable ? 0xFFFF_FFFF : 0x0000_0001;
ReplyToCommand(client, "%s all survivor perks. Changes apply on new round.", strState);
}
if(setZom)
{
zf_zomPerksEnabled = doEnable ? 0xFFFF_FFFF : 0x0000_0001;
ReplyToCommand(client, "%s all zombie perks. Changes apply on new round.", strState);
}
if(setSur || setZom)
{
return Plugin_Handled;
}
//
// Enable/Disable single perk.
//
for(new i = 1; i < TOTAL_SUR_PERKS; i++)
{
if(StrEqual(cmd, ZF_SURPERK_NAME[i], false))
{
zf_surPerksEnabled = doEnable ? (zf_surPerksEnabled | (1 << i)) : (zf_surPerksEnabled & ~(1 << i));
ReplyToCommand(client, "%s %s. Changes apply on new round.", strState, ZF_SURPERK_NAME[i]);
return Plugin_Handled;
}
}
for(new i = 1; i < TOTAL_ZOM_PERKS; i++)
{
if(StrEqual(cmd, ZF_ZOMPERK_NAME[i], false))
{
zf_zomPerksEnabled = doEnable ? (zf_zomPerksEnabled | (1 << i)) : (zf_zomPerksEnabled & ~(1 << i));
ReplyToCommand(client, "%s %s. Changes apply on new round.", strState, ZF_ZOMPERK_NAME[i]);
return Plugin_Handled;
}
}
ReplyToCommand(client, "\"%s\" is not a valid perk!", cmd);
return Plugin_Handled;
}