light definitions cleanups; added some more light effects
[k8zan.git] / decorate / Weapons / PainGun.txt
blobe46cf906d45cb6d2cf847b24c74ac8c67f1d266e
1 ACTOR AmmoBox : Ammo replaces ClipBox {
2   Radius 20
3   Height 18
4   Scale 0.3
5   Inventory.Amount 100
6   Inventory.MaxAmount 450
7   Ammo.BackpackAmount 300
8   Ammo.BackpackMaxAmount 666
9   //Inventory.Icon "SPMGA0"
10   Inventory.Icon "ABULB0"
11   Inventory.PickupMessage "Picked up an Ammo Box."
12   Inventory.PickupSound "Ammo/AmmoBoxPick"
14   States {
15   Spawn:
16     ABUL A -1
17     Stop
18   }
22 Actor AmmoBelt : AmmoBox /*replaces Clip*/ {
23   Scale 0.2
24   Inventory.Amount 30
25   Inventory.PickupMessage "Picked up an Ammo Belt."
26   Inventory.PickupSound "Ammo/AmmoBeltPick"
27   //Inventory.Icon "SPMGA0"
28   Inventory.Icon "ABULC0"
30   States {
31   Spawn:
32     ABUL B -1
33     Stop
34   }
38 Actor AmmoBullet : AmmoBox /*10936*/ {
39   Height 10
40   Radius 10
41   Scale 0.15
42   Health 99999
43   Inventory.Amount 1
44   Inventory.PickupMessage "Picked up a Bullet."
45   Inventory.PickupSound "Ammo/BulletBounce"
46   //Inventory.Icon "SPMGA0"
47   Inventory.Icon "ABULC0"
49   +SHOOTABLE
50   States {
51   Spawn:
52     ABUL C -1
53     Stop
55   Crush:
56   Death:
57     TNT1 A 0
58     Stop
59   }
63 ACTOR PaingunBulletCasing {
64   Radius 1
65   Height 1
66   Scale 0.05
67   Gravity 0.85
68   +MOVEWITHSECTOR
69   +MISSILE
70   +NOBLOCKMAP
71   +BOUNCEONFLOORS
72   +BOUNCEONWALLS
73   +BOUNCEONCEILINGS
74   +ALLOWBOUNCEONACTORS
75   +BOUNCEONACTORS
76   +NOTONAUTOMAP
77   +NoTeleport
78   +k8AllowSimpleTick
79   BounceType Doom
80   BounceFactor 0.3
81   BounceCount 2
82   //BounceSound "Ammo/BulletBounce"
84   States {
85     Spawn:
86     ACAS A 6
87     TNT1 A 0 A_SetScale(0.15, 0.15)
88     ACAS ABC 6
89     ACAS D 1000
90     Stop
92   Death:
93     //TNT1 A 0 A_PlaySound("Ammo/BulletBounce", CHAN_AUTO, 1.0, 0, 2)
94     TNT1 A 0 A_PlaySoundEx("Ammo/BulletBounce", "SoundSlot5", 0, -1)
95   DeathLoop:
96     ACAS D 105 A_CheckSight("Remove")
97     TNT1 A 0 A_Jump(50, "Remove")
98     Goto DeathLoop
100   Remove:
101     ACAS E 4
102     ACAS F 4
103     Stop
104   }
108 ACTOR Paingun : Weapon replaces Chaingun {
109   Xscale 0.45
110   Yscale 0.40
111   Radius 28
112   Height 18
113   +INVENTORY.UNDROPPABLE
114   +WEAPON.NOALERT
115   //+WEAPON.NO_AUTO_SWITCH
116   +WEAPON.AMMO_OPTIONAL
117   //+WEAPON.ALT_USES_BOTH
118   Inventory.PickupMessage "Got a Paingun."
119   Inventory.PickupSound "Weapons/PaingunPick"
120   Inventory.Icon "WPAIA0"
121   Tag "Paingun"
122   Weapon.SelectionOrder 3
123   //Weapon.MinSelectionAmmo1 0
124   //Weapon.MinSelectionAmmo2 0
125   Weapon.AmmoType1 "AmmoBox"
126   //Weapon.AmmoGive1 40
127   Weapon.AmmoGive1 80
128   Weapon.AmmoUse1 1
129   Weapon.AmmoType2 "none"
130   Weapon.AmmoGive2 0
131   Weapon.AmmoUse2 0
132   Weapon.SlotNumber 4
133   Weapon.SlotPriority 1
135   States {
136   Spawn:
137     WPAI B -1
138     Stop
140   Select:
141     stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
142     TNT1 A 0 A_GiveInventory("HoldingPaingun", 1)
143     TNT1 A 0 { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(14); }
144     TNT1 A 0 A_Raise(666)
145     Goto Ready
147   Deselect:
148     stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
149     WPAR A 1 Offset(-15, 40)
150     WPAR A 1 Offset(-30, 50)
151     WPAR A 1 Offset(-50, 65)
152     WPAR A 1 Offset(-70, 80)
153     Goto DeselectLoop
155   DeselectLoop:
156     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
157     TNT1 A 0 A_TakeInventory("HoldingPaingun", 1)
158     TNT1 A 1 A_Lower(666)
159     Loop
161   Ready:
162     TNT1 A 8
163     TNT1 A 0 A_PlaySound("Weapons/PaingunReady", CHAN_WEAPON, 0.6)
164     WPAR A 1 Offset(-70, 80)
165     WPAR A 1 Offset(-50, 65)
166     WPAR A 1 Offset(-30, 50)
167     WPAR A 1 Offset(-15, 40)
168     TNT1 A 0 A_TakeInventory("QuickKickDisabled")
169     Goto ReadyIdle
171   ReadyIdle:
172     WPAR A 8 A_WeaponReady(WRF_ALLOWRELOAD)
173     Loop
175   Fire:
176     TNT1 A 0 A_JumpIfNoAmmo("Reload")
177     TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
178     TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "Firing")
179     WPAF A 4 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
180     WPAF B 4
181     WPAF C 3
182     WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
183     WPAF B 3
184     WPAF C 2
185     WPAF A 2 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
186     WPAF B 2
187     WPAF C 2
188     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
189     WPAF B 1
190     WPAF C 1
191     TNT1 A 0 A_Refire("Firing")
192     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
193     WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
194     WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
195     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
196     WPAF A 2 A_WeaponReady(WRF_ALLOWRELOAD)
197     WPAF B 2 A_WeaponReady(WRF_ALLOWRELOAD)
198     WPAF C 2 A_WeaponReady(WRF_ALLOWRELOAD)
199     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
200     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
201     WPAF A 3 A_WeaponReady
202     WPAF B 3 A_WeaponReady
203     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
204     WPAF C 4 A_WeaponReady
205     Goto ReadyIdle
207   Firing:
208     TNT1 A 0 A_JumpIfNoAmmo("Reload")
209     TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
210     //TNT1 A 0 A_Overlay(3, "MuzzleFlash")
211     TNT1 A 0 A_GunFlash("MuzzleFlash")
212     TNT1 A 0 A_AlertMonsters
213     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
214     TNT1 A 0 A_JumpIf(CountInv("AmmoBox")%5 != 0, 4)
215     TNT1 A 0 A_FireProjectile("PaingunTracer", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
216     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
217     TNT1 A 0 A_Jump(256, 3)
218     TNT1 A 0 A_FireProjectile("PaingunBullet", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
219     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
220     TNT1 A 0 A_SetPitch(-0.35+pitch)
221     TNT1 A 0 A_SetAngle(-0.20+angle)
222     WPAF A 1
223     TNT1 A 0 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0)
224     TNT1 A 0 A_JumpIf(CountInv("AmmoBox")%5 != 0, 4)
225     TNT1 A 0 A_FireProjectile("PaingunTracer", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
226     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
227     TNT1 A 0 A_Jump(256, 3)
228     TNT1 A 0 A_FireProjectile("PaingunBullet", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
229     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
230     WPAF B 1
231     TNT1 A 0 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0)
232     TNT1 A 0 A_JumpIf(CountInv("AmmoBox")%5 != 0, 4)
233     TNT1 A 0 A_FireProjectile("PaingunTracer", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
234     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
235     TNT1 A 0 A_Jump(256, 3)
236     TNT1 A 0 A_FireProjectile("PaingunBullet", frandom(-3.2, 3.2), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-3.2, 3.2))
237     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
238     TNT1 A 0 A_SetPitch(0.35+pitch)
239     TNT1 A 0 A_SetAngle(0.20+angle)
240     WPAF C 1
241     TNT1 A 0 A_Refire("Firing")
242     WPAF A 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
243     WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
244     WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
245     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
246     WPAF A 2 A_WeaponReady(WRF_ALLOWRELOAD)
247     WPAF B 2 A_WeaponReady(WRF_ALLOWRELOAD)
248     WPAF C 2 A_WeaponReady(WRF_ALLOWRELOAD)
249     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
250     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
251     WPAF A 3 A_WeaponReady
252     WPAF B 3 A_WeaponReady
253     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
254     WPAF C 4 A_WeaponReady
255     Goto ReadyIdle
257   MuzzleFlash:
258     WPFL A 1 A_Light2
259     WPFL B 1 A_Light2
260     WPFL C 1 A_Light1
261     TNT1 A 0 A_Light0
262     Goto LightDone
264   AltFire:
265     TNT1 A 0 A_JumpIfNoAmmo("Reload")
266     TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
267     TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "Altfiring")
268     WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
269     WPAF C 2
270     WPAF B 2
271     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
272     WPAF C 1
273     WPAF B 1
274     TNT1 A 0 A_Refire("Altfiring")
275     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
276     WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
277     WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
278     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
279     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
280     WPAF A 2 A_WeaponReady
281     WPAF C 2 A_WeaponReady
282     WPAF B 2 A_WeaponReady
283     Goto ReadyIdle
285   Altfiring:
286     TNT1 A 0 A_JumpIf(CountInv("AmmoBox") == 0, "Reload")
287     TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
288     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
289     //TNT1 A 0 A_Overlay(3, "MuzzleGas")
290     TNT1 A 0 A_GunFlash("MuzzleGas")
291     TNT1 A 0 A_AlertMonsters
292     TNT1 A 0 A_TakeInventory("AmmoBox", 1)
293     TNT1 A 0 A_JumpIf(CountInv("AmmoBox")%5 != 0, 4)
294     TNT1 A 0 A_FireProjectile("PaingunTracer", frandom(-1.8, 1.8), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-1.8, 1.8))
295     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
296     TNT1 A 0 A_Jump(256, 3)
297     TNT1 A 0 A_FireProjectile("PaingunBulletAlt", frandom(-1.8, 1.8), 1, /*5*/0, 0, FPF_NOAUTOAIM, frandom(-1.8, 1.8))
298     TNT1 A 0 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON)
299     TNT1 A 0 A_SetPitch(-0.25+pitch)
300     TNT1 A 0 A_SetAngle(-0.1+angle)
301     WPAF A 1
302     TNT1 A 0 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0)
303     WPAF C 1
304     TNT1 A 0 A_SetPitch(0.25+pitch)
305     TNT1 A 0 A_SetAngle(0.1+angle)
306     WPAF B 1
307     TNT1 A 0 A_Refire("Altfiring")
308     WPAF A 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
309     WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
310     WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
311     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
312     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
313     WPAF A 2 A_WeaponReady
314     WPAF C 2 A_WeaponReady
315     WPAF B 2 A_WeaponReady
316     Goto ReadyIdle
318   MuzzleGas:
319     WPFL D 2 A_Light2
320     WPFL F 2 A_Light1
321     WPFL E 2 A_Light0
322     Goto LightDone
324   Reload:
325     TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "ReloadSpinning")
326     WPAF A 4 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
327     WPAF B 4
328     WPAF C 3
329     WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
330     WPAF B 3
331     WPAF C 2
332     WPAF A 2 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
333     WPAF B 2
334     WPAF C 2
335     TNT1 A 0 A_GiveInventory("BarrelIsSpinning", 1)
336   ReloadSpinning:
337     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
338     WPAF B 1
339     WPAF C 1
340     WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
341     WPAF B 1
342     WPAF C 1
343     WPAF B 1 A_WeaponReady(WRF_ALLOWRELOAD)
344     // stop spinning
345     TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
346     WPAF B 1 A_WeaponReady
347     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
348     WPAF B 2 A_WeaponReady
349     WPAF C 2 A_WeaponReady
350     TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
351     WPAF A 3 A_WeaponReady
352     WPAF B 3 A_WeaponReady
353     WPAF C 4 A_WeaponReady
354     Goto ReadyIdle
356     stateinclude "QuickKick/QuickKickInclude.txt"
357   }
361 ACTOR PaingunBullet : FastProjectile {
362   Scale 0.15
363   Radius 2
364   Height 2
365   Speed 250
366   Projectile
367   Damage (2*random(7, 10))
368   DamageType "Paingun"
369   +k8MissileHeadshots
370   +DONTREFLECT
371   +THRUGHOST
372   +BLOODSPLATTER
373   +THRUSPECIES
374   +EXTREMEDEATH
375   +NoTeleport
376   +k8AllowSimpleTick
377   //SeeSound "Ammo/BulletCrack"
378   //DeathSound "Ammo/BulletCrack"
379   Obituary "%o was shredded down by %k."
380   Decal "PaingunBulletDecal"
381   Species "ID"
383   States {
384   Spawn:
385     PBUL A 8
386     Loop
388   Death:
389     TNT1 A 0 A_Jump(150, 4)
390     TNT1 A 0 A_SetScale(1.0, 1.0)
391     PBUL B 1 bright
392     TNT1 A 0 A_SetScale(1.3, 1.3)
393     PBUL C 1 bright
394     Stop
395   }
399 ACTOR PaingunBulletAlt : PaingunBullet {
400   -EXTREMEDEATH
401   Damage (2*random(9, 12))
405 ACTOR PaingunTracer : PaingunBullet {
406   -EXTREMEDEATH
407   +BRIGHT
409   States {
410   Spawn:
411     PTRA A 4 Bright
412     Loop
414   Death:
415     TNT1 A 0
416     Stop
417   }
421 ACTOR BarrelIsSpinning : Inventory {
422   Inventory.Amount 1
423   Inventory.MaxAmount 1
424   Inventory.InterHubAmount 0
426   States {
427   Spawn:
428     TNT1 A -1
429     Stop
430   }
434 // heretic
435 Actor (optional) Zan_SkullRodAmmoBelt : AmmoBelt Replaces SkullRodAmmo {}
436 Actor (optional) Zan_SkullRodAmmoBox : AmmoBox Replaces SkullRodHefty {}
438 Actor (optional) Zan_SkullRodPaingun : Paingun Replaces SkullRod {}
439 Actor (optional) Zan_SkullRodPoweredPaingun : Paingun Replaces SkullRodPowered {}
441 Actor (optional) Zan_TPH_AmmoChaingun : AmmoBox Replaces AmmoChaingun {}
442 Actor (optional) Zan_TPH_TPHBulletDispenser : Paingun Replaces TPHBulletDispenser {}