Subversion Repositories nw_plus

Rev

Rev 1 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 66
1
/*
1
/*
2
--------------------------------------------------------------------------------
2
--------------------------------------------------------------------------------
3
Duke: Nuclear Winter
3
Duke: Nuclear Winter
4
By Joris Weimar
4
By Joris Weimar
5
© 1997 Simply Silly Software
5
© 1997 Simply Silly Software
6
--------------------------------------------------------------------------------
6
--------------------------------------------------------------------------------
7
Duke: Nuclear Winter Plus
7
Duke: Nuclear Winter Plus
8
By Hendricks266
8
By Hendricks266
9
--------------------------------------------------------------------------------
9
--------------------------------------------------------------------------------
10
*/
10
*/
11
11
12
state checkcommhitstate
12
state checkcommhitstate
13
13
14
  ifhitweapon
14
  ifhitweapon
15
  {
15
  {
16
    guts JIBS6 2
16
    guts JIBS6 2
17
17
18
    ifdead
18
    ifdead
19
    {
19
    {
20
      ifwasweapon FREEZEBLAST
20
      ifwasweapon FREEZEBLAST
21
      {
21
      {
22
        sound SOMETHINGFROZE
22
        sound SOMETHINGFROZE
23
        spritepal 1
23
        spritepal 1
24
        move 0
24
        move 0
25
        action ACOMMFROZEN
25
        action ACOMMFROZEN
26
        strength 0
26
        strength 0
27
        state icesmoke
27
        state icesmoke
28
        break
28
        break
29
      }
29
      }
30
      else
30
      else
31
        ifwasweapon GROWSPARK
31
        ifwasweapon GROWSPARK
32
      {
32
      {
33
        sound ACTOR_GROWING
33
        sound ACTOR_GROWING
34
        ai AICOMMGROW
34
        ai AICOMMGROW
35
        break
35
        break
36
      }
36
      }
37
37
38
      addkills 1 state specialdeath
38
      addkills 1 state specialdeath
39
39
40
      ifwasweapon RADIUSEXPLOSION
40
      ifwasweapon RADIUSEXPLOSION
41
      {
41
      {
42
        spawn BLOODPOOL
42
        spawn BLOODPOOL
43
        sound SQUISHED
43
        sound SQUISHED
44
        state standard_jibs
44
        state standard_jibs
45
        killit
45
        killit
46
      }
46
      }
47
      else
47
      else
48
        ifwasweapon RPG
48
        ifwasweapon RPG
49
      {
49
      {
50
        sound SQUISHED
50
        sound SQUISHED
51
        spawn BLOODPOOL
51
        spawn BLOODPOOL
52
        state standard_jibs
52
        state standard_jibs
53
        killit
53
        killit
54
      }
54
      }
55
55
56
      sound COMM_DYING
56
      sound COMM_DYING
57
      ai AICOMMDYING
57
      ai AICOMMDYING
58
    }
58
    }
59
    else
59
    else
60
    {
60
    {
61
      soundonce COMM_PAIN
61
      soundonce COMM_PAIN
62
      ifwasweapon SHRINKSPARK
62
      ifwasweapon SHRINKSPARK
63
      {
63
      {
64
        sound ACTOR_SHRINKING
64
        sound ACTOR_SHRINKING
65
        ai AICOMMSHRUNK
65
        ai AICOMMSHRUNK
66
      }
66
      }
67
      else
67
      else
68
        ifwasweapon GROWSPARK
68
        ifwasweapon GROWSPARK
69
          sound EXPANDERHIT
69
          sound EXPANDERHIT
70
      else
70
      else
71
        ifrnd 24
71
        ifrnd 24
72
          ai AICOMMABOUTTOSHOOT
72
          ai AICOMMABOUTTOSHOOT
73
    }
73
    }
74
  }
74
  }
