Subversion Repositories nw_plus

Rev

Rev 7 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 h266 1
/*
2
--------------------------------------------------------------------------------
3
Duke: Nuclear Winter
4
By Joris Weimar
5
© 1997 Simply Silly Software
6
--------------------------------------------------------------------------------
7
Duke: Nuclear Winter Plus
8
By Hendricks266
9
--------------------------------------------------------------------------------
10
*/
11
 
12
state snowmangrowcode
13
  ifcount 32
14
  {
15
    addkills 1
16
    sound SQUISH2
17
    sound PIPEBOMB_EXPLODE
18
    hitradius 2048 60 70 80 90
19
    debris SCRAP3 40
20
    debris SCRAP3 40
21
    debris SCRAP3 40
22
    debris SCRAP3 40
23
    killit
24
  }
25
  else
26
  {
27
      sizeto MAXXSTRETCH MAXYSTRETCH
28
    break
29
  }
30
ends
31
 
32
move SNOWBALLSPEED1 750 100
33
move SNOWBALLUP 0 -2000
34
 
35
action SNOWBALL1 0 1 1 1 1
36
 
37
ai AISNOWBALL1 SNOWBALL1 SNOWBALLSPEED1 geth getv
38
ai AISNOWBALLUP SNOWBALL1 SNOWBALLUP geth getv
39
 
40
useractor notenemy SNOWBALL 0 SNOWBALL1
41
   state checksquished
42
 
43
   ifai 0
44
     {
45
       sizeat 1 1
46
       cstat 32768
47
       clipdist 0
48
       ai AISNOWBALLUP
49
     }
50
   ifai AISNOWBALLUP
51
     {
52
       ifcount 1
53
         {
54
           ai AISNOWBALL1
55
           cstat 257
56
           clipdist 32
57
           sizeat 30 30
58
         }
59
       else break
60
    }
61
 
62
   ifai AISNOWBALL1
63
     {
64
       ifpdistl 1024
65
         {
66
           getplayer[THISACTOR].i temp
67
           setactor[temp].htextra SNOWBALLAMOUNT
68
           setactor[temp].htpicnum SNOWBALL
69
          // addphealth SNOWBALLAMOUNT
70
           debris SCRAP3 5
71
           globalsound DUKE_GRUNT
72
           state headhitstate
73
           palfrom 15 15 15
74
           killit
75
         }
76
       iffloordistl 10
77
         {
78
           debris SCRAP3 5
79
           killit
80
         }
81
     }
82
   ifcount 30 killit
83
enda
84
 
85
action ASNOWMANIDLE 26 3 5 1 20
86
action ASNOWMANATTACK 11 3 5 1 30
87
action ASNOWMANDIE 5 5 1 1 10
88
action ASNOWMANDEAD 10 1 1
89
action ASNOWMANFROZEN 0 1 5 1 1
90
 
91
move SNOWMANSPEED
92
 
93
ai AISNOWFOLLOW ASNOWMANIDLE SNOWMANSPEED faceplayerslow
94
ai AISNOWATTACK ASNOWMANATTACK SNOWMANSPEED faceplayer
95
ai AISNOWMANSHRINK ASNOWMANIDLE SNOWMANSPEED geth getv
96
ai AISNOWMANGROW ASNOWMANIDLE SNOWMANSPEED geth getv
97
ai AISNOWMANDYING ASNOWMANDIE SNOWMANSPEED geth getv
98
 
99
state snowmanidlestate
100
   ifcansee
101
     ifpdistl 8192
102
       {
103
         ai AISNOWATTACK
104
         break
105
       }
106
ends
107
 
108
state snowmandyingstate
109
   ifactioncount 5 action ASNOWMANDEAD
110
ends
111
 
112
state snowmanattackstate
113
   ifcount 15 nullop else ifcount 14 spawn SNOWBALL
114
   ifactioncount 3
115
     {
116
       resetcount
117
       ifpdistl 8192 resetactioncount else ai AISNOWFOLLOW
118
     }
119
ends
120
 
121
state snowmanshrinkstate
122
  ifcount SHRUNKDONECOUNT
123
    ai AISNOWFOLLOW
124
  else
125
    ifcount SHRUNKCOUNT
126
      sizeto 42 36
127
  else
128
    state genericshrunkcode
129
ends
130
 
131
state snowmanhitstate
132
 
133
  ifdead
134
  {
135
  //  debris SCRAP3 40
136
  //  debris SCRAP3 40
137
    debris SCRAP3 20
138
 
139
    ifwasweapon GROWSPARK
140
    {
141
      sound ACTOR_GROWING
142
      ai AISNOWMANGROW
143
      break
144
    }
145
 
146
    addkills 1
147
 
148
    ifwasweapon FREEZEBLAST
149
    {
150
      sound SOMETHINGFROZE
151
      spritepal 1
152
      move 0
153
      action ASNOWMANFROZEN
154
      strength 0
155
      break
156
    }
157
    ifwasweapon RADIUSEXPLOSION
158
    {
159
      debris SCRAP3 40
160
      killit
161
    }
162
    else
163
      ifwasweapon RPG
164
    {
165
      debris SCRAP3 20
166
      killit
167
    }
168
    else
169
    {
170
      cstat 0
171
      ai AISNOWMANDYING
172
    }
173
 
174
  }
175
  else
176
  {
177
   debris SCRAP3 20
178
   ifwasweapon SHRINKSPARK
179
    {
180
      sound ACTOR_SHRINKING
181
      ai AISNOWMANSHRINK
182
    }
183
    else
184
      ifwasweapon GROWSPARK
185
        sound EXPANDERHIT
186
  }
187
ends
188
 
189
 
190
useractor enemy SNOWMAN SNOWMANSTRENGTH ASNOWMANIDLE
191
   fall
192
 
193
   ifaction ASNOWMANDEAD
194
     {
195
  ifrespawn
196
    {
197
    ifcount RESPAWNACTORTIME
198
      {
199
      spawn TRANSPORTERSTAR
200
      cstat 257
201
      strength SNOWMANSTRENGTH
202
      ai AISNOWFOLLOW
203
      }
204
    }
205
    else
206
    {
207
    strength 0
208
    ifhitweapon
209
      {
210
      ifwasweapon RADIUSEXPLOSION
211
        {
212
     //  debris SCRAP3 40
213
     //  debris SCRAP3 40
214
        debris SCRAP3 20
215
        killit
216
        }
217
      }
218
    }
219
  break
220
  }
221
  else
222
ifaction ASNOWMANFROZEN
223
  {
224
  ifcount THAWTIME
225
    {
226
    ai AISNOWFOLLOW
227
    getlastpal
228
    }
229
    else
230
    ifcount FROZENDRIPTIME
231
      ifrnd 8
232
       spawn WATERDRIP
233
 
234
  ifhitweapon
235
    {
236
    ifwasweapon FREEZEBLAST
237
      {
238
      strength 0
239
      break
240
      }
241
  addkills 1
242
  lotsofglass 30
243
  ifrnd 84 debris SCRAP3 10
244
  sound GLASS_BREAKING
245
  killit
246
  }
247
  ifp pfacing
248
    ifpdistl FROZENQUICKKICKDIST
249
      pkick
250
  break
251
  }
252
 
253
ifai AISNOWMANSHRINK
254
  {
255
  state snowmanshrinkstate
256
  break
257
  }
258
 
259
 
260
ifhitweapon state snowmanhitstate
261
 
262
ifp pdead break
263
 
264
ifai 0
265
  {
266
  ai AISNOWFOLLOW
267
  sizeat 42 36
268
  clipdist 32
269
  cstat 257
270
  }
271
 
272
      ifai AISNOWMANDYING state snowmandyingstate
273
 else ifai AISNOWMANGROW state genericgrowcode
274
 else ifai AISNOWFOLLOW state snowmanidlestate
275
 else ifai AISNOWATTACK state snowmanattackstate
276
enda
277
 
278
move botshrunkspeed   50
279
move botsteroidspeed  400
280
move botstopped
281
move botfall          0 -38
282
move bothardfall      0
283
move botflyupspeed    200 -140
284
move botflydownspeed  200 -38
285
move botflyspeed      200 // -38
286
move botdodgespeedfly 250 -140
287
move botdodgespeeddownfly 250 140
288
 
289
action ABOTFLY        0  1 5 1 13
290
action ABOTFLYDYING   65 5 1 1 18
291
action ABOTFLYDIEBACK 69 5 1 -1 18
292
action ABOTFLYDEAD    65 1 1 1 1
293
action ABOTFLYFROZEN  0 1 5 1 1
294
 
