Subversion Repositories nw_plus

Rev

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