75
ends
75
ends
76
76
77
state commshootbot
77
state commshootbot
78
78
79
state calczdist
79
state calczdist
80
ldist xydist THISACTOR target
80
ldist xydist THISACTOR target
81
ifvare xydist 0 setvar xydist 1
81
ifvare xydist 0 setvar xydist 1
82
82
83
ifvarand monstflags 32
83
ifvarand monstflags 32
84
{
84
{
85
	mulvar zdist 768
85
	mulvar zdist 768
86
	divvarvar zdist xydist
86
	divvarvar zdist xydist
87
	setprojectile[ELECTROPROJ].workslike 36866
87
	setprojectile[ELECTROPROJ].workslike 36866
88
	ezshoot zdist ELECTROPROJ
88
	ezshoot zdist ELECTROPROJ
89
	setthisprojectile[RETURN].extra 50
89
	setthisprojectile[RETURN].extra 50
90
	ifvarand monstflags 8
90
	ifvarand monstflags 8
91
	{
91
	{
92
		ezshoot zdist ELECTROPROJ
92
		ezshoot zdist ELECTROPROJ
93
		setthisprojectile[RETURN].extra 50
93
		setthisprojectile[RETURN].extra 50
94
	}
94
	}
95
	setprojectile[ELECTROPROJ].workslike 32770
95
	setprojectile[ELECTROPROJ].workslike 32770
96
}
96
}
97
ifvarand monstflags 16
97
ifvarand monstflags 16
98
{
98
{
99
	eshoot FIREBALLPROJ 
99
	eshoot FIREBALLPROJ 
100
	ifvarand monstflags 8 
100
	ifvarand monstflags 8 
101
	{
101
	{
102
		setthisprojectile[RETURN].pal 13
102
		setthisprojectile[RETURN].pal 13
103
		setthisprojectile[RETURN].extra 64
103
		setthisprojectile[RETURN].extra 64
104
	}
104
	}
105
} 
105
} 
106
else
106
else
107
{
107
{
108
	mulvar zdist 644
108
	mulvar zdist 644
109
	divvarvar zdist xydist
109
	divvarvar zdist xydist
110
	ezshoot zdist FREEZEBLAST // NOAIM
110
	ezshoot zdist FREEZEBLAST // NOAIM
111
	ifvarand monstflags 8 setactor[RETURN].extra 100
111
	ifvarand monstflags 8 setactor[RETURN].extra 100
112
	setactor[RETURN].ang sprite[THISACTOR].ang
112
	setactor[RETURN].ang sprite[THISACTOR].ang
113
113
114
}
114
}
115
115
116
116
117
resetactioncount
117
resetactioncount
118
118
119
ends
119
ends
120
120
121
state commshooting
121
state commshooting
122
122
123
ifvarn target -1 { state commshootbot break }
123
ifvarn target -1 { state commshootbot break }
124
124
125
ifvarand monstflags 32
125
ifvarand monstflags 32
126
{
126
{
127
	eshoot ELECTROPROJ
127
	eshoot ELECTROPROJ
128
	setthisprojectile[RETURN].extra 50
128
	setthisprojectile[RETURN].extra 50
129
	ifvarand monstflags 8
129
	ifvarand monstflags 8
130
	{
130
	{
131
		eshoot ELECTROPROJ
131
		eshoot ELECTROPROJ
132
		setthisprojectile[RETURN].extra 50
132
		setthisprojectile[RETURN].extra 50
133
	}
133
	}
134
} else
134
} else
135
ifvarand monstflags 16
135
ifvarand monstflags 16
136
{
136
{
137
	eshoot FIREBALLPROJ 
137
	eshoot FIREBALLPROJ 
138
	ifvarand monstflags 8 
138
	ifvarand monstflags 8 
139
	{
139
	{
140
		setthisprojectile[RETURN].pal 13
140
		setthisprojectile[RETURN].pal 13
141
		setthisprojectile[RETURN].extra 64
141
		setthisprojectile[RETURN].extra 64
142
	}
142
	}
143
} 
143
} 
144
else
144
else
145
{
145
{
146
	shoot FREEZEBLAST
146
	shoot FREEZEBLAST
147
	ifvarand monstflags 8 shoot FREEZEBLAST
147
	ifvarand monstflags 8 shoot FREEZEBLAST
148
}
148
}
149
149
150
150
151
resetactioncount
151
resetactioncount
152
152
153
ends
153
ends
154
154
155
actor COMMANDERSTAYPUT COMMANDERSTRENGTH
155
actor COMMANDERSTAYPUT COMMANDERSTRENGTH
156
  cactor COMMANDER
156
  cactor COMMANDER
157
  ai AICOMMABOUTTOSHOOT
157
  ai AICOMMABOUTTOSHOOT
158
enda
158
enda
159
159
160
state commspinbotstate
160
state commspinbotstate
161
161
162
getactor[target].x mx
162
getactor[target].x mx
163
getactor[target].y my
163
getactor[target].y my
164
getactor[target].z mz
164
getactor[target].z mz
165
getactor[THISACTOR].x x
165
getactor[THISACTOR].x x
166
getactor[THISACTOR].y y
166
getactor[THISACTOR].y y
167
getactor[THISACTOR].z z
167
getactor[THISACTOR].z z
168
subvarvar mx x
168
subvarvar mx x
169
subvarvar my y
169
subvarvar my y
170
getangle angvar mx my
170
getangle angvar mx my
171
171
172
cos xvel angvar
172
cos xvel angvar
173
sin yvel angvar
173
sin yvel angvar
174
shiftvarr xvel 7
174
shiftvarr xvel 7
175
shiftvarr yvel 7
175
shiftvarr yvel 7
176
subvarvar z mz 
176
subvarvar z mz 
177
ifvarg z 2048
177
ifvarg z 2048
178
setvar zvel -512 else
178
setvar zvel -512 else
179
ifvarl z -2048 setvar zvel 512
179
ifvarl z -2048 setvar zvel 512
180
movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN
180
movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN
181
181
182
    soundonce COMM_SPIN