295
ai AIBOTFLYUP ABOTFLY botflyupspeed faceplayer
296
ai AIBOTFLYDOWN ABOTFLY botflydownspeed faceplayer
297
ai AIBOTFLYSEEKUP ABOTFLY botflyupspeed geth seekplayer randomangle
298
ai AIBOTFLYSEEKDOWN ABOTFLY botflydownspeed geth seekplayer randomangle
299
ai AIBOTFLYDODGEUP ABOTFLY botdodgespeedfly fleeenemy randomangle
300
ai AIBOTFLYDODGEDOWN ABOTFLY botdodgespeeddownfly fleeenemy randomangle
301
ai AIBOTFLYNOTMOVING
302
ai AIBOTFLYCAMPING ABOTFLY botstopped faceplayer
303
ai AIBOTFLYDYING ABOTFLYDYING botstopped faceplayer
304
ai AIFLYWAIT ABOTFLY botstopped faceplayer
305
ai AIFLYUPMOMENT ABOTFLY botflyupspeed faceplayer
306
ai AIFLYUPHOLD ABOTFLY botflyupspeed faceplayer
307
ai AIBOTFLYSTRAIGHT ABOTFLY botflyspeed geth getv
308
ai AIBOTFLYGROW ABOTFLY botstopped geth getv
309
ai AIBOTFLYSHRINK ABOTFLY botshrunkspeed fleeenemy
310
ai AIBOTFLYSTEROIDS ABOTFLY botsteroidspeed randomangle
311
ai AIBOTFLYFLEE ABOTFLY botflyspeed randomangle
312
 
313
action ABOTWALK   10 4 5 1 13
314
action ABOTWALK1  10 1 5 1 13
315
action ABOTWALKGO 10 4 5 1 13
316
action ABOTKICK   10 2 5 1 25
317
action ABOTCRAWL  55 3 5 1 13
318
action ABOTJUMPUP 40 2 5 1 13
319
action ABOTFALL   50 1 5 1 1
320
action ABOTWDYING 70 5 1 1 18
321
action ABOTWDEAD  75 1 1 1 1
322
action ABOTWALKDIEBACK 74 5 1 -1 18
323
action ABOTWALKFROZEN  0 1 5 1 1
324
 
325
move   botwalkspeed  250
326
move   botjumpspeed  250 -115
327
move   botjumpdspeed 250 150
328
move   botcrawlspeed 0
329
move   botfallspeed  250 100
330
 
331
ai AIBOTWALKKICK ABOTKICK botstopped faceplayer
332
ai AIBOTWALKHUNT ABOTWALK botwalkspeed faceplayer
333
ai AIBOTWALKSEEK ABOTWALK botwalkspeed seekplayer
334
ai AIBOTWALKSEEK2
335
ai AIBOTWALKCAMPING ABOTWALK botstopped faceplayersmart
336
ai AIBOTWALKSTRJUMP1 ABOTJUMPUP botjumpspeed geth getv
337
ai AIBOTWALKSTRJUMP2 ABOTFALL   botjumpdspeed geth getv
338
ai AIBOTWALKSTRJUMP1S ABOTJUMPUP botjumpspeed faceplayer
339
ai AIBOTWALKSTRJUMP2S ABOTFALL   botjumpdspeed faceplayer
340
ai AIBOTWALKJUMP1 ABOTJUMPUP botjumpspeed faceplayer
341
ai AIBOTWALKJUMP2 ABOTFALL   botjumpdspeed faceplayer
342
ai AIBOTWALKDYING ABOTWDYING botstopped faceplayer
343
ai AIWALKFALL     ABOTFALL   botstopped faceplayer
344
ai AIWALKFALLHARD ABOTFALL   botstopped faceplayer
345
ai AIBOTWALKSTRAIGHT ABOTWALK botwalkspeed geth getv
346
ai AIBOTWALKGROW ABOTWALK1 botstopped geth getv
347
ai AIBOTWALKSHRINK ABOTWALK botshrunkspeed fleeenemy
348
ai AIBOTWALKSTEROIDS ABOTWALK botsteroidspeed randomangle
349
ai AIBOTWALKFLEE ABOTWALK botwalkspeed randomangle
350
ai AIBOTLETFALL ABOTFALL botfallspeed getv geth
351
ai AIBOTWALKNOTMOVING
352
ai AIWALKWAIT ABOTWALK botstopped faceplayer
353
 
354
state miniboss
355
 
356
   sound SANTA_TRASH1
357
 
358
   spawn EXPLOSION2
359
   spawn EXPLOSION2
360
   spawn PIGCOP
361
   spawn PIGCOP
362
 
363
ends
364
 
365
 
366
 
367
state stomphisfreakingass
368
 
369
ifp pdead nullop
370
  else
371
  {
372
  ifpdistl SQUISHABLEDISTANCE
373
    {
374
    addphealth -1000
375
    sound SQUISH2
376
//    state standard_pjibs
377
    state standard_pjibs
378
    sound SANTA_TRASH9
379
    }
380
  }
381
 
382
ends
383
 
384
 
385
state botchangeweaponstate
386
 
387
ifspritepal 0 nullop else break
388
 
389
resetcount
390
 
391
ifspritepal 0
392
  {
393
  ifpdistl 4096
394
    {
395
    ifrnd 128
396
      spritepal 3
397
      else
398
      spritepal 9
399
    }
400
    else
401
    {
402
    ifrnd 128
403
      spritepal 3
404
    }
405
  }
406
  else
407
ifspritepal 3
408
  {
409
  ifpdistg 4096
410
    {
411
    ifrnd 128
412
      spritepal 0
413
      else
414
      spritepal 9
415
    }
416
    else
417
    {
418
    ifrnd 128
419
      spritepal 9
420
    }
421
  }
422
  else
423
ifspritepal 9
424
  {
425
  ifpdistg 4096
426
    {
427
    ifrnd 128
428
      spritepal 0
429
      else
430
      spritepal 3
431
    }
432
    else
433
    {
434
    ifrnd 128
435
      spritepal 9
436
    }
437
  }
438
 
439
sound SELECT_WEAPON
440
 
441
ends
442
 
443
state botquickshootstate
444
 
445
ifspritepal 0 nullop else break
446
 
447
ifp pshrunk break
448
ifp pdead break
449
 
450
ifspritepal 0
451
  {
452
  shoot RPG sound RPG_SHOOT
453
  }
454
  else
455
ifspritepal 3
456
  {
457
  shoot CHAINGUN sound CHAINGUN_FIRE
458
  }
459
  else
460
ifspritepal 9
461
  {
462
//  shoot SHRINKER sound SHRINKER_FIRE
463
  shoot SHOTGUN sound SHOTGUN_FIRE
464
  }
465
 
466
ends
467
 
468
 
469
state botshootstate
470
 
471
ifspritepal 0 nullop else break // ifcanshoottarget nullop // ifcanseetarget nullop
472
 
473
ifp pdead break
474
ifp pshrunk break
475
 
476
ifspritepal 0
477
  {
478
  ifcount 5
479
    {
480
    ifactioncount 5
481
      {
482
      resetactioncount
483
      shoot RPG
484
      sound RPG_SHOOT
485
      }
486
 
487
    ifpdistl 4096
488
      {
489
      ifrnd 5
490
        state botchangeweaponstate
491
      }
492
    }
493
  }
494
  else
495
ifspritepal 3
496
  {
497
  ifcount 5
498
    {
499
    ifactioncount 1
500
      {
501
      resetactioncount
502
      shoot SHOTSPARK1 shoot CHAINGUN shoot CHAINGUN shoot CHAINGUN
503
      sound CHAINGUN_FIRE
504
      }
505
    ifrnd 1 state botchangeweaponstate
506
    }
507
  }
508
  else
509
ifspritepal 9
510
  {
511
  ifcount 5
512
    {
513
    ifactioncount 5
514
      {
515
      resetactioncount
516
//      shoot SHRINKER
517
//      sound SHRINKER_FIRE
518
      shoot SHOTGUN
519
      sound SHOTGUN_FIRE
520
      }
521
    ifp ponsteroids
522
      {
523
      ifrnd 64
524
        state botchangeweaponstate
525
      }
526
    ifrnd 1 state botchangeweaponstate
527
    }
528
  }
529
 
530
 
531
 
532
ends
533
 
534
state dudehurt
535
 
536
/*
537
        ifstrength YELLHURTSOUNDSTRENGTHMP
538
        {
539
          ifrnd 64
540
            sound SANTA_GOTHIT
541
          else
542
            ifrnd 64
543
              sound SANTA_DEAD
544
          else
545
            ifrnd 64
546
              sound SANTA_TRASH6
547
          else
548
            sound SANTA_TRASH8
549
        }
550
        else
551
        {
552
          ifrnd 64
553
            sound SANTA_GOTHIT
554
          else ifrnd 64
555
            sound SANTA_DEAD
556
          else ifrnd 64
557
            sound SANTA_TRASH6
558
          else
559
            sound SANTA_TRASH8
560
        }
561
*/
562
 
563
        ifrnd 80
564
          sound SANTA_GOTHIT
565
ends
566
 
567
state dukehurt
568
 
569
        ifrnd 80
570
          sound SANTA_GOTHIT
