Subversion Repositories nw_plus

Rev

Rev 30 | Rev 66 | 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
definecheat 14 endepisode
13
definecheat 15 endlevel
14
definecheat 25 endvolume
15
 
16
include NWDefs.con
17
include NWUser.con
18
 
19
setgamename Duke: Nuclear Winter
20
 
9 h266 21
gamevar picnum 0 2
22
gamevar temp 0 2
23
gamevar tempb 0 2
24
gamevar x 0 2
25
gamevar y 0 2
26
gamevar z 0 2
27
 
1 h266 28
gamevar owner 0 2
29
gamevar temp2 0 2
30
gamevar temp3 0 2
31
gamevar temp4 0 2
32
gamevar ptemp 0 1
8 h266 33
gamevar holodukeid 0 1
1 h266 34
gamevar musicchange 0 1
8 h266 35
gamevar skin DUKE 132097 // do not reset flag enabled
1 h266 36
 
37
gamevar LOGO_FLAGS 767 0 // default; TEN screen reenabled
38
 
39
state cutsceneambience
40
  getactor[THISACTOR].lotag temp
41
 
42
  switch temp
43
 
44
    case WIND_AMBIENCE
45
    case WIND_REPEAT
46
     setactor[THISACTOR].lotag WIND2
47
    break
48
 
49
    case FLY_BY
50
     setactor[THISACTOR].lotag FLY_BY2
51
    break
52
 
53
  endswitch
54
ends
55
 
56
onevent EVENT_LOADACTOR
57
  getactor[THISACTOR].picnum picnum
58
  switch picnum
59
 
60
   case SNOWYDOORSHOCK 
61
     spritepal 30
62
     cactor DOORSHOCK
63
   break
64
 
65
   case 3765 case 3766 case 3767 case 3768 cactor WOODENHORSE2 break
66
 
67
  // case PIGCOP case PIGCOPSTAYPUT case PIGCOPDIVE sizeat 48 40 break
68
   case SOBBOTWALK case SOBBOTFLY sizeat 42 36 break
69
   case ELFUZI case ELFUZISTAYPUT sizeat 32 27 break
70
   case ELFGUN case ELFGUNSTAYPUT sizeat 32 27 break
71
   case SNOWMAN sizeat 42 36 break
72
 
73
   case 1915
74
    cactor COMMANDER // failsafe fix for NWL5 bug
75
   break
76
 
77
   case MUSICANDSFX
78
     state cutsceneambience
79
   break
80
 
81
   case JETPACK
82
     ifspritepal 21 setvar temp 1
83
     spritepal 0
84
   break
85
 
86
/*
87
   case SNOWFLAKE
88
     cactor SNOW
89
     sizeat 8 8
90
   break
91
*/
92
 
93
   case XMASPRESENT
94
   case XMASPRESENT2
95
     getactor[THISACTOR].hitag temp
96
     setactor[THISACTOR].hitag 0
97
   break
98
 
99
  endswitch
100
endevent
101
 
52 h266 102
onevent EVENT_SPAWN
103
  getactor[THISACTOR].owner owner
104
  getactor[THISACTOR].picnum picnum
105
endevent
106
 
1 h266 107
onevent EVENT_EGS
14 h266 108
 getactor[THISACTOR].picnum picnum
109
 
1 h266 110
 ifactor APLAYER setactor[THISACTOR].mdflags 16
111
 ifactor DUKETORSO setactor[THISACTOR].mdflags 16
112
 ifactor DUKEGUN setactor[THISACTOR].mdflags 16
113
 ifactor DUKELEG setactor[THISACTOR].mdflags 16
114
 ifactor DOORSHOCK setactor[THISACTOR].mdflags 16
115
 
116
 ifactor SNOW
117
   {
118
     sizeat 8 8
119
 
120
     setvar temp3 0
121
     randvar temp3 2047
122
     setactor[THISACTOR].ang temp3
123
 
124
     setvar temp2 -2047
125
     randvar temp2 2047
126
 
127
/*
128
     setvar temp3 0
129
     ifrnd 128 addvar temp3 4
130
     ifrnd 128 addvar temp3 8
131
     setactor[THISACTOR].cstat temp3
132
*/
133
   }
134
endevent
135
 
136
// -----------------------------------------------------------------------------
137
 
138
state standard_bjibs
139
  guts JIBS2 1
140
  guts JIBS3 2
141
  guts JIBS4 3
142
  guts JIBS5 2
143
  guts JIBS6 3
144
  ifrnd 6
145
  {
146
    guts JIBS1 1
147
  }         // a badly drawn spine
148
ends
149
 
150
state nwbreakobject
151
  ifaction 0
152
  {
153
    action ANULLACTION
154
    cstator 257
155
  }
156
    ifhitweapon