182
    soundonce COMM_SPIN
183
    ifcount 16
183
    ifcount 16
184
    {
184
    {
185
      ifvarl xydist 1280
185
      ifvarl xydist 1280
186
      {
186
      {
187
	    setvar temp CAPTSPINNINGPLAYER
187
	    setvar nw_temp CAPTSPINNINGPLAYER
188
        ifvarand monstflags 8 mulvar temp -2 else mulvar temp -1
188
        ifvarand monstflags 8 mulvar nw_temp -2 else mulvar nw_temp -1
189
        setactor[target].htextra temp
189
        setactor[target].htextra nw_temp
190
        setactor[target].htpicnum RPG
190
        setactor[target].htpicnum RPG
191
        setactor[target].htowner THISACTOR
191
        setactor[target].htowner THISACTOR
192
        //sound DUKE_GRUNT
192
        //sound DUKE_GRUNT
193
        resetcount
193
        resetcount
194
      }
194
      }
195
      else
195
      else
196
        ifvarg xydist 2300
196
        ifvarg xydist 2300
197
          ai AICOMMWAIT
197
          ai AICOMMWAIT
198
    }
198
    }
199
    ifactioncount 52
199
    ifactioncount 52
200
      ai AICOMMWAIT
200
      ai AICOMMWAIT
201
    ifnotmoving
201
    ifnotmoving
202
      ifrnd 32
202
      ifrnd 32
203
        operate
203
        operate
204
204
205
ends
205
ends
206
206
207
state commspinstate
207
state commspinstate
208
208
209
getplayer[THISACTOR].posx mx
209
getplayer[THISACTOR].posx mx
210
getplayer[THISACTOR].posy my
210
getplayer[THISACTOR].posy my
211
getactor[THISACTOR].x x
211
getactor[THISACTOR].x x
212
getactor[THISACTOR].y y
212
getactor[THISACTOR].y y
213
subvarvar mx x
213
subvarvar mx x
214
subvarvar my y
214
subvarvar my y
215
getangle angvar mx my
215
getangle angvar mx my
216
216
217
cos xvel angvar
217
cos xvel angvar
218
sin yvel angvar
218
sin yvel angvar
219
shiftvarr xvel 7
219
shiftvarr xvel 7
220
shiftvarr yvel 7
220
shiftvarr yvel 7
221
setvar zvel 0
221
setvar zvel 0
222
movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN 
222
movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN 
223
223
224
    soundonce COMM_SPIN
224
    soundonce COMM_SPIN
225
    ifcount 16
225
    ifcount 16
226
    {
226
    {
227
      ifpdistl 1280 ifvarg canshootplayer 0
227
      ifpdistl 1280 ifvarg canshootplayer 0
228
      {
228
      {
229
        addphealth CAPTSPINNINGPLAYER
229
        addphealth CAPTSPINNINGPLAYER
230
        ifvarand monstflags 8 addphealth CAPTSPINNINGPLAYER
230
        ifvarand monstflags 8 addphealth CAPTSPINNINGPLAYER
231
        sound DUKE_GRUNT
231
        sound DUKE_GRUNT
232
        palfrom 32 16 
232
        palfrom 32 16 
233
        resetcount
233
        resetcount
234
      }
234
      }
235
      else
235
      else
236
        ifpdistg 2300
236
        ifpdistg 2300
237
          ai AICOMMWAIT
237
          ai AICOMMWAIT
238
    }
238
    }
239
    ifactioncount 52
239
    ifactioncount 52
240
      ai AICOMMWAIT
240
      ai AICOMMWAIT
241
    ifnotmoving
241
    ifnotmoving
242
      ifrnd 32
242
      ifrnd 32
243
        operate
243
        operate
244
        
244
        
