Subversion Repositories nw_plus

Rev

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