157
    {
158
      ifdead
159
      {
160
        ifactor WOODSLATS
161
        {
162
          sound GLASS_HEAVYBREAK
163
	  debris SCRAP3 5
164
	  debris SCRAP4 3
165
          killit
166
        }
167
      else
168
        ifactor RIBBON
169
        {
170
          sound GLASS_HEAVYBREAK
171
	  debris SCRAP3 5
172
	  debris SCRAP4 3
173
          killit
174
        }
175
      else
176
        ifactor MYBOX
177
        {
178
          sound GLASS_HEAVYBREAK
179
	  debris SCRAP3 5
180
	  debris SCRAP4 3
181
          killit
182
        }
183
      else
184
        ifactor SNOWGIB killit
185
      else
186
        ifactor DRUNKELF
187
        {
188
          sound PRED_DYING
189
          guts JIBS6 2
190
          guts JIBS6 3
191
          guts JIBS6 4
192
          killit
193
        }
194
      else
195
        ifactor CHOOCHOOSLUT
196
        {
197
          sound GLASS_HEAVYBREAK
198
	  debris SCRAP3 5
199
	  debris SCRAP4 3
200
          killit
201
        }
202
      else
203
        ifactor HORSEPOWER
204
        {
205
          sound GLASS_HEAVYBREAK
206
	  debris SCRAP3 5
207
	  debris SCRAP4 3
208
          killit
209
        }
210
      else
8 h266 211
        ifactor CHANDELIER
212
        {
213
          sound GLASS_BREAKING
214
          debris SCRAP3 3
215
          debris SCRAP4 4
216
          lotsofglass 10
217
          killit
218
        }
219
      else
1 h266 220
        ifactor TREEWITHSOMETHING
221
        {
222
          sound GLASS_HEAVYBREAK
223
	  debris SCRAP3 5
224
          ifrnd 96
225
          {
226
            ifrnd 64 spawn ATOMICHEALTH else spawn SHIELD
227
          }
228
          else
229
          {
230
            ifrnd 128 spawn STEROIDS else spawn FECES
231
          }
232
          killit
233
        }
234
      else
235
        ifactor SSPEAKER
236
        {
237
	  debris SCRAP4 3
238
          killit
239
        }
240
      }
241
    }
242
ends
243
 
244
useractor notenemy WOODSLATS MEDIUMSTRENGTH state nwbreakobject enda
245
 
246
useractor notenemy RIBBON WEAK state nwbreakobject enda
247
 
248
useractor notenemy SSPEAKER WEAK state nwbreakobject enda
249
 
250
useractor notenemy MYBOX WEAK state nwbreakobject enda
251
 
252
useractor notenemy DRUNKELF WEAK state nwbreakobject enda
253
 
254
useractor notenemy CHOOCHOOSLUT WEAK state nwbreakobject enda
255
 
256
useractor notenemy HORSEPOWER WEAK state nwbreakobject enda
257
 
258
useractor notenemy SNOWGIB WEAK state nwbreakobject enda
259
 
8 h266 260
useractor notenemy CHANDELIER WEAK state nwbreakobject enda
261
 
1 h266 262
useractor notenemy TREEWITHSOMETHING TOUGH state nwbreakobject enda
263
 
264
actor JETPACK
265
  fall
266
  ifmove RESPAWN_ACTOR_FLAG
267
    state respawnit
268
  else
269
    ifp pshrunk nullop
270
    else
271
      ifp palive
272
        ifpdistl RETRIEVEDISTANCE
273
          ifcount 6
274
            ifpinventory GET_JETPACK JETPACK_AMOUNT
275
              ifcanseetarget
276
      {
277
        ifvare temp 1
278
        {
279
          addinventory GET_JETPACK JETPACK_NEAR_EMPTY
280
          quote 125
281
        }
282
        else
283
        {
284
          addinventory GET_JETPACK JETPACK_AMOUNT
285
          quote 41
286
        }
287
        ifspawnedby JETPACK
288
          state getcode
289
        else
290
          state quikget
291
      }
292
enda
293
 
294
action FEMHDANCE1 205 1 1 1 16
295
action FEMHDANCE3 205 1 1 1 26
296
action FEMHDANCE2 206 2 1 1 10
297
 
298
 
299
 
300
state nwbabecode
301
 getactor[THISACTOR].cstat temp
302
 ifvarand temp 1 nullop else addvar temp 1
303
 ifactor HALFBITCH { ifvarand temp 128 nullop else addvar temp 128 }
304
 ifvarand temp 256 nullop else addvar temp 256
305
 
306
 getuserdef .lockout temp2
307
 ifvare temp2 1
308
   {
309
     ifvarand temp 32768 nullop else addvar temp 32768
310
   }
311
 else
312
  // {
313
     ifvarand temp 32768 subvar temp 32768
