Subversion Repositories nw_plus

Rev

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