571
/*
572
 
573
        ifphealthl YELLHURTSOUNDSTRENGTHMP
574
        {
575
          ifrnd 64
576
            sound DUKE_LONGTERM_PAIN2
577
          else
578
            ifrnd 64
579
              sound DUKE_LONGTERM_PAIN3
580
          else
581
            ifrnd 64
582
              sound DUKE_LONGTERM_PAIN4
583
          else
584
            sound DUKE_DEAD
585
        }
586
        else
587
        {
588
          ifrnd 64
589
            sound DUKE_LONGTERM_PAIN5
590
          else ifrnd 64
591
            sound DUKE_LONGTERM_PAIN6
592
          else ifrnd 64
593
            sound DUKE_LONGTERM_PAIN7
594
          else
595
            sound DUKE_LONGTERM_PAIN8
596
        }
597
*/
598
ends
599
 
600
 
601
// WALK STATES
602
 
603
state botwalkhitstate
604
 
605
state botshootstate
606
 
607
// spawn BLOOD
608
 
609
ifdead
610
  {
611
  ifspritepal 21 { state miniboss break } else soundonce SANTA_DEAD
612
 
613
  ifwasweapon FREEZEBLAST
614
    {
615
      spritepal 1
616
      strength 0
617
      move 0
618
      action ABOTWALKFROZEN
619
      sound SOMETHINGFROZE
620
      break
621
    }
622
    else
623
  ifwasweapon GROWSPARK
624
    {
625
      cstat 0
626
      sound ACTOR_GROWING
627
      ai AIBOTWALKGROW
628
      break
629
    }
630
    else
631
  ifwasweapon RADIUSEXPLOSION
632
    {
633
//      state standard_pjibs
634
//      state standard_pjibs
635
//      state standard_pjibs
636
      state standard_pjibs
637
      sound SQUISH2
638
      addkills 1
639
      endofgame 52
640
      killit
641
    }
642
    else
643
  ifwasweapon RPG
644
    {
645
//      state standard_pjibs
646
//      state standard_pjibs
647
//      state standard_pjibs
648
      state standard_pjibs
649
      sound SQUISH2
650
      addkills 1
651
      endofgame 52
652
      killit
653
    }
654
    else
655
    {
656
      ai AIBOTWALKDYING
657
      break
658
    }
659
   }
660
  else
661
  {
662
  state dudehurt
663
 
664
  ifwasweapon SHRINKSPARK
665
    {
666
      ifai AIBOTWALKSTEROIDS nullop else
667
       {
668
         ai AIBOTWALKSHRINK
669
         break
670
       }
671
    }
672
  }
673
 
674
ends
675
 
676
state botwalkdyingstate
677
  fall
678
  strength 0
679
 
680
  ifactioncount 5
681
    {
682
      action ABOTWDEAD
683
      endofgame 52
684
      killit
685
    }
686
ends
687
 
688
state botwalkseekstate
689
 
690
ifcansee
691
  {
692
    ai AIBOTWALKHUNT
693
    break
694
  }
695
 
696
ifgapzl 100
697
  {
698
  }
699
  else
700
  {
701
  ifnotmoving
702
    {
703
    ifrnd 4 operate
704
    ifpdistl 8000
705
      {
706
      ai AIFLYUPMOMENT
707
      cactor SOBBOTFLY
708
      break
709
      }
710
      else
711
      ai AIBOTWALKJUMP1
712
    break
713
    }
714
  }
715
 
716
ends
717
 
718
state botwalkjumpstate
719
 
720
ifrnd 4
721
  ifpdistl 6000
722
    state botquickshootstate
723
 
724
ifai AIBOTWALKJUMP1
725
  {
726
  ifactioncount 2
727
    {
728
    ai AIBOTWALKJUMP2
729
    break
730
    }
731
  }
732
 
733
ifai AIBOTWALKJUMP2
734
  {
735
  ifactioncount 1
736
    {
737
    state botshootstate
738
    iffloordistl 16
739
      {
740
      sound DUKE_LAND
741
      operate
742
      ai AIBOTWALKHUNT
743
      }
744
    }
745
  }
746
 
747
ends
748
 
749
state botwalkhuntstate
750
 
751
state botshootstate
752
 
753
ifrnd 3
754
  {
755
  ai AIBOTWALKSTRJUMP1S
756
  count 10
757
  }
758
 
759
ifcansee
760
  {
761
  ifpdistl 1024
762
    {
763
    ifrnd 24
764
      {
765
      ifp pdead
766
        nullop
767
        else
768
        ai AIBOTWALKKICK
769
      break
770
      }
771
    }
772
  }
773
  else
774
  {
775
  ifphealthl 50
776
    ifrnd 64
777
      ifpdistl 8000
778
        {
779
          ifrnd 80
780
            sound SANTA_TRASH1
781
        }
782
 
783
  ifrnd 128
784
    {
785
    ifp phigher
786
      {
787
      ai AIFLYUPMOMENT
788
      cactor SOBBOTFLY
789
      break
790
      }
791
      else
792
      {
793
      ai AIBOTWALKSTRAIGHT
794
      break
795
      }
796
    }
797
    else
798
    {
799
    ai AIBOTWALKSTRAIGHT
800
    break
801
    }
802
  ai AIBOTWALKSEEK
803
  break
804
  }
805
 
806
ifrnd 128
807
  ifnotmoving
808
    {
809
    ifrnd 8
810
      operate
811
    ai AIBOTWALKJUMP1
812
    break
813
    }
814
 
815
ends
816
 
817
state botwalkkickstate
818
 
819
ifactioncount 2
820
  {
821
  resetactioncount
822
  ifpdistl 1024
823
    {
824
    ifp pdead
825
      {
826
      ai AIBOTWALKHUNT
827
      break
828
      }
829
    ifp pfacing
830
      ifrnd 16
831
        {
832
          globalsound SANTA_TRASH8
833
        }
834
    sound KICK_HIT
835
 
836
    ifspritepal 21 addphealth -1 else addphealth -6
837
 
838
    state dukehurt
839
    }
840
    else
841
    {
842
    ai AIBOTWALKHUNT
843
    break
844
    }
845
 
846
  ifrnd 50
847
    {
848
    ai AIBOTWALKHUNT
849
    break
850
    }
851
  }
852
 
853
ends
854
 
855
state botwalkstraightjumpstate
856
 
857
ifai AIBOTWALKSTRJUMP1
858
  {
859
  ifcount 20
860
    {
861
    ai AIBOTWALKSTRJUMP2
862
    break
863
    }
864
  }
865
  else
866
ifai AIBOTWALKSTRJUMP2
867
  {
868
  ifcount 18
869
    {
870
    iffloordistl 16
871
      {
872
      operate
873
      ifrnd 128
874
      sound DUKE_LAND
875
      ifrnd 200
876
        ai AIBOTWALKSTRAIGHT
877
        else
878
        ai AIBOTWALKSEEK
879
      }
880
    }
881
  }
882
 
883
ends
884
 
885
state botjumpshootstate
886
 
887
ifai AIBOTWALKSTRJUMP1S
888
  {
889
  state botshootstate
890
 
891
  ifcount 20
892
    {
893
    ai AIBOTWALKSTRJUMP2S
894
    resetactioncount
895
    count 10
896
    break
897
    }
898
 
899
  }
900
  else
901
ifai AIBOTWALKSTRJUMP2S
902
  {
903
  ifcount 18
904
    {
905
    iffloordistl 16
906
      {
907
      operate
908
      sound DUKE_LAND
909
      ai AIBOTWALKHUNT
910
      count 10
911
      }
912
    }
913
  }
914
 
915
 
916
ends
917
 
918
 
919
state botwalkstraightstate
920
 
921
ifpdistg 20000
922
  ai AIBOTWALKSEEK
923
 
924
ifcansee
925
  {
926
  ifnotmoving
927
    {
928
    ai AIBOTWALKSTRJUMP1
929
    break
930
    }
931
  ifrnd 64
932
    ai AIBOTWALKHUNT
933
  }
934
  else
935
  {
936
  ifrnd 128
937
    ifnotmoving
938
      ai AIBOTWALKSTRJUMP1
939
  }
940
 
941
ends
942
 
943
state steroidswalk
944
 
945
soundonce DUKE_HARTBEAT
946
spawn FRAMEEFFECT1
947
 
948
ifhitweapon
949
  {
950
  state botwalkhitstate
951
  break
952
  }
953
 
954
ifcount 150
955
  {
956
  ai AIBOTWALKHUNT
957
  }
958
 
959
ifcount 34
960
  {
961
  }
962
  else
963
  {
964
  sizeto 42 36
965
  }
966
 
967
ends
968
 
969
state botletfallstate
970
 
971
ifactioncount 5
972
  {
973
  }
974
  else
975
  ifactioncount 6
976
    {
977
    soundonce SANTA_TRASH7
978
    }
979
 
980
ifcansee
981
  {
982
  ai AIFLYWAIT
983
  cactor SOBBOTFLY
984
  break
985
  }
986
  else
987
  {
988
  iffloordistl 50
989
    {
990
    ai AIFLYWAIT
991
    cactor SOBBOTFLY
992
    break
993
    }
994
  }