314
  // }
315
 
316
 setactor[THISACTOR].cstat temp
317
 
318
 
319
 
320
  ifactor HALFBITCH nullop else fall
321
 
322
  ifaction FEMSHRUNK
323
  {
324
    ifcount SHRUNKDONECOUNT
325
    {
326
      action FEMANIMATE
327
      cstat 257
328
    }
329
    else
330
      ifcount SHRUNKCOUNT
331
        sizeto 40 40
332
    else
333
      state genericshrunkcode
334
  }
335
  else ifaction FEMGROW
336
  {
337
    ifcount 32
338
    {
339
      respawnhitag
340
      guts JIBS4 20
341
      guts JIBS6 20
342
      spritepal 6
343
      soundonce LADY_SCREAM
344
      ifactor SLUTASS debris SCRAP6 1
345
      sound SQUISH2
346
      killit
347
    }
348
    else
349
      sizeto MAXXSTRETCH MAXYSTRETCH
350
  }
351
 
352
 
353
  else
354
    ifaction FEMHDANCE1
355
  {
356
    ifactioncount 2
357
      action FEMHDANCE2
358
  }
359
  else
360
    ifaction FEMHDANCE2
361
  {
362
    ifactioncount 8
363
      action FEMHDANCE3
364
  }
365
  else
366
    ifaction FEMHDANCE3
367
  {
368
    ifactioncount 2
369
    action FEMANIMATE
370
  }
371
  else
372
    ifaction FEMFROZEN1
373
  {
374
    ifcount THAWTIME
375
    {
376
      action FEMANIMATE
377
      getlastpal
378
    }
379
    else
380
      ifcount FROZENDRIPTIME
381
    {
382
      ifactioncount 26
383
      {
384
        spawn WATERDRIP
385
        resetactioncount
386
      }
387
    }
388
 
389
    ifhitweapon
390
    {
391
      ifwasweapon FREEZEBLAST
392
      {
393
        strength 0
394
        break
395
      }
396
      lotsofglass 30
397
      sound GLASS_BREAKING
398
      respawnhitag
399
      ifrnd 84
400
        spawn BLOODPOOL
401
      killit
402
    }
403
    else
404
      ifp pfacing
405
        ifpdistl FROZENQUICKKICKDIST
406
          pkick
407
    break
408
  }
409
  else ifaction FEMFROZEN2
410
  {
411
    ifcount THAWTIME
412
    {
413
      action FEMANIMATE
414
      getlastpal
415
    }
416
    else
417
      ifcount FROZENDRIPTIME
418
    {
419
      ifactioncount 26
420
      {
421
        spawn WATERDRIP
422
        resetactioncount
423
      }
424
    }
425
 
426
    ifhitweapon
427
    {
428
      ifwasweapon FREEZEBLAST
429
      {
430
        strength 0
431
          break
432
      }
433
 
434
      lotsofglass 30
435
 
436
      sound GLASS_BREAKING
437
      ifrnd 84
438
        spawn BLOODPOOL
439
      respawnhitag
440
 
441
      ifrnd 128
442
        sound DUKE_HIT_STRIPPER1
443
      else
444
        sound DUKE_HIT_STRIPPER2
445
 
446
      killit
447
    }
448
    else
449
      ifp pfacing
450
        ifpdistl FROZENQUICKKICKDIST
451
          pkick
452
    break
453
  }
454
 
455
  ifhitweapon
456
  {
457
    ifdead
458
    {
459
      ifwasweapon GROWSPARK
460
      {
461
        cstat 0
462
        move 0
463
        sound ACTOR_GROWING
464
        action FEMGROW
465
        break
466
      }
467
      else ifwasweapon FREEZEBLAST
468
      {
469
        ifaction FEMSHRUNK
470
          break
471
 
472
          action FEMFROZEN1
473
 
474
        move 0
475
        spritepal 1
476
        strength 0
477
 
478
        sound SOMETHINGFROZE
479
 
480
        break
481
      }
482
 
483
      ifrnd 128
484
        sound DUKE_HIT_STRIPPER1
485
      else
486
        sound DUKE_HIT_STRIPPER2
487
 
488
      respawnhitag
489
      state standard_bjibs
490
      state random_wall_jibs
491
      spawn BLOODPOOL
492
 
493
        ifactor HALFBITCH
494
          money 3
495
      else
496
        ifactor SLUTASS
497
          money 3
498
 
499
 
500
        spritepal 6
501
        soundonce LADY_SCREAM
502
        ifactor NAKED1
503
	  debris SCRAP3 18
504
        else
505
          ifactor PODFEM1
506
	    debris SCRAP3 18
507
        killit
508
    }
509
    else
510
    {
511
      ifwasweapon SHRINKSPARK
512
      {
513
        sound ACTOR_SHRINKING
514
        move 0
515
        action FEMSHRUNK
516
        cstat 0
517
        break
518
      }
519
      else
520
        ifwasweapon GROWSPARK
521
          sound EXPANDERHIT
522
 
523
 
524
      sound SQUISH2
525
 
526
      guts JIBS6 1
527
    }
528
  }