245
ends
245
ends
246
246
247
state commfrisbeestate
247
state commfrisbeestate
248
248
249
setvar weapcount -1
249
setvar weapcount -1
250
ifcount 6
250
ifcount 6
251
{
251
{
252
	ifcount 7 nullop else
252
	ifcount 7 nullop else
253
	{
253
	{
254
		getplayer[THISACTOR].posx mx
254
		getplayer[THISACTOR].posx mx
255
		getplayer[THISACTOR].posy my
255
		getplayer[THISACTOR].posy my
256
		getactor[THISACTOR].x x
256
		getactor[THISACTOR].x x
257
		getactor[THISACTOR].y y
257
		getactor[THISACTOR].y y
258
		subvarvar mx x
258
		subvarvar mx x
259
		subvarvar my y
259
		subvarvar my y
260
		getangle peractor5 mx my
260
		getangle peractor5 mx my
261
	}
261
	}
262
	
262
	
263
	cos xvel peractor5
263
	cos xvel peractor5
264
	sin yvel peractor5
264
	sin yvel peractor5
265
	shiftvarr xvel 5
265
	shiftvarr xvel 5
266
	shiftvarr yvel 5
266
	shiftvarr yvel 5
267
	setvar zvel 0
267
	setvar zvel 0
268
	movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN
268
	movesprite THISACTOR xvel yvel zvel CLIPMASK0 RETURN
269
	ifvarn RETURN 0
269
	ifvarn RETURN 0
270
	{
270
	{
271
		addvar RETURN 16384
271
		addvar RETURN 16384
272
        ifvarl RETURN 16384
272
        ifvarl RETURN 16384
273
        ifvarg RETURN -1 // hit a sprite
273
        ifvarg RETURN -1 // hit a sprite
274
        {
274
        {
275
	        getactor[RETURN].picnum picnum
275
	        getactor[RETURN].picnum nw_picnum
276
	        getactorvar[RETURN].monstatus temp
276
	        getactorvar[RETURN].monstatus nw_temp
277
	        ifvare picnum APLAYER sound SQUISHED else
277
	        ifvare nw_picnum APLAYER sound SQUISHED else
278
	        ifvare temp 1 sound SQUISHED
278
	        ifvare nw_temp 1 sound SQUISHED
279
	        setactor[RETURN].htpicnum RPG
279
	        setactor[RETURN].htpicnum RPG
280
	        setactor[RETURN].htextra 100
280
	        setactor[RETURN].htextra 100
281
	        setactor[RETURN].htowner THISACTOR
281
	        setactor[RETURN].htowner THISACTOR
282
	        setactor[RETURN].htang peractor5
282
	        setactor[RETURN].htang peractor5
283
	        sound COMM_ATTACK
283
	        sound COMM_ATTACK
284
	        
284
	        
285
        }
285
        }
286
        ai AICOMMWAIT
286
        ai AICOMMWAIT
287
        setvar weapcount 0
287
        setvar weapcount 0
288
    }
288
    }
289
}
289
}
290
290
291
    soundonce COMM_SPIN
291
    soundonce COMM_SPIN
292
    
292
    
293
      ifpdistl 1280
293
      ifpdistl 1280
294
      ifvarg canseeplayer 0
294
      ifvarg canseeplayer 0
295
      {
295
      {
296
        addphealth -1
296
        addphealth -1
297
        ifvarand monstflags 8 addphealth -1
297
        ifvarand monstflags 8 addphealth -1
298
        sound DUKE_GRUNT
298
        sound DUKE_GRUNT
299
        palfrom 32 16 
299
        palfrom 32 16 
300
      }
300
      }
301
      
301
      
302
    
302
    
303
    ifactioncount 52
303
    ifactioncount 52
304
    {
304
    {
305
      ai AICOMMWAIT
305
      ai AICOMMWAIT
306
      setvar weapcount 0
306
      setvar weapcount 0
307
    }
307
    }
308
ends
308
ends
309
309
310
actor COMMANDER COMMANDERSTRENGTH
310
actor COMMANDER COMMANDERSTRENGTH
311
311
312
ifvarn target -1
312
ifvarn target -1
313
{
313
{
314
	getactor[THISACTOR].z z
314
	getactor[THISACTOR].z z
315
	getactor[target].z mz
315
	getactor[target].z mz
316
}
316
}
317
317
318
  state checksquished
318
  state checksquished
319
  state monsterai
319
  state monsterai
320
  ifaction ACOMMFROZEN
320
  ifaction ACOMMFROZEN
321
  {
321
  {
322
    fall
322
    fall
323
323
324
    ifcount THAWTIME
324
    ifcount THAWTIME
325
    {
325
    {
326
      getlastpal
326
      getlastpal
327
      ai AICOMMWAIT
327
      ai AICOMMWAIT
328
    }
328
    }
329
    else
329
    else
330
      ifcount FROZENDRIPTIME
330
      ifcount FROZENDRIPTIME
331
    {
331
    {
332
      ifactioncount 26
332
      ifactioncount 26
333
      {
333
      {
334
        spawn WATERDRIP
334
        spawn WATERDRIP
335
        resetactioncount
335
        resetactioncount
336
      }
336
      }
337
    }
337
    }
338
338
339
    ifhitweapon
339
    ifhitweapon
340
    {
340
    {
341
      ifwasweapon FREEZEBLAST
341
      ifwasweapon FREEZEBLAST
342
      {
342
      {
343
        strength 0
343
        strength 0
344
        break
344
        break
345
      }
345
      }
346
      addkills 1 state specialdeath
346
      addkills 1 state specialdeath
347
347
348
      ifrnd 84
348
      ifrnd 84
349
        spawn BLOODPOOL
349
        spawn BLOODPOOL
350
      lotsofglass 30
350
      lotsofglass 30
351
      state standard_jibs
351
      state standard_jibs
352
      sound GLASS_BREAKING
352
      sound GLASS_BREAKING
353
      killit
353
      killit
354
    }
354
    }
355
    ifp pfacing
355
    ifp pfacing
356
      ifpdistl FROZENQUICKKICKDIST
356
      ifpdistl FROZENQUICKKICKDIST
357
      ifvare superkicking 0
357
      ifvare superkicking 0
358
        pkick
358
        pkick
359
    break
359
    break
360
  }
360
  }
