Rev 22 | Rev 52 | 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 | |||
30 | h266 | 584 | // Flying Frosty |
585 | |||
9 | h266 | 586 | /* |
587 | action ACOMMBREETH 0 3 5 1 40 |
||
588 | action ACOMMFROZEN 0 1 5 |
||
589 | action ACOMMSPIN -5 1 5 1 12 |
||
590 | action ACOMMGET 0 3 5 1 30 |
||
591 | action ACOMMSHOOT 20 1 5 1 35 |
||
592 | action ACOMMABOUTTOSHOOT 20 1 5 1 30 |
||
593 | action ACOMMDYING 30 8 1 1 12 |
||
594 | action ACOMMDEAD 38 1 1 1 1 |
||
595 | |||
596 | |||
597 | move COMMGETUPVELS 128 -64 |
||
598 | move COMMGETVELS 128 64 |
||
599 | move COMMSLOW 64 24 |
||
600 | move COMMSTOPPED |
||
601 | |||
602 | ai AICOMMWAIT ACOMMBREETH COMMSTOPPED faceplayerslow |
||
603 | ai AICOMMGET ACOMMGET COMMGETVELS seekplayer |
||
604 | ai AICOMMSHOOT ACOMMSHOOT COMMSTOPPED faceplayerslow |
||
605 | ai AICOMMABOUTTOSHOOT ACOMMABOUTTOSHOOT COMMSTOPPED faceplayerslow |
||
606 | ai AICOMMSPIN ACOMMSPIN COMMGETVELS spin |
||
607 | ai AICOMMDYING ACOMMDYING COMMSTOPPED faceplayer |
||
608 | ai AICOMMSHRUNK ACOMMGET COMMSLOW furthestdir |
||
609 | ai AICOMMGROW ACOMMGET COMMSTOPPED furthestdir |
||
610 | */ |
||
611 | |||
612 | move COMMGETUPVELSNW 128 -64 |
||
613 | move COMMGETVELSNW 128 64 |
||
614 | move COMMSLOWNW 64 24 |
||
615 | move COMMSTOPPEDNW |
||
616 | |||
1 | h266 | 617 | action ACOMMSPINNW 0 1 5 1 12 |
8 | h266 | 618 | action ACOMMSHOOTNW 20 1 5 1 16 // this is custom to shorten the delay between firing freezeblasts |
1 | h266 | 619 | |
9 | h266 | 620 | ai AICOMMSPINNW ACOMMSPINNW COMMGETVELSNW spin |
621 | ai AICOMMSHOOTNW ACOMMSHOOTNW COMMSTOPPEDNW faceplayerslow |
||
1 | h266 | 622 | |
623 | state checkcommhitstate |
||
624 | |||
625 | ifhitweapon |
||
626 | { |
||
627 | debris SCRAP3 5 |
||
628 | ifdead |
||
629 | { |
||
630 | ifwasweapon FREEZEBLAST |
||
631 | { |
||
632 | break |
||
633 | } |
||
634 | else |
||
635 | ifwasweapon GROWSPARK |
||
636 | { |
||
637 | sound ACTOR_GROWING |
||
638 | ai AICOMMGROW |
||
639 | break |
||
640 | } |
||
641 | |||
642 | addkills 1 |
||
643 | |||
644 | ifwasweapon RADIUSEXPLOSION |
||
645 | { |
||
646 | debris SCRAP3 5 |
||
647 | sound SQUISH2 |
||
648 | killit |
||
649 | } |
||
650 | else |
||
651 | ifwasweapon RPG |
||
652 | { |
||
653 | sound SQUISH2 |
||
654 | debris SCRAP3 5 |
||
655 | state standard_jibs |
||
656 | killit |
||
657 | } |
||
658 | |||
659 | debris SCRAP3 100 |
||
660 | sound COMM_DYING |
||
661 | ai AICOMMDYING |
||
662 | } |
||
663 | else |
||
664 | { |
||
665 | soundonce COMM_PAIN |
||
666 | ifwasweapon SHRINKSPARK |
||
667 | { |
||
668 | sound ACTOR_SHRINKING |
||
669 | ai AICOMMSHRUNK |
||
670 | } |
||
671 | else |
||
672 | ifwasweapon GROWSPARK |
||
673 | sound EXPANDERHIT |
||
674 | else |
||
675 | ifrnd 24 |
||
676 | ai AICOMMABOUTTOSHOOT |
||
677 | } |
||
678 | } |
||
679 | ends |
||
680 | |||
681 | actor COMMANDERSTAYPUT COMMANDERSTRENGTH |
||
682 | cactor COMMANDER |
||
683 | ai AICOMMABOUTTOSHOOT |
||
684 | enda |
||
685 | |||
686 | actor COMMANDER COMMANDERSTRENGTH |
||
687 | |||
688 | state checksquished |
||
689 | |||
690 | ifaction ACOMMFROZEN |
||
691 | { |
||
692 | fall |
||
693 | |||
694 | ifcount THAWTIME |
||
695 | { |
||
696 | getlastpal |
||
697 | ai AICOMMWAIT |
||
698 | } |
||
699 | else |
||
700 | ifcount FROZENDRIPTIME |
||
701 | { |
||
702 | ifactioncount 26 |
||
703 | { |
||
704 | spawn WATERDRIP |
||
705 | resetactioncount |
||
706 | } |
||
707 | } |
||
708 | |||
709 | ifhitweapon |
||
710 | { |
||
711 | ifwasweapon FREEZEBLAST |
||
712 | { |
||
713 | strength 0 |
||
714 | break |
||
715 | } |
||
716 | addkills 1 |
||
717 | |||
718 | ifrnd 84 |
||
719 | spawn BLOODPOOL |
||
720 | lotsofglass 30 |
||
721 | sound GLASS_BREAKING |
||
722 | killit |
||
723 | } |
||
724 | ifp pfacing |
||
725 | ifpdistl FROZENQUICKKICKDIST |
||
726 | pkick |
||
727 | break |
||
728 | } |
||
729 | ifai 0 |
||
8 | h266 | 730 | ai AICOMMSHOOTNW |
1 | h266 | 731 | else |
732 | ifai AICOMMWAIT |
||
733 | { |
||
734 | ifcount 20 |
||
735 | { |
||
736 | ifcansee |
||
737 | { |
||
738 | ifcanshoottarget |
||
739 | { |
||
740 | ifrnd 96 |
||
741 | ai AICOMMGET |
||
742 | else |
||
743 | ai AICOMMABOUTTOSHOOT |
||
744 | } |
||
745 | } |
||
746 | else |
||
747 | ai AICOMMGET |
||
748 | } |
||
749 | } |
||
750 | else |
||
751 | ifai AICOMMABOUTTOSHOOT |
||
752 | { |
||
753 | ifactioncount 2 |
||
754 | { |
||
755 | ifcansee |
||
8 | h266 | 756 | ai AICOMMSHOOTNW |
1 | h266 | 757 | else |
758 | { |
||
759 | ai AICOMMGET |
||
760 | break |
||
761 | } |
||
762 | } |
||
763 | ifrnd 32 soundonce COMM_ATTACK |
||
764 | } |
||
765 | else |
||
8 | h266 | 766 | ifai AICOMMSHOOTNW |
1 | h266 | 767 | { |
768 | ifcanshoottarget |
||
769 | { |
||
770 | ifcount 12 |
||
771 | ifrnd 16 |
||
772 | ai AICOMMWAIT |
||
8 | h266 | 773 | |
1 | h266 | 774 | ifactioncount 1 |
775 | { |
||
776 | shoot FREEZEBLAST |
||
777 | resetactioncount |
||
778 | } |
||
8 | h266 | 779 | |
780 | getplayer[THISACTOR].i temp |
||
781 | getactor[temp].pal temp |
||
782 | ifvare temp 1 // if player is frozen |
||
783 | ai AICOMMGET |
||
1 | h266 | 784 | } |
785 | else |
||
786 | ai AICOMMGET |
||
787 | } |
||
788 | else |
||
789 | ifai AICOMMSHRUNK |
||
790 | { |
||
791 | ifcount SHRUNKDONECOUNT |
||
792 | ai AICOMMGET |
||
793 | else |
||
794 | ifcount SHRUNKCOUNT |
||
795 | sizeto 48 40 |
||
796 | else |
||
797 | state genericshrunkcode |
||
798 | } |
||
799 | else |
||
800 | ifai AICOMMGROW |
||
801 | state genericgrowcode |
||
802 | else |
||
803 | ifai AICOMMGET |
||
804 | { |
||
805 | ifnotmoving |
||
806 | ifrnd 4 |
||
807 | operate |
||
808 | ifpdistl 1024 |
||
8 | h266 | 809 | { |
1 | h266 | 810 | ifp palive |
8 | h266 | 811 | { |
812 | sound COMM_SPIN |
||
813 | ai AICOMMSPINNW |
||
814 | break |
||
815 | } |
||
816 | |||
817 | getplayer[THISACTOR].i temp |
||
818 | getactor[temp].pal temp |
||
819 | ifvare temp 1 // if player is frozen |
||
820 | { |
||
821 | sound COMM_SPIN |
||
822 | ai AICOMMSPINNW |
||
823 | break |
||
824 | } |
||
1 | h266 | 825 | } |
826 | |||
827 | ifcansee |
||
828 | { |
||
829 | ifp phigher |
||
830 | move COMMGETUPVELS getv geth faceplayer |
||
831 | else |
||
832 | move COMMGETVELS getv geth faceplayer |
||
833 | } |
||
834 | ifactioncount 8 |
||
835 | ifrnd 2 |
||
836 | ai AICOMMABOUTTOSHOOT |
||
837 | } |
||
838 | else |
||
839 | ifai AICOMMSPINNW |
||
840 | { |
||
841 | soundonce COMM_SPIN |
||
842 | ifcount 16 |
||
843 | { |
||
844 | ifpdistl 1280 |
||
845 | { |
||
8 | h266 | 846 | setvar tempb CAPTSPINNINGPLAYER |
847 | mulvar tempb -1 |
||
848 | // addphealth CAPTSPINNINGPLAYER |
||
849 | getplayer[THISACTOR].i temp |
||
850 | setactor[temp].htextra tempb |
||
851 | setactor[temp].htpicnum KNEE |
||
852 | setactor[temp].htowner THISACTOR |
||
853 | |||
854 | globalsound DUKE_GRUNT |
||
855 | palfrom 32 16 |
||
856 | resetcount |
||
1 | h266 | 857 | } |
858 | else |
||
859 | ifpdistg 2300 |
||
860 | ai AICOMMWAIT |
||
861 | } |
||
862 | ifactioncount 52 |
||
863 | ai AICOMMWAIT |
||
864 | ifnotmoving |
||
865 | ifrnd 32 |
||
866 | operate |
||
867 | } |
||
868 | |||
869 | ifai AICOMMDYING |
||
870 | { |
||
871 | fall |
||
872 | strength 0 |
||
873 | |||
874 | ifhitweapon |
||
875 | ifwasweapon RADIUSEXPLOSION |
||
876 | { |
||
877 | sound SQUISH2 |
||
878 | spawn BLOODPOOL |
||
879 | state standard_jibs |
||
880 | |||
881 | killit |
||
882 | } |
||
883 | |||
884 | ifaction ACOMMDYING |
||
885 | ifactioncount 8 |
||
886 | { |
||
887 | iffloordistl 8 |
||
888 | sound THUD |
||
889 | cstat 0 |
||
890 | action ACOMMDEAD |
||
891 | } |
||
892 | } |
||
893 | else |
||
894 | { |
||
895 | ifrnd 2 |
||
896 | soundonce COMM_ROAM |
||
897 | state checkcommhitstate |
||
898 | } |
||
899 | enda |
||
900 | |||
30 | h266 | 901 | // Frosted Battle Mobile |
902 | |||
1 | h266 | 903 | move TANKSTOPNW |
904 | |||
905 | useractor enemy TANK TANKSTRENGTH |
||
906 | fall |
||
907 | |||
908 | // sizeat 45 45 |
||
909 | ifaction 0 |
||
910 | { |
||
911 | action ATANKWAIT |
||
912 | cstat 257 |
||
913 | clipdist 100 |
||
914 | } |
||
915 | else |
||
916 | ifaction ATANKSPIN |
||
917 | { |
||
918 | soundonce TANK_ROAM |
||
919 | |||
920 | ifactioncount 20 |
||
921 | { |
||
922 | ifrnd 16 |
||
923 | ifcansee |
||
924 | ifcanshoottarget |
||
925 | { |
||
926 | move TANKSTOPNW geth |
||
927 | action ATANKSHOOTING |
||
928 | stopsound TANK_ROAM |
||
929 | } |
||
930 | } |
||
931 | |||
932 | ifrnd 16 |
||
933 | move TANKFORWARD seekplayer |
||
934 | } |
||
935 | else |
||
936 | ifaction ATANKSHOOTING |
||
937 | { |
||
938 | ifactioncount 22 |
||
939 | { |
||
940 | ifpdistg 8192 |
||
941 | { |
||
942 | sound BOS1_ATTACK2 |
||
943 | shoot MORTER |
||
944 | } |
||
945 | resetcount |
||
946 | move 0 action ATANKWAIT |
||
947 | } |
||
948 | else |
||
949 | ifactioncount 2 |
||
950 | { |
||
951 | ifcansee |
||
952 | { |
||
953 | ifpdistl 16384 |
||
954 | { |
||
955 | ifrnd 128 |
||
956 | { |
||
957 | |||
958 | |||
959 | sound PISTOL_FIRE |
||
960 | shoot SHOTSPARK1 |
||
961 | } |
||
962 | } |
||
963 | else |
||
964 | ifrnd 128 |
||
965 | { |
||
966 | sound PRED_ATTACK |
||
967 | shoot FIRELASER |
||
968 | } |
||
969 | } |
||
970 | else |
||
971 | { |
||
972 | move TANKFORWARD seekplayer |
||
973 | action ATANKSPIN |
||
974 | } |
||
975 | } |
||
976 | |||
977 | ifrnd 16 |
||
978 | { |
||
979 | stopsound TANK_ROAM |
||
980 | move TANKSTOPNW faceplayerslow |
||
981 | } |
||
982 | } |
||
983 | else |
||
984 | ifaction ATANKWAIT |
||
985 | { |
||
986 | ifactioncount 32 |
||
987 | { |
||
988 | move TANKFORWARD seekplayer |
||
989 | action ATANKSPIN |
||
990 | } |
||
991 | } |
||
992 | else |
||
993 | ifaction ATANKDEAD |
||
994 | { |
||
995 | addkills 1 |
||
996 | hitradius 6144 TOUGH TOUGH TOUGH TOUGH |
||
997 | sound LASERTRIP_EXPLODE |
||
998 | debris SCRAP1 15 |
||
999 | spawn EXPLOSION2 |
||
1000 | ifrnd 128 spawn SNOWMAN |
||
1001 | killit |
||
1002 | } |
||
1003 | |||
1004 | ifhitweapon |
||
1005 | { |
||
1006 | ifdead |
||
1007 | action ATANKDEAD |
||
1008 | else |
||
1009 | { |
||
1010 | debris SCRAP1 1 |
||
1011 | ifaction ATANKSHOOTING break |
||
1012 | |||
1013 | ifrnd 192 |
||
1014 | { |
||
1015 | move TANKSTOPNW geth |
||
1016 | action ATANKSHOOTING |
||
1017 | stopsound TANK_ROAM |
||
1018 | } |
||
1019 | } |
||
1020 | } |
||
1021 | |||
1022 | enda |
||
1023 | |||
1024 | |||
1025 | include NWActor.con |
||
1026 | include NWSnow.con |
||
1027 | |||
1028 | // ----------------------------------------------------------------------------- |
||
1029 | |||
1030 | onevent EVENT_GAME |
||
8 | h266 | 1031 | ifactor APLAYER |
1032 | { |
||
1033 | state nwl3surprise |
||
1034 | |||
1035 | getplayer[THISACTOR].holoduke_on holodukeid |
||
1036 | ifvarg holodukeid -1 |
||
1037 | setactor[holodukeid].mdflags 16 |
||
1038 | |||
1039 | // addlogvar skin |
||
1040 | } |
||
1041 | ifactor FRAMEEFFECT1 |
||
1042 | ifspawnedby APLAYER |
||
1043 | setactor[THISACTOR].mdflags 16 |
||
1044 | |||
1 | h266 | 1045 | /* |
1046 | ifactor MONEY |
||
1047 | { |
||
1048 | setactor[THISACTOR].mdflags 16 |
||
14 | h266 | 1049 | // getactor[THISACTOR].owner owner |
1 | h266 | 1050 | switch owner |
1051 | case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE |
||
1052 | getactor[THISACTOR].x x |
||
1053 | getactor[THISACTOR].y y |
||
1054 | getactor[THISACTOR].z z |
||
1055 | |||
1056 | updatesectorz x y z temp |
||
1057 | ifvarn temp -1 getflorzofslope temp x y temp2 else killit |
||
1058 | |||
1059 | ifvarvare z temp2 killit |
||
1060 | break |
||
1061 | endswitch |
||
1062 | } |
||
1063 | */ |
||
1064 | endevent |
||
1065 | |||
14 | h266 | 1066 | onevent EVENT_ANIMATESPRITES |
1 | h266 | 1067 | |
1068 | ifvare picnum DOORSHOCK |
||
1069 | { |
||
1070 | ifspritepal 30 settspr[THISACTOR].tsprpicnum 3656 |
||
1071 | ifvare VOLUME 1 ifvare LEVEL 2 settspr[THISACTOR].tsprpicnum 3656 |
||
1072 | break |
||
1073 | } |
||
1074 | ifvare picnum SNOWFLAKE |
||
1075 | { |
||
1076 | settspr[THISACTOR].tsprpicnum SNOW |
||
1077 | settspr[THISACTOR].tsprxrepeat 4 |
||
1078 | settspr[THISACTOR].tspryrepeat 4 |
||
1079 | break |
||
1080 | } |
||
1081 | /* |
||
1082 | ifvare picnum MONEY |
||
1083 | { |
||
1084 | switch owner |
||
1085 | case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE |
||
1086 | settspr[THISACTOR].tsprpicnum SNOW |
||
1087 | break |
||
1088 | endswitch |
||
1089 | } |
||
1090 | */ |
||
8 | h266 | 1091 | |
1092 | switch picnum |
||
1093 | case APLAYER |
||
1094 | ifvare skin SANTA |
||
1095 | { |
||
1096 | gettspr[THISACTOR].tsprpicnum temp3 |
||
14 | h266 | 1097 | ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096 |
8 | h266 | 1098 | settspr[THISACTOR].tsprpicnum temp3 |
1 | h266 | 1099 | |
8 | h266 | 1100 | ifvarg holodukeid -1 |
1101 | { |
||
1102 | gettspr[holodukeid].tsprpicnum temp3 |
||
14 | h266 | 1103 | ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096 |
8 | h266 | 1104 | settspr[holodukeid].tsprpicnum temp3 |
1105 | } |
||
1106 | } |
||
1107 | break |
||
1108 | |||
1109 | case FRAMEEFFECT1 |
||
1110 | ifvare skin SANTA |
||
1111 | ifspawnedby APLAYER |
||
1112 | { |
||
1113 | gettspr[THISACTOR].tsprpicnum temp3 |
||
14 | h266 | 1114 | ifvarg temp3 1399 ifvarl temp3 1544 addvar temp3 4096 |
8 | h266 | 1115 | settspr[THISACTOR].tsprpicnum temp3 |
1116 | } |
||
1117 | break |
||
1118 | |||
1119 | case DUKETORSO |
||
1120 | case DUKEGUN |
||
1121 | getactor[owner].picnum temp2 |
||
1122 | ifvare temp2 SOBBOTWALK |
||
1123 | { |
||
1124 | gettspr[THISACTOR].tsprpicnum temp3 |
||
1125 | addvar temp3 2456 |
||
1126 | settspr[THISACTOR].tsprpicnum temp3 |
||
1127 | } |
||
1128 | ifvare temp2 SOBBOTFLY |
||
1129 | { |
||
1130 | gettspr[THISACTOR].tsprpicnum temp3 |
||
1131 | addvar temp3 2456 |
||
1132 | settspr[THISACTOR].tsprpicnum temp3 |
||
1133 | } |
||
1134 | ifvare temp2 APLAYER |
||
1135 | { |
||
1136 | ifvare skin SANTA |
||
1137 | { |
||
1138 | gettspr[THISACTOR].tsprpicnum temp3 |
||
1139 | addvar temp3 2456 |
||
1140 | settspr[THISACTOR].tsprpicnum temp3 |
||
1141 | } |
||
1142 | } |
||
1143 | break |
||
1 | h266 | 1144 | |
8 | h266 | 1145 | case DUKELEG |
1146 | getactor[owner].picnum temp2 |
||
1147 | ifvare temp2 SOBBOTWALK settspr[THISACTOR].tsprpal 30 |
||
1148 | ifvare temp2 SOBBOTFLY settspr[THISACTOR].tsprpal 30 |
||
1149 | ifvare temp2 APLAYER ifvare skin SANTA settspr[THISACTOR].tsprpal 30 |
||
1150 | break |
||
1151 | endswitch |
||
1152 | |||
1153 | ifvare picnum APLAYER // this fixes the bug with the misplaced TV screen tiles |
||
1 | h266 | 1154 | { |
1155 | gettspr[THISACTOR].tsprpicnum temp |
||
1156 | switch temp |
||
1157 | case 1470 case 1471 case 1472 case 1473 case 1474 |
||
1158 | subvar temp 5 |
||
1159 | settspr[THISACTOR].tsprpicnum temp |
||
1160 | break |
||
1161 | endswitch |
||
1162 | } |
||
1163 | endevent |
||
1164 | |||
1165 | |||
1166 | |||
1167 | |||
1168 | useractor notenemy NWEFFECTOR 0 |
||
22 | h266 | 1169 | cstat 32768 |
1170 | // sizeat 1 1 |
||
1 | h266 | 1171 | |
22 | h266 | 1172 | ifspritepal 31 // phone ringing effect |
1173 | { |
||
1174 | /* |
||
1175 | getplayer[THISACTOR].cursectnum temp3 |
||
1176 | switch temp3 |
||
1177 | case 60 case 61 case 62 case 63 |
||
1178 | case 86 case 87 |
||
1179 | case 299 case 300 case 301 case 302 case 303 case 304 case 305 case 306 case 307 case 308 case 309 |
||
1180 | case 310 case 311 case 312 case 313 case 314 case 315 case 316 case 317 |
||
1181 | soundonce PHONE_RING |
||
1 | h266 | 1182 | break |
1183 | |||
22 | h266 | 1184 | default |
1185 | stopsound PHONE_RING |
||
1186 | break |
||
1187 | endswitch |
||
1188 | */ |
||
1189 | |||
1190 | ifpdistl 8192 // 4096 |
||
1191 | soundonce PHONE_RING |
||
1192 | ifpdistg 16384 |
||
1193 | stopsound PHONE_RING |
||
1194 | |||
1195 | ifpdistl RETRIEVEDISTANCE |
||
1 | h266 | 1196 | ifp pfacing |
22 | h266 | 1197 | ifhitspace |
1198 | ifvare temp2 0 |
||
1199 | { |
||
1200 | setvar temp 0 |
||
1201 | setvar temp2 1 |
||
1202 | setvar temp3 0 |
||
1203 | setvar tempb 0 |
||
1204 | } |
||
1 | h266 | 1205 | |
22 | h266 | 1206 | ifvare temp2 1 |
1207 | { |
||
1208 | addvar temp 1 |
||
1 | h266 | 1209 | |
22 | h266 | 1210 | stopsound PHONE_RING |
1211 | ifvare temp 1 |
||
1212 | sound PHONE_PICKUP |
||
1213 | else ifvare temp 30 |
||
1214 | { |
||
1215 | setvar tempb 0 |
||
1216 | randvar tempb 3 |
||
1217 | |||
1218 | switch tempb |
||
1219 | case 0 |
||
1220 | sound LOWANG1 |
||
1221 | setvar temp3 57 |
||
1222 | break |
||
1223 | case 1 |
||
1224 | sound LOWANG2 |
||
1225 | setvar temp3 124 |
||
1226 | break |
||
1227 | case 2 |
||
1228 | sound LOWANG3 |
||
1229 | setvar temp3 121 |
||
1230 | break |
||
1231 | case 3 |
||
1232 | sound LOWANG4 |
||
1233 | setvar temp3 156 |
||
1234 | break |
||
1235 | endswitch |
||
1236 | |||
1237 | addvar temp3 60 |
||
1238 | setvar tempb 0 |
||
1239 | } |
||
1240 | else ifvarvare temp temp3 |
||
1241 | { |
||
1242 | sound PHONE_HANGUP |
||
1243 | setvarvar tempb temp3 |
||
1244 | addvar tempb 150 |
||
1245 | } |
||
1246 | else ifvarvare temp tempb |
||
1247 | { |
||
1248 | setvar temp2 0 |
||
1249 | setvar temp 0 |
||
1250 | } |
||
1251 | } |
||
1252 | } |
||
1 | h266 | 1253 | enda |
1254 | |||
1255 | useractor notenemy 3831 0 |
||
1256 | // cstat 32768 |
||
1257 | sizeat 12 13 |
||
1258 | getactor[THISACTOR].sectnum temp |
||
1259 | getplayer[THISACTOR].cursectnum temp2 |
||
1260 | ifvarvare temp temp2 |
||
1261 | { |
||
1262 | setuserdef[THISACTOR].volume_number 1 |
||
1263 | endofgame 13 |
||
1264 | } |
||
1265 | enda |
||
1266 | |||
1267 | action WOODENHORSE2FRAME 0 1 5 |
||
1268 | action WOODEN2FALLFRAME -2738 1 5 |
||
1269 | useractor notenemy WOODENHORSE2 WEAK WOODENHORSE2FRAME |
||
1270 | fall |
||
1271 | ifhitweapon |
||
1272 | { |
||
1273 | ifdead |
||
1274 | { |
||
1275 | debris SCRAP1 4 |
||
1276 | debris SCRAP2 3 |
||
1277 | killit |
||
1278 | } |
||
1279 | else |
||
1280 | action WOODEN2FALLFRAME |
||
1281 | } |
||
1282 | enda |
||
1283 | |||
1284 | useractor notenemy NWSTEAM 0 |
||
1285 | ifpdistl 6144 |
||
1286 | soundonce STEAM_HISSING |
||
1287 | enda |
||
1288 | |||
1289 | define title_x1 73 |
||
1290 | define title_x2 306 |
||
1291 | define title_y 194 |
||
1292 | define title_zoom 32768 |
||
1293 | |||
1294 | onevent EVENT_DISPLAYMENU |
||
1295 | // getplayer[THISACTOR].gm temp |
||
1296 | // ifvarand temp 4 nullop else |
||
1297 | // { |
||
1298 | rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim |
||
1299 | rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim |
||
1300 | // } |
||
1301 | endevent |
||
1302 | |||
1303 | /* |
||
1304 | onevent EVENT_DISPLAYTITLE |
||
1305 | rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim |
||
1306 | rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim |
||
1307 | endevent |
||
1308 | */ |
||
1309 | |||
1310 |