529
 
530
 
531
 
532
  ifp pfacing
533
    ifpdistl 1280
534
      ifhitspace
535
  {
536
    tip
537
    ifrnd 128
538
      soundonce DUKE_TIP1
539
    else
540
      soundonce DUKE_TIP2
541
ifactor HALFBITCH
542
      action FEMHDANCE1
543
  }
544
ends
545
 
546
useractor notenemy HALFBITCH TOUGH
547
  state nwbabecode
548
enda
549
 
550
useractor notenemy SLUTASS TOUGH
551
  state nwbabecode
552
enda
553
 
554
state nwl3surprise
555
ifvare VOLUME 1
556
  {
557
    ifvare LEVEL 2
558
      {
559
        getactor[THISACTOR].sectnum temp
560
        switch temp
561
          case 220 case 221
562
            ifvarn musicchange 1
563
              {
564
                starttrack 12 // doom
565
                setvar musicchange 1
566
              }
567
          break
568
          case 563 case 564 case 565 case 566 case 567
569
            ifvarn musicchange 2
570
              {
571
                starttrack 13 // mario
572
                setvar musicchange 2
573
              }
574
          break
575
          case 192 case 193 case 194 case 195 case 196 case 197 case 198 case 237 case 238 case 239 case 240
576
          case 166 case 167 case 172 case 173 case 174 case 176 case 179
577
            ifvarn musicchange 0
578
              {
8 h266 579
                starttrackvar LEVEL // level music
1 h266 580
                setvar musicchange 0
581
              }
582
          break
583
        endswitch
584
      }
585
  }
586
ends
587
 
30 h266 588
// Flying Frosty
589
 
9 h266 590
/*
591
action ACOMMBREETH  0  3  5  1  40
592
action ACOMMFROZEN  0  1  5
593
action ACOMMSPIN   -5  1  5  1  12
594
action ACOMMGET   0  3  5  1  30
595
action ACOMMSHOOT  20  1  5   1 35
596
action ACOMMABOUTTOSHOOT 20 1 5 1 30
597
action ACOMMDYING  30  8  1  1  12
598
action ACOMMDEAD   38  1  1  1  1
599
 
600
 
601
move COMMGETUPVELS 128 -64
602
move COMMGETVELS 128 64
603
move COMMSLOW 64 24
604
move COMMSTOPPED
605
 
606
ai AICOMMWAIT ACOMMBREETH COMMSTOPPED faceplayerslow
607
ai AICOMMGET ACOMMGET COMMGETVELS seekplayer
608
ai AICOMMSHOOT ACOMMSHOOT COMMSTOPPED faceplayerslow
609
ai AICOMMABOUTTOSHOOT ACOMMABOUTTOSHOOT COMMSTOPPED faceplayerslow
610
ai AICOMMSPIN ACOMMSPIN COMMGETVELS spin
611
ai AICOMMDYING ACOMMDYING COMMSTOPPED faceplayer
612
ai AICOMMSHRUNK ACOMMGET COMMSLOW furthestdir
613
ai AICOMMGROW ACOMMGET COMMSTOPPED furthestdir
614
*/
615
 
616
move COMMGETUPVELSNW 128 -64
617
move COMMGETVELSNW 128 64
618
move COMMSLOWNW 64 24
619
move COMMSTOPPEDNW
620
 
1 h266 621
action ACOMMSPINNW   0  1  5  1  12
8 h266 622
action ACOMMSHOOTNW  20  1  5 1  16 // this is custom to shorten the delay between firing freezeblasts
1 h266 623
 
9 h266 624
ai AICOMMSPINNW ACOMMSPINNW COMMGETVELSNW spin
625
ai AICOMMSHOOTNW ACOMMSHOOTNW COMMSTOPPEDNW faceplayerslow
1 h266 626
 
627
state checkcommhitstate
628
 
629
  ifhitweapon