361
  ifai 0
361
  ifai 0
362
    ai AICOMMSHOOT
362
    ai AICOMMSHOOT
363
  else
363
  else
364
    ifai AICOMMWAIT
364
    ifai AICOMMWAIT
365
  {
365
  {
366
    ifcount 20
366
    ifcount 20
367
    {
367
    {
368
	  ifvarn target -1
368
	  ifvarn target -1
369
	  {
369
	  {
370
		  ifrnd 96
370
		  ifrnd 96
371
	            ai AICOMMGET
371
	            ai AICOMMGET
372
	          else
372
	          else
373
	            ai AICOMMABOUTTOSHOOT
373
	            ai AICOMMABOUTTOSHOOT
374
	  }
374
	  }
375
	  else
375
	  else
376
	  {
376
	  {
377
		  ifvarand monstflags 2048
377
		  ifvarand monstflags 2048
378
		  {
378
		  {
379
			  ifvarg targetlock 0
379
			  ifvarg targetlock 0
380
			  {
380
			  {
381
				ifrnd 96
381
				ifrnd 96
382
	              ai AICOMMGET
382
	              ai AICOMMGET
383
	            else ifvare playerally 0
383
	            else ifvare playerally 0
384
	              ai AICOMMABOUTTOSHOOT
384
	              ai AICOMMABOUTTOSHOOT
385
	          }
385
	          }
386
	          else
386
	          else
387
	             ai AICOMMGET
387
	             ai AICOMMGET
388
	      }
388
	      }
389
	      else
389
	      else
390
	      
390
	      
391
	      ifvarg canseeplayer 0
391
	      ifvarg canseeplayer 0
392
	      {
392
	      {
393
	        ifvarg canshootplayer 0
393
	        ifvarg canshootplayer 0
394
	        {
394
	        {
395
	          ifrnd 96
395
	          ifrnd 96
396
	            ai AICOMMGET
396
	            ai AICOMMGET
397
	          else ifvare playerally 0
397
	          else ifvare playerally 0
398
	            ai AICOMMABOUTTOSHOOT
398
	            ai AICOMMABOUTTOSHOOT
399
	        }
399
	        }
400
	      }
400
	      }
401
	      else
401
	      else
402
	        ai AICOMMGET
402
	        ai AICOMMGET
403
      }
403
      }
404
    }
404
    }
405
  }
405
  }
406
  else
406
  else
407
    ifai AICOMMABOUTTOSHOOT
407
    ifai AICOMMABOUTTOSHOOT
408
  {
408
  {
409
	ifvare target -1 ifvarn playerally 0 { ai AICOMMGET break }
409
	ifvare target -1 ifvarn playerally 0 { ai AICOMMGET break }
410
    ifactioncount 2
410
    ifactioncount 2
411
    {
411
    {
412
	  ifvarn target -1 ai AICOMMSHOOT else
412
	  ifvarn target -1 ai AICOMMSHOOT else
413
      ifvarg canseeplayer 0 ifvare playerally 0
413
      ifvarg canseeplayer 0 ifvare playerally 0
414
        ai AICOMMSHOOT
414
        ai AICOMMSHOOT
415
      else
415
      else
416
      {
416
      {
417
        ai AICOMMGET
417
        ai AICOMMGET
418
        break
418
        break
419
      }
419
      }
420
    }
420
    }
421
    ifrnd 32 soundonce COMM_ATTACK
421
    ifrnd 32 soundonce COMM_ATTACK
422
  }
422
  }
423
  else
423
  else
424
    ifai AICOMMSHOOT
424
    ifai AICOMMSHOOT
425
  {
425
  {
426
	ifvare target -1 ifvarn playerally 0 { ai AICOMMGET break }
426
	ifvare target -1 ifvarn playerally 0 { ai AICOMMGET break }
427
	setvar temp 0
427
	setvar nw_temp 0
428
	ifvarn target -1 setvar temp 1
428
	ifvarn target -1 setvar nw_temp 1
429
	ifvarand monstflags 2048
429
	ifvarand monstflags 2048
430
	ifvare playerally 0
430
	ifvare playerally 0
431
	{
431
	{
432
		ifangdiffl 512 
432
		ifangdiffl 512 
433
		{ 
433
		{ 
434
			ai AICOMMFRISBEE 
434
			ai AICOMMFRISBEE 
435
			break 
435
			break 
436
		} 
436
		} 
437
		else ifvarg targetlock 0 setvar temp 1 
437
		else ifvarg targetlock 0 setvar nw_temp 1 
438
	} else
438
	} else
439
	ifvarg canshootplayer 0 setvar temp 1
439
	ifvarg canshootplayer 0 setvar nw_temp 1
440
    ifvare temp 1
440
    ifvare nw_temp 1
441
    {
441
    {
442
      ifcount 24
442
      ifcount 24
443
        ifrnd 16
443
        ifrnd 16
444
          ai AICOMMWAIT
444
          ai AICOMMWAIT
445
      ifactioncount 2
445
      ifactioncount 2
446
      {
446
      {
447
	    state commshooting
447
	    state commshooting
448
      }
448
      }
449
    }
449
    }
450
    else
450
    else
451
      ai AICOMMGET
451
      ai AICOMMGET
452
  }
452
  }