995
 
996
ends
997
 
998
useractor enemy SOBBOTWALK SOBBOTSTRENGTH ABOTWALK
999
   state checksquished
1000
 
1001
  ifai 0
1002
    {
1003
 
1004
      ifspawnedby RECON
1005
        {
1006
          spawn PIGCOP
1007
          killit
1008
        }
1009
 
1010
  ifcansee nullop else break
1011
 
1012
  sizeat 42 36
1013
  cstat 257
1014
 
1015
  ai AIBOTWALKSEEK
1016
 
1017
  ifspritepal 21
1018
    {
1019
      strength MINIBOSSSTRENGTH
1020
      ifrnd 64 soundonce SANTA_TRASH9
1021
    }
1022
    else spritepal 0
1023
 
1024
  sound INSERT_CLIP
1025
  break
1026
  }
1027
 
1028
 
1029
   fall
1030
   sleeptime 300
1031
 
1032
ifaction ABOTWDEAD break
1033
  else
1034
ifaction ABOTWALKFROZEN
1035
  {
1036
 
1037
  ifcount THAWTIME
1038
    {
1039
    ai AIBOTWALKHUNT
1040
    getlastpal
1041
    }
1042
    else
1043
    ifcount FROZENDRIPTIME
1044
      {
1045
      ifactioncount 26
1046
        {
1047
        spawn WATERDRIP
1048
        resetactioncount
1049
        }
1050
      }
1051
  ifhitweapon
1052
    {
1053
    ifwasweapon FREEZEBLAST
1054
      {
1055
      strength 0
1056
      break
1057
      }
1058
    addkills 1
1059
 
1060
    ifrnd 84
1061
      spawn BLOODPOOL
1062
    lotsofglass 30
1063
    spawn ATOMICHEALTH
1064
    sound GLASS_BREAKING
1065
    ifspritepal 21
1066
      {
1067
        state miniboss
1068
        break
1069
      }
1070
    endofgame 52
1071
    killit
1072
    }
1073
  ifp pfacing
1074
    ifpdistl FROZENQUICKKICKDIST
1075
      pkick
1076
  break
1077
  }
1078
  else
1079
ifai AIBOTWALKSTEROIDS
1080
  {
1081
    state steroidswalk
1082
    break
1083
  }
1084
  else
1085
ifai AIBOTWALKGROW
1086
  {
1087
  ifcount 32
1088
    {
1089
    guts JIBS4 24
1090
    guts JIBS6 28
1091
    addkills 1
1092
    sound SQUISH2
1093
    sound PIPEBOMB_EXPLODE
1094
    hitradius 2048 60 70 80 90
1095
    spawn BLOODPOOL
1096
    spawn EXPLOSION2
1097
    ifspritepal 21
1098
      {
1099
        state miniboss
1100
        break
1101
      }
1102
    endofgame 52
1103
    killit
1104
    }
1105
    else
1106
    {
1107
    sizeto MAXXSTRETCH MAXYSTRETCH
1108
    break
1109
    }
1110
  break
1111
  }
1112
  else
1113
ifai AIBOTWALKSHRINK
1114
  {
1115
 
1116
  ifcount SHRUNKDONECOUNT
1117
    ai AIBOTWALKHUNT
1118
    else
1119
    ifcount SHRUNKCOUNT
1120
      {
1121
      spawn FRAMEEFFECT1
1122
      sizeto 42 36
1123
      }
1124
      else
1125
      {
1126
      ifcount 31
1127
        nullop
1128
        else
1129
        {
1130
        ifcount 30
1131
          {
1132
          ifrnd 255
1133
            {
1134
            sound DUKE_TAKEPILLS
1135
            ai AIBOTWALKSTEROIDS
1136
            break
1137
            }
1138
          }
1139
        }
1140
      ifcount 32
1141
        {
1142
        ifpdistl SQUISHABLEDISTANCE
1143
          {
1144
          state standard_pjibs
1145
          sound SQUISH2
1146
          spawn BLOODPOOL
1147
          pkick
1148
//          state headhitstate
1149
//          state headhitstate
1150
//          state headhitstate
1151
          state headhitstate
1152
    ifspritepal 21
1153
      {
1154
        state miniboss
1155
        break
1156
      }
1157
    else
1158
      {
1159
          ifrnd 128
1160
              sound SANTA_DEAD
1161
              else
1162
              sound SANTA_TRASH9
1163
      }
1164
          endofgame 52
1165
          killit
1166
          }
1167
        }
1168
        else
1169
        {
1170
        sizeto MINXSTRETCH MINYSTRETCH
1171
        spawn FRAMEEFFECT1
1172
        }
1173
      }
1174
 
1175
  break
1176
  }
1177
  else
1178
ifai AIBOTWALKDYING
1179
  {
1180
  state botwalkdyingstate
1181
  break
1182
  }
1183
  else
1184
  ifrnd 1
1185
    operate
1186
 
1187
ifhitweapon
1188
  {
1189
  state botwalkhitstate
1190
  break
1191
  }
1192
  else
1193
ifai AIWALKFALLHARD
1194
  {
1195
  iffloordistl 16
1196
    {
1197
    ai AIBOTWALKHUNT
1198
    }
1199
    else
1200
    {
1201
    break
1202
    }
1203
  }
1204
  else
1205
  {
1206
  ifai AIWALKFALL
1207
    {
1208
    state botshootstate
1209
    iffloordistl 16
1210
      {
1211
      ai AIBOTWALKHUNT
1212
      }
1213
      else
1214
      {
1215
      break
1216
      }
1217
    }
1218
  }
1219
 
1220
ifp pshrunk
1221
  state stomphisfreakingass
1222
 
1223
iffloordistl 550
1224
  nullop
1225
  else
1226
  {
1227
  ai AIFLYWAIT
1228
  cactor SOBBOTFLY
1229
  }
1230
 
1231
ifonwater
1232
  {
1233
  }
1234
  else
1235
  {
1236
  ifp pjetpack
1237
    ifp phigher
1238
      ifcansee
1239
        {
1240
        ai AIFLYWAIT
1241
        cactor SOBBOTFLY
1242
        }
1243
  }
1244
 
1245
ifp phigher
1246
  {
1247
  ifrnd 1
1248
    {
1249
    ifrnd 196
1250
      {
1251
      ai AIFLYWAIT
1252
      cactor SOBBOTFLY
1253
      }
1254
    }
1255
  }
1256
 
1257
ifai AIWALKWAIT
1258
  {
1259
  ai AIBOTWALKSEEK
1260
  break
1261
  }
1262
  else
1263
ifai AIBOTWALKSEEK
1264
  state botwalkseekstate
1265
    else
1266
ifai AIBOTWALKHUNT
1267
  state botwalkhuntstate
1268
    else
1269
ifai AIBOTWALKJUMP1
1270
  state botwalkjumpstate
1271
    else
1272
ifai AIBOTWALKJUMP2
1273
  state botwalkjumpstate
1274
    else
1275
ifai AIBOTWALKKICK
1276
  state botwalkkickstate
1277
    else
1278
ifai AIBOTWALKSTRAIGHT
1279
  state botwalkstraightstate
1280
    else
1281
ifai AIBOTWALKSTRJUMP1
1282
  state botwalkstraightjumpstate
1283
    else
1284
ifai AIBOTWALKSTRJUMP2
1285
  state botwalkstraightjumpstate
1286
    else
1287
ifai AIBOTLETFALL
1288
  state botletfallstate
1289
    else
1290
ifai AIBOTWALKSTRJUMP1S
1291
  state botjumpshootstate
1292
    else
1293
ifai AIBOTWALKSTRJUMP2S
1294
  state botjumpshootstate
1295
 
1296
 
1297
enda
1298
 
1299
state botflydyingstate
1300
 
1301
fall
1302
 
1303
strength 0
1304
cstat 0
1305
 
1306
ifactioncount 5
1307
  {
1308
  action ABOTFLYDEAD
1309
    ifspritepal 21
1310
      {
1311
        state miniboss
1312
        break
1313
      }
1314
  endofgame 52
1315
  }
1316
 
1317
ends
1318
 
1319
state choosedodgefly
1320
 
1321
ifceilingdistl 100
1322
  {
1323
  ifai AIBOTFLYDODGEDOWN
1324
    nullop
1325
    else
1326
    ai AIBOTFLYDODGEDOWN
1327
  }
1328
  else
1329
  {
1330
  ifai AIBOTFLYDODGEUP
1331
    nullop
1332
    else
1333
    ai AIBOTFLYDODGEUP
1334
  }
1335
 
1336
ends
1337
 
1338
 
1339
state botflydodgestate
1340
 
1341
ifcanshoottarget
1342
  state botshootstate
1343
 
1344
ifcansee
1345
  {
1346
  ifrnd 2
1347
    {
1348
    ifceilingdistl 100
1349
      ai AIBOTFLYDODGEDOWN
1350
      else
1351
      ai AIBOTFLYDODGEUP
1352
    }
1353
  }
1354
  else