630
  {
631
    debris SCRAP3 5
632
    ifdead
633
    {
634
      ifwasweapon FREEZEBLAST
635
      {
636
        break
637
      }
638
      else
639
        ifwasweapon GROWSPARK
640
      {
641
        sound ACTOR_GROWING
642
        ai AICOMMGROW
643
        break
644
      }
645
 
646
      addkills 1
647
 
648
      ifwasweapon RADIUSEXPLOSION
649
      {
650
        debris SCRAP3 5
651
        sound SQUISH2
652
        killit
653
      }
654
      else
655
        ifwasweapon RPG
656
      {
657
        sound SQUISH2
658
        debris SCRAP3 5
659
        state standard_jibs
660
        killit
661
      }
662
 
663
      debris SCRAP3 100
664
      sound COMM_DYING
665
      ai AICOMMDYING
666
    }
667
    else
668
    {
669
      soundonce COMM_PAIN
670
      ifwasweapon SHRINKSPARK
671
      {
672
        sound ACTOR_SHRINKING
673
        ai AICOMMSHRUNK
674
      }
675
      else
676
        ifwasweapon GROWSPARK
677
          sound EXPANDERHIT
678
      else
679
        ifrnd 24
680
          ai AICOMMABOUTTOSHOOT
681
    }
682
  }
683
ends
684
 
685
actor COMMANDERSTAYPUT COMMANDERSTRENGTH
686
  cactor COMMANDER
687
  ai AICOMMABOUTTOSHOOT
688
enda
689
 
690
actor COMMANDER COMMANDERSTRENGTH
691
 
692
  state checksquished
693
 
694
  ifaction ACOMMFROZEN
695
  {
696
    fall
697
 
698
    ifcount THAWTIME
699
    {
700
      getlastpal
701
      ai AICOMMWAIT
702
    }
703
    else
704
      ifcount FROZENDRIPTIME
705
    {
706
      ifactioncount 26
707
      {
708
        spawn WATERDRIP
709
        resetactioncount
710
      }
711
    }
712
 
713
    ifhitweapon
714
    {
715
      ifwasweapon FREEZEBLAST
716
      {
717
        strength 0
718
        break
719
      }
720
      addkills 1
721
 
722
      ifrnd 84
723
        spawn BLOODPOOL
724
      lotsofglass 30
725
      sound GLASS_BREAKING
726
      killit
727
    }
728
    ifp pfacing
729
      ifpdistl FROZENQUICKKICKDIST
730
        pkick
731
    break
732
  }
733
  ifai 0
8 h266 734
    ai AICOMMSHOOTNW
1 h266 735
  else
736
    ifai AICOMMWAIT
737
  {
738
    ifcount 20
739
    {
740
      ifcansee
741
      {
742
        ifcanshoottarget
743
        {
744
          ifrnd 96
745
            ai AICOMMGET
746
          else
747
            ai AICOMMABOUTTOSHOOT
748
        }
749
      }
750
      else
751
        ai AICOMMGET
752
    }
753
  }
754
  else
755
    ifai AICOMMABOUTTOSHOOT
756
  {
757
    ifactioncount 2
758
    {
759
      ifcansee
8 h266 760
        ai AICOMMSHOOTNW
1 h266 761
      else
762
      {
763
        ai AICOMMGET
764
        break
765
      }
766
    }
767
    ifrnd 32 soundonce COMM_ATTACK
768
  }
769
  else
8 h266 770
    ifai AICOMMSHOOTNW
1 h266 771
  {
772
    ifcanshoottarget
773
    {
774
      ifcount 12
775
        ifrnd 16
776
          ai AICOMMWAIT
8 h266 777
 
1 h266 778
      ifactioncount 1
779
      {
780
        shoot FREEZEBLAST
781
        resetactioncount
782
      }
8 h266 783
 
784
      getplayer[THISACTOR].i temp
785
      getactor[temp].pal temp
786
      ifvare temp 1 // if player is frozen
787
        ai AICOMMGET
1 h266 788
    }
789
    else
790
      ai AICOMMGET
791
  }
792
  else
793
    ifai AICOMMSHRUNK
794
  {
795
    ifcount SHRUNKDONECOUNT
796
      ai AICOMMGET
797
    else
798
      ifcount SHRUNKCOUNT
799
        sizeto 48 40
800
    else
801
      state genericshrunkcode
802
  }
803
  else
804
    ifai AICOMMGROW
805
      state genericgrowcode
806
  else
807
    ifai AICOMMGET
808
  {
809
    ifnotmoving
810
      ifrnd 4
811
        operate
812
    ifpdistl 1024
8 h266 813
    {
1 h266 814
      ifp palive
8 h266 815
      {
816
        sound COMM_SPIN
817
        ai AICOMMSPINNW
818
        break
819
      }
820
 
821
      getplayer[THISACTOR].i temp
822
      getactor[temp].pal temp
823
      ifvare temp 1 // if player is frozen
824
      {
825
        sound COMM_SPIN
826
        ai AICOMMSPINNW
827
        break
828
      }
1 h266 829
    }
830
 
831
    ifcansee
832
    {
833
      ifp phigher
834
        move COMMGETUPVELS getv geth faceplayer
835
      else
836
        move COMMGETVELS getv geth faceplayer
837
    }
838
    ifactioncount 8
839
      ifrnd 2
840
        ai AICOMMABOUTTOSHOOT
841
  }