453
  else
453
  else
454
    ifai AICOMMSHRUNK
454
    ifai AICOMMSHRUNK
455
  {
455
  {
456
    ifcount SHRUNKDONECOUNT
456
    ifcount SHRUNKDONECOUNT
457
      ai AICOMMGET
457
      ai AICOMMGET
458
    else
458
    else
459
      ifcount SHRUNKCOUNT
459
      ifcount SHRUNKCOUNT
460
        sizeto 48 40
460
        sizeto 48 40
461
    else
461
    else
462
      state genericshrunkcode
462
      state genericshrunkcode
463
  }
463
  }
464
  else
464
  else
465
    ifai AICOMMGROW
465
    ifai AICOMMGROW
466
      state genericgrowcode
466
      state genericgrowcode
467
  else
467
  else
468
    ifai AICOMMGET
468
    ifai AICOMMGET
469
  {
469
  {
470
	ifvarn playerally 0 ifvare target -1 ifpdistl 1280 { ai AICOMMWAIT break }
470
	ifvarn playerally 0 ifvare target -1 ifpdistl 1280 { ai AICOMMWAIT break }
471
    ifnotmoving
471
    ifnotmoving
472
      ifrnd 4
472
      ifrnd 4
473
        operate
473
        operate
474
    ifvare playerally 0
474
    ifvare playerally 0
475
    ifpdistl 1280
475
    ifpdistl 1280
476
      ifp palive
476
      ifp palive
477
    {
477
    {
478
      sound COMM_SPIN
478
      sound COMM_SPIN
479
      ai AICOMMSPIN
479
      ai AICOMMSPIN
480
      break
480
      break
481
    }
481
    }
482
    ifvarn target -1
482
    ifvarn target -1
483
      ifvarl xydist 1280
483
      ifvarl xydist 1280
484
    {
484
    {
485
	  sound COMM_SPIN
485
	  sound COMM_SPIN
486
	  ai AICOMMSPIN
486
	  ai AICOMMSPIN
487
	  break
487
	  break
488
    }
488
    }
489
489
490
    ifvarg canseeplayer 0
490
    ifvarg canseeplayer 0
491
    {
491
    {
492
	  setvar temp 0
492
	  setvar nw_temp 0
493
	  ifp phigher setvar temp 1
493
	  ifp phigher setvar nw_temp 1
494
	  ifvarn target -1
494
	  ifvarn target -1
495
	  ifvarvarg z mz setvar temp 1
495
	  ifvarvarg z mz setvar nw_temp 1
496
	  
496
	  
497
      ifvare temp 1
497
      ifvare nw_temp 1
498
        move COMMGETUPVELS getv geth faceplayer
498
        move COMMGETUPVELS getv geth faceplayer
499
      else
499
      else
500
        move COMMGETVELS getv geth faceplayer
500
        move COMMGETVELS getv geth faceplayer
501
    }
501
    }
502
    ifactioncount 8
502
    ifactioncount 8
503
      ifrnd 2
503
      ifrnd 2
504
        ai AICOMMABOUTTOSHOOT
504
        ai AICOMMABOUTTOSHOOT
505
  }
505
  }
506
  else
506
  else
507
    ifai AICOMMSPIN
507
    ifai AICOMMSPIN
508
  {
508
  {
509
	ifvarn target -1 state commspinbotstate else
509
	ifvarn target -1 state commspinbotstate else
510
	state commspinstate
510
	state commspinstate
511
  }
511
  }
512
  else ifai AICOMMFRISBEE state commfrisbeestate
512
  else ifai AICOMMFRISBEE state commfrisbeestate
513
513
514
  ifai AICOMMDYING
514
  ifai AICOMMDYING
