light definitions cleanups; added some more light effects
[k8zan.git] / decorate / Weapons / SpikeGun.txt
blob0c9d17afa6782e0e68294007b97d0f3a907e11ae
1 //Thanks to Wildweasel for the Gun Labs tutorials! ( http://gunlabs.blogspot.ro/2011/01/welcome-to-new-doom-armory.html )
3 /*
4 actor (optional) ZanPistolReplacer : RandomSpawner replaces Pistol {
5   DropItem "SpikeGun"
7 */
10 ACTOR SpikeMag : Ammo replaces Clip {
11   Radius 14
12   Height 12
13   Scale 0.55
14   Inventory.Amount 36
15   Inventory.MaxAmount 288
16   Ammo.BackpackAmount 72
17   Ammo.BackpackMaxAmount 360
18   Inventory.Icon "SPMGA0"
19   Inventory.PickupMessage "Picked up a Spike Mag."
20   Inventory.PickupSound "Ammo/SpikeMagPick"
22   States {
23   Spawn:
24     SPMG A -1
25     Stop
26   }
30 ACTOR SpikeMagBox : SpikeMag /*replaces Clipbox*/ {
31   Radius 15
32   Height 16
33   Scale 0.95
34   Inventory.Amount 100
35   Inventory.Icon "SPMGA0"
36   Inventory.PickupMessage "Picked up a Spike Box."
37   Inventory.PickupSound "Ammo/SpikeMagPick"
38   States {
39   Spawn:
40     SPMG A -1
41     Stop
42   }
46 Actor SpikeMagDropped {
47   Radius 1
48   Height 1
49   Scale 0.55
50   Gravity 0.75
51   +MOVEWITHSECTOR
52   +MISSILE
53   +NOBLOCKMAP
54   +BOUNCEONFLOORS
55   +BOUNCEONWALLS
56   +BOUNCEONCEILINGS
57   +ALLOWBOUNCEONACTORS
58   +BOUNCEONACTORS
59   +NoTeleport
60   +k8AllowSimpleTick
61   BounceType Doom
62   BounceFactor 0.7
63   BounceCount 4
64   BounceSound "Ammo/SpikeMagBounce"
66   States {
67   Spawn:
68     SPMG BC 12
69     SPMG D 1000
70     Stop
72   Death:
73     SPMG D -1
74     Stop
75   }
79 ACTOR SpikeGunLoaded : Ammo {
80   Inventory.Amount 0
81   Inventory.MaxAmount 36
82   Ammo.BackpackAmount 0
83   Ammo.BackpackMaxAmount 36
84   +INVENTORY.IGNORESKILL
88 ACTOR SpikeGun : Weapon /*replaces Chaingun*/ replaces Pistol {
89   Xscale 0.35
90   Yscale 0.35
91   Radius 30
92   Height 12
93   +INVENTORY.UNDROPPABLE
94   +NOEXTREMEDEATH
95   +WEAPON.NOALERT
96   //+WEAPON.NO_AUTO_SWITCH
97   +WEAPON.AMMO_OPTIONAL
98   Inventory.PickupMessage "Got a Spike Gun."
99   Inventory.PickupSound "Ammo/SpikeGunPick"
100   //Inventory.Icon "SPGIA0"
101   Tag "Spike Gun"
102   Weapon.KickBack 70
103   Weapon.SelectionOrder 4
104   //Weapon.MinSelectionAmmo1 0
105   //Weapon.MinSelectionAmmo2 0
106   Weapon.AmmoType1 "SpikeGunLoaded"
107   Weapon.AmmoGive1 0
108   Weapon.AmmoUse1 1
109   Weapon.AmmoType2 "SpikeMag"
110   Weapon.AmmoGive2 18
111   Weapon.AmmoUse2 0
112   Weapon.SlotNumber 2
113   //Decal "SpikeDecalHot"
114   //AttackSound "weapons/spikegunfire"
116   var int user_lowPauseCount;
118   States {
119   Spawn:
120     SPGS A -1
121     Stop
123   PickupWeapon:
124     // always has some loaded ammo on first pickup
125     TNT1 A 0 A_GiveInventory("SpikeGunLoaded", random(1, 3)*10)
126     Stop
128   Select:
129     stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
130     TNT1 A 0
131       {
132         A_GiveInventory("HoldingSpikeGun", 1);
133         if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3);
134       }
135     WSPI A 0 A_Raise(666)
136     Goto Ready
138   Deselect:
139     stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
140     TNT1 A 0
141       {
142         A_TakeInventory("SpikeGunZoomed", 1);
143         A_ZoomFactor(1);
144         A_TakeInventory("SpikeGunHeat", 36);
145       }
146     WSPI A 1 Offset(-15, 40)
147     WSPI A 1 Offset(-30, 50)
148     WSPI A 1 Offset(-50, 65)
149     WSPI A 1 Offset(-70, 80)
150     Goto DeselectLoop
152   DeselectLoop:
153     TNT1 A 0 A_TakeInventory("HoldingSpikeGun", 1)
154     TNT1 A 1 A_Lower(666)  // was zero duration
155     Loop
157   Ready:
158     TNT1 A 8
159     TNT1 A 0 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.6)
160     WSPI A 1 Offset(-70, 80)
161     WSPI A 1 Offset(-50, 65)
162     WSPI A 1 Offset(-30, 50)
163     WSPI A 1 Offset(-15, 40)
164     TNT1 A 0 A_TakeInventory("QuickKickDisabled")
165     Goto ReadyIdle
167   ReadyIdle:
168     WSPI A 0
169       {
170         // low ammo sound
171         if (CountInv("SpikeGunLoaded") <= 8) {
172           user_lowPauseCount -= 1;
173           if (user_lowPauseCount < 1) {
174             if (user_lowPauseCount > -666 && GetCVarB("k8ZanMod_WarnLowAmmo")) {
175               A_PlaySound("weapons/zanweapon/lowammo", CHAN_VOICE, 1.0);
176             }
177             local ammoCount = CountInv("SpikeGunLoaded");
178                  if (ammoCount > 6) user_lowPauseCount = 40;
179             else if (ammoCount > 4) user_lowPauseCount = 30;
180             else if (ammoCount > 0) user_lowPauseCount = 20;
181             else user_lowPauseCount = 10;
182           }
183         }
184       }
185     WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "ReadyZoomed")
186     TNT1 A 0 Offset(-15, 40) { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3); }
187     WSPI A 1 A_WeaponReady(WRF_ALLOWRELOAD)
188     TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "Steaming")
189     Loop
191   Steaming:
192     TNT1 A 0
193       {
194         A_TakeInventory("SpikeGunHeat", 1);
195         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
196       }
197     WSPI A 4 A_WeaponReady(WRF_ALLOWRELOAD)
198     Goto ReadyIdle
200   ReadyZoomed:
201     WSPS A 1 Offset(10000, 32) A_WeaponReady(WRF_ALLOWRELOAD)
202     TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "ZoomSteaming")
203     Goto ReadyIdle
205   ZoomSteaming:
206     TNT1 A 0
207       {
208         A_TakeInventory("SpikeGunHeat", 1);
209         A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
210       }
211     WSPS A 4 A_WeaponReady(WRF_ALLOWRELOAD)
212     Goto ReadyIdle
214   AltFire:
215     WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "UnZoom")
216     WSPI A 8 { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(1); }
217     WSPI A 1 Offset(10000, 36)
218     WSPI A 1 Offset(10000, 42)
219     WSPI A 1 Offset(10000, 48)
220     TNT1 A 0 A_ZoomFactor(2)
221     WSPS A 1 Offset(10000, 48)
222     WSPS A 1 Offset(10000, 40)
223     WSPS A 1 Offset(10000, 35)
224     WSPS A 1 Offset(10000, 32)
225     TNT1 A 0 A_GiveInventory("SpikeGunZoomed", 1)
226     Goto ReadyIdle
228   UnZoom:
229     WSPS A 4 A_TakeInventory("SpikeGunZoomed", 1)
230     WSPS A 1 Offset(10000, 32)
231     WSPS A 1 Offset(10000, 35)
232     WSPS A 1 Offset(10000, 40)
233     WSPS A 1 Offset(10000, 48)
234     TNT1 A 0 A_ZoomFactor(1)
235     WSPI A 1 Offset(-15, 48)
236     WSPI A 1 Offset(-15, 42)
237     WSPI A 1 Offset(-15, 36)
238     Goto ReadyIdle
240   Fire:
241     TNT1 A 0 A_JumpIfNoAmmo("Reload")
242     TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
243     TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFire")
244     SPGH A 0
245       {
246         user_lowPauseCount = -666;
247         A_GunFlash("Flash");
248         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
249         A_SetPitch(-0.50+pitch);
250       }
251     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
252     WSPF A 1 A_FireProjectile("SpikeShot", frandom(-0.5, 0.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.5, 0.5))
253     WSPF A 1
254     WSPF A 0
255       {
256         A_GiveInventory("SpikeGunHeat", 1);
257         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
258         A_SetPitch(-0.30+pitch);
259       }
260     //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
261     WSPF B 2 Offset(0, 33)
262     WSPF B 0 A_SetPitch(0.40+pitch)
263     WSPF C 2 Offset(0, 34) //A_ReFire
264     WSPF C 0
265       {
266         A_SetPitch(0.40+pitch);
267         A_AlertMonsters();
268       }
269     Goto ReadyIdle
271   WaterFire:
272     TNT1 A 0 A_JumpIfNoAmmo("Reload")
273     TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
274     SPGH A 0
275       {
276         user_lowPauseCount = -666;
277         A_GunFlash("Flash");  //k8: i restored underwater flash
278         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
279         A_SetPitch(-0.2+pitch);
280       }
281     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
282     WSPF A 1 A_FireProjectile("SpikeShotUnderwater", frandom(-0.7, 0.7), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.7, 0.7))
283     WSPF A 1
284     TNT1 A 0 A_SetPitch(0.1+pitch)
285     //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
286     WSPF B 2 Offset(0, 33)
287     WSPF C 2 Offset(0, 34) //A_ReFire
288     TNT1 A 0 A_SetPitch(0.1+pitch)
289     TNT1 A 0 //A_AlertMonsters
290     Goto ReadyIdle
292   FireZoomed:
293     TNT1 A 0 A_JumpIfNoAmmo("Reload")
294     TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
295     WSPS A 0
296       {
297         user_lowPauseCount = -666;
298         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
299         A_SetPitch(-0.20+pitch);
300       }
301     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
302     WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
303     WSPS A 0
304       {
305         A_GiveInventory("SpikeGunHeat", 1);
306         A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
307       }
308     WSPS A 1 Offset(0, 33)
309     WSPS A 0 A_SetPitch(0.10+pitch)
310     WSPS A 1 Offset(0, 34)
311     WSPS A 0
312       {
313         A_SetPitch(0.10+pitch);
314         A_AlertMonsters();
315       }
316     WSPS A 0 A_JumpIfNoAmmo("Reload")
317     WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
318     WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
319     WSPS A 0 A_SetPitch(-0.20+pitch)
320     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
321     WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
322     WSPS A 0
323       {
324         A_GiveInventory("SpikeGunHeat", 1);
325         A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
326       }
327     WSPS A 1 Offset(0, 33)
328     WSPS A 0 A_SetPitch(0.10+pitch)
329     WSPS A 1 Offset(0, 34)
330     WSPS A 0
331       {
332         A_SetPitch(0.10+pitch);
333         A_AlertMonsters();
334       }
335     WSPS A 0 A_JumpIfNoAmmo("Reload")
336     WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
337     WSPS A 0
338       {
339         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
340         A_SetPitch(-0.20+pitch);
341       }
342     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
343     WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
344     WSPS A 0
345       {
346         A_GiveInventory("SpikeGunHeat", 1);
347         A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
348       }
349     WSPS A 1 Offset(0, 33)
350     WSPS A 0 A_SetPitch(0.10+pitch)
351     WSPS A 1 Offset(0, 34)
352     WSPS A 0
353       {
354         A_SetPitch(0.10+pitch);
355         A_AlertMonsters();
356       }
357     Goto BurstBreak
359   WaterFireZoomed:
360     TNT1 A 0 A_JumpIfNoAmmo("Reload")
361     WSPS A 0
362       {
363         user_lowPauseCount = -666;
364         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
365         A_SetPitch(-0.1+pitch);
366       }
367     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
368     WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
369     WSPS A 1 Offset(0, 33)
370     WSPS A 0 A_SetPitch(0.05+pitch)
371     WSPS A 1 Offset(0, 34)
372     WSPS A 0 A_SetPitch(0.05+pitch)
373     WSPS A 0 A_JumpIfNoAmmo("Reload")
374     WSPS A 0
375       {
376         A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
377         A_SetPitch(-0.1+pitch);
378       }
379     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
380     WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
381     WSPS A 1 Offset(0, 33)
382     WSPS A 0 A_SetPitch(0.05+pitch)
383     WSPS A 1 Offset(0, 34)
384     WSPS A 0 A_SetPitch(0.05+pitch)
385     WSPS A 0 A_JumpIfNoAmmo("Reload")
386     WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
387     WSPS A 0 A_SetPitch(-0.1+pitch)
388     //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
389     WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
390     WSPS A 1 Offset(0, 33)
391     WSPS A 0 A_SetPitch(0.05+pitch)
392     WSPS A 1 Offset(0, 34)
393     WSPS A 0 A_SetPitch(0.05+pitch)
394     Goto BurstBreak
396   BurstBreak:
397     WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
398     WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
399     WSPS A 2
400     Goto ReadyIdle
402   Flash:
403     SPGF A 2 A_Light1
404     SPGF B 2 A_Light1
405     SPGF C 3 A_Light0
406     SPGF D 3 A_Light0
407     SPGF E 4 A_Light0
408     //TNT1 A 1 A_Light0
409     Goto LightDone
411   Reload:
412     WSPR A 0 A_JumpIfInventory("SpikeGunLoaded", 36, "ReloadFinish")
413     WSPR A 0
414       {
415         A_ZoomFactor(1);
416         A_TakeInventory("SpikeGunZoomed", 1);
417       }
418     WSPR A 0 A_JumpIfInventory("SpikeMag", 1, "ReloadWork")
419     WSPR A 0 A_JumpIfNoAmmo("DryFire")
420     WSPI A 1
421     Goto ReadyIdle
423   ReloadWork:
424     WSPI A 0 A_JumpIf(CountInv("SpikeGunHeat") > 12, "ReloadWorkSteaming")
425     WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
426     WSPI A 6 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
427     WSPR G 2
428     WSPR A 3
429     WSPR B 9
430     WSPR C 3
431     WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
432     WSPR E 3
433     WSPR F 3
434     WSPR A 2
435     WSPR G 2
436     Goto ReloadLoop
438   ReloadWorkSteaming:
439     WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
440     WSPI A 3 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
441     WSPI A 0
442       {
443         A_TakeInventory("SpikeGunHeat", 1);
444         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
445       }
446     WSPI A 3
447     WSPI A 0
448       {
449         A_TakeInventory("SpikeGunHeat", 1);
450         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
451       }
452     WSPR G 2
453     WSPI G 0
454       {
455         A_TakeInventory("SpikeGunHeat", 1);
456         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
457       }
458     WSPR A 3
459     WSPR A 0
460       {
461         A_TakeInventory("SpikeGunHeat", 1);
462         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
463       }
464     WSPR B 3
465     WSPR B 0
466       {
467         A_TakeInventory("SpikeGunHeat", 1);
468         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
469       }
470     WSPR B 3
471     WSPR B 0
472       {
473         A_TakeInventory("SpikeGunHeat", 1);
474         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
475       }
476     WSPR B 3
477     WSPR B 0
478       {
479         A_TakeInventory("SpikeGunHeat", 1);
480         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
481       }
482     WSPR C 3
483     WSPR C 0
484       {
485         A_TakeInventory("SpikeGunHeat", 1);
486         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
487       }
488     WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
489     WSPR D 0
490       {
491         A_TakeInventory("SpikeGunHeat", 1);
492         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
493       }
494     WSPR E 3
495     WSPR E 0
496       {
497         A_TakeInventory("SpikeGunHeat", 1);
498         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
499       }
500     WSPR F 3
501     WSPR F 0
502       {
503         A_TakeInventory("SpikeGunHeat", 1);
504         A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
505       }
506     WSPR A 2
507     WSPR A 0
508       {
509         A_TakeInventory("SpikeGunHeat", 1);
510         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
511       }
512     WSPR G 2
513     WSPR G 0
514       {
515         A_TakeInventory("SpikeGunHeat", 1);
516         A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
517       }
518     //Goto ReloadLoop
520   ReloadLoop:
521     TNT1 A 0
522       {
523         // if reload in not cheating, drop unused ammo
524         if (!GetCVar("k8ZanMod_CheatReload")) {
525           A_TakeInventory("SpikeGunLoaded", 666);
526         }
527         local clipCount = CountInv("SpikeMag");
528         local loadCount = 36-CountInv("SpikeGunLoaded");
529         if (loadCount > 0) {
530           if (loadCount > clipCount) loadCount = clipCount;
531           A_TakeInventory("SpikeMag", loadCount);
532           A_GiveInventory("SpikeGunLoaded", loadCount);
533         }
534         user_lowPauseCount = 0;
535       }
537   ReloadFinish:
538     TNT1 A 0
539     Goto ReadyIdle
541   DryFire:
542     WSPI A 16 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.2)
543     Goto ReadyIdle
545     stateinclude "QuickKick/QuickKickInclude.txt"
546   }
550 ACTOR SpikeGunZoomed : Inventory {
551   Inventory.MaxAmount 1
555 ACTOR SpikeShot : FastProjectile {
556   //Xscale 0.35
557   //Yscale 0.35
558   Radius 2
559   Height 2
560   Speed 160
561   Projectile
562   //MissileHeight 8
563   Damage (3*random(6, 8))
564   DamageType "SpikeGun"
565   +k8MissileHeadshots
566   +DONTREFLECT
567   +THRUGHOST
568   +NOEXTREMEDEATH
569   +BLOODSPLATTER
570   +BRIGHT
571   //+FORCEXYBILLBOARD
572   SeeSound "Weapons/SpikeShotSee"
573   DeathSound "Weapons/SpikeShotDeath"
574   Obituary "%o got nailed by %k."
575   Decal "SpikeDecalHot"
577   States {
578   Spawn:
579     PSPI Z 1 Bright //A_FaceMovementDirection(0, 0, 0)
580     Loop
582   Death:
583     TNT1 A 0
584     Stop
585   }
589 ACTOR SpikeShotAimed : FastProjectile {
590   Radius 2
591   Height 2
592   Speed 220
593   Damage (3*random(9, 9))
594   DamageType "SpikeGun"
595   Projectile
596   +k8MissileHeadshots
597   +DONTREFLECT
598   +THRUGHOST
599   +NOEXTREMEDEATH
600   +BLOODSPLATTER
601   +BRIGHT
602   SeeSound "Weapons/SpikeShotSee"
603   DeathSound "Weapons/SpikeShotDeath"
604   Obituary "%o got surgically nailed by %k."
605   Decal "SpikeDecalHot"
607   States {
608   Spawn:
609     PSPI Z 1 Bright
610     Loop
612   Death:
613     TNT1 A 0
614     Stop
615   }
619 // Underwater shots
620 ACTOR SpikeShotUnderwater /*: FastProjectile*/ {
621   //Xscale 0.35
622   //Yscale 0.35
623   Radius 2
624   Height 2
625   Speed 60
626   Projectile
627   //MissileHeight 8
628   Damage (3*random(6, 8))
629   DamageType "SpikeGun"
630   +k8MissileHeadshots
631   +DONTREFLECT
632   +THRUGHOST
633   +NOEXTREMEDEATH
634   +BLOODSPLATTER
635   +NoTeleport
636   +k8AllowSimpleTick
637   //+FORCEXYBILLBOARD
638   //SeeSound "weapons/spikegunfire"
639   DeathSound "Weapons/SpikeShotDeath"
640   Obituary "%o got nailed by %k."
641   Decal "SpikeDecalHotUnderwater"
643   States {
644   Spawn:
645     PSPI Z 1 Bright A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)//A_FaceMovementDirection(0, 0, 0)
646     Loop
648   Death:
649     TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
650     Stop
651   }
655 ACTOR SpikeShotAimedUnderwater /*: FastProjectile*/ {
656   Radius 2
657   Height 2
658   Speed 70
659   Damage (3*random(7, 8))
660   DamageType "SpikeGun"
661   Projectile
662   +k8MissileHeadshots
663   +DONTREFLECT
664   +THRUGHOST
665   +NOEXTREMEDEATH
666   +BLOODSPLATTER
667   +NoTeleport
668   +k8AllowSimpleTick
669   DeathSound "Weapons/SpikeShotDeath"
670   Obituary "%o got surgically nailed by %k."
671   Decal "SpikeDecalHotUnderwater"
673   States {
674   Spawn:
675     PSPI Z 1 Bright A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
676     Loop
678   Death:
679     TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
680     Stop
681   }
685 ACTOR SteamPuffSpikeGun {
686   Radius 5
687   Height 5
688   Mass 5
689   Scale 0.1
690   RenderStyle "Translucent"
691   Alpha 0.6
692   +NOGRAVITY
693   +NOBLOCKMAP
694   +NOINTERACTION
695   +NoTeleport
696   +k8AllowSimpleTick
698   States {
699   Spawn:
700     LPUF D 2
701     LPUF E 3
702     LPUF F 4
703     LPUF G 5
704     Stop
705   }
709 ACTOR SpikeGunHeat : Inventory {
710   Inventory.Amount 1
711   Inventory.MaxAmount 36
712   Inventory.InterHubAmount 36
714   States {
715   Spawn:
716     TNT1 A -1
717     Stop
718   }
722 // heretic
723 Actor (optional) Zan_GoldWandSpikeMag : SpikeMag Replaces GoldWandAmmo {}
724 Actor (optional) Zan_GoldWandSpikeMagBox : SpikeMagBox Replaces GoldWandHefty {}
726 Actor (optional) Zan_GoldWandSpikeGun : SpikeGun Replaces GoldWand {}
727 Actor (optional) Zan_GoldWandPoweredSpikeGun : SpikeGun Replaces GoldWandPowered {}
730 // hexen
731 Actor (optional) Zan_Mana1SpikeMag : SpikeMag Replaces Mana1 {}
733 Actor (optional) Zan_TPH_TPHPistol : SpikeGun Replaces TPHPistol {}
734 Actor (optional) Zan_TPH_PistolAmmo : SpikeMag Replaces PistolAmmo {}