842
  else
843
    ifai AICOMMSPINNW
844
  {
845
    soundonce COMM_SPIN
846
    ifcount 16
847
    {
848
      ifpdistl 1280
849
      {
8 h266 850
        setvar tempb CAPTSPINNINGPLAYER
851
        mulvar tempb -1
852
        // addphealth CAPTSPINNINGPLAYER
853
        getplayer[THISACTOR].i temp
854
        setactor[temp].htextra tempb
855
        setactor[temp].htpicnum KNEE
856
        setactor[temp].htowner THISACTOR
857
 
858
        globalsound DUKE_GRUNT
859
        palfrom 32 16
860
        resetcount
1 h266 861
      }
862
      else
863
        ifpdistg 2300
864
          ai AICOMMWAIT
865
    }
866
    ifactioncount 52
867
      ai AICOMMWAIT
868
    ifnotmoving
869
      ifrnd 32
870
        operate
871
  }
872
 
873
  ifai AICOMMDYING
874
  {
875
    fall
876
    strength 0
877
 
878
    ifhitweapon
879
      ifwasweapon RADIUSEXPLOSION
880
    {
881
      sound SQUISH2
882
      spawn BLOODPOOL
883
      state standard_jibs
884
 
885
      killit
886
    }
887
 
888
    ifaction ACOMMDYING
889
      ifactioncount 8
890
    {
891
      iffloordistl 8
892
        sound THUD
893
      cstat 0
894
      action ACOMMDEAD
895
    }
896
  }
897
  else
898
  {
899
    ifrnd 2
900
      soundonce COMM_ROAM
901
    state checkcommhitstate
902
  }
903
enda
904
 
30 h266 905
// Frosted Battle Mobile
906
 
1 h266 907
move TANKSTOPNW
908
 
909
useractor enemy TANK TANKSTRENGTH
910
    fall
911
 
912
//  sizeat 45 45
913
  ifaction 0
914
  {
915
    action ATANKWAIT
916
    cstat 257
917
    clipdist 100
918
  }
919
  else
920
    ifaction ATANKSPIN
921
  {
922
    soundonce TANK_ROAM
923
 
924
    ifactioncount 20
925
    {
926
      ifrnd 16
927
        ifcansee
928
          ifcanshoottarget
929
      {
930
        move TANKSTOPNW geth
931
        action ATANKSHOOTING
932
        stopsound TANK_ROAM
933
      }
934
    }
935
 
936
    ifrnd 16
937
      move TANKFORWARD seekplayer
938
  }
939
  else
940
    ifaction ATANKSHOOTING
941
  {
942
    ifactioncount 22
943
    {
944
      ifpdistg 8192
945
      {
946
        sound BOS1_ATTACK2
947
        shoot MORTER
948
      }
949
      resetcount
950
      move 0 action ATANKWAIT
951
    }
952
    else
953
      ifactioncount 2
954
    {
955
      ifcansee
956
      {
957
        ifpdistl 16384
958
        {
959
          ifrnd 128
960
          {
961
 
962
 
963
            sound PISTOL_FIRE
964
            shoot SHOTSPARK1
965
          }
966
        }
967
        else
968
          ifrnd 128
969
        {
970
          sound PRED_ATTACK
971
          shoot FIRELASER
972
        }
973
      }
974
      else
975
      {
976
        move TANKFORWARD seekplayer
977
        action ATANKSPIN
978
      }
979
    }
980
 
981
    ifrnd 16
982
    {
983
      stopsound TANK_ROAM
984
      move TANKSTOPNW faceplayerslow
985
    }
986
  }
987
  else
988
    ifaction ATANKWAIT
989
  {
990
    ifactioncount 32
991
    {
992
      move TANKFORWARD seekplayer
993
      action ATANKSPIN
994
    }
995
  }
996
  else
997
    ifaction ATANKDEAD
998
  {
999
    addkills 1
1000
    hitradius 6144 TOUGH TOUGH TOUGH TOUGH
1001
    sound LASERTRIP_EXPLODE
1002
    debris SCRAP1 15
1003
    spawn EXPLOSION2
1004
    ifrnd 128 spawn SNOWMAN
1005
    killit
1006
  }
1007
 
1008
  ifhitweapon
1009
  {
1010
    ifdead
1011
      action ATANKDEAD
1012
    else
1013
    {
1014
      debris SCRAP1 1
1015
      ifaction ATANKSHOOTING break
1016
 
1017
      ifrnd 192
1018
      {
1019
        move TANKSTOPNW geth
1020
        action ATANKSHOOTING
1021
        stopsound TANK_ROAM
1022
      }
1023
    }
1024
  }
1025
 
1026
enda
1027
 
1028
 