1355
  {
1356
  ai AIBOTFLYSEEKUP
1357
  }
1358
 
1359
ifcount 10
1360
  ai AIBOTFLYDOWN
1361
 
1362
ends
1363
 
1364
state botflyhitstate
1365
 
1366
state botshootstate
1367
 
1368
// spawn BLOOD
1369
 
1370
ifdead
1371
  {
1372
  ifspritepal 21 { state miniboss break } else sound SANTA_DEAD
1373
 
1374
  ifwasweapon FREEZEBLAST
1375
    {
1376
    spritepal 1
1377
    strength 0
1378
    move 0
1379
    action ABOTFLYFROZEN
1380
    sound SOMETHINGFROZE
1381
    break
1382
    }
1383
    else
1384
  ifwasweapon GROWSPARK
1385
    {
1386
    cstat 0
1387
    sound ACTOR_GROWING
1388
    ai AIBOTFLYGROW
1389
    break
1390
    }
1391
    else
1392
  ifwasweapon RADIUSEXPLOSION
1393
    {
1394
//    state standard_pjibs
1395
//    state standard_pjibs
1396
//    state standard_pjibs
1397
    state standard_pjibs
1398
    sound SQUISH2
1399
    addkills 1
1400
    endofgame 52
1401
    killit
1402
    }
1403
    else
1404
  ifwasweapon RPG
1405
    {
1406
//    state standard_pjibs
1407
//    state standard_pjibs
1408
//    state standard_pjibs
1409
    state standard_pjibs
1410
    sound SQUISH2
1411
    addkills 1
1412
    endofgame 52
1413
    killit
1414
    }
1415
    else
1416
    {
1417
    ai AIBOTFLYDYING
1418
    }
1419
 
1420
  }
1421
  else
1422
  {
1423
  state dudehurt
1424
 
1425
  ifwasweapon SHRINKSPARK
1426
    {
1427
    ifai AIBOTFLYSTEROIDS
1428
       {
1429
       }
1430
       else
1431
       {
1432
       ai AIBOTFLYSHRINK
1433
       break
1434
       }
1435
    }
1436
  }
1437
 
1438
ends
1439
 
1440
state botflyseekupstate
1441
 
1442
ifcansee
1443
  {
1444
  ai AIBOTFLYUP
1445
  break
1446
  }
1447
 
1448
ifp phigher
1449
  {
1450
  }
1451
  else
1452
  {
1453
  ai AIBOTFLYSEEKDOWN
1454
  break
1455
  }
1456
 
1457
ends
1458
 
1459
state botflyseekdownstate
1460
 
1461
ifcansee
1462
  {
1463
  ai AIBOTFLYDOWN
1464
  break
1465
  }
1466
  else
1467
  {
1468
  ifp phigher
1469
    {
1470
    }
1471
    else
1472
    {
1473
    ai AIBOTLETFALL
1474
    cactor SOBBOTWALK
1475
    }
1476
  }
1477
 
1478
ifp phigher
1479
  {
1480
  ai AIBOTFLYSEEKUP
1481
  break
1482
  }
1483
 
1484
ends
1485
 
1486
state botflydownstate
1487
 
1488
state botshootstate
1489
 
1490
ifrnd 16
1491
  {
1492
  ifp phigher
1493
    {
1494
    ai AIBOTFLYUP
1495
    break
1496
    }
1497
  }
1498
 
1499
ifcansee
1500
  {
1501
  }
1502
  else
1503
  {
1504
  ai AIBOTFLYSTRAIGHT
1505
  break
1506
  }
1507
 
1508
ends
1509
 
1510
state botflyupstate
1511
 
1512
state botshootstate
1513
 
1514
ifrnd 16
1515
  {
1516
  ifp phigher
1517
    nullop
1518
    else
1519
    {
1520
    ai AIBOTFLYDOWN
1521
    break
1522
    }
1523
  }
1524
 
1525
ifcansee
1526
  {
1527
  }
1528
  else
1529
  {
1530
  ai AIBOTFLYSTRAIGHT
1531
  }
1532
 
1533
ends
1534
 
1535
state botflyupmomentstate
1536
 
1537
ifcansee
1538
  {
1539
  ifcount 10 ai AIBOTFLYUP
1540
  break
1541
  }
1542
  else
1543
  {
1544
  ifcount 50
1545
    {
1546
    ai AIBOTLETFALL
1547
    cactor SOBBOTWALK
1548
    }
1549
  }
1550
 
1551
ends
1552
 
1553
state botflyholdstate
1554
 
1555
state botshootstate
1556
 
1557
ifcount 50
1558
  {
1559
  ai AIBOTFLYUP
1560
  }
1561
 
1562
ends
1563
 
1564
state botflystraightstate
1565
 
1566
ifpdistg 20000
1567
  ai AIBOTFLYSEEKDOWN
1568
 
1569
ifcansee
1570
  {
1571
  ai AIBOTFLYDOWN
1572
  }
1573
  else
1574
  {
1575
  ifrnd 128
1576
    ifnotmoving
1577
      ai AIFLYUPMOMENT
1578
  }
1579
 
1580
ends
1581
 
1582
state steroidsfly
1583
 
1584
soundonce DUKE_HARTBEAT
1585
spawn FRAMEEFFECT1
1586
 
1587
ifcount 100
1588
  {
1589
  ai AIBOTFLYUP
1590
  }
1591
 
1592
ifcount 34
1593
  {
1594
  }
1595
  else
1596
  {
1597
  sizeto 42 36
1598
  }
1599
 
1600
ifhitweapon
1601
  {
1602
  state botflyhitstate
1603
  break
1604
  }
1605
 
1606
ends
1607
 
1608
// FLY ACTOR
1609
 
1610
useractor enemy SOBBOTFLY SOBBOTSTRENGTH ABOTFLY
1611
state checksquished
1612
 
1613
ifai 0
1614
  {
1615
  ifcansee nullop else { break }
1616
  ifspritepal 21 strength MINIBOSSSTRENGTH
1617
  sizeat 42 36
1618
  cstat 257
1619
  sound INSERT_CLIP
1620
  ai AIBOTFLYSEEKDOWN
1621
  spritepal 0
1622
  break
1623
  }
1624
 
1625
 
1626
fall
1627
 
1628
sleeptime 300
1629
 
1630
ifaction ABOTFLYDEAD
1631
  break
1632
  else
1633
ifaction ABOTFLYFROZEN
1634
  {
1635
  ifcount THAWTIME
1636
    {
1637
    ai AIBOTFLYUP
1638
    getlastpal
1639
    }
1640
    else
1641
    ifcount FROZENDRIPTIME
1642
      {
1643
      ifactioncount 26
1644
        {
1645
        spawn WATERDRIP
1646
        resetactioncount
1647
        }
1648
      }
1649
  ifhitweapon
1650
    {
1651
    ifwasweapon FREEZEBLAST
1652
      {
1653
      strength 0
1654
      break
1655
      }
1656
    addkills 1
1657
 
1658
    ifrnd 84
1659
      spawn BLOODPOOL
1660
 
1661
    lotsofglass 30
1662
    spawn ATOMICHEALTH
1663
    sound GLASS_BREAKING
1664
    ifspritepal 21
1665
      {
1666
        state miniboss
1667
        break
1668
      }
1669
    endofgame 52
1670
    killit
1671
    }
1672
 
1673
  ifp pfacing
1674
    ifpdistl FROZENQUICKKICKDIST
1675
      pkick
1676
  break
1677
  }
1678
  else
1679
ifai AIBOTFLYSTEROIDS
1680
  {
1681
  soundonce DUKE_JETPACK_IDLE
1682
  state steroidsfly
1683
  break
1684
  }
1685
  else
1686
ifai AIBOTFLYGROW
1687
  {
1688
  ifcount 32
1689
    {
1690
    guts JIBS4 24
1691
    guts JIBS6 28
1692
    addkills 1
1693
    sound SQUISH2
1694
    sound PIPEBOMB_EXPLODE
1695
    hitradius 2048 60 70 80 90
1696
    spawn BLOODPOOL
1697
    spawn EXPLOSION2
1698
    ifspritepal 21
1699
      {
1700
        state miniboss
1701
        break
1702
      }
1703
    endofgame 52
1704
    killit
1705
    }
1706
    else
1707
    {
1708
    sizeto MAXXSTRETCH MAXYSTRETCH
1709
    break
1710
    }
1711
  break
1712
  }
1713
  else
