-
Notifications
You must be signed in to change notification settings - Fork 3
/
APLAYER.CON
13975 lines (12974 loc) · 467 KB
/
APLAYER.CON
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
state freezecode_player
ifvare mainmenu 0
{
ifvarand CHEATBITFIELD? 32
{
ifvarg freezetimer 0 { randvar tempb 2 addvar tempb 1 subvarvar freezetimer tempb }
ifvarl freezetimer 0 setvar freezetimer 0
}
else
{
ifvarl INVULNTIME 1
{
ifvare VEHICLEID -1
{
setvar MISCARRAYID 26 getactorvar[MISCARRAYID].MISCARRAYID_AMOUNT MISCARRAYID_AMOUNTTEMP // DEATHSWITCH-DELAY
ifvarl MISCARRAYID_AMOUNTTEMP 1
{
setvarvar tempe freezing
ifvarl tempe 1 setvar tempe 1
// Checks if you're outside, inside, underwater, sitting in water, etc
ifoutside
{
ifvare WATER? 1 // 240%
{
getactor[THISACTOR].sectnum temp
getsector[temp].floorpicnum TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
getactor[THISACTOR].sectnum temp
getsector[temp].hitag TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
mulvar tempe 12
divvar tempe 5
}
}
}
else
ifvare WATER? 2 // 560%
{
getactor[THISACTOR].sectnum temp
getsector[temp].ceilingpicnum TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
getactor[THISACTOR].sectnum temp
getsector[temp].hitag TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
mulvar tempe 28
divvar tempe 5
}
}
}
else // 100%
{
mulvar tempe 5
divvar tempe 5
}
ifvarl tempe 1 setvar tempe 1
}
else
{
ifvare WATER? 1 // 240%
{
getactor[THISACTOR].sectnum temp
getsector[temp].floorpicnum TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
getactor[THISACTOR].sectnum temp
getsector[temp].hitag TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
mulvar tempe 12
divvar tempe 5
}
}
}
else
ifvare WATER? 2 // 560%
{
getactor[THISACTOR].sectnum temp
getsector[temp].ceilingpicnum TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
getactor[THISACTOR].sectnum temp
getsector[temp].hitag TEMPVAR3
ifvare TEMPVAR3 NEWFLOORPLASMA setvar tempe 0
else ifvare TEMPVAR3 HOTLAVA setvar tempe 0
else ifvare TEMPVAR3 MEGALAVA setvar tempe 0
else ifvare TEMPVAR3 ULTRALAVA setvar tempe 0
else ifvare TEMPVAR3 HYPERMAGMA setvar tempe 0
else
{
mulvar tempe 28
divvar tempe 5
}
}
}
else // 25%
{
mulvar tempe 1
divvar tempe 4
}
}
ifvarg winterclothes 0
{
setvar tempc 95
mulvarvar tempc winterclothes
divvar tempc 100
setvar tempb 100
subvarvar tempb tempc
mulvarvar tempe tempb
divvar tempe 100
}
// Character conditionals
ifvare CHARACTERSELECTED? 3
{
setvar MISCARRAYID 231 getactorvar[MISCARRAYID].MISCARRAYID_AMOUNT MISCARRAYID_AMOUNTTEMP // BUBSY-DIVINGSUIT?
ifvare MISCARRAYID_AMOUNTTEMP 1 { mulvar tempe 50 divvar tempe 100 } // -50% Ice damage w/ Diving Suit on
}
ifvare PLAYEREQUIPSLOTITEM1 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar tempe 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar tempe 10
ifvarl tempe 1
{
setvarvar RNDMIZERLIMIT freezing
ifvare PLAYEREQUIPSLOTITEM1 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar RNDMIZERLIMIT 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar RNDMIZERLIMIT 10
ifvarg winterclothes 0
{
mulvar RNDMIZERLIMIT -4 addvar RNDMIZERLIMIT 256
ifvarl RNDMIZERLIMIT 0 setvar RNDMIZERLIMIT 0 ifvarg RNDMIZERLIMIT 256 setvar RNDMIZERLIMIT 256
mulvarvar RNDMIZERLIMIT winterclothes
divvar RNDMIZERLIMIT 100
state rndmizer256
ifvarvarg RNDMIZER RNDMIZERLIMIT setvar tempe 1
else
{
setvar tempe 0
setvar RNDMIZERLIMIT 20
mulvarvar RNDMIZERLIMIT winterclothes
divvar RNDMIZERLIMIT 100
addvar RNDMIZERLIMIT 5
mulvar RNDMIZERLIMIT -1
addvar RNDMIZERLIMIT 256
ifvarl RNDMIZERLIMIT 0 setvar RNDMIZERLIMIT 0 ifvarg RNDMIZERLIMIT 256 setvar RNDMIZERLIMIT 256
state rndmizer256
ifvarvarg RNDMIZER RNDMIZERLIMIT { subvar freezetimer 1 ifvarl freezetimer 0 setvar freezetimer 0 }
}
}
else
{
mulvar RNDMIZERLIMIT -40 addvar RNDMIZERLIMIT 256
ifvarl RNDMIZERLIMIT 0 setvar RNDMIZERLIMIT 0 ifvarg RNDMIZERLIMIT 256 setvar RNDMIZERLIMIT 256
state rndmizer256
ifvarvarg RNDMIZER RNDMIZERLIMIT setvar tempe 1
else
{
setvar tempe 0
ifrnd 5 { subvar freezetimer 1 ifvarl freezetimer 0 setvar freezetimer 0 }
}
}
}
// Sound Checks dependant on Freezing Strength
ifvarg freezing 76
{
ifoutside ifvarn WATER? 2
{
soundonce WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
soundonce WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
}
}
else ifvarg freezing 40 ifvarl freezing 77
{
ifoutside ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
soundonce WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
soundonce WIND_AMBIENCE_NR4
}
else
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
}
}
else ifvarg freezing 16 ifvarl freezing 41
{
ifoutside ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
soundonce WIND_AMBIENCE_NR4
}
else
{
ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
soundonce WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
}
}
else ifvarg freezing 0 ifvarl freezing 17
{
ifoutside ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
soundonce WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifvarn WATER? 2
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
else
{
ifsound WIND_AMBIENCE_NR1 stopsound WIND_AMBIENCE_NR1
ifsound WIND_AMBIENCE_NR2 stopsound WIND_AMBIENCE_NR2
ifsound WIND_AMBIENCE_NR3 stopsound WIND_AMBIENCE_NR3
ifsound WIND_AMBIENCE_NR4 stopsound WIND_AMBIENCE_NR4
}
}
}
ifvare FROZEN? 0 addvarvar freezetimer tempe
state dealfreezedamage-player
}
}
else
{
ifvarg freezetimer 0 { randvar tempb 2 addvar tempb 1 subvarvar freezetimer tempb }
ifvarl freezetimer 0 setvar freezetimer 0
}
}
else
{
ifvarg freezetimer 0 { randvar tempb 2 addvar tempb 1 subvarvar freezetimer tempb }
ifvarl freezetimer 0 setvar freezetimer 0
}
}
}
ends
// Mantling?
define MANTDIST 384 // 480-384=96
state pythagoras
// next code gets distance between (x,y) and (hitx,hity), puts result in xydist
setvarvar temp x
setvarvar tempb hitx
subvarvar temp tempb
mulvarvar temp temp
setvarvar tempc y
setvarvar tempd hity
subvarvar tempc tempd
mulvarvar tempc tempc
addvarvar temp tempc
sqrt temp temp
setvarvar xydist temp
ends
state checkmantlesprite
ifvarn hitsprite -1
{
getactor[hitsprite].picnum picnum
ifvare picnum 3699 // special mantling sprite
ifvarl xydist MANTDIST
setvar EDGEGRAPPLING 1
}
ends
state checkwall
setvar EDGEGRAPPLING 0
// we start by checking for the dreaded slope at feet problem
getactor[THISACTOR].z z
getactor[THISACTOR].x x
getactor[THISACTOR].y y
getactor[THISACTOR].sectnum mysector
getactor[THISACTOR].ang angvar
setvar zdist 0
cos mycos angvar
sin mysin angvar
hitscan x y z mysector mycos mysin zdist hitsector hitwall hitsprite hitx hity hitz clipmask
state pythagoras
setvarvar xydist2 xydist // saves the distance
subvar z 1536
hitscan x y z mysector mycos mysin zdist hitsector hitwall2 hitsprite hitx hity hitz clipmask
state pythagoras
/*
ifvarn hitsprite -1
{
getactor[hitsprite].picnum picnum
ifvare picnum CRATE2 ifvarl xydist 844
{
setvar EDGEGRAPPLING 1 break
}
}
*/
ifvarn hitwall -1
ifvarvare hitwall hitwall2 ifvarvarg xydist xydist2 break // it's one of those slopes...
// Character Reach Z (the value determines how far the character can 'reach up' to grapple/mantle on an edge
setvarvar TEMPVAR PLAYERHEIGHT
divvar TEMPVAR 3
subvarvar z TEMPVAR
// subvar z 3072 // 1536 // now we do the first "real" hitscan
// End Character Reach Z
hitscan x y z mysector mycos mysin zdist hitsector hitwall hitsprite hitx hity hitz clipmask
state pythagoras
ifvarg xydist MANTDIST
{
subvar z 3072
hitscan x y z mysector mycos mysin zdist hitsector hitwall hitsprite hitx hity hitz clipmask
addvar z 3072
state checkmantlesprite
ifvare EDGEGRAPPLING 1 break
ifvarg xydist MANTDIST break
}
ifvarn hitsprite -1
{
state checkmantlesprite
ifvare EDGEGRAPPLING 1 break
getactor[hitsprite].cstat temp
ifvarand temp 1 nullop else break // a non-blocking sprite will prevent mantling
}
//ifvare hitwall -1 ifvarn hitsprite -1 setvarvar hitwall hitsprite // treats sprite as wall
// now a second hitscan to see whether the upper body is above the wall
subvar z 7168
hitscan x y z mysector mycos mysin zdist hitsector hitwall2 hitsprite hitx hity hitz clipmask
//ifvare hitwall2 -1 ifvarn hitsprite2 -1 setvarvar hitwall2 hitsprite2 // treats sprite as wall
state pythagoras
state checkmantlesprite
ifvare INTHEAIR? 0 setvar tempb MANTDIST else setvar tempb 256
ifvarvarg xydist tempb
ifvarvarn hitwall hitwall2
{
setvar EDGEGRAPPLING 1
}
else
{
subvar z 3072
hitscan x y z mysector mycos mysin zdist hitsector hitwall2 hitsprite hitx hity hitz clipmask
ifvarvare hitwall hitwall2 break
state pythagoras
state checkmantlesprite
ifvare EDGEGRAPPLING 1 break
ifvarl xydist MANTDIST
{
// there's still the possibility it could be a duct...
ifvarn hitsprite -1
{
getactor[hitsprite].picnum picnum
ifvare picnum BGRATE1 setvar EDGEGRAPPLING 1
ifvare picnum FANSPRITEBROKE setvar EDGEGRAPPLING 1
}
break
}
}
setvar EDGEGRAPPLING 1
ends
state edgegrabbing
ifp ponground ifvare INTHEAIR? 1 setvar INTHEAIR? 0
ifvarl EDGEGRAPPLING 0 addvar EDGEGRAPPLING 1
ifvare EDGEGRAPPLING 1 addvar EDGEGRAPPLEDELAY 1 else setvar EDGEGRAPPLEDELAY 0
ifvarn ONAWALL? 0 break
ifvarn VEHICLEID -1 break
ifvare EDGEGRAPPLING 0
{
ifvare PLAYERPULLUPSOUND? 1 setvar PLAYERPULLUPSOUND? 0
getplayer[THISACTOR].posx x
getplayer[THISACTOR].posy y
getactor[THISACTOR].z z
getplayer[THISACTOR].cursectnum mysector
getflorzofslope mysector x y mz // mz is the return var
subvarvar mz z // mz is now the distance to the ground
setvar temp 0
ifvarl mz 6144 nullop else
{
getplayer[THISACTOR].poszv temp
ifvare INTHEAIR? 1 setvar tempb 0 else setvar tempb 1536
ifvarvarg temp tempb
{
state checkwall
ifvare EDGEGRAPPLING 1
{
getplayer[THISACTOR].posz EDGEGRAPPLEZ
ifvare CHARACTERSELECTED? 1
{
stopsound DUKE_GRUNT
sound DUKE_GRUNT
}
ifvare CHARACTERSELECTED? 8
{
stopsound LISA_WALLGRAB
sound LISA_WALLGRAB
}
ifvare CHARACTERSELECTED? 15
{
stopsound MAKEN_WALLGRAB
sound MAKEN_WALLGRAB
}
wackplayer
getplayer[THISACTOR].posz z
subvar z 512
setplayer[THISACTOR].posz z
shiftvarr temp 7
addvar temp 3
setvarvar EDGEWAITTIME temp
ifvarg EDGEWAITTIME 40 setvar EDGEWAITTIME 40
}
}
}
}
ifvarg EDGEGRAPPLING 0
{
ifvare mainmenu 0
{
ifvarl INVULNTIME 1
{
ifvarn CHARACTERSELECTED? 9 // Cybanis has unlimited mantle-strength
{
setvar MISCARRAYID 26 getactorvar[MISCARRAYID].MISCARRAYID_AMOUNT MISCARRAYID_AMOUNTTEMP // DEATHSWITCH-DELAY
ifvare MISCARRAYID_AMOUNTTEMP 0
{
ifvare EDGEGRAPPLING 1 // Drain at normal rate
{
ifp ponsteroids // Triple your Mantling time if using steroids
{
setvar TEMPVAR5 334 // Base Drain rate [1000 = 1 tic]
// Character Specfic conditions [sans Cybanis]
ifvare CHARACTERSELECTED? 3
{
setvar MISCARRAYID 231 getactorvar[MISCARRAYID].MISCARRAYID_AMOUNT MISCARRAYID_AMOUNTTEMP // BUBSY-DIVINGSUIT?
ifvare MISCARRAYID_AMOUNTTEMP 1 { mulvarvar TEMPVAR5 5 divvar TEMPVAR5 4 } // +25% Drain w/ Diving Suit on
}
// Check for Power Wrist [equippable item]
setvar DAMAGEMODIFIER 1000
ifvare PLAYEREQUIPSLOTITEM1 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM2 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM3 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM4 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM5 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM6 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM7 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM8 18 subvar DAMAGEMODIFIER 125
ifvarl DAMAGEMODIFIER 0 setvar DAMAGEMODIFIER 0
mulvarvar TEMPVAR5 DAMAGEMODIFIER
divvar TEMPVAR5 1000
// Check for Jewel of Four Souls [equippable item]
ifvare PLAYEREQUIPSLOTITEM1 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar TEMPVAR5 10
subvarvar MANTLINGTIMEREXTRA TEMPVAR5
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMER 0 setvar MANTLINGTIMER 0
}
else
{
setvar TEMPVAR5 1000 // Base Drain rate [1000 = 1 tic]
// Character Specfic conditions [sans Cybanis]
ifvare CHARACTERSELECTED? 3
{
setvar MISCARRAYID 231 getactorvar[MISCARRAYID].MISCARRAYID_AMOUNT MISCARRAYID_AMOUNTTEMP // BUBSY-DIVINGSUIT?
ifvare MISCARRAYID_AMOUNTTEMP 1 { mulvarvar TEMPVAR5 5 divvar TEMPVAR5 4 } // +25% Drain w/ Diving Suit on
}
// Check for Power Wrist [equippable item]
setvar DAMAGEMODIFIER 1000
ifvare PLAYEREQUIPSLOTITEM1 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM2 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM3 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM4 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM5 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM6 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM7 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM8 18 subvar DAMAGEMODIFIER 125
ifvarl DAMAGEMODIFIER 0 setvar DAMAGEMODIFIER 0
mulvarvar TEMPVAR5 DAMAGEMODIFIER
divvar TEMPVAR5 1000
// Check for Jewel of Four Souls [equippable item]
ifvare PLAYEREQUIPSLOTITEM1 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar TEMPVAR5 10
subvarvar MANTLINGTIMEREXTRA TEMPVAR5
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMER 0 setvar MANTLINGTIMER 0
}
}
else // Drain at double rate when pulling up
{
ifvare PLAYERPULLUPSOUND? 0
{
ifvare CHARACTERSELECTED? 8
{
stopsound LISA_WALLGRAB
stopsound LISA_WALLPULLUP
sound LISA_WALLPULLUP
}
ifvare CHARACTERSELECTED? 15
{
stopsound MAKEN_WALLGRAB
stopsound MAKEN_WALLPULLUP
sound MAKEN_WALLPULLUP
}
setvar PLAYERPULLUPSOUND? 1
}
ifp ponsteroids // Triple your Mantling time if using steroids
{
setvar TEMPVAR5 500
// Check for Power Wrist [equippable item]
setvar DAMAGEMODIFIER 1000
ifvare PLAYEREQUIPSLOTITEM1 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM2 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM3 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM4 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM5 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM6 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM7 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM8 18 subvar DAMAGEMODIFIER 125
ifvarl DAMAGEMODIFIER 0 setvar DAMAGEMODIFIER 0
mulvarvar TEMPVAR5 DAMAGEMODIFIER
divvar TEMPVAR5 1000
// Check for Jewel of Four Souls [equippable item]
ifvare PLAYEREQUIPSLOTITEM1 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar TEMPVAR5 10
subvarvar MANTLINGTIMEREXTRA TEMPVAR5
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMER 0 setvar MANTLINGTIMER 0
}
else
{
setvar TEMPVAR5 1500
// Check for Power Wrist [equippable item]
setvar DAMAGEMODIFIER 1000
ifvare PLAYEREQUIPSLOTITEM1 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM2 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM3 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM4 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM5 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM6 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM7 18 subvar DAMAGEMODIFIER 125
ifvare PLAYEREQUIPSLOTITEM8 18 subvar DAMAGEMODIFIER 125
ifvarl DAMAGEMODIFIER 0 setvar DAMAGEMODIFIER 0
mulvarvar TEMPVAR5 DAMAGEMODIFIER
divvar TEMPVAR5 1000
// Check for Jewel of Four Souls [equippable item]
ifvare PLAYEREQUIPSLOTITEM1 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM2 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM3 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM4 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM5 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM6 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM7 28 divvar TEMPVAR5 10
ifvare PLAYEREQUIPSLOTITEM8 28 divvar TEMPVAR5 10
subvarvar MANTLINGTIMEREXTRA TEMPVAR5
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMEREXTRA 1
{
subvar MANTLINGTIMER 1
addvar MANTLINGTIMEREXTRA 1000
}
ifvarl MANTLINGTIMER 0 setvar MANTLINGTIMER 0
}
}
}
}
else
{
setvarvar tempc MANTLINGTIMERMAX
subvarvar tempc 1
setvarvar MANTLINGTIMER tempc
}
}
else
{
ifvarvare MANTLINGTIMER MANTLINGTIMERMAX
{
setvarvar tempc MANTLINGTIMERMAX
subvarvar tempc 1
setvarvar MANTLINGTIMER tempc
}
}
}
ifvare EDGEGRAPPLING 1 // hanging there, possibly strafing
{
setplayer[THISACTOR].falling_counter 0
getplayer[THISACTOR].posxv xvel
ifvare CHARACTERSELECTED? 1 mulvar xvel 75
ifvare CHARACTERSELECTED? 2 mulvar xvel 63
ifvare CHARACTERSELECTED? 3 mulvar xvel 88
ifvare CHARACTERSELECTED? 4 mulvar xvel 38
ifvare CHARACTERSELECTED? 5 mulvar xvel 91
ifvare CHARACTERSELECTED? 6 mulvar xvel 69
ifvare CHARACTERSELECTED? 7 mulvar xvel 66
ifvare CHARACTERSELECTED? 8 mulvar xvel 58 // 40
ifvare CHARACTERSELECTED? 9 mulvar xvel 81
ifvare CHARACTERSELECTED? 10 mulvar xvel 53
ifvare CHARACTERSELECTED? 11 mulvar xvel 47
ifvare CHARACTERSELECTED? 12 mulvar xvel 71
ifvare CHARACTERSELECTED? 13 mulvar xvel 78
ifvare CHARACTERSELECTED? 14 mulvar xvel 94
ifvare CHARACTERSELECTED? 15 mulvar xvel 44
divvar xvel 100
setplayer[THISACTOR].posxv xvel
getplayer[THISACTOR].posyv yvel
ifvare CHARACTERSELECTED? 1 mulvar yvel 75
ifvare CHARACTERSELECTED? 2 mulvar yvel 63
ifvare CHARACTERSELECTED? 3 mulvar yvel 88
ifvare CHARACTERSELECTED? 4 mulvar yvel 38
ifvare CHARACTERSELECTED? 5 mulvar yvel 91
ifvare CHARACTERSELECTED? 6 mulvar yvel 69
ifvare CHARACTERSELECTED? 7 mulvar yvel 66
ifvare CHARACTERSELECTED? 8 mulvar yvel 58 // 40
ifvare CHARACTERSELECTED? 9 mulvar yvel 81
ifvare CHARACTERSELECTED? 10 mulvar yvel 53
ifvare CHARACTERSELECTED? 11 mulvar yvel 47
ifvare CHARACTERSELECTED? 12 mulvar yvel 71
ifvare CHARACTERSELECTED? 13 mulvar yvel 78
ifvare CHARACTERSELECTED? 14 mulvar yvel 94
ifvare CHARACTERSELECTED? 15 mulvar yvel 44
divvar yvel 100
setplayer[THISACTOR].posyv yvel
setplayer[THISACTOR].posz EDGEGRAPPLEZ
setplayer[THISACTOR].poszv 0
state checkwall
}
else
{
ifvare CHARACTERSELECTED? 1 setplayer[THISACTOR].poszv -1536
ifvare CHARACTERSELECTED? 2 setplayer[THISACTOR].poszv -1280
ifvare CHARACTERSELECTED? 3 setplayer[THISACTOR].poszv -1792
ifvare CHARACTERSELECTED? 4 setplayer[THISACTOR].poszv -768
ifvare CHARACTERSELECTED? 5 setplayer[THISACTOR].poszv -1856
ifvare CHARACTERSELECTED? 6 setplayer[THISACTOR].poszv -1408
ifvare CHARACTERSELECTED? 7 setplayer[THISACTOR].poszv -1344
ifvare CHARACTERSELECTED? 8 setplayer[THISACTOR].poszv -1212 // -832
ifvare CHARACTERSELECTED? 9 setplayer[THISACTOR].poszv -1664
ifvare CHARACTERSELECTED? 10 setplayer[THISACTOR].poszv -1088
ifvare CHARACTERSELECTED? 11 setplayer[THISACTOR].poszv -960
ifvare CHARACTERSELECTED? 12 setplayer[THISACTOR].poszv -1472
ifvare CHARACTERSELECTED? 13 setplayer[THISACTOR].poszv -1600
ifvare CHARACTERSELECTED? 14 setplayer[THISACTOR].poszv -1920
ifvare CHARACTERSELECTED? 15 setplayer[THISACTOR].poszv -896
getplayer[THISACTOR].ang angvar
cos xvel angvar
sin yvel angvar
mulvar xvel 64
mulvar yvel 64
setplayer[THISACTOR].posxv xvel
setplayer[THISACTOR].posyv yvel
getactor[THISACTOR].z z
getactor[THISACTOR].x x
getactor[THISACTOR].y y
getactor[THISACTOR].sectnum mysector
getactor[THISACTOR].ang angvar
setvar zdist 0
cos mycos angvar
sin mysin angvar
hitscan x y z mysector mycos mysin zdist hitsector hitwall hitsprite hitx hity hitz clipmask
state pythagoras
ifvarg xydist 384 setvar EDGEGRAPPLING -10
addvar EDGEGRAPPLING 1
ifvarg EDGEGRAPPLING 20 setvar EDGEGRAPPLING -10
}
}
ends
state checkhitscan
getplayer[THISACTOR].posx x
getplayer[THISACTOR].posy y
getplayer[THISACTOR].posz z
getplayer[THISACTOR].cursectnum mysector
getplayer[THISACTOR].ang angvar
getplayer[THISACTOR].horiz zdist2
subvar zdist2 100
mulvar zdist2 -2048
cos mycos angvar
sin mysin angvar
hitscan x y z mysector mycos mysin zdist2 hitsector hitwall hitsprite hitx hity hitz clipmask
updatesector hitx hity hitsector
ends
state falling
ifvarg fallcounter -1 ifvarl fallcounter 47 state stopfallscreams
ifvare fallcounter 47
{
ifvare oldskoolmode 0
{
redefinequote 242 ^21YOU'RE FALLING WAY TOO FAR!!
setvarvar fta fta_normal setvar ftq 242
}
ifvarg CURRENTHITPOINTS 0 // ifp palive
{
ifvare CHARACTERSELECTED? 1 globalsound DUKE_SCREAM2
else ifvare CHARACTERSELECTED? 2 globalsound JACK_FALLSCREAM
else ifvare CHARACTERSELECTED? 5 globalsound WANG_SCREAM
else ifvare CHARACTERSELECTED? 6 globalsound ESSENCE_FALLSCREAM
else ifvare CHARACTERSELECTED? 8 globalsound LISA_FALLSCREAM
else ifvare CHARACTERSELECTED? 9 globalsound CYBANIS_FALLSCREAM
else ifvare CHARACTERSELECTED? 15 globalsound MAKEN_FALLSCREAM
else globalsound DUKE_SCREAM2
}
else ifp pdead state stopfallscreams
}
ifvarg fallcounter 60
{
setvar FALLSOUND? 1
ifvarl fallcounter2 63 addvar fallcounter2 1
setvar fallcounter 60
setplayer[THISACTOR].falling_counter fallcounter
}
ifvarg fallcounter 8
{
setvar FALLSOUND? 1
setvarvar totalfallcounter fallcounter
addvarvar totalfallcounter fallcounter2
ifp ponground nullop else setvarvar rfallcounter fallcounter
}
ifvarl fallcounts 0 ifvarg fallcounter 0 // each count shaves off 2 fallcounter tics
{
setplayer[THISACTOR].falling_counter 0
addvar fallcounts 1
resetcount
}
ends
state lockplayerhealthfloors
state stoppainsounds
ends
state playerregen5percenthp
addvarvar CURRENTHITPOINTS PLAYERREGENAMOUNT2
ifvarn player[THISACTOR].over_shoulder_on 0
{
ifvarg PLAYERREGENAMOUNT2 0
{
setvarvar SHOWDAMAGE PLAYERREGENAMOUNT2
setvar SHOWDAMAGETYPE 3
setvarvar SHOWDAMAGEACTORID THISACTOR
state showdamage
}
}
ifvarvarg CURRENTHITPOINTS STATLIMITATOMIC setvarvar CURRENTHITPOINTS STATLIMITATOMIC
ifvarvarg CURRENTHITPOINTS MAXHITPOINTSATOMIC setvarvar CURRENTHITPOINTS MAXHITPOINTSATOMIC
ifvarvarl CURRENTHITPOINTS STATLIMITATOMIC sound REGEN_HEALTH5 setvar PLAYERHPDAMAGED? -1
ends
state playerregen5percentap
addvarvar PLAYERAPREGENAMOUNT PLAYERAPREGENAMOUNT2
ifvarn player[THISACTOR].over_shoulder_on 0
{
ifvarg PLAYERAPREGENAMOUNT2 0
{
setvarvar SHOWDAMAGE PLAYERAPREGENAMOUNT2
setvar SHOWDAMAGETYPE 4
setvarvar SHOWDAMAGEACTORID THISACTOR
state showdamage
}
}
ifvarvarg PLAYERAPREGENAMOUNT STATLIMITATOMIC setvarvar PLAYERAPREGENAMOUNT STATLIMITATOMIC
ifvarvarg PLAYERAPREGENAMOUNT MAXARMORPOINTSATOMIC setvarvar PLAYERAPREGENAMOUNT MAXARMORPOINTSATOMIC
ifvarvarl PLAYERAPREGENAMOUNT STATLIMITATOMIC sound REGEN_ARMOR5 setvar PLAYERAPDAMAGED? -1
setvarvar CURRENTARMORPOINTS PLAYERAPREGENAMOUNT
ends
state determineregenrates // affects how regeneration speed for HP and EP works.
ifvarn TEMPVAR8 1 ifp ponsteroids mulvar TEMPMOD 4 // Steroids = 400% Speed
ifvarand PLAYERSTATUS? 2 { mulvar TEMPMOD 1250 divvar TEMPMOD 1000 } // Haste = 125% Speed
ifvarand PLAYERSTATUS? 4 { mulvar TEMPMOD 750 divvar TEMPMOD 1000 } // Slow = 75% Speed
// Defending
ifvare DEFENSEMODE? 1
{
ifvare TEMPVAR8 0 // HP Regen
{
ifvarand PLAYERSTATUS? 8 { mulvar TEMPMOD 750 divvar TEMPMOD 1000 } // Defend Mode = 75% Speed if Poisoned
else { mulvar TEMPMOD 1333 divvar TEMPMOD 1000 } // Defend Mode = 133% Speed
}
ifvare TEMPVAR8 2 // EP Regen
{
ifvarand PLAYERSTATUS? 32768 { mulvar TEMPMOD 750 divvar TEMPMOD 1000 } // Defend Mode = 75% Speed if Mindblown
else { mulvar TEMPMOD 1333 divvar TEMPMOD 1000 } // Defend Mode = 133% Speed
}
}
// In a Vehicle
ifvarn VEHICLEID -1
{
ifvarg VEHICLETYPE -1 ifvarl VEHICLETYPE 3
{
ifvare TEMPVAR8 0 // HP Regen
{
ifvarand PLAYERSTATUS? 8 { mulvar TEMPMOD 714 divvar TEMPMOD 1000 } // 71.4% speed if Poisoned
else { mulvar TEMPMOD 1400 divvar TEMPMOD 1000 } // using a Riot Tank will put a character at rest, giving a 40% bonus to regen speeds
}
ifvare TEMPVAR8 2 // AP Regen
{
ifvarand PLAYERSTATUS? 32768 { mulvar TEMPMOD 714 divvar TEMPMOD 1000 } // 71.4% speed if Mindblown
else { mulvar TEMPMOD 1400 divvar TEMPMOD 1000 } // using a Riot Tank will put a character at rest, giving a 40% bonus to regen speeds
}
}
}
else // NOT in a Vehicle
{
ifvarand bits 536870912 ifvarand extbits 12 // "Focusing" EP
{
ifvare TEMPVAR8 2 // EP Regen
{
mulvar TEMPMOD 4
}
}
ifvarand bits 1 // Jump
{
ifp ponground
{
ifvare TEMPVAR8 0 // HP Regen
{
ifvarand PLAYERSTATUS? 8 { mulvar TEMPMOD 2500 divvar TEMPMOD 1000 } // 250% speed if Poisoned
else { mulvar TEMPMOD 400 divvar TEMPMOD 1000 }