1029
include NWActor.con
1030
include NWSnow.con
1031
 
1032
// -----------------------------------------------------------------------------
1033
 
1034
onevent EVENT_GAME
8 h266 1035
  ifactor APLAYER
1036
  {
1037
    state nwl3surprise
1038
 
1039
    getplayer[THISACTOR].holoduke_on holodukeid
1040
    ifvarg holodukeid -1
1041
      setactor[holodukeid].mdflags 16
1042
 
1043
   // addlogvar skin
1044
  }
1045
  ifactor FRAMEEFFECT1
1046
    ifspawnedby APLAYER
1047
      setactor[THISACTOR].mdflags 16
1048
 
1 h266 1049
/*
1050
  ifactor MONEY
1051
    {
1052
      setactor[THISACTOR].mdflags 16
14 h266 1053
      // getactor[THISACTOR].owner owner
1 h266 1054
      switch owner
1055
      case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE
1056
        getactor[THISACTOR].x x
1057
        getactor[THISACTOR].y y
1058
        getactor[THISACTOR].z z
1059
 
1060
        updatesectorz x y z temp
1061
        ifvarn temp -1 getflorzofslope temp x y temp2 else killit
1062
 
1063
        ifvarvare z temp2 killit
1064
      break
1065
      endswitch
1066
    }
1067
*/
1068
endevent
1069
 
14 h266 1070
onevent EVENT_ANIMATESPRITES
1 h266 1071
 
1072
 ifvare picnum DOORSHOCK
1073
   {
1074
     ifspritepal 30 settspr[THISACTOR].tsprpicnum 3656
1075
     ifvare VOLUME 1 ifvare LEVEL 2 settspr[THISACTOR].tsprpicnum 3656
1076
     break
1077
   }
1078
 ifvare picnum SNOWFLAKE
1079
   {
1080
     settspr[THISACTOR].tsprpicnum SNOW
1081
     settspr[THISACTOR].tsprxrepeat 4
1082
     settspr[THISACTOR].tspryrepeat 4
1083
     break
1084
   }
1085
/*
1086
 ifvare picnum MONEY
1087
   {
1088
      switch owner
1089
      case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE
1090
        settspr[THISACTOR].tsprpicnum SNOW
1091
      break
1092
      endswitch
1093
   }
1094
*/
8 h266 1095
 
1096
  switch picnum
1097
    case APLAYER
1098
      ifvare skin SANTA
1099
      {
1100
        gettspr[THISACTOR].tsprpicnum temp3
14 h266 1101
        ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096
8 h266 1102
        settspr[THISACTOR].tsprpicnum temp3
1 h266 1103
 
8 h266 1104
        ifvarg holodukeid -1
1105
        {
1106
          gettspr[holodukeid].tsprpicnum temp3
14 h266 1107
          ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096
8 h266 1108
          settspr[holodukeid].tsprpicnum temp3
1109
        }
1110
      }
1111
      break
1112
 
1113
    case FRAMEEFFECT1
1114
      ifvare skin SANTA
1115
        ifspawnedby APLAYER
1116
        {
1117
          gettspr[THISACTOR].tsprpicnum temp3
14 h266 1118
          ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096
8 h266 1119
          settspr[THISACTOR].tsprpicnum temp3
1120
        }
1121
      break
1122
 
1123
    case DUKETORSO
1124
    case DUKEGUN
1125
      getactor[owner].picnum temp2
1126
      ifvare temp2 SOBBOTWALK
1127
      {
1128
        gettspr[THISACTOR].tsprpicnum temp3
1129
        addvar temp3 2456
1130
        settspr[THISACTOR].tsprpicnum temp3
1131
      }
1132
      ifvare temp2 SOBBOTFLY
1133
      {
1134
        gettspr[THISACTOR].tsprpicnum temp3
1135
        addvar temp3 2456
1136
        settspr[THISACTOR].tsprpicnum temp3
1137
      }
1138
      ifvare temp2 APLAYER
1139
      {
1140
        ifvare skin SANTA
1141
        {
1142
          gettspr[THISACTOR].tsprpicnum temp3
1143
          addvar temp3 2456
1144
          settspr[THISACTOR].tsprpicnum temp3
1145
        }
1146
      }
1147
      break
1 h266 1148
 
8 h266 1149
    case DUKELEG
1150
      getactor[owner].picnum temp2
1151
      ifvare temp2 SOBBOTWALK settspr[THISACTOR].tsprpal 30
1152
      ifvare temp2 SOBBOTFLY settspr[THISACTOR].tsprpal 30
1153
      ifvare temp2 APLAYER ifvare skin SANTA settspr[THISACTOR].tsprpal 30
1154
      break
1155
  endswitch
1156
 
1157
 ifvare picnum APLAYER // this fixes the bug with the misplaced TV screen tiles