1714
ifai AIBOTFLYSHRINK
1715
  {
1716
  ifcount SHRUNKDONECOUNT
1717
    ai AIBOTFLYUP
1718
    else
1719
    ifcount SHRUNKCOUNT
1720
      {
1721
      spawn FRAMEEFFECT1
1722
      sizeto 42 36
1723
      }
1724
      else
1725
      {
1726
      ifcount 31
1727
        nullop
1728
        else
1729
        {
1730
        ifcount 30
1731
          {
1732
          ifrnd 255
1733
            {
1734
            sound DUKE_TAKEPILLS
1735
            ai AIBOTFLYSTEROIDS
1736
            break
1737
            }
1738
          }
1739
        }
1740
      ifcount 32
1741
        {
1742
 
1743
        ifpdistl SQUISHABLEDISTANCE
1744
          {
1745
//          state standard_pjibs
1746
//          state standard_pjibs
1747
//          state standard_pjibs
1748
          state standard_pjibs
1749
          sound SQUISH2
1750
          spawn BLOODPOOL
1751
          pkick
1752
//          state headhitstate
1753
//          state headhitstate
1754
//          state headhitstate
1755
          state headhitstate
1756
    ifspritepal 21
1757
      {
1758
        state miniboss
1759
        break
1760
      }
1761
    else
1762
      {
1763
          ifrnd 128
1764
              sound SANTA_DEAD
1765
              else
1766
              sound SANTA_TRASH9
1767
      }
1768
          endofgame 52
1769
          killit
1770
          }
1771
        }
1772
        else
1773
        {
1774
        sizeto MINXSTRETCH MINYSTRETCH
1775
        spawn FRAMEEFFECT1
1776
        }
1777
      }
1778
  break
1779
  }
1780
 
1781
soundonce DUKE_JETPACK_IDLE
1782
 
1783
ifai AIBOTFLYDYING
1784
  {
1785
  state botflydyingstate
1786
  break
1787
  }
1788
 
1789
ifhitweapon
1790
  state botflyhitstate
1791
 
1792
ifrnd 2 operate
1793
 
1794
ifp pshrunk
1795
  {
1796
  state stomphisfreakingass
1797
  }
1798
 
1799
ifrnd 25
1800
  {
1801
  ifp phigher
1802
    {
1803
    }
1804
    else
1805
    {
1806
    ifp ponground
1807
      {
1808
      iffloordistl 200
1809
        {
1810
        sound DUKE_JETPACK_OFF
1811
        iffloordistl 100 ai AIWALKFALL else ai AIWALKFALLHARD
1812
        cactor SOBBOTWALK
1813
        }
1814
      }
1815
    }
1816
  }
1817
 
1818
ifai AIFLYWAIT
1819
  {
1820
  move 0
1821
  sound DUKE_JETPACK_ON
1822
  ai AIBOTFLYSEEKDOWN
1823
  }
1824
 
1825
ifai AIBOTFLYSEEKUP
1826
  state botflyseekupstate
1827
    else
1828
ifai AIBOTFLYSEEKDOWN
1829
  state botflyseekdownstate
1830
    else
1831
ifai AIBOTFLYDOWN
1832
  state botflydownstate
1833
    else
1834
ifai AIBOTFLYUP
1835
  state botflyupstate
1836
    else
1837
ifai AIBOTFLYDODGEUP
1838
  state botflydodgestate
1839
    else
1840
ifai AIBOTFLYDODGEDOWN
1841
  state botflydodgestate
1842
    else
1843
ifai AIFLYUPMOMENT
1844
  state botflyupmomentstate
1845
    else
1846
ifai AIFLYUPHOLD
1847
  state botflyholdstate
1848
    else
1849
ifai AIBOTFLYSTRAIGHT
1850
  state botflystraightstate
1851
 
1852
break
1853
enda
1854
 
1855
 
1856
 
1857
action  AELFUZIWALK    0 4 5 1 30
1858
action  AELFUZIRUN     0 4 5 1 15
1859
action  AELFUZIFROZEN  0 1 5 1
1860
action  AELFUZIGROW    0 1 5 1
1861
action  AELFUZIJUMP  266 2 5 1 15
1862
action  AELFUZIFALL  276 1 5 1 1
1863
action  AELFUZIDYING 260 5 1 1 25
1864
action  AELFUZIDEAD  265 1 1 1 1
1865
action  AELFUZISHOOT 281 2 5 1
1866
 
1867
move    elfuziwalkspeed 100
1868
move    elfuzirunspeed  200
1869
move    elfuzijumpspeed 150 -200
1870
move    elfuzifallspeed 150 150
1871
move    elfuzistopped
1872
move    elfuzishrink1    80
1873
 
1874
ai      AIELFUZISHRINKING AELFUZIWALK   elfuzishrink1  fleeenemy
1875
ai      AIELFUZIDYING     AELFUZIDYING  elfuzistopped faceplayer
1876
ai      AIELFUZISEEKING   AELFUZIWALK   elfuziwalkspeed seekplayer
1877
ai      AIELFUZIHUNTING   AELFUZIRUN    elfuzirunspeed faceplayer
1878
ai      AIELFUZIJUMPING   AELFUZIJUMP   elfuzijumpspeed geth getv
1879
ai      AIELFUZIFALLING   AELFUZIFALL   elfuzifallspeed geth getv
1880
ai      AIELFUZISHOOTING  AELFUZISHOOT  elfuzistopped faceplayer
1881
ai      AIELFUZIIQ        AELFUZIRUN    elfuzirunspeed geth getv
1882
ai      AIELFUZIGROW      AELFUZIGROW   elfuzistopped geth getv
1883
 
1884
state elfuziseekstate
1885
 
1886
ifcansee
1887
  {
1888
  ifp pdead break
1889
 
1890
  ifpdistl 15000
1891
    {
1892
    ifrnd 16
1893
      {
1894
      ai AIELFUZIHUNTING
1895
      }
1896
    }
1897
  }
1898
 
1899
ends
1900
 
1901
state elfuzihuntstate
1902
 
1903
ifp pdead ai AIELFUZISEEKING
1904
 
1905
 
1906
ifcansee
1907
  {
1908
  ifpdistl 2000
1909
    {
1910
    ai AIELFUZISHOOTING
1911
    break
1912
    }
1913
  ifrnd 64 ifnotmoving
1914
    {
1915
    ai AIELFUZIJUMPING
1916
    break
1917
    }
1918
 
1919
  ifrnd 7
1920
    ifpdistl 8192
1921
      {
1922
      ai AIELFUZISHOOTING
1923
      }
1924
  }
1925
  else
1926
  {
1927
  ifrnd 64 ai AIELFUZIIQ
1928
  }
1929
 
1930
ends
1931
 
1932
state elfuziiqstate
1933
 
1934
ifcansee
1935
  {
1936
  ai AIELFUZIHUNTING
1937
  }
1938
  else
1939
  {
1940
  ifrnd 16
1941
    ifnotmoving
1942
      {
1943
      ai AIELFUZISEEKING
1944
      }
1945
  }
1946
 
1947
ends
1948
 
1949
state elfuzishootstate
1950
 
1951
ifcansee
1952
  {
1953
  ifp pdead ai AIELFUZISEEKING
1954
 
1955
  ifactioncount 3
1956
    {
1957
    ifspritepal 0
1958
    {
1959
    sound CHAINGUN_FIRE
1960
    shoot CHAINGUN
1961
    }
1962
    else {
1963
    ifrnd 80
1964
      {
1965
      sound SHRINKER_FIRE
1966
      shoot SHRINKER
1967
      } }
1968
    resetactioncount
1969
    }
1970
  ifrnd 4
1971
    ai AIELFUZIHUNTING
1972
  }
1973
  else
1974
  {
1975
  ai AIELFUZIIQ
1976
  }
1977
 
1978
ends
1979
 
1980
state elfuzijumpingstate
1981
 
1982
ifactioncount 2
1983
  ai AIELFUZIFALLING
1984
 
1985
ends
1986
 
1987
state elfuzifallingstate
1988
 
1989
iffloordistl 5
1990
  ai AIELFUZIHUNTING
1991
 
1992
ends
1993
 
1994
action NONEACTION 0 1 1 1 1
1995
 
1996
move forwardspeed 1500
1997
// ai AIMOVEFORWARD NONEACTION forwardspeed faceplayer
1998
 
1999
useractor notenemy SPECBLOOD 0 // Hendricks266 fixed this actor. Before this fix, this line said "useractor SPECBLOOD 0", and the code was all messed up.
2000
  cstat 32768
2001
  // sizeat 42 36
2002
  // sizeat 32 27
2003
  sizeat 1 1
2004
  // ai AIMOVEFORWARD
2005
  spawn BLOOD
2006
  killit
2007
enda
2008
 
2009
 
2010
 
2011
state elfuzihitstate
2012
spawn BLOOD // Hendricks266 fixed this bug. Before this fix, this line said "spawn SPECBLOOD".  SPECBLOOD is a piece of shit.
2013
state random_wall_jibs
2014
 
