1 ////////////////////////////////////////////////////////////////////////////////
3 Actor Zan_FragfireGunCasingSpawn {
22 TNT1 A 1 A_CustomMissile("Zan_FragfireGunEmptyShell", -5, 0, random(-80, -100), CMF_AIMDIRECTION, random(45, 80))
28 Actor Zan_FragfireGunEmptyShell : Zan_CasingBase {
35 BounceSound "Ammo/ShellBounce"
40 ZFGX ABCDEFGHABCDEFGHABCDEFGHABCDEFGH 3
42 A_JumpIf(waterlevel > 1, "Splash");
43 if (!A_k8JumpIfOnFloorSky("Disappear")) {
44 A_k8JumpIfOnLiquidFloor("Death");
56 A_ChangeFlag("DoomBounce", false);
57 A_ChangeFlag("NoInteraction", true);
59 TNT1 A 0 A_Jump(256, "Rest1", "Rest2")
66 if (!A_k8JumpIfOnFloorSky("Disappear")) {
67 A_k8JumpIfOnLiquidFloor("Stopping");
71 //"####" "#" 0 A_SetTics(GetCVar("ZanExOpt_EmptyCasingTime")*35*60+10)
72 // become non-scripted instead
73 "####" "#" -1 A_BecomeK8VavoomInternalNoTickGrav(GetCVar("ZanExOpt_EmptyCasingTime")*60+frandom(1, 4), frandom(64, 90)/35.0/10.0)
75 "####" "#" random(10, 15) A_FadeOut(0.01)
87 TNT1 A 0 A_SpawnItem("Zan_UnderwaterFragfireGunEmptyShell")
93 A_ChangeFlag("NoInteraction", true);
94 A_ChangeVelocity(0, 0, -14, CVF_REPLACE);
101 Actor Zan_UnderwaterFragfireGunEmptyShell : Zan_FragfireGunEmptyShell {
110 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
112 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
114 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
116 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
118 TNT1 A 0 A_SpawnItem("UnderwaterBubble")
125 ////////////////////////////////////////////////////////////////////////////////
126 ACTOR FragfireCan : Ammo {
131 Inventory.MaxAmount 240
132 Ammo.BackpackAmount 160
133 Ammo.BackpackMaxAmount 400
134 Inventory.Icon "AFRAA0"
135 Inventory.PickupMessage "Picked up a Fragfire Can."
136 Inventory.PickupSound "Ammo/FragfireCanPick"
140 ACTOR FragfireCanBox : FragfireCan replaces ShellBox {
142 Inventory.PickupMessage "Picked up a Fragfire Can."
143 Inventory.PickupSound "Ammo/FragfireCanPick"
153 Actor FragfireCanHalf : FragfireCan replaces Shell {
155 Inventory.PickupMessage "Picked up a half full Fragfire Can."
165 ACTOR FragfireCanDropped {
184 BounceSound "Ammo/FragfireCanBounce"
199 ACTOR FragfireGunLoaded : Ammo {
201 Inventory.MaxAmount 80
202 Ammo.BackpackAmount 0
203 Ammo.BackpackMaxAmount 80
204 +INVENTORY.IGNORESKILL
208 ACTOR FragfireGun : Weapon replaces Shotgun {
213 +INVENTORY.UNDROPPABLE
215 //+WEAPON.NO_AUTO_SWITCH
216 +WEAPON.AMMO_OPTIONAL
217 //+WEAPON.ALT_USES_BOTH
218 Inventory.PickupMessage "Got a Fragfire Gun."
219 Inventory.PickupSound "Ammo/FragfireGunPick"
220 //Inventory.Icon "WFRAA0"
222 Weapon.SelectionOrder 1
223 //Weapon.MinSelectionAmmo1 0
224 //Weapon.MinSelectionAmmo2 1
225 Weapon.AmmoType1 "FragfireGunLoaded"
228 Weapon.AmmoType2 "FragfireCan"
232 +Weapon.k8AllowPickupState // so 'PickupWeapon:' magic would work
234 var int user_lowPauseCount;
242 // always has some loaded ammo on first pickup
243 TNT1 A 0 A_GiveInventory("FragfireGunLoaded", random(1, 6)*10)
247 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
250 A_GiveInventory("HoldingFragfireGun", 1);
251 if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(4);
253 TNT1 A 0 A_Raise(666)
257 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
258 WFRR A 1 Offset(-15, 40)
259 WFRR A 1 Offset(-30, 50)
260 WFRR A 1 Offset(-50, 65)
261 WFRR A 1 Offset(-70, 80)
265 TNT1 A 0 A_TakeInventory("HoldingFragfireGun", 1)
266 TNT1 A 1 A_Lower(666) // was zero duration
271 TNT1 A 0 A_PlaySound("Ammo/FragfireGunPick", CHAN_WEAPON, 0.6)
272 WFRR A 1 Offset(-70, 80)
273 WFRR A 1 Offset(-50, 65)
274 WFRR A 1 Offset(-30, 50)
275 WFRR A 1 Offset(-15, 40)
276 TNT1 A 0 A_TakeInventory("QuickKickDisabled")
283 if (CountInv("FragfireGunLoaded") <= 3*8) {
284 user_lowPauseCount -= 1;
285 if (user_lowPauseCount < 1) {
286 if (user_lowPauseCount > -666 && GetCVarB("k8ZanMod_WarnLowAmmo") && GetCVarB("k8ZanMod_WarnLowAmmoFragGun")) {
287 A_PlaySound("weapons/zanweapon/lowammo", CHAN_VOICE, 1.0);
289 local ammoCount = CountInv("FragfireGunLoaded");
290 if (ammoCount > 2*8) user_lowPauseCount = 40/8;
291 else if (ammoCount > 1*8) user_lowPauseCount = 30/8;
292 else if (ammoCount > 0*8) user_lowPauseCount = 20/8;
293 else user_lowPauseCount = 10; // one frame
297 TNT1 A 0 Offset(-15, 40) A_JumpIfNotInventory("FragfireGunLoaded", "ReadyEmptyGun")
298 WFRR AA 4 A_WeaponReady(WRF_ALLOWRELOAD)
302 WFRR B 1 Offset(-15, 40) A_WeaponReady(WRF_ALLOWRELOAD)
304 Goto ReadyIdle // for sound
307 TNT1 A 0 A_JumpIfNoAmmo("Reload")
308 TNT1 A 0 A_JumpIf(waterlevel==3, "UnderwaterDryFire")
311 user_lowPauseCount = -666;
313 A_PlaySound("Weapons/FragfireGunFire", CHAN_WEAPON);
314 A_SetPitch(-1.0+pitch);
315 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-1, 3));
316 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
317 if (GetCVarB('k8ZanMod_FragCasing'))
319 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
322 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
325 A_SetPitch(-1.0+pitch);
326 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(0, 4));
327 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
328 if (GetCVarB('k8ZanMod_FragCasing'))
330 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
333 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
336 A_SetPitch(-1.0+pitch);
337 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(1, 5));
338 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
339 if (GetCVarB('k8ZanMod_FragCasing'))
341 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
344 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
347 A_SetPitch(-1.0+pitch);
348 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(2, 6));
349 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
350 if (GetCVarB('k8ZanMod_FragCasing'))
352 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
355 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
358 A_SetPitch(-1.0+pitch);
359 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(3, 7));
360 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
361 if (GetCVarB('k8ZanMod_FragCasing'))
363 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
366 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
369 A_SetPitch(-1.0+pitch);
370 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(4, 8));
371 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
372 if (GetCVarB('k8ZanMod_FragCasing'))
374 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
377 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
380 A_SetPitch(-1.0+pitch);
381 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(5, 9));
382 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
383 if (GetCVarB('k8ZanMod_FragCasing'))
385 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
388 TNT1 A 0 A_JumpIfNoAmmo("OutOfPellets")
391 A_SetPitch(-1.0+pitch);
392 A_FireProjectile("FragShot", frandom(-2.5, 2.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(6, 10));
393 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
394 if (GetCVarB('k8ZanMod_FragCasing'))
396 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
399 WFRR A 8 //Offset(0, 33)
400 WFRR A 2 A_SetPitch(1.50+pitch)
401 WFRF A 1 //A_PlaySound("Weapons/FragfireGunPump", CHAN_WEAPON)
402 WFRF A 1 A_SetPitch(1.50+pitch)
403 WFRF B 2 A_SetPitch(1.50+pitch)
404 WFRF C 2 A_SetPitch(1.50+pitch)
405 WFRF D 2 A_PlaySound("Weapons/FragfireGunPump", CHAN_WEAPON)
406 WFRF C 2 A_SetPitch(1.00+pitch)
407 WFRF B 2 A_SetPitch(1.00+pitch)
408 WFRF A 2 A_AlertMonsters
412 WFRR B 1 A_SetPitch(1.00+pitch)
413 WFRR B 1 A_SetPitch(1.00+pitch)
414 WFRR B 1 A_SetPitch(1.00+pitch)
418 //TNT1 A 0 A_JumpIfNoAmmo("Reload")
419 TNT1 A 0 A_JumpIfNotInventory("FragfireGunLoaded", "Reload")
420 TNT1 A 0 A_JumpIf(waterlevel==3, "UnderwaterDryFire")
423 user_lowPauseCount = -666;
424 A_TakeInventory("FragfireGunLoaded", 1);
426 A_SetPitch(-0.3+pitch);
427 A_FireCustomMissile("FlameShot", frandom(-3, 3), 0, 4, -3, FPF_NOAUTOAIM, frandom(-3, 3));
428 //if (IsActorClassExists("Zan_FragfireGunCasingSpawn"))
429 if (GetCVarB('k8ZanMod_FragCasing'))
431 A_FireCustomMissileEx("Zan_FragfireGunCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
434 WFRR A 2 //Offset(0, 33)
437 A_SetPitch(0.15+pitch);
440 WFRR A 1 A_SetPitch(0.15+pitch)
445 TNT1 A 0 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.4)
450 TNT1 A 0 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.2)
462 WFRR A 0 A_JumpIfInventory("FragfireGunLoaded", 80, "ReloadFinish")
463 WFRR A 0 A_JumpIfInventory("FragfireCan", 1, "ReloadWork")
464 TNT1 A 0 A_JumpIfNoAmmo("DryFire")
465 //WFRR B 1 A_JumpIfNotInventory("FragfireCan", "ReadyIdle")
469 WFRF B 2 A_PlaySound("Weapons/FragReloadA", CHAN_WEAPON);
474 WFRL C 3 A_SpawnItem("FragfireCanDropped", -1, 16, 0)
476 WFRL D 3 A_PlaySound("Weapons/FragReloadB", CHAN_WEAPON)
481 WFRF B 2 A_PlaySound("Weapons/FragfireGunPump", CHAN_WEAPON)
491 // if reload in not cheating, drop unused ammo
492 if (!GetCVar("k8ZanMod_CheatReload")) {
493 A_TakeInventory("FragfireGunLoaded", 666);
495 local clipCount = CountInv("FragfireCan");
496 local loadCount = 80-CountInv("FragfireGunLoaded");
498 if (loadCount > clipCount) loadCount = clipCount;
499 A_TakeInventory("FragfireCan", loadCount);
500 A_GiveInventory("FragfireGunLoaded", loadCount);
502 user_lowPauseCount = 0;
509 stateinclude "QuickKick/QuickKickInclude.txt"
514 ACTOR FragShot : FastProjectile {
522 ProjectileKickBack 280
524 DamageType "FragfireGun"
526 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
531 DeathSound "Weapons/SpikeShotDeath"
532 //SeeSound "Weapons/FragfireGunFire"
533 Obituary "%o was turned into a charred pile of gore by %k's frag shot."
538 PFRA A 1 Bright A_SpawnItemEx("ProjectileFragShotTrail", Random(-24, -8), 0, 0, random(1, 4), 0, 0, 0, SXF_TRANSFERPITCH, 0)
542 TNT1 A 0 A_SpawnItemEx("SparkDie", 0, 0, 0, Random(-4, 4), Random(-4, 4), Random(-3, 5), 0, 0, 100)
543 TNT1 A 0 A_SpawnItemEx("SparkDie", 0, 0, 0, Random(-5, 5), Random(-5, 5), Random(-2, 6), 0, 0, 200)
549 ACTOR FlameShot /*: FastProjectile*/ {
555 //Damage (1*random(2, 6))
556 Damage (1*random(12, 16))
573 SeeSound "Weapons/FlameShot"
574 DeathSound "Weapons/FlameDeath"
575 Obituary "%o got roasted by %k."
581 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
583 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
585 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
587 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
589 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
591 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
593 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
595 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
597 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
599 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
601 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
603 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
605 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
607 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
609 TNT1 A 0 A_JumpIf(waterlevel>=1, "WaterDeath")
614 TNT1 A 0 A_SpawnItemEx("FireTinyDie1", 0, 0, 1, 0, 0, 0, 0, 0, 190)
615 TNT1 A 0 A_SpawnItemEx("FireTinyDie2", 0, 0, 1, 0, 0, 0, 0, 0, 180)
616 TNT1 A 0 A_SpawnItemEx("FireTinyDie3", 0, 0, 1, 0, 0, 0, 0, 0, 170)
617 TNT1 A 0 A_SpawnItemEx("SteamPuffMedium", 0, 0, -25)
618 TNT1 A 0 A_PlaySound("Weapons/FlameDeath", CHAN_WEAPON)
619 //PFRA M 2 bright A_Explode(random(8, 12), 160, 0, false, 80)
620 PFRA M 2 bright A_Explode(random(18, 22), 160, 0, false, 80)
625 PFRA Q 2 bright A_PlaySound("Weapons/SteamHiss", CHAN_WEAPON)
626 TNT1 A 0 A_SpawnItemEx("SteamPuffSmall")
627 TNT1 A 0 A_SpawnItemEx("SteamPuffMedium")
628 //TNT1 A 0 A_PlaySound("Weapons/SteamHiss", CHAN_WEAPON)
634 ACTOR ProjectileFragShotTrail {
645 TNT1 A 0 A_JumpIf(waterlevel>1, "WaterDeath")
657 actor (optional) ZanSSGReplacer : RandomSpawner replaces SuperShotgun {
658 DropItem "FragfireGun"
664 Actor (optional) Zan_CrossbowFragfireCan : FragfireCanBox Replaces CrossbowAmmo {}
665 Actor (optional) Zan_CrossbowFragfireCanBox : FragfireCanBox Replaces CrossbowHefty {}
667 Actor (optional) Zan_CrossbowFragfireGun : FragfireGun Replaces Crossbow {}
668 Actor (optional) Zan_CrossbowPoweredFragfireGun : FragfireGun Replaces CrossbowPowered {}
672 Actor (optional) Zan_Mana2FragfireCan : FragfireCanBox Replaces Mana2 {}
674 Actor (optional) Zan_TPH_AmmoShotgun : FragfireCanBox Replaces AmmoShotgun {}
675 //Actor (optional) Zan_TPH_TPHShotgun : FragfireGun Replaces TPHShotgun {} //SSG
676 Actor (optional) Zan_TPH_TPHRifle : FragfireGun Replaces TPHRifle {}