1 h266 1158
   {
1159
     gettspr[THISACTOR].tsprpicnum temp
1160
     switch temp
1161
      case 1470 case 1471 case 1472 case 1473 case 1474
1162
       subvar temp 5
1163
       settspr[THISACTOR].tsprpicnum temp
1164
      break
1165
     endswitch
1166
   }
1167
endevent
1168
 
1169
 
1170
 
1171
 
1172
useractor notenemy NWEFFECTOR 0 
22 h266 1173
  cstat 32768
1174
  // sizeat 1 1
1 h266 1175
 
22 h266 1176
  ifspritepal 31 // phone ringing effect
1177
  {
1178
    /*
1179
    getplayer[THISACTOR].cursectnum temp3
1180
    switch temp3
1181
      case 60 case 61 case 62 case 63
1182
      case 86 case 87
1183
      case 299 case 300 case 301 case 302 case 303 case 304 case 305 case 306 case 307 case 308 case 309
1184
      case 310 case 311 case 312 case 313 case 314 case 315 case 316 case 317
1185
        soundonce PHONE_RING
1 h266 1186
        break
1187
 
22 h266 1188
      default
1189
        stopsound PHONE_RING
1190
        break
1191
    endswitch
1192
    */
1193
 
1194
    ifpdistl 8192 // 4096
1195
      soundonce PHONE_RING
1196
    ifpdistg 16384
1197
      stopsound PHONE_RING
1198
 
1199
    ifpdistl RETRIEVEDISTANCE
1 h266 1200
      ifp pfacing
22 h266 1201
        ifhitspace
1202
          ifvare temp2 0
1203
          {
1204
            setvar temp 0
1205
            setvar temp2 1
1206
            setvar temp3 0
1207
            setvar tempb 0
1208
          }
1 h266 1209
 
22 h266 1210
    ifvare temp2 1
1211
    {
1212
      addvar temp 1
1 h266 1213
 
22 h266 1214
      stopsound PHONE_RING
1215
      ifvare temp 1
1216
        sound PHONE_PICKUP
1217
      else ifvare temp 30
1218
      {
1219
        setvar tempb 0
1220
        randvar tempb 3
1221
 
1222
        switch tempb
1223
          case 0
1224
            sound LOWANG1
1225
            setvar temp3 57
1226
            break
1227
          case 1
1228
            sound LOWANG2
1229
            setvar temp3 124
1230
            break
1231
          case 2
1232
            sound LOWANG3
1233
            setvar temp3 121
1234
            break
1235
          case 3
1236
            sound LOWANG4
1237
            setvar temp3 156
1238
            break
1239
        endswitch
1240
 
1241
        addvar temp3 60
1242
        setvar tempb 0
1243
      }
1244
      else ifvarvare temp temp3
1245
      {
1246
        sound PHONE_HANGUP
1247
        setvarvar tempb temp3
1248
        addvar tempb 150
1249
      }
1250
      else ifvarvare temp tempb
1251
      {
1252
        setvar temp2 0
1253
        setvar temp 0
1254
      }
1255
    }
1256
  }
1 h266 1257
enda
1258
 
1259
useractor notenemy 3831 0
1260
// cstat 32768
1261
 sizeat 12 13
1262
 getactor[THISACTOR].sectnum temp
1263
 getplayer[THISACTOR].cursectnum temp2
1264
 ifvarvare temp temp2
1265
   {
1266
     setuserdef[THISACTOR].volume_number 1
1267
     endofgame 13
1268
   }
1269
enda
1270
 
1271
action WOODENHORSE2FRAME  0   1   5
1272
action WOODEN2FALLFRAME  -2738  1   5
1273
useractor notenemy WOODENHORSE2 WEAK WOODENHORSE2FRAME
1274
  fall
1275
  ifhitweapon
1276
  {
1277
    ifdead
1278
    {
1279
      debris SCRAP1 4
1280
      debris SCRAP2 3
1281
      killit
1282
    }
1283
    else
1284
      action WOODEN2FALLFRAME
1285
  }
1286
enda
1287
 
1288
useractor notenemy NWSTEAM 0 
1289
  ifpdistl 6144
1290
    soundonce STEAM_HISSING
1291
enda
1292
 
1293
define title_x1 73
1294
define title_x2 306
1295
define title_y 194
1296
define title_zoom 32768
1297
 
1298
onevent EVENT_DISPLAYMENU
1299
//  getplayer[THISACTOR].gm temp
1300
//  ifvarand temp 4 nullop else
1301
// {
1302
  rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim
1303
  rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim
1304
// }
1305
endevent
1306
 
1307
/*
1308
onevent EVENT_DISPLAYTITLE
1309
  rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim
1310
  rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim
1311
endevent
1312
*/
1313
 
1314