2015
ifdead
2016
  {
2017
  ifrnd 128
2018
    {
2019
    spawn XMASPRESENT2
2020
    }
2021
  ifwasweapon GROWSPARK
2022
    {
2023
    sound ACTOR_GROWING
2024
    ai AIELFUZIGROW
2025
    break
2026
    }
2027
 
2028
  addkills 1
2029
  state random_wall_jibs
2030
 
2031
  ifwasweapon FREEZEBLAST
2032
    {
2033
    sound SOMETHINGFROZE
2034
    spritepal 1
2035
    move 0
2036
    action AELFUZIFROZEN
2037
    strength 0
2038
    break
2039
    }
2040
  ifwasweapon RADIUSEXPLOSION
2041
    {
2042
    sound SQUISH2
2043
//    state standard_jibs
2044
//    state standard_jibs
2045
    state standard_jibs
2046
    killit
2047
    }
2048
    else
2049
  ifwasweapon RPG
2050
    {
2051
    sound SQUISH2
2052
//    state standard_jibs
2053
//    state standard_jibs
2054
    state standard_jibs
2055
    killit
2056
    }
2057
    else
2058
    ai AIELFUZIDYING
2059
 
2060
  }
2061
  else
2062
  {
2063
//  state random_wall_jibs
2064
  ifwasweapon SHRINKSPARK
2065
    {
2066
    sound ACTOR_SHRINKING
2067
    ai AIELFUZISHRINKING
2068
    }
2069
    else
2070
    ifwasweapon GROWSPARK
2071
      sound EXPANDERHIT
2072
      else
2073
      ifrnd 32
2074
        ai AIELFUZISHOOTING
2075
  }
2076
ends
2077
 
2078
state elfuzishrinkstate
2079
 
2080
ifcount SHRUNKDONECOUNT
2081
  ai AIELFUZISEEKING
2082
  else
2083
  ifcount SHRUNKCOUNT
2084
//    sizeto 48 40
2085
      sizeto 32 27
2086
    else
2087
    state genericshrunkcode
2088
 
2089
ends
2090
 
2091
state elfuzidyingstate
2092
 
2093
ifactioncount 5
2094
  {
2095
  ifrnd 64
2096
    spawn BLOODPOOL
2097
  state rf
2098
  iffloordistl 8
2099
    sound THUD
2100
  action AELFUZIDEAD
2101
  move elfuzistopped
2102
  break
2103
  }
2104
 
2105
ends
2106
 
2107
useractor enemy ELFUZI ELFUZISTRENGTH
2108
fall
2109
 
2110
state checksquished
2111
 
2112
ifaction AELFUZIDEAD
2113
  {
2114
  ifrespawn
2115
    ifcount RESPAWNACTORTIME
2116
      {
2117
      spawn TRANSPORTERSTAR
2118
      cstat 257
2119
      strength ELFUZISTRENGTH
2120
      ai AIELFUZISEEKING
2121
      }
2122
      else
2123
      {
2124
      strength 0
2125
      ifhitweapon
2126
        ifwasweapon RADIUSEXPLOSION
2127
          {
2128
          sound SQUISH2
2129
//          state standard_jibs
2130
//          state standard_jibs
2131
          state standard_jibs
2132
          killit
2133
          }
2134
      break
2135
      }
2136
  break
2137
  }
2138
  else
2139
ifaction AELFUZIFROZEN
2140
  {
2141
  ifcount THAWTIME
2142
    {
2143
    ai AIELFUZISEEKING
2144
    getlastpal
2145
    }
2146
    else
2147
    ifcount FROZENDRIPTIME
2148
      ifrnd 8
2149
        spawn WATERDRIP
2150
 
2151
  ifhitweapon
2152
    {
2153
    ifwasweapon FREEZEBLAST
2154
      {
2155
      strength 0
2156
      break
2157
      }
2158
    addkills 1
2159
    lotsofglass 30
2160
    ifrnd 84 spawn BLOODPOOL
2161
    sound GLASS_BREAKING
2162
    killit
2163
    }
2164
  ifp pfacing
2165
    ifpdistl FROZENQUICKKICKDIST
2166
      pkick
2167
  break
2168
  }
2169
  else
2170
  ifai AIELFUZIDYING
2171
    state elfuzidyingstate
2172
 
2173
ifai AIELFUZISHRINKING nullop else { ifai AIELFUZIGROW nullop else { ifhitweapon state elfuzihitstate } }
2174
 
2175
ifai 0
2176
  {
2177
  ai AIELFUZISEEKING
2178
  cstat 257
2179
  // clipdist 32
2180
//  sizeat 42 36
2181
  sizeat 32 27
2182
  ifspritepal 0 nullop else
2183
    {
2184
  ifrnd 72
2185
    strength ELFUZIALTSTR
2186
  else
2187
    strength ELFUZISTRENGTH
2188
    }
2189
  }
2190
  else
2191
 
2192
      ifai AIELFUZISEEKING state elfuziseekstate
2193
 else ifai AIELFUZIHUNTING state elfuzihuntstate
2194
 else ifai AIELFUZIIQ state elfuziiqstate
2195
 else ifai AIELFUZISHOOTING state elfuzishootstate
2196
 else ifai AIELFUZIJUMPING state elfuzijumpingstate
2197
 else ifai AIELFUZIFALLING state elfuzifallingstate
2198
 else ifai AIELFUZIGROW state genericgrowcode
2199
      ifai AIELFUZISHRINKING state elfuzishrinkstate
2200
enda
2201
 
2202
useractor enemystayput ELFUZISTAYPUT ELFUZISTRENGTH
2203
   cstat 257
2204
   // clipdist 32
2205
   ai AIELFUZISEEKING
2206
   cactor ELFUZI
2207
enda
2208
 
2209
action  AELFGUNWALK    0 4 5 1 20
2210
action  AELFGUNRUN     0 4 5 1 10
2211
action  AELFGUNFROZEN  0 1 5 1
2212
action  AELFGUNGROW    0 1 5 1
2213
action  AELFGUNDYING  35 4 1 1 25
2214
action  AELFGUNDEAD   39 1 1 1 1
2215
action  AELFGUNSHOOT  20 3 5 1 40
2216
 
2217
move    elfgunwalkspeed 70
2218
move    elfgunrunspeed  110
2219
move    elfgunstopped
2220
move    elfgunshrink1    80
2221
 
2222
ai      AIELFGUNSHRINKING AELFGUNWALK   elfgunshrink1  fleeenemy
2223
ai      AIELFGUNDYING     AELFGUNDYING  elfgunstopped faceplayer
2224
ai      AIELFGUNSEEKING   AELFGUNWALK   elfgunwalkspeed seekplayer
2225
ai      AIELFGUNHUNTING   AELFGUNRUN    elfgunrunspeed faceplayer
2226
ai      AIELFGUNSHOOTING  AELFGUNSHOOT  elfgunstopped faceplayer
2227
ai      AIELFGUNIQ        AELFGUNRUN    elfgunrunspeed geth getv
2228
ai      AIELFGUNGROW      AELFGUNGROW   elfgunstopped geth getv
2229
 
2230
state elfgunseekstate
2231
 
2232
ifcansee
2233
  {
2234
  ifp pdead break
2235
 
2236
  ifpdistl 15000
2237
    {
2238
    ifrnd 16
2239
      {
2240
      ai AIELFGUNHUNTING
2241
      }
2242
    }
2243
  }
2244
 
2245
ends
2246
 
2247
state elfgunhuntstate
2248
   ifp pdead ai AIELFGUNSEEKING
2249
 
2250
   ifcansee
2251
     {
2252
       ifpdistl 2000
2253
         {
2254
           ai AIELFGUNSHOOTING
2255
           break
2256
         }
2257
     }
2258
 
2259
  ifrnd 7 
2260
    {
2261
      ifpdistl 8192 ai AIELFGUNSHOOTING
2262
    }
2263
  else ifrnd 48 ai AIELFGUNIQ
2264
ends
2265
 
2266
state elfguniqstate
2267
   ifcansee ai AIELFGUNHUNTING
2268
  else
2269
  {
2270
  ifrnd 16
2271
    ifnotmoving
2272
      ai AIELFGUNSEEKING
2273
  }
2274
ends
2275
 
2276
state elfgunshootstate
2277
 
2278
ifcansee
2279
  {
2280
  ifp pdead ai AIELFGUNSEEKING
2281
 
2282
  ifcount 20
2283
    {
2284
    ifcount 29
2285
      nullop
2286
      else
2287
      {
2288
      ifcount 28
2289
        {
2290
        sound SHOTGUN_COCK
2291
        }
2292
      }
2293
    }
2294
    else
2295
    {
2296
    ifcount 19
2297
      {
2298
      sound SHOTGUN_FIRE
2299
      shoot SHOTGUN
2300
      shoot SHOTGUN
2301
      shoot SHOTGUN
2302
      shoot SHOTGUN
2303
      shoot SHOTGUN
2304
      }
2305
    }
2306
 
2307
  ifactioncount 3
2308
    {
2309
    resetcount
2310
    resetactioncount
2311
    ifrnd 64
2312
      ai AIELFGUNHUNTING
2313
    }
2314
  }
2315
  else ai AIELFGUNIQ
2316
 
2317
ends
2318
 
2319
state elfgunhitstate
2320
   spawn BLOOD
2321
 
2322
state random_wall_jibs
2323
 