515
  {
515
  {
516
    fall
516
    fall
517
    strength 0
517
    strength 0
518
518
519
    ifhitweapon
519
    ifhitweapon
520
      ifwasweapon RADIUSEXPLOSION
520
      ifwasweapon RADIUSEXPLOSION
521
    {
521
    {
522
      sound SQUISHED
522
      sound SQUISHED
523
      spawn BLOODPOOL
523
      spawn BLOODPOOL
524
      state standard_jibs
524
      state standard_jibs
525
      killit
525
      killit
526
    }
526
    }
527
527
528
    ifaction ACOMMDYING
528
    ifaction ACOMMDYING
529
      ifactioncount 8
529
      ifactioncount 8
530
    {
530
    {
531
      iffloordistl 8
531
      iffloordistl 8
532
        sound THUD
532
        sound THUD
533
      cstat 0
533
      cstat 0
534
      action ANULLACTION
534
      action ANULLACTION
535
      //action ACOMMDEAD
535
      //action ACOMMDEAD
536
      move 0
536
      move 0
537
      cactor COMMANDERCORPSE
537
      cactor COMMANDERCORPSE
538
    }
538
    }
539
  }
539
  }
540
  else
540
  else
541
  {
541
  {
542
    ifrnd 2
542
    ifrnd 2
543
      soundonce COMM_ROAM
543
      soundonce COMM_ROAM
544
    state checkcommhitstate
544
    state checkcommhitstate
545
  }
545
  }
546
enda
546
enda
547
547
548
548
549
549
550
550
551
useractor enemy TANK TANKSTRENGTH fall
551
useractor enemy TANK TANKSTRENGTH fall
552
  state monsterai
552
  state monsterai
553
  ifaction 0
553
  ifaction 0
554
  {
554
  {
555
   // sizeat 60 60
555
   // sizeat 60 60
556
    action ATANKWAIT
556
    action ATANKWAIT
557
    cstat 257
557
    cstat 257
558
    clipdist 100
558
    clipdist 100
559
  }
559
  }
560
  else
560
  else
561
    ifaction ATANKSPIN
561
    ifaction ATANKSPIN
562
  {
562
  {
563
    soundonce TANK_ROAM
563
    soundonce TANK_ROAM
564
564
565
    ifactioncount 20
565
    ifactioncount 20
566
    {
566
    {
567
	  ifvare target -1 ifvarn playerally 0 nullop else
567
	  ifvare target -1 ifvarn playerally 0 nullop else
568
      ifrnd 16
568
      ifrnd 16
569
        ifvarg canseeplayer 0
569
        ifvarg canseeplayer 0
570
          ifvarg canshootplayer 0
570
          ifvarg canshootplayer 0
571
      {
571
      {
572
        move STOPPED geth
572
        move STOPPED geth
573
        action ATANKSHOOTING
573
        action ATANKSHOOTING
574
        stopsound TANK_ROAM
574
        stopsound TANK_ROAM
575
      }
575
      }
576
    }
576
    }
577
577
578
    ifrnd 16
578
    ifrnd 16
579
      move TANKFORWARD seekplayer
579
      move TANKFORWARD seekplayer
580
  }
580
  }
581
  else
581
  else
582
    ifaction ATANKSHOOTING
582
    ifaction ATANKSHOOTING
