Subversion Repositories nw_plus

Rev

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