2324
ifdead
2325
  {
2326
  state random_wall_jibs
2327
  ifrnd 128
2328
    {
2329
    spawn XMASPRESENT
2330
    }
2331
  ifwasweapon GROWSPARK
2332
    {
2333
    sound ACTOR_GROWING
2334
    ai AIELFGUNGROW
2335
    break
2336
    }
2337
 
2338
  addkills 1
2339
 
2340
  ifwasweapon FREEZEBLAST
2341
    {
2342
    sound SOMETHINGFROZE
2343
    spritepal 1
2344
    move 0
2345
    action AELFGUNFROZEN
2346
    strength 0
2347
    break
2348
    }
2349
  ifwasweapon RADIUSEXPLOSION
2350
    {
2351
    sound SQUISH2
2352
//    state standard_jibs
2353
//    state standard_jibs
2354
    state standard_jibs
2355
    killit
2356
    }
2357
    else
2358
  ifwasweapon RPG
2359
    {
2360
    sound SQUISH2
2361
//    state standard_jibs
2362
//    state standard_jibs
2363
    state standard_jibs
2364
    killit
2365
    }
2366
    else
2367
    ai AIELFGUNDYING
2368
 
2369
  }
2370
  else
2371
  {
2372
  state random_wall_jibs
2373
  ifwasweapon SHRINKSPARK
2374
    {
2375
    sound ACTOR_SHRINKING
2376
    ai AIELFGUNSHRINKING
2377
    }
2378
    else
2379
    ifwasweapon GROWSPARK
2380
      sound EXPANDERHIT
2381
      else
2382
      ifrnd 32
2383
        ai AIELFGUNSHOOTING
2384
  }
2385
ends
2386
 
2387
state elfgunshrinkstate
2388
 
2389
ifcount SHRUNKDONECOUNT
2390
  ai AIELFGUNSEEKING
2391
  else
2392
  ifcount SHRUNKCOUNT
2393
//    sizeto 48 40
2394
    sizeto 32 27
2395
    else
2396
    state genericshrunkcode
2397
 
2398
ends
2399
 
2400
state elfgundyingstate
2401
 
2402
ifactioncount 4
2403
  {
2404
  ifrnd 64
2405
    spawn BLOODPOOL
2406
  state rf
2407
  iffloordistl 8
2408
    sound THUD
2409
  action AELFGUNDEAD
2410
  move elfgunstopped
2411
  break
2412
  }
2413
 
2414
ends
2415
 
2416
useractor enemy ELFGUN ELFGUNSTRENGTH
2417
fall
2418
state checksquished
2419
 
2420
ifaction AELFGUNDEAD
2421
  {
2422
  ifrespawn
2423
    ifcount RESPAWNACTORTIME
2424
      {
2425
      spawn TRANSPORTERSTAR
2426
      cstat 257
2427
      strength ELFGUNSTRENGTH
2428
      ai AIELFGUNSEEKING
2429
      }
2430
      else
2431
      {
2432
      strength 0
2433
      ifhitweapon
2434
        ifwasweapon RADIUSEXPLOSION
2435
          {
2436
          sound SQUISH2
2437
//          state standard_jibs
2438
//          state standard_jibs
2439
          state standard_jibs
2440
          killit
2441
          }
2442
      break
2443
      }
2444
  break
2445
  }
2446
  else
2447
ifaction AELFGUNFROZEN
2448
  {
2449
  ifcount THAWTIME
2450
    {
2451
    ai AIELFGUNSEEKING
2452
    getlastpal
2453
    }
2454
    else
2455
    ifcount FROZENDRIPTIME
2456
      ifrnd 8
2457
        spawn WATERDRIP
2458
 
2459
  ifhitweapon
2460
    { // state elfgunhitstate
2461
    ifwasweapon FREEZEBLAST
2462
      {
2463
      strength 0
2464
      break
2465
      }
2466
    addkills 1
2467
    lotsofglass 30
2468
    ifrnd 84 spawn BLOODPOOL
2469
    sound GLASS_BREAKING
2470
    killit
2471
    }
2472
  ifp pfacing
2473
    ifpdistl FROZENQUICKKICKDIST
2474
      pkick
2475
  break
2476
  }
2477
  else
2478
  ifai AIELFGUNDYING
2479
    state elfgundyingstate
2480
 
2481
ifai AIELFGUNSHRINKING nullop else { ifai AIELFGUNGROW nullop else { ifhitweapon { state elfgunhitstate } } }
2482
 
2483
ifai 0
2484
  {
2485
  ai AIELFGUNSEEKING
2486
  cstat 257
2487
  // clipdist 32
2488
//  sizeat 42 36
2489
  sizeat 32 27
2490
  strength ELFGUNSTRENGTH
2491
  }
2492
  else
2493
 
2494
ifai AIELFGUNSEEKING { state elfgunseekstate } else
2495
ifai AIELFGUNHUNTING { state elfgunhuntstate } else
2496
ifai AIELFGUNIQ { state elfguniqstate } else
2497
ifai AIELFGUNSHOOTING { state elfgunshootstate } else
2498
ifai AIELFGUNGROW { state genericgrowcode }
2499
ifai AIELFGUNSHRINKING { state elfgunshrinkstate }
2500
 
2501
break
2502
enda
2503
 
2504
useractor enemystayput ELFGUNSTAYPUT ELFGUNSTRENGTH
2505
ai AIELFGUNSEEKING
2506
cstat 257
2507
// clipdist 32
2508
cactor ELFGUN
2509
break
2510
enda
2511
 
2512
state present
2513
  fall
2514
  sizeat 20 20
2515
  cstat 257
2516
  clipdist 16
2517
ends
2518
 
2519
state present1
2520
  ifp pshrunk nullop else
2521
  ifp palive
2522
    ifcount 6
2523
      ifpdistl RETRIEVEDISTANCE
2524
        ifcanseetarget
2525
          {
2526
            sound RIP_PAPER
2527
            ifvarl temp 1 { ifrnd 128 spawn SHIELD else spawn SIXPAK } else espawnvar temp
2528
            killit
2529
          }
2530
ends
2531
 
2532
state present2
2533
  ifp pshrunk nullop else
2534
  ifp palive
2535
    ifcount 6
2536
      ifpdistl RETRIEVEDISTANCE
2537
        ifcanseetarget
2538
          {
2539
            sound RIP_PAPER
2540
            ifvarl temp 1 { ifrnd 128 spawn CHAINGUNSPRITE else spawn SHOTGUNSPRITE } else espawnvar temp
2541
            killit
2542
          }
2543
ends
2544
 
2545
 
2546
useractor notenemy XMASPRESENT 0 // ELFGUN
2547
  state present
2548
  state present1
2549
enda
2550
 
2551
useractor notenemy XMASPRESENT2 0 // ELFUZI
2552
  state present
2553
  state present2
2554
enda
2555
 
2556
 
2557
action VOIDACTION
2558
move NULLSPEED
2559
 
2560
ai MAKENOISE VOIDACTION NULLSPEED geth getv
2561
 
2562
useractor notenemy NOISEMAKER 999
2563
  sizeat 48 40
2564
  cstat 17
2565
 
2566
  ifai 0 ai MAKENOISE
2567
 
2568
  ifspritepal 21
2569
    {
2570
      ifhitweapon
2571
        {
2572
          ifcount 24
2573
            {
2574
              strength 999
2575
              ifrnd 128 sound MOVIE2 else sound MOVIE3
2576
              resetcount
2577
            }
2578
        }
2579
    }
2580
  else
2581
   {
2582
     hitradius 4096 1 1 1 1
2583
   }
2584
enda
2585
 
2586
useractor notenemy MALEGEEK 20
2587
 ifhitweapon
2588
   {
2589
     guts JIBS6 3
2590
     sound SQUISH2
2591
     ifdead
2592
       {
2593
         stopsound MALECAROL
2594
         guts JIBS6 2
2595
         guts JIBS6 3
2596
         guts JIBS6 4
2597
         sound MALECAROL_DEAD
2598
         globalsound MOUSEANNOY
2599
         killit
2600
       }
2601
   }
2602
 ifcount 225
2603
   {
2604
     sound MALECAROL
2605
     resetcount
2606
   }
2607
enda
2608
 
2609
useractor notenemy FEMALEGEEK 20
2610
 ifhitweapon
2611
   {
2612
     guts JIBS6 3
2613
     sound SQUISH2
2614
     ifdead
2615
       {
2616
         stopsound FEMALECAROL
2617
         guts JIBS6 2
2618
         guts JIBS6 3
2619
         guts JIBS6 4
2620
         sound FEMALECAROL_DEAD
2621
         killit
2622
       }
2623
   }
2624
 ifcount 225
2625
   {
2626
     sound FEMALECAROL
2627
     resetcount
2628
   }
2629
enda
2630
 
2631
state mariocode
2632
 cstat 257
2633
 sizeat 62 62
2634
ends
2635
 
2636
useractor notenemy NWMARIO 0
2637
 state mariocode
2638
enda
2639
 
2640
useractor notenemy NWMARIO2 0
2641
 state mariocode
2642
enda