583
  {
583
  {
584
	ifvarn target -1 state tankshootbot else
584
	ifvarn target -1 state tankshootbot else
585
	{
585
	{
586
		ifvarn playerally 0 { move 0 action ATANKWAIT break }
586
		ifvarn playerally 0 { move 0 action ATANKWAIT break }
587
	    ifactioncount 22
587
	    ifactioncount 22
588
	    {
588
	    {
589
	      ifpdistg 8192
589
	      ifpdistg 8192
590
	      {
590
	      {
591
	        sound BOS1_ATTACK2
591
	        sound BOS1_ATTACK2
592
	        shoot MORTER
592
	        shoot MORTER
593
	        ifvarand monstflags 8 shoot MORTER
593
	        ifvarand monstflags 8 shoot MORTER
594
	      }
594
	      }
595
	      resetcount
595
	      resetcount
596
	      move 0 action ATANKWAIT
596
	      move 0 action ATANKWAIT
597
	    }
597
	    }
598
	    else
598
	    else
599
	      ifactioncount 2
599
	      ifactioncount 2
600
	    {
600
	    {
601
	      ifvarg canseeplayer 0
601
	      ifvarg canseeplayer 0
602
	      {
602
	      {
603
	        ifpdistl 16384
603
	        ifpdistl 16384
604
	        {
604
	        {
605
	          ifrnd 128
605
	          ifrnd 128
606
	          {
606
	          {
607
		        ifvarand monstflags 16
607
		        ifvarand monstflags 16
608
		        {
608
		        {
609
			        ifvarand morefx 16
609
			        ifvarand morefx 16
610
			        ifvarn rendmode 0 espawn SHOTSPARK5
610
			        ifvarn rendmode 0 espawn SHOTSPARK5
611
			        sound PISTOL_LOW
611
			        sound PISTOL_LOW
612
			        shoot STARPROJ
612
			        shoot STARPROJ
613
			        ifvarand monstflags 8 shoot STARPROJ
613
			        ifvarand monstflags 8 shoot STARPROJ
614
		        } else
614
		        } else
615
		        {
615
		        {
616
			        ifvarand morefx 16
616
			        ifvarand morefx 16
617
			        ifvarn rendmode 0 espawn SHOTSPARK5
617
			        ifvarn rendmode 0 espawn SHOTSPARK5
618
			        addvar position 1 ifvarg position 3 setvar position 0
618
			        addvar position 1 ifvarg position 3 setvar position 0
619
			        setactorvar[RETURN].position position
619
			        setactorvar[RETURN].position position
620
			        ifvare dpsounds YES sound DPCHAINGUNFIRE else
620
			        ifvare dpsounds YES sound DPCHAINGUNFIRE else
621
		            sound PISTOL_FIRE
621
		            sound PISTOL_FIRE
622
		            shoot SHOTSPARK1
622
		            shoot SHOTSPARK1
623
		            ifvarand monstflags 8 shoot SHOTSPARK1
623
		            ifvarand monstflags 8 shoot SHOTSPARK1
624
	            }
624
	            }
625
	          }
625
	          }
626
	        }
626
	        }
627
	        else
627
	        else
628
	          ifrnd 128
628
	          ifrnd 128
629
	        {
629
	        {
630
		        ifvarand monstflags 16
630
		        ifvarand monstflags 16
631
		        {
631
		        {
632
			        sound RPG_SHOOT
632
			        sound RPG_SHOOT
633
			        shoot FIREBULLET
633
			        shoot FIREBULLET
634
			        ifvarand monstflags 8 shoot FIREBULLET
634
			        ifvarand monstflags 8 shoot FIREBULLET
635
		        }
635
		        }
636
		        else
636
		        else
637
		        {
637
		        {
638
			      ifvare dpsounds YES sound PRED_ATTACK2 else
638
			      ifvare dpsounds YES sound PRED_ATTACK2 else
639
		          sound PRED_ATTACK
639
		          sound PRED_ATTACK
640
		          shoot FIRELASER
640
		          shoot FIRELASER
641
		          ifvarand monstflags 8 shoot FIRELASER
641
		          ifvarand monstflags 8 shoot FIRELASER
642
	            }
642
	            }
643
	        }
643
	        }
644
	      }
644
	      }
645
	      else
645
	      else
646
	      {
646
	      {
647
	        move TANKFORWARD seekplayer
647
	        move TANKFORWARD seekplayer
648
	        action ATANKSPIN
648
	        action ATANKSPIN
649
	      }
649
	      }
650
	    }
650
	    }
651
	
651
	
652
	    ifrnd 16
652
	    ifrnd 16
653
	    {
653
	    {
654
	      stopsound TANK_ROAM
654
	      stopsound TANK_ROAM
655
	      move STOPPED faceplayerslow
655
	      move STOPPED faceplayerslow
656
	    }
656
	    }
657
    }
657
    }
658
  }
658
  }
659
  else
659
  else
660
    ifaction ATANKWAIT
660
    ifaction ATANKWAIT
661
  {
661
  {
662
    ifactioncount 32
662
    ifactioncount 32
663
    {
663
    {
664
      move TANKFORWARD seekplayer
664
      move TANKFORWARD seekplayer
665
      action ATANKSPIN
665
      action ATANKSPIN
666
    }
666
    }
667
  }
667
  }
668
  else
668
  else
669
    ifaction ATANKDEAD
669
    ifaction ATANKDEAD
670
  {
670
  {
671
    addkills 1 state specialdeath
671
    addkills 1 state specialdeath
672
    hitradius 6144 TOUGH TOUGH TOUGH TOUGH
672
    hitradius 6144 TOUGH TOUGH TOUGH TOUGH
673
    sound LASERTRIP_EXPLODE
673
    sound LASERTRIP_EXPLODE
674
    debris SCRAP1 15
674
    debris SCRAP1 15
675
    spawn EXPLOSION2
675
    spawn EXPLOSION2
676
    ifrnd 128 spawn SNOWMAN
676
    ifrnd 128 spawn SNOWMAN
677
    killit
677
    killit
678
  }
678
  }
679
679
680
  ifhitweapon
680
  ifhitweapon
681
  {
681
  {
682
    ifdead
682
    ifdead
683
      action ATANKDEAD
683
      action ATANKDEAD
684
    else
684
    else
685
    {
685
    {
686
      debris SCRAP1 1
686
      debris SCRAP1 1
687
      ifaction ATANKSHOOTING break
687
      ifaction ATANKSHOOTING break
688
	  ifvare target -1 ifvarn playerally 0 nullop else
688
	  ifvare target -1 ifvarn playerally 0 nullop else
689
      ifrnd 192
689
      ifrnd 192
690
      {
690
      {
691
        move STOPPED geth
691
        move STOPPED geth
692
        action ATANKSHOOTING
692
        action ATANKSHOOTING
693
        stopsound TANK_ROAM
693
        stopsound TANK_ROAM
694
      }
694
      }
695
    }
695
    }
696
  }
696
  }
697
697
698
enda
698
enda