ACTOR PerkDPlayer : Doomplayer replaces Doomplayer
{
	player.startitem "startmapanim", 1
	player.startitem "PDA"
        player.startitem "92f"
	player.startitem "PerkFist"
	player.startitem "handgrenade"
	player.startitem "Gren", 1
	player.startitem "nadeitem"
	Player.StartItem "Clip2", 50
	Player.WeaponSlot 1, knife, Chainsaw2, PerkFist
   	Player.WeaponSlot 2, magnum, Pistol2, 92f
	Player.WeaponSlot 3, Riotgun2, PerkSuperShotgun, MegaShotgun
	Player.WeaponSlot 4, hmg, superchaingun, SMG 
	Player.WeaponSlot 5, devastator, GrenadeLauncher, rpg
	Player.WeaponSlot 6, UnmakerL, LIGHTNINGGUN, PerkPlasmaRifle
        Player.WeaponSlot 7, UnmakerR, Freezer, BFG9k
	Player.Weaponslot 8, NuclearMissileLauncher
	Player.Weaponslot 9, Handgrenade
	Player.Weaponslot 0, weaponFlashlight, weaponFlashlight92f

	DamageFactor "stun", 0
	
	States
	{
	Spawn:
		PLAY A -1
		Loop
	See:
		PLAY ABCD 4
		Loop
	Missile:
		PLAY E 12
		Goto Spawn
	Melee:
		PLAY F 6 BRIGHT
		Goto Missile
	Pain.Holotracer:
	Goto See
	Pain:
		PLAY G 4
		PLAY G 4 A_Pain
		Goto Spawn
	Death:
		PLAY H 0 A_PlayerSkinCheck("AltSkinDeath")
	Death1:
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		PLAY N -1
		Stop
	XDeath:
		PLAY O 0 A_PlayerSkinCheck("AltSkinXDeath")
	XDeath1:
		PLAY O 0 A_SpawnDebris("NashGore_Gib9",0)
		PLAY O 0 A_SpawnDebris("NashGore_Gib10",0)
		PLAY O 0 A_SpawnDebris("NashGore_Gib11",0)
 		PLAY O 0 A_SpawnDebris("NashGore_Gib11",0)
	 	PLAY O 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		PLAY O 5
	 	PLAY P 0 A_SpawnDebris("PLAYERHEAD",0)
		PLAY P 5 A_XScream
	 	POSS N 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		POSS O 5 A_NoBlocking
	 	POSS P 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		POSS QRST 5
		POSS U -1
		Stop
	AltSkinDeath:
		PLAY H 6
		PLAY I 6 A_PlayerScream
		PLAY JK 6
		PLAY L 6 A_NoBlocking
		PLAY MNO 6
		PLAY P -1
		Stop
	AltSkinXDeath:
		PLAY Q 0 A_SpawnDebris("NashGore_Gib9",0)
		PLAY Q 0 A_SpawnDebris("NashGore_Gib10",0)
		PLAY Q 0 A_SpawnDebris("NashGore_Gib11",0)
 		PLAY Q 0 A_SpawnDebris("NashGore_Gib11",0)
	 	PLAY Q 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		PLAY Q 5 A_PlayerScream
	 	PLAY R 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		PLAY R 0 A_NoBlocking
		PLAY R 5 A_SkullPop
	 	PLAY S 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
		PLAY STUVWX 5
		PLAY Y -1
		Stop
	Death.UMDEATH:
		UMDT A 5 bright A_NoBlocking
		UMDT B 5 bright A_NoBlocking
		UMDT C 5 bright A_PlaySound("monster/bfgdie")
		UMDT DEFGHI 5
		stop
	Death.shred:
	 	shrd A 0 A_SpawnDebris("NashGore_Gib9",0)
	 	shrd A 0 A_SpawnDebris("NashGore_Gib11",0)
 	 	shrd A 0 A_SpawnDebris("NashGore_Gib11",0)
		shrd A 1  A_SpawnDebris("HEADBlood",0) 
		shrd A 1  A_SpawnDebris("HEADBlood",0) 
		shrd A 1  A_SpawnDebris("HEADBlood",0) 
		shrd A 1  A_SpawnDebris("HEADBlood",0) 
		shrd A 1  A_SpawnDebris("HEADBlood",0) 
		shrd B 5 A_XScream
		shrd C 5 
		shrd D 5 A_NoBlocking
		shrd E 5 
		shrd F 5 
		shrd g -1
		stop
	Death.fire:
		DBRN A 0 bright A_PLAYSOUND("player/onfire")
		DBRN aBCDefghijklmnopqrst 4 bright
		DBRN U 4 bright A_NoBlocking
		DBRN v-1
		stop
	Crush:
	 	CRS1 A -1
	      	stop
	}
}


ACTOR startmapanim : Ammo
{
 Inventory.MaxAmount 1
 +IGNORESKILL
}

actor PDA : custominventory
{
  Inventory.Amount 1
  Inventory.DefMaxAmount
  +INVENTORY.INVBAR
  inventory.icon PDA1B0
  states
  {
  Spawn:
    PDA1 A -1 
    stop
  Use:
      TNT1 A 0
      TNT1 A 0 A_GiveInventory("PDA", 1)
    stop
  }
}

actor flashlightspawner : CustomInventory 
{
  Inventory.PickupMessage "You got the Flash Light!" 
  states
  {
  Spawn:
    FLSH A 2 A_SpawnItem("FLASHLIGHTGlare",0,0,0,0)
    FLSH A 0 
    LOOP
  Pickup:
    TNT1 A 0 A_GiveInventory ("itemflashlight")
    TNT1 A 0 A_GiveInventory ("weaponflashlight92f")
    TNT1 A 0 A_GiveInventory ("weaponflashlight")
    stop
  }
}

ACTOR FLASHLIGHTGlare
{
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	+DONTSPLASH
	+DONTBLAST
	renderstyle add
	Alpha 0.2
	States
	{
	Spawn:
		FLSH B 3 Bright
		Stop
	}
}

actor itemflashlight : CustomInventory 
{
  Inventory.Amount 1
  Inventory.DefMaxAmount
  +INVENTORY.INVBAR
  inventory.icon FLSHC0
  states
  {
  Spawn:
    FLSH A -1 
    stop
  Use:
      TNT1 A 0 A_SelectWeapon("weaponflashlight")
      TNT1 A 0 A_GiveInventory("itemflashlight", 1)
    stop
  }
}
ACTOR flashpuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOGRAVITY
   -ALLOWPARTICLES
   +NOCLIP
   Scale 2
   Speed 0
   vspeed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.1
   +puffonactors
   +dontsplash
   +BLOODLESSIMPACT
   States
   {
   Spawn:
      flar g 2 BRIGHT
      Stop
   }
}

ACTOR weaponFlashlight : Weapon 
{
   +WEAPON.NOALERT
   Inventory.PickupMessage "You got the Flash Light!" 
   Weapon.Upsound "items/visor"
   States 
   { 
   Spawn: 
      FLSH A -1 
      LOOP 
   Ready: 
      D3FG A 1 A_Light2
      D3FG A 0 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
      D3FG A 0 A_WeaponReady
      LOOP 
   Deselect: 
      D3Fx a 0 A_Light0 
     tnt1 a 0 A_Lower
      D3Fx a 1 A_Lower 
      LOOP 
   Select: 
     tnt1 a 0 A_raise
      D3Fx a 1 A_Raise 
      LOOP 
   Fire:
tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastefire")
      TNT1 A 2 A_Light0
      D3FG G 2 
      D3FG H 2 A_PlayWeaponSound("weapons/wiff")
      D3FG IJ 1
      D3FG K 2 A_CustomPunch(3,0,0,"FistPuff")
      D3FG LMN 1
      TNT1 A 4 
	TNT1 A 0 A_refire
      D3FG FE 2 A_Light2
	Goto ready
   hasteFire:
      TNT1 A 1 A_Light0
      D3FG G 1 
      D3FG H 1 A_PlayWeaponSound("weapons/wiff")
      D3FG IJ 1
      D3FG K 1 A_CustomPunch(3,0,0,"FistPuff")
      D3FG LMN 1
      TNT1 A 2 
	TNT1 A 0 A_refire
      D3FG FE 2 A_Light2
	Goto ready
  AltFire:
		KICK A 0 A_GunFlash
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 0 A_CustomPunch(3,0,0,"FootPuff")
                FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT E 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
                D3FG A 0 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    D3FG A 15 A_Light2
    stop
   } 
}

actor weaponflashlight92f: Weapon 
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 0
  Weapon.AmmoType "Clip2"
  Obituary "$OB_MPPISTOL" // "%o was tickled by %k's pea shooter."
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "You got the Flash Light!"
  Weapon.UpSound "items/flashlight"
  States
  {
  Ready:
      D3FG B 1 A_Light2
      D3FG B 0 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
      D3FG B 0 A_WeaponReady 
    Loop
  Deselect:
      D3FG B 0 A_Light0 
     tnt1 a 0 A_Lower
      D3FG B 1 A_Lower
    Loop
  Select:
     tnt1 a 0 A_raise
      D3FG B 1 A_Raise 
    Loop
 Fire:
  D3FG B 0 A_GunFlash
  D3FG B 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  D3FG B 1 A_GiveInventory("NewPistolLoaded", 1)
  D3FG B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
  D3FF A 0 A_PlayWeaponSound("weapons/pistol")
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 8, 0, 0, Random(2, -2))
  D3FF A 1 A_FireBullets(4,4,-1,6,"BulletPuff",1)
  D3FF A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
  D3FF A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
  D3FG C 1 A_FireCustomMissile("BulletSpawnL",0,0,19,5)
  D3FG C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
  D3FG B 1 A_ReFire
  D3FG B 0 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ, 0)
  D3FG B 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
  D3FG B 2 A_PlaySound("items/clip")
  D3FG D 2 A_PlaySound("items/visor")
  PISR B 2 A_Light0 
  PISR B 2
  PISR B 11
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISR C 6 A_PlaySound("items/pistol") 
  PISR D 6
  PISR B 6
  D3FG D 2 A_PlaySound("items/visor")
  Goto Ready
hasteReload:
  D3FG B 1 A_PlaySound("items/clip")
  D3FG D 1 A_PlaySound("items/visor")
  PISR B 1 A_Light0 
  PISR B 1
  PISR B 5
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISR C 3 A_PlaySound("items/pistol") 
  PISR D 3
  PISR B 3
  D3FG D 1 A_PlaySound("items/visor")
  Goto Ready
  Flash:
    TNT1 A 10 A_Light2
    stop
  AltFire:
		KICK A 0 A_GunFlash
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 0 A_CustomPunch(3,0,0,"FootPuff")
                FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT E 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		FOOT D 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
                D3FG A 0 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK C 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK B 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 1 A_FireBullets (0, 0, 0, 0, "flashPuff", FBF_NORANDOMPUFFZ)
		KICK A 0 A_ReFire	
		Goto Ready
    AltFlash:
    D3FG B 15 A_Light2
    stop
  Spawn:
    FLSH A -1
    Stop
  }
}

actor splosionspark
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
        Scale 0.2
	States
	{
		Spawn:
	SPnK A 1 A_SetScale(0.2, 0.2)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.4, 0.4)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.6, 0.6)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.8, 0.8)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(1, 1)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(1.2, 1.2)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(1.4, 1.4)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(1.6, 1.6)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(1.8, 1.8)
		SPnK A 1 bright A_FadeOut(0.1)
		stop
	}
}

actor splosionspark2
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
        Scale 0.2
	States
	{
		Spawn:
	SPnK B 1 A_SetScale(0.2, 0.2)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(0.4, 0.4)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(0.6, 0.6)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(0.8, 0.8)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(1, 1)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(1.2, 1.2)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(1.4, 1.4)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(1.6, 1.6)
		SPnK B 1 bright A_FadeOut(0.1)
	SPnK B 1 A_SetScale(1.8, 1.8)
		SPnK B 1 bright A_FadeOut(0.1)
		stop
	}
}

actor splosionspark3
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
        Scale 0.1
	States
	{
		Spawn:
	SPnK A 1 A_SetScale(0.02, 0.02)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.04, 0.04)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.06, 0.06)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.08, 0.08)
		SPnK A 1 bright A_FadeOut(0.1)
	SPnK A 1 A_SetScale(0.1, 0.1)
		SPnK A 1 bright A_FadeOut(0.1)
		stop
	}
}


ACTOR Smokeshot
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   vspeed 1
   Speed 5
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +DONTSPLASH
   States
   {
   Spawn:
      TNT1 A 6
      RSMK ABCDE 4 
      Stop
   }
}


ACTOR BulletPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Translucent
	scale 0.3
	Alpha 1
	VSpeed 1
	Mass 5
	States
	{
	Spawn:
		SPRK A 2 Bright
	TNT1 a 0 A_SpawnItem("splosionspark3",0,0,0,0)
		SPRK A 0 Bright A_SpawnDebris("BulletSpark")
		SPRK B 0 A_PlayWeaponSound("weapons/puff")
		SPRK BCD 2 Bright 
	Melee:
		TNT1 A 2 Bright A_PlaySound("weapons/tink")
		TNT1 A 0 Bright A_spawnitemex("puffsmoke",0,0,0,0,0)
		TNT1 A 2 Bright
		Stop
	}
}

ACTOR superPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Translucent
	scale 0.3
	Alpha 1
	VSpeed 1
	Mass 5
	Damagetype shred
	+noextremedeath
	States
	{
	Spawn:
		SPRK A 2 Bright
	TNT1 a 0 A_SpawnItem("splosionspark3",0,0,0,0)
		SPRK A 0 Bright A_SpawnDebris("BulletSpark")
		SPRK B 0 A_PlayWeaponSound("weapons/puff")
		SPRK BCD 2 Bright 
	Melee:
		TNT1 A 2 Bright A_PlaySound("weapons/tink")
		TNT1 A 0 Bright A_spawnitemex("puffsmoke",0,0,0,0,0)
		TNT1 A 2 Bright
		Stop
	}
}

ACTOR fistpuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.5
   +puffonactors
   AttackSound "weapons/tink"
   SeeSound "player/male/fist"
   States
   {
   Spawn:
            Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR zerkfistpuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
	damagetype shred3
   +puffonactors
   AttackSound "weapons/tink"
   SeeSound "player/male/fist"
   States
   {
   Spawn:
            Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR footpuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
	damagetype foot
   +puffonactors
	+noextremedeath
	projectilekickback 800
   AttackSound "weapons/tink"
   SeeSound "player/male/fist"
   States
   {
   Spawn:
      Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR zerkfootpuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
	damagetype shred3
   +puffonactors
	projectilekickback 800
   AttackSound "weapons/tink"
   SeeSound "player/male/fist"
   States
   {
   Spawn:
            Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR knifepuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +puffonactors
	+noextremedeath
   AttackSound "weapons/tink"
   SeeSound "knifehit"
   States
   {
   Spawn:
            Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR zerkknifepuff
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +puffonactors
	Damagetype saw
	+noextremedeath
   AttackSound "weapons/tink"
   SeeSound "knifehit"
   States
   {
   Spawn:
            Rbit ABCD 4 A_FadeOut(0.05)
      Stop
   }
}

ACTOR sawPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Translucent
	scale 0.3
	Alpha 1
	VSpeed 1
	Mass 5
	Damagetype saw
	States
	{
	Spawn:
		SPRK A 2 Bright
	TNT1 a 0 A_SpawnItem("splosionspark3",0,0,0,0)
		SPRK A 0 Bright A_SpawnDebris("BulletSpark")
		SPRK BCD 2 Bright 
	Melee:
		TNT1 A 2 Bright 
		TNT1 A 0 Bright A_spawnitemex("puffsmoke",0,0,0,0,0)
		TNT1 A 2 Bright
		Stop
	}
}

ACTOR puffSmoke2
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   vspeed 1
   Speed 1
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +DONTSPLASH
   States
   {
   Spawn:
      Rbit ABCD 4 A_FadeOut(0.08)
      Stop
   }
}

ACTOR puffSmoke
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   vspeed 1
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +DONTSPLASH
   States
   {
   Spawn:
      RSMK ABCDE 4 A_FadeOut(0.05)
      Stop
   }
}



ACTOR BulletSpark
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	Alpha		1
	Scale		.3
	Mass		0
	+missile
	//+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		SPRK E 1
		SPRK EFGHE 1  Bright A_SetTranslucent(.8,1)
		SPRK EGHEFG 1  Bright A_SetTranslucent(.6,1)
		SPRK HEFGHEFG 1  Bright A_SetTranslucent(.4,1)
		SPRK HEFGHEFGHE 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}


ACTOR rocketSmoker2
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .3
   Speed 0
   vspeed 1.5
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.4
   States
   {
   Spawn: 
      tnt1 a 2
      BAL1 CDE 1 bright A_FadeOut(0.1)
      stop
   }
}

ACTOR rocketSmoker
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .6
   Speed 0
   vspeed 1.5
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.6
   States
   {
   Spawn: 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
      tnt1 a 1
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
      tnt1 a 1
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
      tnt1 a 1
      tnt1 a 0  A_Playsound("weapons/rockfly")
             TNT1 A 0 A_CustomMissile("smokeParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("smokeParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
       TNT1 A 0 A_CustomMissile("smokeParticle2",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("smokeParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
             TNT1 A 0 A_CustomMissile("smokeParticle1",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("smokeParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))
      Stop
   }
}





actor smokeParticle
{
    Radius 0
    Height 0
    
    Speed 1
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.1
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RBIT ABCD 2 A_FadeOut(0.05)
        loop
    }
}

actor smokeParticle1
{
    Radius 0
    Height 0
    
    Speed 1
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.2
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 2 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RBIT ABCD 1 A_FadeOut(0.05)
        loop
    }
}

actor smokeParticle2
{
    Radius 0
    Height 0
    
    Speed 1
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.3
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 2 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RBIT ABCD 1 A_FadeOut(0.05)
        loop
    }
}


ACTOR shockwave
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 1
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.5
   States
   {
   Spawn: 
      shok abcdefghijklmnopqr 1 bright A_FadeOut(0.01)
      Stop
   }
}

ACTOR shockwave2
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .8
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.8
TRANSLATION "112:122=160:165", "123:127=43:47"
   States
   {
   Spawn: 
      shok abcdefghijklmnopqr 1  A_FadeOut(0.05)
      Stop
   }
}

ACTOR shockwave3
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .5
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.8
TRANSLATION "112:122=160:165", "123:127=43:47"
   States
   {
   Spawn: 
      shok abcdefghijklmnopqr 1  A_FadeOut(0.05)
      Stop
   }
}

ACTOR shockwave4
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 1
   Speed 0
   RENDERSTYLE add
   ALPHA 0.75
	TRANSLATION "112:119=200:207", "120:127=240:247"
   States
   {
   Spawn: 
      shok abcdefghijklmnopqr 1 bright A_FadeOut(0.01)
      Stop
   }
}

ACTOR shockwave5
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .5
   Speed 0
   RENDERSTYLE add
   ALPHA 0.75
   States
   {
   Spawn: 
      BZAP ABCD 1 bright A_FadeOut(0.01)   
	BZAP a 0 A_SetScale(.6, .6)
      BZAP ABCD 1 bright A_FadeOut(0.01)   
	BZAP a 0 A_SetScale(.7, .7)
      BZAP ABCD 1 bright A_FadeOut(0.01)   
	BZAP a 0 A_SetScale(.8, .8)
      BZAP ABCD 1 bright A_FadeOut(0.01)   
	BZAP a 0 A_SetScale(.9, .9)
      Stop
   }
}

ACTOR shockwave6
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale .7
   Speed 0
   RENDERSTYLE translucent
   ALPHA 0.8
TRANSLATION "112:127=176:191"
   States
   {
   Spawn: 
      shok abcdefghijklmnopqr 1 bright A_FadeOut(0.01)
      Stop
   }
}


actor Backpack3 : CustomInventory replaces Backpack
{
  Inventory.PickupMessage "$GOTBACKPACK"
  states
  {
  Spawn:
    BPAK A -1
	Stop
  Pickup:
    TNT1 A 0 A_GiveInventory ("Backpack2")
    TNT1 A 0 A_GiveInventory ("nadeitem", 1)
    stop
  }
}

ACTOR Backpack2 : BackpackItem
{
	Height 26
	Inventory.PickupMessage "$GOTBACKPACK"
	States
	{
	Spawn:
		BPAK A -1
		Stop
	}
}

actor nadeitem : custominventory
{
  Inventory.Amount 1
  Inventory.DefMaxAmount
  Inventory.InterHubAmount 25
  +INVENTORY.INVBAR
  inventory.icon NADEI0
  states
  {
  Spawn:
    GRND A -1 
    stop
  Use:
      TNT1 A 0 A_SelectWeapon("HandGrenade")
      TNT1 A 0 A_GiveInventory("nadeitem", 1)
    stop
  }
}


ACTOR Gren : AMMO
{
Inventory.MaxAmount 25
Ammo.BackpackAmount 1
Ammo.BackpackMaxAmount 25
Inventory.Icon GRNDA0
}

ACTOR HandGrenade : Weapon
{ 
	Weapon.SelectionOrder 50
	Inventory.PickupSound "misc/w_pkup" 
	Inventory.PickupMessage "Picked up a Grenade." 
	Obituary "%o tried to put the pin back in %k's grenade."
	Scale 0.6
	Weapon.AmmoType Gren
	Weapon.AmmoGive 1 
	Weapon.AmmoUse 1
	Inventory.Icon GRNDA0
        Weapon.UpSound "items/nade"
	+WEAPON.NOALERT
	+NOAUTOFIRE
     States
     { 
     Spawn: 
        GRND A -1 
        LOOP 
   Ready: 
      GRND B 0 A_JumpIfNoAmmo("deselect")
      GRND B 1 A_WeaponReady
      Loop
      TNT1 A 1 A_WeaponReady
      Loop
   Deselect:
      GRND B 0 A_JumpIfNoAmmo(2)
      GRND B 1 A_Lower
      Goto Deselect+1
      TNT1 A 1 A_Lower
      Goto Deselect+2
   Select:
      GRND B 0 A_JumpIfNoAmmo("deselect")
     tnt1 a 0 A_raise
      GRND B 1 A_Raise
      Loop 
   Fire: 
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastefire")
      GRND CDE 4 
      GRND F 2 A_PlayWeaponSound("weapons/pin")
      GRND GH 2 
      TNT1 A 6
      GRND I 0 A_PlayWeaponSound("weapons/Throw")
      GRND I 0 A_TakeInventory("nadeitem", 1)
      GRND I 0 A_Recoil(-3)
      GRND I 2 A_FireCustomMissile("Grenade",0,1,0,0)
      GRND JKLM 2
      TNT1 A 10
      TNT1 A 0 A_JumpIfNoAmmo(4)
      GRND HGB 3
      Goto Ready
      TNT1 A 0
      Goto Ready+2
   hasteFire: 
      GRND CDE 2 
      GRND F 1 A_PlayWeaponSound("weapons/pin")
      GRND GH 1 
      TNT1 A 3
      GRND I 0 A_PlayWeaponSound("weapons/Throw")
      GRND I 0 A_TakeInventory("nadeitem", 1)
      GRND I 0 A_Recoil(-3)
      GRND I 2 A_FireCustomMissile("Grenade",0,1,0,0)
      GRND JKLM 1
      TNT1 A 5
      TNT1 A 0 A_JumpIfNoAmmo(4)
      GRND HGB 1
      Goto Ready
      TNT1 A 0
      Goto Ready+2
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"footpuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready+2
  AltFlash:
    GRND B 15 A_Light0
    Goto LightDone
   } 
} 


ACTOR Grenade

{  
	Speed 30
	Height 2
	Radius 12
	Mass 9
	Damage 10
	ExplosionDamage 128
	ExplosionRadius 196
	PROJECTILE
	+ DoomBounce
	- NOGRAVITY
	+GRENADETRAIL
	Damagetype Blasted
	RenderStyle normal
	SeeSound  "weapons/bounce"
	DeathSound "weapons/rocklx"
	ReactionTime 40
	BounceFactor 0.5
	Scale 0.8
	States
   {
   Spawn:
      GRND A 0 ThrustThingZ(0,7,0,1)
      HGN1 ABCDEF 2 A_Countdown
      LOOP
   Death: 
      BOOM A 0 A_SetTranslucent(0.6,0)
      BOOM A 0 A_quake(1,12,0,300,"NO/SOUND")
      BOOM A 0 A_SpawnItem("dustcloud",0,0,0,0)
	BOOM A 0 A_SpawnItem("BITZGenerator",0,0,0,0)
	BOOM A 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      BOOM A 0 Bright A_NoGravity
      BOOM A 0 Bright A_AlertMonsters
      BOOM A 0 Bright A_Scream
	TNT1 a 0 A_SpawnItem("splosionspark2",0,0,0,0)
      BOOM A 4 Bright A_Explode
      BOOM A 4 BRIGHT
	BOOM B 4 BRIGHT A_SpawnItem("BITZGenerator",0,0,0,0)
	BOOM C 4 BRIGHT A_SpawnItem("BITZGenerator",0,0,0,0)
      BOOM DE 4 Bright
      TNT1 A 1 
      STOP      
   XDeath: 
	TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
      MISL B 0 A_SetTranslucent(0.6,0)
      MISL B 0 A_quake(1,12,0,300,"NO/SOUND")
      MISL B 0 A_SpawnItem("dustcloud",0,0,0,0)
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL B 0 Bright A_NoGravity
      MISL B 0 Bright A_AlertMonsters
      MISL B 0 Bright A_Scream
      MISL B 5 Bright A_Explode
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL C 4 Bright
	MISL C 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL D 3 Bright
      TNT1 A 1
      STOP
   }
}


ACTOR GrenadeLauncher : Weapon 
{
  obituary "%o was popped by %k's grenade."
   Weapon.Upsound "items/glauncher"
   Inventory.PickupMessage "You got the Grenade Launcher!"
   Weapon.AmmoType "RocketAmmo2"
   Weapon.AmmoGive 2
   Weapon.AmmoUse 1
  +Weapon.Ammo_Optional 
   States
   {
   Spawn:
      RTGW A -1
      Loop
   Ready:
	tnt1 a 0 A_SetCrosshair(4)
      RTGG A 1 A_WeaponReady
      Loop
   Deselect:
     tnt1 a 0 A_Lower
      RTGG A 1 A_Lower
loop
   Select:
     tnt1 a 0 A_raise
      RTGG A 1 A_Raise
      Loop
   Fire:
  RTGG A 0 A_JumpIfNoAmmo("Click")
      RTGG A 2
      RTGG B 0 A_GunFlash
      RTGG B 0 A_Recoil(4)
      RTGG B 0 A_PlayWeaponSound("weapons/grenlau")
      RTGG B 5 A_FireCustomMissile("Grenade2")
      RTGG C 5
      RTGG D 5
      RTGG E 2
      RTGG A 2
      RTGG A 3 A_ReFire
      Goto Ready
 Click:
   RTGG A 0 A_PlaySound("weapons/dry")
   RTGG A 12
   Goto Ready
   Flash:
      RTGG B 5 Bright A_Light1
      RTGG C 5 Bright A_Light2
      RTGG C 0 A_Light0
      Stop
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    RTGG A 15 A_Light0
    Goto LightDone
   }
}


ACTOR Grenade2

{  
	Speed 50
	Height 2
	Radius 12
	Mass 9
	Damage 10
	ExplosionDamage 128
	ExplosionRadius 196
	PROJECTILE
	+ DoomBounce
	- NOGRAVITY
	+ROCKETTRAIL
	+EXTREMEDEATH
	Damagetype Bouncer
	RenderStyle normal
	SeeSound  "weapons/bounce2"
	DeathSound "weapons/rocklx"
	ReactionTime 50
	BounceFactor 0.5
	Scale 0.8
	States
   {
   Spawn:
      ZRND A 0 ThrustThingZ(0,7,0,1)
      ZGN1 ABCDEF 2 A_Countdown
      LOOP
   Death: 
      TNT1 A 0 A_SpawnItem("Grenadesploder",0,0,0,0)
      STOP     
   XDeath: 
	TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
      MISL B 0 A_SetTranslucent(0.6,0)
      MISL B 0 A_quake(1,12,0,300,"NO/SOUND")
      MISL B 0 A_SpawnItem("dustcloud",0,0,0,0)
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL B 0 Bright A_NoGravity
      MISL B 0 Bright A_AlertMonsters
      MISL B 0 Bright A_Scream
      MISL B 5 Bright A_Explode
	MISL B 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL C 4 Bright
	MISL C 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      MISL D 3 Bright
      TNT1 A 1
      STOP
   }
}

ACTOR Grenadesploder 
{
	Height 8
	Speed 0
	Damage 10
	scale 0.8
	ExplosionDamage 128
	ExplosionRadius 196
	PROJECTILE
	+RANDOMIZE
	+DEHEXPLOSION
	+EXTREMEDEATH
	+THRUGHOST
	SeeSound ""
	DeathSound "weapons/rocklx"
	Obituary "%o was POPPED by %k's GRENADE."
	States
	{
	Spawn:
		ZgN1 E 50 
		goto death
   Death: 
      BOOM A 0 A_SetTranslucent(0.6,0)
      BOOM A 0 A_quake(1,12,0,300,"NO/SOUND")
      BOOM A 0 A_SpawnItem("dustcloud",0,0,0,0)
	BOOM A 0 A_SpawnItem("BITZGenerator",0,0,0,0)
	BOOM A 0 A_SpawnItem("BITZGenerator",0,0,0,0)
      BOOM A 0 Bright A_NoGravity
      BOOM A 0 Bright A_AlertMonsters
      BOOM A 0 Bright A_Scream
	TNT1 a 0 A_SpawnItem("splosionspark2",0,0,0,0)
      BOOM A 4 Bright A_Explode
      BOOM A 4 BRIGHT
	BOOM B 4 BRIGHT A_SpawnItem("BITZGenerator",0,0,0,0)
	BOOM C 4 BRIGHT A_SpawnItem("BITZGenerator",0,0,0,0)
      BOOM DE 4 Bright
      TNT1 A 1 
      STOP  
	}
}


ACTOR PerkFist : Fist replaces Fist
{

scale 0.25
   +WEAPON.NOALERT
	States
	{
  Deselect:
     tnt1 a 0 A_Lower
    PUNG A 1 A_Lower
    Loop
  Select:
     tnt1 a 0 A_raise
    PUNG A 1 A_Raise
    Loop
	ready:
		PUNG A 0 A_Jump(128, "ready2")
		PUNG A 1
	goto ready3
	ready2:
		fist eab 1
		fist c 2 A_PlayWeaponSound("weapons/knuck")
		fist dcbae 2
	goto ready3
	ready3:
		PUNG A 1 A_WeaponReady
	loop

	Fire:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastefire")
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "ZerkFire")
		PKFS L 1 A_PlayWeaponSound("weapons/wiff")
		PKFS BCD 1
		PKFS E 2 A_Punch
		PKFS E 0 A_Recoil(-3)
		PKFS FGHI 2
		PKFS JKL 1
		PUNG A 5 A_ReFire
		Goto Ready3
	hasteFire:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "ZerkFire")
		PKFS L 1 A_PlayWeaponSound("weapons/wiff")
		PKFS BCD 1
		PKFS E 1 A_Punch
		PKFS E 0 A_Recoil(-3)
		PKFS FGHI 1
		PKFS JKL 1
		PUNG A 2 A_ReFire
		Goto Ready3
	ZerkFire:
             tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastezerkfire")
		xfst a 1 A_PlayWeaponSound("weapons/wiff")
		xfst BCD 1
		xfst E 2 A_CustomPunch(20,0,0,"zerkfistPuff")
		xfst E 0 A_Recoil(-3)
		xfst DCBA 2
		PUNG A 2
		PUNG A 5 A_ReFire
		Goto Ready3
	hasteZerkFire:
		xfst a 1 A_PlayWeaponSound("weapons/wiff")
		xfst BCD 1
		xfst E 1 A_CustomPunch(20,0,0,"zerkfistPuff")
		xfst E 0 A_Recoil(-3)
		xfst DCBA 1
		PUNG A 1
		PUNG A 2 A_ReFire
		Goto Ready3
	AltFire:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "ZerkAltFire")
		PKFS L 1 A_PlayWeaponSound("weapons/wiff")
		FOOT ABC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT DCBA 2
		PKFS L 2	
		PUNG A 6 A_ReFire
		Goto Ready3
	ZerkAltFire:
		PKFS L 1 A_PlayWeaponSound("weapons/wiff")
		FOOT ABC 1
		FOOT D 1 A_CustomPunch(20,0,0,"zerkFootPuff")
		FOOT E 1 
		FOOT DCBA 2
		PKFS L 2	
		PUNG A 6 A_ReFire
		Goto Ready3
	Spawn:
		PUNP A -1
		Stop
	}
}

actor SawDrop : RandomSpawner replaces Chainsaw
{
dropitem Chainsaw2
}


actor GotRedBloodOnSaw2 : inventory
{
inventory.maxamount 1
-invbar
}

actor GotRedBloodOnSaw : CustomInventory 
{
  states
  {
  Pickup:
  TNT1 A 0 A_TakeInventory("GotGreenBloodOnSaw2")
  TNT1 A 0 A_TakeInventory("GotBlueBloodOnSaw2")
  TNT1 A 0 A_Giveinventory("GotRedBloodOnSaw2")
    stop
  }
}

actor GotGreenBloodOnSaw2 : inventory
{
inventory.maxamount 1
-invbar
}

actor GotGreenBloodOnSaw : CustomInventory 
{
  states
  {
  Pickup:
  TNT1 A 0 A_TakeInventory("GotRedBloodOnSaw2")
  TNT1 A 0 A_TakeInventory("GotBlueBloodOnSaw2")
  TNT1 A 0 A_Giveinventory("GotGreenBloodOnSaw2")
    stop
  }
}

actor GotBlueBloodOnSaw2 : inventory
{
inventory.maxamount 1
-invbar
}

actor GotBlueBloodOnSaw : CustomInventory 
{
  states
  {
  Pickup:
  TNT1 A 0 A_TakeInventory("GotRedBloodOnSaw2")
  TNT1 A 0 A_TakeInventory("GotGreenBloodOnSaw2")
  TNT1 A 0 A_Giveinventory("GotBlueBloodOnSaw2")
    stop
  }
}

ACTOR Chainsaw2 : Weapon 
{
	Game Doom
	Weapon.Kickback 0
	Inventory.PickupMessage "$GOTCHAINSAW"
	Obituary "$OB_MPCHAINSAW"
	+WEAPON.MELEEWEAPON
	States
	{
	Ready:
		SAWG E 2  
		Goto Ready2
	Ready2:
		SAWG F 4 
		SAWG G 2 A_PlaySound("weapons/pull")
		SAWG H 6 
		SAWG H 0 A_Jump(128, "tug")
		Goto Ready3
	tug:
		SAWG HG 2 
		SAWG F 8
		SAWG G 2 A_PlaySound("weapons/pull")
		SAWG H 6 
		Goto Ready3
	Ready3:
		SAWG G 0 A_PlayWeaponSound("weapons/sawup")
		SAWG GFE 2
		SAWG C 4
		SAWG D 4
		Goto Ready4
	Ready4:
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnsaw2",1,"Ready_RedBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotGreenBloodOnsaw2",1,"Ready_GreenBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotBlueBloodOnsaw2",1,"Ready_BlueBloodSpatter")
		SAWG C 0 A_PlaySound("weapons/sawidle")
		SAWG C 4 A_WeaponReady
		SAWG D 4 A_WeaponReady
		Loop
 Ready_RedBloodSpatter:
		csgr C 0 A_PlaySound("weapons/sawidle")
		csgr C 4 A_WeaponReady
		csgr D 4 A_WeaponReady
		Loop
 Ready_GreenBloodSpatter:
		csgg C 0 A_PlaySound("weapons/sawidle")
		csgg C 4 A_WeaponReady
		csgg D 4 A_WeaponReady
		Loop
 Ready_BlueBloodSpatter:
		csgb C 0 A_PlaySound("weapons/sawidle")
		csgb C 4 A_WeaponReady
		csgb D 4 A_WeaponReady
		Loop
	Deselect:
	TNT1 A 0 A_JumpIfInventory("GotRedBloodOnsaw2",1,"Deselect_RedBloodSpatter")
  	TNT1 A 0 A_JumpIfInventory("GotGreenBloodOnsaw2",1,"Deselect_GreenBloodSpatter")
 	TNT1 A 0 A_JumpIfInventory("GotBlueBloodOnsaw2",1,"Deselect_BlueBloodSpatter")
     		tnt1 a 0 A_Lower
		SAWG C 1 A_Lower
		Loop
	Deselect_RedBloodSpatter:
     		tnt1 a 0 A_Lower
		csgr C 1 A_Lower
		Loop
	Deselect_GreenBloodSpatter:
     		tnt1 a 0 A_Lower
		csgG C 1 A_Lower
		Loop
	Deselect_BlueBloodSpatter:
     		tnt1 a 0 A_Lower
		csgb C 1 A_Lower
		Loop
	Select:
  TNT1 A 0 A_TakeInventory("GotRedBloodOnSaw2")
  TNT1 A 0 A_TakeInventory("GotGreenBloodOnSaw2")
  TNT1 A 0 A_TakeInventory("GotBlueBloodOnSaw2")
     		tnt1 a 0 A_raise
		SAWG C 1 A_Raise
		Loop
	Fire:
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnsaw2",1,"Fire_RedBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotGreenBloodOnsaw2",1,"Fire_GreenBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotBlueBloodOnsaw2",1,"Fire_BlueBloodSpatter")
		TNT1 A 0 A_quake(0.5,6,0,1,"NO/SOUND")
		SAWG AB 4 a_saw("weapons/sawfull",  "weapons/sawhit", 2, "sawpuff")
		SAWG B 0 A_ReFire
		Goto Ready4  
	Fire_RedBloodSpatter:
		TNT1 A 0 A_quake(0.5,6,0,1,"NO/SOUND")
  		csgr AB 4 a_saw("weapons/sawfull",  "weapons/sawhit", 2, "sawpuff")
		csgr B 0 A_ReFire
		Goto Ready4 
	Fire_GreenBloodSpatter:
		TNT1 A 0 A_quake(0.5,6,0,1,"NO/SOUND")
  		csgG AB 4 a_saw("weapons/sawfull",  "weapons/sawhit", 2, "sawpuff")
		csgG B 0 A_ReFire
		Goto Ready4 
	Fire_BlueBloodSpatter:
		TNT1 A 0 A_quake(0.5,6,0,1,"NO/SOUND")
  		csgb AB 4 A_saw("weapons/sawfull",  "weapons/sawhit", 2, "sawpuff")
		csgb B 0 A_ReFire
		Goto Ready4 
	AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlaySound("weapons/wiff")
		KICK A 0 A_PlaySound("weapons/sawidle")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 0 A_PlaySound("weapons/sawidle")
		FOOT D 2
		KICK C 2
		KICK C 0 A_PlaySound("weapons/sawidle")
		KICK BA 2
		KICK A 0 A_ReFire	
		Goto Ready4
  AltFlash:
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnsaw2",1,"AltFlash_RedBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotGreenBloodOnsaw2",1,"AltFlash_GreenBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotBlueBloodOnsaw2",1,"AltFlash_BlueBloodSpatter")
    SAWG CDCD 4 A_Light0
    Goto LightDone
  AltFlash_RedBloodSpatter:
    csgr CDCD 4 A_Light0
    Goto LightDone
  AltFlash_GreenBloodSpatter:
    csgg CDCD 4 A_Light0
    Goto LightDone
  AltFlash_BlueBloodSpatter:
    csgb CDCD 4 A_Light0
    Goto LightDone
	Spawn:
		CSAW A -1
		Stop
	}
}

actor Knife : Weapon 
{
  obituary "%o was shanked by %k's combat knife."
  radius 20
  height 16
  inventory.pickupmessage "You got the combat knife!"
	Weapon.Kickback 0
  weapon.upsound "items/knife"
  +WEAPON.MELEEWEAPON
  +WEAPON.NOALERT
  states
  {
  Ready:
    KNIF A 4 A_WeaponReady
    loop
  Deselect:
     tnt1 a 0 A_Lower
    KNIF A 1 A_Lower
    Loop
  Select:
     tnt1 a 0 A_Raise
    KNIF A 1 A_Raise
    loop
  Fire:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "ZerkFire")
    KNIF A 0 A_Jump(128, "Fire2")
    KNIF BC 1 
    TNT1 A 0 A_PlaySound("weapons/wiff")
    KNIF DEF 1
    KNIF G 1 A_CustomPunch(3,0,0,"knifePuff")
    KNIF HI 1
    TNT1 A 0 A_PlaySound("weapons/wiff")
    KNIF NO 1
    KNIF P 1 A_CustomPunch(3,0,0,"knifePuff")
    KNIF QRCB 1
    KNIF R 1 A_Refire 
    goto Ready
  ZerkFire:
    KNIF BC 1 
    TNT1 A 0 A_PlaySound("weapons/wiff")
    KNIF DEF 1
    KNIF G 1 A_CustomPunch(20,0,0,"zerkknifePuff")
    KNIF HI 1
    TNT1 A 0 A_PlaySound("weapons/wiff")
    KNIF NO 1
    KNIF P 1 A_CustomPunch(20,0,0,"zerkknifePuff")
    KNIF QRCB 1
    KNIF R 1 A_Refire 
    goto Ready
Fire2:
    KNIF BC 1 
    TNT1 A 0 A_PlaySound("weapons/wiff")
    KNIF JKL 1
    KNIF M 1 A_CustomPunch(3,0,0,"knifePuff")
    KNIF LKJCB 1
    KNIF A 1 A_Refire 
    goto Ready
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    KNIF ABC 1 A_Light0
    TNT1 A 9 A_Light0
    KNIF CBA 1 A_Light0
    Goto LightDone
  Spawn:
    KNIF W -1
    stop
  }
}

actor MegaShotgunpickup : CustomInventory 
{
  Inventory.PickupMessage "You got the shotgun!"
  inventory.pickupsound "misc/W_pkup"
  states
  {
  Spawn:
    SHOT A -1
    stop
  Pickup:
    TNT1 A 0 A_GiveInventory ("MegaShotgun")
    TNT1 A 0 A_GiveInventory ("MegaShotgun")
    stop
  }
}

ACTOR chambershell : Ammo
{
 Inventory.MaxAmount 8
 +IGNORESKILL
}

actor MegaShotgun : Weapon
{
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 1
  Weapon.AmmoGive 4
  Weapon.AmmoType "Shell2"
  Weapon.SlotNumber 3
  Inventory.PickupMessage "$GOTSHOTGUN" // "You got the shotgun!"
  Weapon.UpSound "items/shotgun1"
  Obituary "$OB_MPSHOTGUN" // "%o chewed on %k's boomstick."
  decal "bulletchip"
  +Weapon.Ammo_Optional 
  States
  {
  Ready:
     TNT1 A 0 A_jumpifinventory("shell2", 1, 1)
	goto readydry
	D64G A 0 A_Jump(2,"readydothing")
		tnt1 A 0 A_JumpIfInventory("chambershell", 8, "Reload")
    D64G A 1 A_WeaponReady
    Loop
	Readydry:
    D64G A 1 A_WeaponReady
    Loop
  readydothing:
	 D64G mnop 2 A_WeaponReady
goto ready
  Deselect:
     tnt1 a 0 A_Lower
    D64G A 1 A_Lower
    Loop
  Select:
     tnt1 a 0 A_Raise
    D64G A 1 A_Raise
    Loop
  Fire:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hasteFire")
  D64G A 0 A_JumpIfNoAmmo("Click")
		tnt1 A 0 A_JumpIfInventory("chambershell", 8, "Reload")
    D64G A 3 
    D64G A 0 A_PlayWeaponSound("weapons/D64HOTGN")
    D64G A 0 A_FireBullets (4.6, 4.6, 12, 6, "BulletPuff")
		TNT1 A 0 A_GiveInventory("CHAMBERSHELL", 1)
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    D64G A 0 A_Recoil(1)
    D64G A 0 A_SetPitch (pitch-1)
    D64G A 2 A_GunFlash
    D64G b 1 A_ZoomFactor(.99)
    D64G c 1 A_ZoomFactor(.98)
    D64G d 1 A_ZoomFactor(.97)
    D64G c 1 A_ZoomFactor(.98)
    D64G b 1 A_ZoomFactor(.99)
    D64G A 0 A_ZoomFactor(1)
    D64G A 0 A_Jump(128,"Pump1","Pump2")
    D64G BC 5
    D64G D 4 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
    D64G CB 5
    tnt1 A 0 A_JumpIfInventory("chambershell", 8, "Reload")
    D64G A 3
    D64G A 7 A_ReFire
    Goto Ready
  hasteFire:
  D64G A 0 A_JumpIfNoAmmo("Click")
		tnt1 A 0 A_JumpIfInventory("chambershell", 8, "Reloadhaste")
    D64G A 3 
    D64G A 0 A_PlayWeaponSound("weapons/D64HOTGN")
    D64G A 0 A_FireBullets (4.6, 4.6, 12, 6, "BulletPuff")
		TNT1 A 0 A_GiveInventory("CHAMBERSHELL", 1)
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    D64G A 0 A_Recoil(1)
    D64G A 0 A_SetPitch (pitch-1)
    D64G A 0 A_GunFlash
    D64G A 1 A_ZoomFactor(.98)
    D64G A 1 A_ZoomFactor(.97)
    D64G A 1 A_ZoomFactor(.98)
    D64G A 0 A_ZoomFactor(1)
    D64G BC 2
    D64G D 2 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
    D64G CB 1
    D64G A 1
    D64G A 1 A_ReFire
    Goto Ready
 Click:
   D64G A 0 A_PlaySound("weapons/dry")
   D64G A 12
   Goto Ready
 Pump1:
	D64G EFG 3
        D64G H 4 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
        D64G GFE 3
        D64G A 3
        D64G A 7 A_ReFire
    Goto Ready
 Pump2:
	D64G IJK 3
        D64G L 4 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
        D64G KJI 3
        D64G A 3
        D64G A 7 A_ReFire
    Goto Ready
reload:
  D64G A 0 A_JumpIfNoAmmo("readydry")
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "reloadhaste")
	D64G EFG 1
	D64R AB 2
	D64R CDE 1
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R CDE 1 a_weaponready
	D64R F 2 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	goto RELOADFINISH
Reloadfinish:
	D64R BA 2
	D64G GFEA 2
TNT1 A 0 A_PlaySound("ITEMS/SHOTGUN1")
	D64G BC 3
        D64G D 4 
        D64G CB 3
        D64G A 1
GOTO READY
reloadhaste:
  D64G A 0 A_JumpIfNoAmmo("readydry")
	D64G EFG 1
	D64R AB 1
	D64R D 1
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R e 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R D 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R e 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R D 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R e 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R D 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	D64R e 1 a_weaponready
	D64R F 1 A_PLAYSOUND("ITEMS/SHELL")
	TNT1 A 0 A_TakeInventory("CHAMBERSHELL", 1)
	goto RELOADHASTEFINISH
Reloadhastefinish:
	D64G GFEA 1
TNT1 A 0 A_PlaySound("ITEMS/SHOTGUN1")
	D64G BC 1
        D64G D 2 
        D64G CB 1
        D64G A 1
GOTO READY
	
  Flash:
    D64F B 3 Bright A_Light1
    Goto LightDone
  AltFire:
     TNT1 A 0 A_jumpifinventory("shell2", 1, 1)
	goto altfiredry
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
  		D64G A 0 A_JumpIfNoAmmo("readydry")	
		KICK A 0 A_ReFire
		Goto Ready
  AltFiredry:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
  		D64G A 0 A_JumpIfNoAmmo("readydry")	
		KICK A 0 A_ReFire
		Goto Readydry
  AltFlash:
    D64G A 15 A_Light0
    Goto LightDone
  Spawn:
    SHOT A -1
    Stop
  }
}

ACTOR superLoaded : Ammo
{
 Inventory.MaxAmount 2
 +IGNORESKILL
}

ACTOR PerkSuperShotgun : SuperShotgun replaces SuperShotgun
{
  Weapon.AmmoType "shell2"
        Weapon.UpSound "items/shotgun2"
  decal "bulletchip"
Weapon.AmmoUse 1
  +Weapon.Ammo_Optional 
	States
	{
	Ready:
		PKS2 A 1 A_WeaponReady
		Loop
	Deselect:
     tnt1 a 0 A_Lower
		PKS2 A 1 A_Lower
		Loop
	Select:
     tnt1 a 0 A_Raise
		PKS2 A 1 A_Raise
		Loop
	Fire:
		tnt1 A 0 A_JumpIfCloser (120,"Fireupclose")
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 2, "Reload")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 1, "FIRE2")
		PKS2 A 0 A_GiveInventory("superLoaded", 1)
		PKS5 A 1 BRIGHT A_Light1
    		PKS5 A 1 BRIGHT A_ZoomFactor(.97)
		PKS5 B 1 BRIGHT A_Light2
    		PKS5 A 1 BRIGHT A_ZoomFactor(.98)
    		PKS2 A 0 A_ZoomFactor(1)
		PKS5 B 0 A_Light0
		PKS2 A 0 A_PlaySound("weapons/super")
		PKS2 A 0 A_FireBullets(11.2,7,12,6,"BulletPuff")
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
		PKS2 A 0 A_Recoil(3)
		PKS2 A 0 A_SetPitch (pitch-2)
		PKS7 ABA 1 A_refire
		GOTO READY
	Fireupclose:
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 2, "Reload")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 1, "FIRE2")
		PKS2 A 0 A_GiveInventory("superLoaded", 1)
		PKS5 A 1 BRIGHT A_Light1
    		PKS5 A 1 BRIGHT A_ZoomFactor(.97)
		PKS5 B 1 BRIGHT A_Light2
    		PKS5 A 1 BRIGHT A_ZoomFactor(.98)
    		PKS2 A 0 A_ZoomFactor(1)
		PKS5 B 0 A_Light0
		PKS2 A 0 A_PlaySound("weapons/super")
		PKS2 A 0 A_FireBullets(11.2,7,12,6,"superPuff")
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
		PKS2 A 0 A_Recoil(3)
		PKS2 A 0 A_SetPitch (pitch-2)
		PKS7 ABA 1 A_refire
		GOTO READY
        Fire2:
	        tnt1 A 0 A_JumpIfCloser (120,"Fire2upclose")
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 2, "Reload")
		PKS2 A 0 A_GiveInventory("superLoaded", 1)
		PKS4 A 1 BRIGHT A_Light1
    		PKS4 A 1 BRIGHT A_ZoomFactor(.97)
		PKS4 B 1 BRIGHT A_Light2
    		PKS4 A 1 BRIGHT A_ZoomFactor(.98)
    		PKS2 A 0 A_ZoomFactor(1)
		PKS4 B 0 A_Light0
		PKS2 A 0 A_PlaySound("weapons/super")
		PKS2 A 0 A_FireBullets(11.2,7,12,6,"BulletPuff")
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
		PKS2 A 0 A_Recoil(3)
		PKS2 A 0 A_SetPitch (pitch-2)
		PKS7 ABA 1 
		PKS2 A 3 A_JumpIfInventory("superLoaded", 2, "Reload")
		GOTO READY
        Fire2upclose:
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 0 A_JumpIfInventory("superLoaded", 2, "Reload")
		PKS2 A 0 A_GiveInventory("superLoaded", 1)
		PKS4 A 1 BRIGHT A_Light1
    		PKS4 A 1 BRIGHT A_ZoomFactor(.97)
		PKS4 B 1 BRIGHT A_Light2
    		PKS4 A 1 BRIGHT A_ZoomFactor(.98)
    		PKS2 A 0 A_ZoomFactor(1)
		PKS4 B 0 A_Light0
		PKS2 A 0 A_PlaySound("weapons/super")
		PKS2 A 0 A_FireBullets(11.2,7,12,6,"superPuff")
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
		PKS2 A 0 A_Recoil(3)
		PKS2 A 0 A_SetPitch (pitch-2)
		PKS7 ABA 1 
		PKS2 A 3 A_JumpIfInventory("superLoaded", 2, "Reload")
		GOTO READY
 Click:
   PKS2 A 0 A_PlaySound("weapons/dry")
   PKS2 A 12
   Goto Ready
        reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 3 A_Checkreload
		PKS2 B 2
		PKS2 C 3
		PKS2 D 4
		PKS2 E 2 A_OpenShotgun2
		PKS2 EF 4
		PKS6 B 4
		PKS6 A 2 
                PKS3 G 0 A_FireCustomMissile("shellSpawnL",0,0,4,-6)
                PKS3 G 0 A_FireCustomMissile("shellSpawnL",0,0,4,-6)
                PKS3 G 5
                PKS2 H 2
                PKS2 UVW 3
                PKS2 X 6 A_PlaySound("weapons/sshotL")
		PKS2 Y 3
		PKS3 Y 3
		PKS2 Z 4 A_LoadShotgun2
  		TNT1 A 0 A_TakeInventory("superLoaded", 2)
		PKS2 M 3
		PKS2 NOPQ 2 
		PKS2 R 3 A_CloseShotgun2
		PKS2 S 3
		PKS2 T 1 A_ReFire
		Goto Ready
        hastereload:
  		PKS2 A 0 A_JumpIfNoAmmo("Click")
		PKS2 A 1 A_Checkreload
		PKS2 B 1
		PKS2 C 1
		PKS2 D 2
		PKS2 E 1 A_OpenShotgun2
		PKS2 EF 1
		PKS6 B 2
		PKS6 A 1 
                PKS3 G 0 A_FireCustomMissile("shellSpawnL",0,0,4,-6)
                PKS3 G 0 A_FireCustomMissile("shellSpawnL",0,0,4,-6)
                PKS3 G 3
                PKS2 H 1
                PKS2 UVW 1
                PKS2 X 2 A_PlaySound("weapons/sshotL")
		PKS2 Y 1
		PKS3 Y 1
		PKS2 Z 2 A_LoadShotgun2
  		TNT1 A 0 A_TakeInventory("superLoaded", 2)
		PKS2 M 1
		PKS2 NOPQ 1 
		PKS2 R 1 A_CloseShotgun2
		PKS2 S 1
		PKS2 T 1 A_ReFire
		Goto Ready
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    PKS2 A 15 A_Light0
    Goto LightDone
	}
}

ACTOR PerkPlasmaRifle : PlasmaRifle 
{
  	Weapon.AmmoType "cell2"
	Weapon.UpSound "items/plasma"
  +Weapon.Ammo_Optional 
	States
	{
	Deselect:
     tnt1 a 0 A_Lower
		PKPL A 1 A_Lower
		Loop
	Select:
     tnt1 a 0 A_Raise
		PKPL A 1 A_Raise
		Loop
	Fire:
		PKPL A 0 A_JumpIfNoAmmo("Click")
		PKPL A 0 A_Gunflash
	tnt1 a 0 A_SetBlend("lightblue", .1,4)
		PKPL A 0 A_FireCustomMissile("Plasmaball")
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 1 A_ZoomFactor(.98)
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 0 A_ZoomFactor(1)
		PKPL A 0 A_Recoil(0.2)
		PKPL A 1 A_ReFire
		Goto Ready
	hold:
		PKPL A 0 A_JumpIfNoAmmo("Click")
		PKPL A 0 A_Gunflash
	tnt1 a 0 A_SetBlend("lightblue", .1,4)
		PKPL A 0 A_FireCustomMissile("Plasmaball")
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 1 A_ZoomFactor(.98)
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 0 A_ZoomFactor(1)
		PKPL A 0 A_Recoil(0.2)
		PKPL B 1 A_ReFire
		PKPL DEF 1
		PKPL GF 3
		PKPL EDCBA 2
		Goto Ready
	AltFirestun:
     		TNT1 A 0 A_jumpifinventory("cell2", 10, 1)
		goto click
		PKPL A 0 A_Gunflash
		PKPL A 0 A_FireCustomMissile("Plasmabolt")
  		TNT1 A 0 A_TakeInventory("cell2",10)
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 1 A_ZoomFactor(.98)
      		PKPL A 1 A_ZoomFactor(.97)
      		PKPL A 1 A_ZoomFactor(.96)
      		PKPL A 1 A_ZoomFactor(.97)
      		PKPL A 1 A_ZoomFactor(.98)
      		PKPL A 1 A_ZoomFactor(.99)
      		PKPL A 0 A_ZoomFactor(1)
		PKPL A 0 A_Recoil(1)
		PKPL A 20 
		Goto Ready
 Click:
   PKPL A 0 A_PlaySound("weapons/dry")
   PKPL A 4
   Goto Ready
	Flash:
		TNT1 A 0 A_Jump(128,"Flash2")
		PLSF B 2 Bright A_Light1
		PLSF A 1 Bright A_Light1
		TNT1 A 1 Bright A_Light1
		Goto LightDone
		PLSF C 2 Bright A_Light1
		PLSF D 1 Bright A_Light1
		TNT1 A 1 Bright A_Light1
		Goto LightDone
	Flash2:
		PLSF E 2 Bright A_Light1
		PLSF F 1 Bright A_Light1
		TNT1 A 1 Bright A_Light1
		Goto LightDone
		PLSF C 2 Bright A_Light1
		PLSF D 1 Bright A_Light1
		TNT1 A 1 Bright A_Light1
		Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    PLSG A 15 A_Light0
    Goto LightDone
Spawn:
    PLAS A 1 A_spawnitem("bm_plasgun",0,0,0,0)
    loop
  }
}

ACTOR BM_plasgun
{
   +NOCLIP
   +NOGRAVITY
   +NOBLOCKMAP
   States
   {
   Spawn:
      PLAS B 2 BRIGHT
      Stop
   }
}

ACTOR PLASMAGlare
{
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	+DONTSPLASH
	+DONTBLAST
	renderstyle add
	Alpha 0.1
	SCALE 0.6
	States
	{
	Spawn:
		POL3 F 2 Bright
		Stop
	}
}

ACTOR BFGGlare
{
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	+DONTSPLASH
	+DONTBLAST
	renderstyle add
	Alpha 0.1
	SCALE 1.2
	States
	{
	Spawn:
		POL3 F 2 Bright
		Stop
	}
}

ACTOR PlasmaBall
{
	Game Doom
	SpawnID 51
	Radius 13
	Height 8
	Speed 25
	Damage 5
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	+noextremedeath
	DamageType "plasma"
	States
	{
	Spawn:
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS A 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS A 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS C 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS C 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS B 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS B 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS D 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS D 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
		Loop
	Death:
		PLSE ABCDE 4 Bright
		Stop
	}
}

ACTOR PlasmaBallSTUN 
{
	Scale 0.6
	Radius 13
	Height 8
	mass 1
	Speed 30
	Damage 1
   ExplosionDamage 5
   ExplosionRadius 128
	Projectile
  	- nogravity
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	Decal PlasmaScorch5
	damagetype "stun"
	States
	{
	Spawn:
  tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS e 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS e 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
  tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS e 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS e 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
  tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS f 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS f 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
  tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS f 1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS f 1 Bright 
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
		Loop
	Death:
		BZAP A 1 Bright a_nogravity	
		BZAP A 3 Bright  a_explode
		BZAP BCD 4 Bright
		Stop
	}
}

ACTOR Plasmabolt
{
	Scale 0.6
	Radius 13
	Height 8
	mass 1
	Speed 30
	Damage 1
   ExplosionDamage 5
   ExplosionRadius 128
	Projectile
  	+nogravity
	RenderStyle ADD
	Alpha 0.75
	SeeSound "weapons/plasbolt"
	Obituary "$OB_MPPLASMARIFLE"
	Decal PlasmaScorch5
	damagetype "stun"
	+FORCEPAIN
	States
	{
	Spawn:
  tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS G  1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAbolttrail",0,0,0,0)
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAGlare",0,-15,0,0)
		PLSS G  1 Bright 
    tnt1 A 0 BRIGHT A_Spawnitem("PLASMAbolttrail",0,0,0,0)
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("plasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
 		Loop
	Death:
		tnt1 a 0 A_setdamagetype("stun")
 tnt1 a 0  A_Playsound("weapons/obl_zap")
		tnt1 A 1 A_SpawnItem("shockwave4",0,0,0,0)
		tnt1 A 1 A_SpawnItem("shockwave5",0,0,0,0)
		tnt1 A 1 a_explode
		tnt1 A 0 A_quake(2,24,0,500,"NO/SOUND")
		Stop
	}
}


ACTOR plasmasmoke
{
	Game Doom
	scale 0.5
	RenderStyle Translucent
	Alpha 0.75
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		BSMK ABC 4 
	Stop
	}
}

ACTOR PLASMASPARK
{
	Game Doom
	Alpha 0.75
	+DONTSPLASH
	States
	{
	Spawn:
		BSPK ABCDE 3 
	Stop
	}
}

actor PLASParticle
{
    Radius 0
    Height 0
    
    Speed 2
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.8
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        BSPK f 0 bright
        BSPK g 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        BSPK fgfgfg 2 bright A_FadeOut(0.08)
        loop
    }
}

actor greenPLASParticle
{
    Radius 0
    Height 0
    
    Speed 2
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.8
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        gSPK f 0 bright
        gSPK g 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        gSPK fgfgfg 2 bright A_FadeOut(0.05)
        loop
    }
}

actor plasmaboltTrail
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle ADD
	scale 0.6
	alpha 0.5
	States
	{
		Spawn:
		PLSS GGGGGG 3 A_FadeOut(0.1)
		loop
	}
}


ACTOR NewPistolLoaded : Ammo
{
 Inventory.MaxAmount 12
 +IGNORESKILL
}

actor 92f: DoomWeapon 5010 
{
  Game Doom
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.AmmoGive 20
  Weapon.AmmoType "Clip2"
  Obituary "$OB_MPPISTOL" // "%o was tickled by %k's pea shooter."
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED" // "Picked up a pistol."
  Weapon.UpSound "items/pistol"
    decal "bulletchip"
  +Weapon.Ammo_Optional 
  States
  {
  Ready:
    PISG A 0 A_JumpIfInventory("startmapanim", 1, "fancyanim")
    PISG A 1 A_WeaponReady
    Loop
  Fancyanim:
	fist eab 1
	fist c 2 A_PlayWeaponSound("weapons/knuck")
	fist dcbae 2
	PUNG A 2
	TNT1 A 1 A_PlayWEAPONSound("weapons/HOLSTER")
	TNT1 A 3
 zpiz A 3
 zpiz B 3 
  zpiz C 3 A_PlaySound("items/pistol")
  zpiz D 3 
  TNT1 A 0 A_TakeInventory("startmapanim", 1)
  PISG A 4 
   Goto Ready
  Deselect:
    tnt1 a 0 A_Lower
    PISG A 1 A_Lower
    Loop
  Select:
    OPIZ A 0 A_JumpIfInventory("startmapanim", 1, "SELECT2")
    PISG D 1 A_Raise
    tnt1 a 0 A_Raise
    PISG D 1 A_Raise
    tnt1 a 0 A_Raise
    PISG D 1 A_Raise
    tnt1 a 0 A_Raise
    PISG D 1 A_Raise
    tnt1 a 0 A_Raise
    PISG E 1 A_Raise
    tnt1 a 0 A_Raise
    PISG F 1 A_Raise
    tnt1 a 0 A_Raise
    PISG A 1 A_Raise
    tnt1 a 0 A_Raise
    PISG A 1 A_Raise
    Loop
  Select2:
    PUNG A 1 A_Raise
    LOOP
 Fire:
  PISG A 0 A_JumpIfNoAmmo("Click")
  PISG A 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  PISG A 2 A_GiveInventory("NewPistolLoaded", 1)
  PISG B 3 A_FirePistol
     TNT1 A 0 A_FireCustomMissile("tracer", 0, 0, 0, 0)
  PISG C 2 A_FireCustomMissile("BulletSpawnL",0,0,8,3)
  PISG B 1 A_ReFire
  PISG A 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  Goto Ready
 Click:
   PISG A 0 A_PlaySound("weapons/dry")
   PISG I 4
   PISG A 4
   Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
  PISG A 0 A_JumpIfNoAmmo("Click")
  PISG B 2 A_PlaySound("items/clip")
  PISG F 2 
  PISG E 2
  PISG D 2
  PISG G 11
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISG H 6 A_PlaySound("items/pistol") 
  PISG F 4
  PISG B 4
  PISG A 4 
  Goto Ready
hasteReload:
  PISG A 0 A_JumpIfNoAmmo("Click")
  PISG B 1 A_PlaySound("items/clip")
  PISG F 1 
  PISG E 1
  PISG D 1
  PISG G 5
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISG H 3 A_PlaySound("items/pistol") 
  PISG F 2
  PISG B 2
  PISG A 2 
  Goto Ready
  Flash:
    PISF A 4 Bright A_Light1
    Goto LightDone
    PISF A 4 Bright A_Light0
    Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    PISG A 15 A_Light0
	Goto LightDone
  Spawn:
    PIST A -1
    Stop
  }
}


actor pistol2 : chaingun replaces chaingun
{
   Game Doom
   SpawnID 28
   Weapon.SelectionOrder 700
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip2"
   Inventory.PickupMessage "You got another pistol!"
   Weapon.UpSound "items/pistol"
   Obituary "%o was mowed down by %k's pistols."
     decal "bulletchip"
  +Weapon.Ammo_Optional 
   States
   {
   Ready:
     CHGG C 1 A_WeaponReady
     Loop
   Deselect:
    tnt1 a 0 A_Lower
     CHGG C 1 A_Lower
     Loop
   Select:
    tnt1 a 0 A_Raise
     CHGG C 1 A_Raise
     Loop
 Fire:
  CHGG C 0 A_JumpIfNoAmmo("Click")
  CHGG C 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  CHGG C 0 A_GiveInventory("NewPistolLoaded", 1)
  CHGG C 0 A_GUNFLASH
  CHGG D 2 A_PlayWeaponSound("weapons/pistol")
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -8, 0, 0, Random(2, -2))
  CHGF A 2 BRIGHT A_FireBullets(4,4,-1,6,"BulletPuff",1)
  TNT1 A 0 A_FireCustomMissile("BulletSpawnL",0,0,-8,5)
  CHGG E 2 A_PlayWeaponSound("weapons/pistol")
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 8, 0, 0, Random(2, -2))
  CHGF B 2 BRIGHT A_FireBullets(4,4,-1,6,"BulletPuff",1)
  TNT1 A 0 A_FireCustomMissile("BulletSpawnL",0,0,19,5)
  CHGG C 0 A_ReFire
  CHGG C 0 A_JumpIfInventory("NewPistolLoaded", 12, "Reload")
  Goto Ready
 Click:
   CHGG C 0 A_PlaySound("weapons/dry")
   CHGG F 4
   CHGG C 0 A_PlaySound("weapons/dry")
   CHGG G 4
   Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
  PISR A 0 A_JumpIfNoAmmo("Click")
  PISR A 2 A_PlaySound("items/clip")
  PISR B 10 
  PISR C 3
  PISR D 6 A_PlaySound("items/pistol")
  PISR B 12
  PISR E 2 
  PISR E 0 A_PlaySound("items/clip")
  PISR F 12 
  PISR G 3
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISR H 6 A_PlaySound("items/pistol")
  PISR F 12
  PISR E 2
  CHGG C 2
  Goto Ready
hasteReload:
  PISR A 0 A_JumpIfNoAmmo("Click")
  PISR A 1 A_PlaySound("items/clip")
  PISR B 5 
  PISR C 1
  PISR D 3 A_PlaySound("items/pistol")
  PISR B 6
  PISR E 1 
  PISR E 0 A_PlaySound("items/clip")
  PISR F 6
  PISR G 1
  TNT1 A 0 A_TakeInventory("NewPistolLoaded", 12)
  PISR H 3 A_PlaySound("items/pistol")
  PISR F 6
  PISR E 1
  CHGG C 1
  Goto Ready
   Flash:
     tnt1 A 4 Bright A_Light1
     Goto LightDone
     tnt1 D 2
     tnt1 B 4 Bright A_Light1
     Goto LightDone
     tnt1 E 2
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    CHGG C 15 A_Light0
    Goto LightDone
   Spawn:
     MGUN A -1
     Stop
   }
}

ACTOR slugs : Ammo 
{
	Inventory.PickupMessage "You got the Magnum slugs!"
	Inventory.Amount 24
	Inventory.MaxAmount 36
	Ammo.BackpackAmount 6
	Ammo.BackpackMaxAmount 72
	Inventory.Icon "slugB0"
	inventory.pickupsound "items/magnum"
	States
	{
	Spawn:
		slug A -1
		Stop
	}
}

ACTOR MagnumLoaded : Ammo
{
 Inventory.MaxAmount 6
 +IGNORESKILL
}

actor Magnum: DoomWeapon 
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 12
  Weapon.AmmoType "slugs"
  Obituary "%o was hollow-pointed by %k's Magnum."
  Inventory.Pickupmessage "You got the Magnum!"
  Weapon.UpSound "items/magnum"
    decal "bulletchip"
  +Weapon.Ammo_Optional 
  States
  {
  Ready:
    REVG A 1 A_WeaponReady
    Loop
  Deselect:
    tnt1 a 0 A_Lower
    REVG A 1 A_Lower
    Loop
  Select:
    REVR M 1 A_Raise
    tnt1 a 0 A_Raise
    REVR M 1 A_Raise
    tnt1 a 0 A_Raise
    REVR M 1 A_Raise
    tnt1 a 0 A_Raise
    REVR M 1 A_Raise
    tnt1 a 0 A_Raise
    REVR N 1 A_Raise
    tnt1 a 0 A_Raise
    REVR N 1 A_Raise
    tnt1 a 0 A_Raise
    REVR B 1 A_Raise
    tnt1 a 0 A_Raise
    REVR B 1 A_Raise
    tnt1 a 0 A_Raise
    Loop
 Fire:
  REVG A 0 A_JumpIfNoAmmo("Click")
  REVG A 0 A_JumpIfInventory("MagnumLoaded", 6, "Reload")
  REVG A 2 A_GiveInventory("MagnumLoaded", 1)
  REVF A 0 A_PlayweaponSound("Weapons/magfir")
  REVF A 0 A_Gunflash
     TNT1 A 0 A_FireCustomMissile("tracer", 0, 0, 0, 0)
  REVF A 0 A_FireBullets (0, 0, 10, 6, "BulletPuff")
  REVF A 0 A_Recoil(2)
  REVF A 0 A_SetPitch (pitch-3)
  REVF A 3
  REVG B 4
  REVG A 0 A_JumpIfInventory("MagnumLoaded", 6, "Reload")
  REVG A 20 
  REVG A 0 A_ReFire
  Goto Ready
 Click:
   REVG A 0 A_PlaySound("weapons/dry")
   REVG C 4
   REVG A 4
   Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
  REVG A 0 A_JumpIfNoAmmo("Click")
  REVG A 3 A_PlaySound("Weapons/magrl")
  REVR A 2 
  REVR B 2
  REVR CDEF 2 
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 4
  REVR GHIJK 2
  TNT1 A 11
  TNT1 A 0 A_TakeInventory("MagnumLoaded", 6)
  REVR LMNB 2
  REVG A 2 
  Goto Ready
hasteReload:
  REVG A 0 A_JumpIfNoAmmo("Click")
  REVG A 1 A_PlaySound("Weapons/magrl")
  REVR A 1 
  REVR B 1
  REVR CDEF 1 
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  TNT1 A 0 A_CustomMissile("BulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
  TNT1 A 2
  REVR GHIJK 1
  TNT1 A 5
  TNT1 A 0 A_TakeInventory("MagnumLoaded", 6)
  REVR LMNB 1
  REVG A 1 
  Goto Ready
  Flash:
    REVF A 2 Bright A_Light1
    Goto LightDone
    REVF A 2 Bright A_Light0
    Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    REVG A 15 A_Light0
	Goto LightDone
  Spawn:
    REVW A -1
    Stop
  }
}

ACTOR SMGLoaded : Ammo
{
 Inventory.MaxAmount 30
 +IGNORESKILL
}

actor SMG : DoomWeapon
{
   Game Doom
   SpawnID 28
   Weapon.SelectionOrder 700
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip2"
   Inventory.PickupMessage "You got the Machinegun!"
   Weapon.UpSound "items/smg1"
   Obituary "%o was tagged by %k's Machinegun."
     decal "bulletchip"
  +Weapon.Ammo_Optional 
   States
   {
   Ready:
	tnt1 a 0 A_SetCrosshair(0)
     SMGG A 1 A_WeaponReady
     Loop
  readydothing:
	 SMGG ek 3 A_WeaponReady
	 SMGG L 4 A_WeaponReady
	 SMGG ke 3 A_WeaponReady
goto ready
   Deselect:
     tnt1 a 0 A_Lower
     SMGG A 1 A_Lower
     Loop
   Select:
     tnt1 a 0 A_Raise
     SMGG C 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG C 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG C 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG D 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG D 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG D 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG E 1 A_Raise
     tnt1 a 0 A_Raise
     SMGG A 1 A_Raise
     tnt1 a 0 A_Raise
     Loop
   Fire:
     SMGG A 0 A_JumpIfNoAmmo("Click")
  SMGG A 0 A_JumpIfInventory("SMGLoaded", 30, "Reload")
  SMGG A 0 A_GiveInventory("SMGLoaded", 1)
     SMGG A 1 A_PlayWeaponSound("weapons/smgfire")
     sMGG A 0 A_FireCustomMissile("tracer", 0, 0, 0, 0)
     SMGG A 2 A_FireBullets (5, 4, 1, 5, "BulletPuff")
     SMGG B 1 A_FireCustomMissile("BulletSpawnL",0,0,4,4)
     SMGG B 0 A_GunFlash
     SMGG A 0 A_ReFire
  SMGG A 0 A_JumpIfInventory("SMGLoaded", 30, "Reload")
     Goto Ready
   Hold:
	tnt1 a 0 A_SetCrosshair(5)
     SMGG A 0 A_JumpIfNoAmmo("Click")
  SMGG A 0 A_JumpIfInventory("SMGLoaded", 30, "Reload")
  SMGG A 0 A_GiveInventory("SMGLoaded", 1)
     SMGG A 1 A_PlayWeaponSound("weapons/smgfire")
     SMGG A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 1, 0, 0, Random(1, -1))
     SMGG A 2 A_FireBullets (5, 4, 1, 5, "BulletPuff")
     SMGG A 0 A_SetPitch (pitch-1)
     SMGG B 1 A_FireCustomMissile("BulletSpawnL",0,0,4,4)
     SMGG B 0 A_Recoil(0.1)
     SMGG B 0 A_GunFlash
     SMGG A 0 A_ReFire
  SMGG A 0 A_JumpIfInventory("SMGLoaded", 30, "Reload")
     Goto Ready
 Click:
	tnt1 a 0 A_SetCrosshair(0)
   SMGG A 0 A_PlaySound("weapons/dry")
   SMGG A 2 
   SMGG J 2
   Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
	tnt1 a 0 A_SetCrosshair(0)
  SMGG A 0 A_JumpIfNoAmmo("Click")
  SMGG ED 2
  SMGG C 2 A_PlaySound("items/clip")
  SMGG C 2
  smrl abc 2
  smrl d 8
  TNT1 A 0 A_TakeInventory("SMGLoaded", 30)
  smrl e 2 A_PlaySound("items/pistol") 
  smrl dcba 1
  SMGG DE 2
  SMGG A 5
  SMGG G 2 A_PlaySound("items/smg1")
  SMGG HIG 3
  Goto Ready
hasteReload:
	tnt1 a 0 A_SetCrosshair(0)
  SMGG A 0 A_JumpIfNoAmmo("Click")
  SMGG ED 1
  SMGG C 1 A_PlaySound("items/clip")
  SMGG C 1
  smrl abc 1
  smrl d 4
  TNT1 A 0 A_TakeInventory("SMGLoaded", 30)
  smrl e 1 A_PlaySound("items/pistol") 
  smrl dcba 1
  SMGG DE 1
  SMGG A 2
  SMGG G 1 A_PlaySound("items/smg1")
  SMGG HIG 1
  Goto Ready
   Flash:
     SMGF A 2 Bright A_Light1
     Goto LightDone
     SMGF B 2 Bright A_Light1
     Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    SMGG A 15 A_Light0
    Goto LightDone   
Spawn:
     SMGW A -1
     Stop
   }
}

ACTOR HMGLoaded : Ammo
{
 Inventory.MaxAmount 20
 +IGNORESKILL
}

actor HMG : DoomWeapon
{
   Game Doom
   Weapon.SelectionOrder 700
   Weapon.AmmoUse 2
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip2"
   Inventory.PickupMessage "You got the Rifle!"
   Weapon.UpSound "items/chaingun"
   Obituary "%o was perforated by %k's Rifle."
     decal "bulletchip"
  +Weapon.Ammo_Optional 
   States
   {
   Ready:
	tnt1 a 0 A_SetCrosshair(0)
     HMGG A 1 A_WeaponReady
     Loop
   Deselect:
    tnt1 a 0 A_Lower
     HMGG A 1 A_Lower
     Loop
   Select:
    tnt1 a 0 A_Raise
     HMGG A 1 A_Raise
     Loop
   Fire:
     HMGG A 0 A_JumpIfNoAmmo("Click")
  HMGG A 0 A_JumpIfInventory("HMGLoaded", 20, "Reload")
  HMGG A 0 A_GiveInventory("HMGLoaded", 1)
     HMGG A 1 
     HMGG A 0 A_FireCustomMissile("tracer", 0, 0, 0, 0)
     HMGG A 2 A_FireBullets (0, 0, 2, 6, "BulletPuff")
     HMGG C 0 A_GunFlash
     HMGG C 0 A_PlayWeaponSound("weapons/rifle")
     HMGG A 0 A_SetPitch (pitch-1)
     HMGG C 1 A_FireCustomMissile("rifleSpawnL",0,0,4,4)
     HMGG C 0 A_Recoil(0.2)
     HMGG C 0 A_SetPitch (pitch-1)
     HMGG C 1 
     HMGG A 1 
     HMGG A 0 A_ReFire
  HMGG A 0 A_JumpIfInventory("HMGLoaded", 20, "Reload")
     Goto Ready
   Hold:
	tnt1 a 0 A_SetCrosshair(5)
     HMGG A 0 A_JumpIfNoAmmo("Click")
  HMGG A 0 A_JumpIfInventory("HMGLoaded", 20, "Reload")
  HMGG A 0 A_GiveInventory("HMGLoaded", 1)
     HMGG A 1 A_PlayWeaponSound("weapons/rifle")
     HMGG A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 1, 0, 0, Random(1, -1))
     HMGG A 2 A_FireBullets (0, 0, 2, 6, "BulletPuff")
     HMGG C 0 A_GunFlash
     HMGG C 0 A_quake(1,6,0,1,"NO/SOUND")
     HMGG A 0 A_SetPitch (pitch-3)
     HMGG C 1 
     HMGG C 0 A_Recoil(0.2)
     HMGG C 0 
     HMGG C 1 
     HMGG A 1 A_FireCustomMissile("rifleSpawnL",0,0,4,4)
     HMGG A 0 A_ReFire
  HMGG A 0 A_JumpIfInventory("HMGLoaded", 20, "Reload")
     Goto Ready
 Click:
	tnt1 a 0 A_SetCrosshair(0)
   HMGG A 0 A_PlaySound("weapons/dry")
   HMGG A 2 
   HMGG A 5
   Goto Ready
Reload:
	    tnt1 A 0 A_JumpIfInventory("PowerSpeed", 1, "hastereload")
	tnt1 a 0 A_SetCrosshair(0)
  HMGG A 0 A_JumpIfNoAmmo("Click")
  HMGR AB 2
  HMGR C 2 A_PlaySound("items/clip")
  HMGR CGH 1
  TNT1 A 0 A_TakeInventory("HMGLoaded", 20)
  HMGR I 9 
  HMGR I 1 A_PlaySound("ITEMS/PISTOL")
  HMGR I 6 
  HMGR HGC 1
  HMGR BA 2
  HMGG A 8
  HMGR D 3
  HMGR E 3 A_PlaySound("items/CHAINGUN")
  HMGR FD 3
   Goto Ready
hasteReload:
	tnt1 a 0 A_SetCrosshair(0)
  HMGG A 0 A_JumpIfNoAmmo("Click")
  HMGR AB 1
  HMGR C 2 A_PlaySound("items/clip")
  HMGR CGH 1
  TNT1 A 0 A_TakeInventory("HMGLoaded", 20)
  HMGR I 4 
  HMGR I 1 A_PlaySound("ITEMS/PISTOL")
  HMGR I 3 
  HMGR HGC 1
  HMGR BA 1
  HMGG A 4
  HMGR D 1
  HMGR E 1 A_PlaySound("items/CHAINGUN")
  HMGR FD 1
   Goto Ready
   Flash:
     HMGF A 2 Bright A_Light1
     Goto LightDone
     HMGF B 2 Bright A_Light1
     Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    HMGG A 15 A_Light0
    Goto LightDone   
Spawn:
     HMGW A -1
     Stop
   }
}

ACTOR rpgZoomed : Inventory { Inventory.MaxAmount 1 }

actor Rpg : Weapon
{
  Game Doom
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo2"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "$GOTLAUNCHER" // "You got the rocket launcher!"
  Weapon.UpSound "items/rlauncher"
  +Weapon.Ammo_Optional 
  States
  {
  Ready:
    tnt1 a 0 A_JumpIfInventory("rpgZoomed",1,"ZoomedReady")
	tnt1 a 0 A_SetCrosshair(0)
    MISG A 1 A_WeaponReady
    Loop
  zoomedReady:
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
        MISG A 0 A_JumpIfTargetInLOS(2)
	MISG A 0 A_SetCrosshair(3)
	Loop
	MISG A 0 A_SetCrosshair(8)
	Loop
  Deselect:
	MISG A 0 A_takeInventory("rpgzoomed", 1)
      MISG A 0 A_SetCrosshair(0)
     tnt1 a 0 A_Lower
    MISG A 1 A_Lower
    Loop
  Select:
	MISG A 0 A_takeInventory("rpgzoomed", 1)
     tnt1 a 0 A_Raise
    MISG A 1 A_Raise
    Loop
  Fire:
    tnt1 a 0 A_JumpIfInventory("rpgZoomed",1,"ZoomedFire")    
  MISG B 0 A_JumpIfNoAmmo("Click")
    MISG B 8 A_GunFlash 
    MISG B 1 A_FireMissile
    MISG B 1 A_ZoomFactor(.99)
    MISG B 1 A_ZoomFactor(.98)
    MISG B 1 A_ZoomFactor(.97)
    MISG B 1 A_ZoomFactor(.96)
    MISG B 0 A_Recoil(5)
    MISG B 1 A_ZoomFactor(.97)
    MISG B 1 A_ZoomFactor(.98)
    MISG B 1 A_ZoomFactor(.99)
    MISG B 4 A_ZoomFactor(1)
    MISG B 0 A_ReFire
    Goto Ready
  zoomedFire:
  MISG B 0 A_JumpIfNoAmmo("Click")
    MISG B 8 A_GunFlash 
	MISG A 0 A_TakeInventory("rocketammo2", 1)
    MISG I 1 A_FireCustomMissile("rocketseeker",0,0,0,0)
    MISG I 1 A_ZoomFactor(.99)
    MISG I 1 A_ZoomFactor(.98)
    MISG I 1 A_ZoomFactor(.97)
    MISG I 1 A_ZoomFactor(.96)
    MISG B 0 A_Recoil(5)
    MISG I 1 A_ZoomFactor(.97)
    MISG I 1 A_ZoomFactor(.98)
    MISG I 1 A_ZoomFactor(.99)
    MISG I 4 A_ZoomFactor(1)
    MISG I 0 A_ReFire
    Goto Ready
 Click:
   MISG B 0 A_PlaySound("weapons/dry")
   MISG A 8
   Goto Ready
  Flash:
    MISF A 3 Bright A_Light1
    MISF B 4 Bright
    MISF CD 4 Bright A_Light2
    Goto LightDone
  AltFire:
        tnt1 A 0 A_JumpIfCloser (78,"kick")
    MISG A 0 A_JumpIfInventory("rpgZoomed",1,"UnZoom")
      MISG A 2
      MISG E 1 
      MISG F 1 
      MISG G 2
      MISG H 1 
      MISG H 0 A_PlaySound("weapons/beep")
      MISG A 0 A_giveInventory("rpgzoomed", 1)
      MISG A 0 A_SetCrosshair(3)
      MISG H 1 
goto zoomedready
unzoom:
      MISG i 2
      MISG E 1 
      MISG F 1 
      MISG G 2
      MISG A 1 
      MISG A 0 A_PlaySound("weapons/beep")
	MISG A 0 A_takeInventory("rpgzoomed", 1)
      MISG i 0 A_SetCrosshair(0)
      MISG A 1 
goto ready
kick:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "Zerkkick")
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  zerkkick:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(20,0,0,"zerkFootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    MISG A 15 A_Light0
    Goto LightDone
Spawn:
    LAUN A -1
    Loop
  }
}

actor Rpgsmart : Weapon
{
  Game Doom
  Weapon.AmmoUse 1
  Weapon.AmmoGive 0
  Weapon.AmmoType "RocketAmmo2"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "$GOTLAUNCHER" // "You got the rocket launcher!"
  Weapon.UpSound "items/rlauncher"
  +Weapon.Ammo_Optional 
  States
  {
  Ready:
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG I 1 A_WeaponReady
 MISG I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
 MISG a 1 A_WeaponReady
 MISG a 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
        MISG A 0 A_JumpIfTargetInLOS(2)
	MISG A 0 A_SetCrosshair(3)
	Loop
	MISG A 0 A_SetCrosshair(8)
	Loop
   Deselect:
    MISG I 1 A_Lower
    Loop
  Select:
      MISG A 0 A_SetCrosshair(3)
      MISG A 1 A_Raise
      MISG A 1 A_Raise
      MISG E 1 A_Raise
      MISG F 1 A_Raise
      MISG G 1 A_Raise
      MISG G 1 A_Raise
      MISG H 1 A_Raise
      MISG H 0 A_PlaySound("weapons/beep")
      MISG H 1 A_Raise
      Loop
  Fire:
  MISG B 0 A_JumpIfNoAmmo("Click")
    MISG B 8 A_GunFlash 
	MISG A 0 A_TakeInventory("rocketammo2", 1)
    MISG I 1 A_FireCustomMissile("rocketseeker",0,0,0,0)
    MISG I 1 A_ZoomFactor(.99)
    MISG I 1 A_ZoomFactor(.98)
    MISG I 1 A_ZoomFactor(.97)
    MISG I 1 A_ZoomFactor(.96)
    MISG B 0 A_Recoil(5)
    MISG I 1 A_ZoomFactor(.97)
    MISG I 1 A_ZoomFactor(.98)
    MISG I 1 A_ZoomFactor(.99)
    MISG I 4 A_ZoomFactor(1)
    MISG I 0 A_ReFire
    Goto Ready
 Click:
   MISG B 0 A_PlaySound("weapons/dry")
   MISG A 8
   Goto Ready
  Flash:
    MISF A 3 Bright A_Light1
    MISF B 4 Bright
    MISF CD 4 Bright A_Light2
    Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash
     		tnt1 I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
     		tnt1 I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		KICK BC 1 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
     		tnt1 I 0 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		FOOT E 1 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		FOOT D 2 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		KICK CBA 2 A_FireBullets (0, 0, 0, 0, "lasersightPuff", 0, 0)
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    MISG I 15 A_Light0
    Goto LightDone  
Spawn:
    LAUN A -1
    Loop
  }
}


ACTOR lasersightPuff
{
  Radius 1
   Height 1
   PROJECTILE
   +NOGRAVITY
   -ALLOWPARTICLES
   +NOCLIP
   Speed 0
   vspeed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 1
   +puffonactors
   +dontsplash
   +BLOODLESSIMPACT
	Scale		1
	States
	{
	Spawn:
		lazz a 2 BRIGHT
		Stop
}
}



actor RPG2 : CustomInventory 
{
  Inventory.PickupMessage "$GOTLAUNCHER" // "You got the rocket launcher!"
  inventory.pickupsound "misc/W_pkup"
  states
  {
  Spawn:
    LAUN A -1
    stop
  Pickup:
    TNT1 A 0 A_GiveInventory ("NuclearMissileLauncher")
    TNT1 A 0 A_GiveInventory ("RPG")
    stop
  }
}


ACTOR Rocket
{
	Game Doom
	SpawnID 127
	Radius 11
	Height 8
	Speed 20
	Damage 20
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	-ROCKETTRAIL
	+EXTREMEDEATH
	Damagetype Blasted
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	States
	{
	Spawn:
		MISL A 2 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		tnt1 a 0 A_SpawnItem("rocketsmoker2",0,0,0,0)
		Loop
	Death:
	tnt1 a 0 A_SpawnItem("shockwave2",0,0,0,0)
	MISL f 0 A_SpawnItem("splosionspark",0,0,0,0)
		MISL f 6 Bright A_Explode
	MISL f 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL f 0 A_quake(1,12,0,300,"NO/SOUND")
      		MISL f 0 A_SpawnItem("dustcloud",0,0,0,0)
	MISL e 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL g 3 Bright
	MISL g 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL h 3 Bright
	MISL h 0 A_SpawnItem("BITZGenerator",0,0,0,0)
        misl ijklm 3 Bright
		Stop
	}
}

ACTOR Rocketseeker
{
	Game Doom
	SpawnID 127
	Radius 11
	Height 8
	Speed 20
	Damage 20
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	-ROCKETTRAIL
	+EXTREMEDEATH
	+seekermissile
	Damagetype Blasted
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	States
	{
	Spawn:
		MISL A 1 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		tnt1 a 0 A_SpawnItem("rocketsmoker2",0,0,0,0)
	Seek:
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright A_SpawnItem("rocketsmoker2",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright A_SpawnItem("rocketsmoker2",0,0,0,0)
		Goto Seek
	Death:
	tnt1 a 0 A_SpawnItem("shockwave2",0,0,0,0)
	TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
		MISL f 6 Bright A_Explode
	MISL f 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL f 0 A_quake(1,12,0,300,"NO/SOUND")
      		MISL f 0 A_SpawnItem("dustcloud",0,0,0,0)
	MISL e 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL g 3 Bright
	MISL g 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL h 3 Bright
	MISL h 0 A_SpawnItem("BITZGenerator",0,0,0,0)
        misl ijklm 3 Bright
		Stop
	}
}

// --------------------------------------------------------------------------
//
// Gatling Gun
//
// --------------------------------------------------------------------------

ACTOR superchaingun : DoomWeapon 5014
{
	Game Doom
	Scale 0.8
	SpawnID 28
	Weapon.SelectionOrder 700
	Weapon.AmmoUse 2
	Weapon.AmmoGive 30
	Weapon.AmmoType "Clip2"
	Inventory.PickupMessage "$YOU GOT THE CHAINGUN!"
        Weapon.UpSound "items/chaingun"
	Obituary "%o was destroyed by %k's Chaingun."
	  decal "bulletchip"
  +Weapon.Ammo_Optional 
	States
	{
	Ready:
		DGTG C 1 A_WeaponReady
		Loop
	Deselect:
		DGTG C 0 A_StopSound(CHAN_BODY)
		DGTG C 1 A_Lower
     tnt1 a 0 A_Lower
		DGTG C 1 A_Lower
     tnt1 a 0 A_Lower
		Wait
	Select:
     tnt1 a 0 A_Raise
		DGTG C 1 A_Raise
		Loop
	CLICK:
		DGTG A 0 A_PlaySound("weapons/gatlingspin")
		DGTG A 1 
		DGTG BCD 1
		DGTG D 0 A_ReFire
		DGTG D 0 A_JumpIfNoAmmo("WINDDOWN")
	Fire:
		DGTG D 2 A_PlaySound("weapons/gatlingwindup", CHAN_BODY)
		DGTG AB 2
		DGTG CD 1
	F1:
		DGTG ABCD 1
		DGTF A 0 A_PlaySound("weapons/gatlingspin", CHAN_BODY, 1.0, 1)
	Hold:
		DGTG D 0 A_JumpIfNoAmmo("Click")
		DGTF A 0 A_GunFlash
		DGTF A 0 A_PlaySound("weapons/gatlingfire", CHAN_WEAPON)
                DGTF A 0 A_CustomMissile("rifleCasing",30,0,135+random(-15,15),2,35+random(-15,15))
                DGTF A 0 A_CustomMissile("rifleCasing",30,0,135+random(-15,15),2,35+random(-15,15))		
                DGTF A 0 A_Recoil(0.1)
		DGTF A 0 A_quake(1,6,0,1,"NO/SOUND")
		DGTF A 1 bright A_FireBullets (3, 2, 2, 6, "BulletPuff")
    DGTF A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    DGTF A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
		DGTG BCD 1
		DGTG D 0 A_JumpIfNoAmmo("CLICK")
		DGTG D 0 A_ReFire
	WindDown:
		DGTG A 2 A_PlaySound("weapons/gatlingwinddown", CHAN_BODY)
		DGTG BC 2
		DGTG A 0 A_JumpIfNoAmmo(2)
		DGTG A 0 A_WeaponReady(WRF_NOBOB | WRF_NOSWITCH)
		DGTG D 2
		DGTG ABC 3
		DGTG A 0 A_JumpIfNoAmmo(2)
		DGTG A 0 A_WeaponReady(WRF_NOBOB | WRF_NOSWITCH)
		DGTG DAB 4
		DGTG C 2
		Goto Ready
	Flash:
		TNT1 A 1 Bright A_Light2
		TNT1 A 1 Bright A_Light1
		Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    DGTG C 15 A_Light0
    Goto LightDone	
Spawn:
		DEGT A -1
		Stop
	}
}


ACTOR chaingunPickup : CustomInventory
{
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "$YOU GOT THE CHAINGUN!"
	Scale 0.8
	States
	{
	Spawn:
		DEGT A -1
		Stop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("AltToken",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("superchaingun",1)
		Stop
	}
}

ACTOR tracer_old
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.2
   Speed 40
   +DONTSPLASH
   States
   {
   Spawn:
      TNT1 A 2
      	SPRK E 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK G 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK H 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK E 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK G 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK H 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
      	SPRK E 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK G 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK H 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK E 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK G 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
	SPRK H 1 bright A_spawnitemEx("tracertrail_old",0,0,0,0)
      Stop
   }
}

actor tracertrail_OLD
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
        Scale 0.2
	States
	{
		Spawn:
		SPRK EGHEFG 2 bright A_FadeOut(0.1)
		loop
	}
}

ACTOR tracershotgun
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   - NOGRAVITY
   mass 10
   Speed 40
   +DONTSPLASH
   States
   {
   Spawn:
      TNT1 A 2
      SPRK EGHEFGEGHEFG 1  Bright 
      Stop
   }
}

ACTOR tracer : fastprojectile
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.1
   Speed 70
	renderstyle add
	alpha 0.7
   +DONTSPLASH
	TRANSLATION "112:122=160:165", "123:127=43:47"
	MissileType "tracertrail"
States
	{
	Spawn:
		tnt1 A 1  
		loop
 death:
tnt1 a 0
stop
}
}


actor tracertrail
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
        Scale 0.2
	TRANSLATION "112:122=160:165", "123:127=43:47"
	States
	{
		Spawn:
		VEKF AAAAAA 2 A_FadeOut(0.1)
		loop
	}
}

// --------------------------------------------------------------------------
//
// Riot controller
//
// --------------------------------------------------------------------------


ACTOR riotgunZoomed : Inventory { Inventory.MaxAmount 1 }

ACTOR riotgun2 : DoomWeapon 
{
	Game Doom
	Scale 0.8
	Weapon.AmmoUse 1
	Weapon.AmmoGive 16
	Weapon.AmmoType "shell2"
	Inventory.PickupMessage "$YOU GOT THE RIOT CONTROLLER!"
        Weapon.UpSound "items/chaingun"
	Obituary "%o was Pacified by %k's RIOT CONTROLLER."
	  decal "bulletchip"
  +Weapon.Ammo_Optional 
   States
   {
   Ready:
    tnt1 a 0 A_JumpIfInventory("RIOTGUNZoomed",1,"ZoomedReady")
     ASGG A 1 A_WeaponReady
     Loop
   zoomedReady:
	tnt1 a 0 A_SetCrosshair(12)
      ASGG A 1 A_WeaponReady
      Loop
   Deselect:
	tnt1 A 0 A_takeInventory("RIOTGUNzoomed", 1)
     tnt1 a 0 A_Lower
     ASGG A 1 A_Lower
     Loop
   Select:
	tnt1 A 0 A_takeInventory("riotgunzoomed", 1)
     tnt1 a 0 A_Raise
	tnt1 a 0 A_SetCrosshair(11)
     ASGG A 1 A_Raise
     Loop
   Fire:
    tnt1 a 0 A_JumpIfInventory("riotgunZoomed",1,"ZoomedFire")    
     ASGG A 0 A_JumpIfNoAmmo("Click")
     ASGG A 1 A_PlayWeaponSound("weapons/RIOTFIRE")
     ASGG L 1 bright A_FireBullets (10, 8, 10, 4.5, "BulletPuff")
     ASGG EL 1 bright
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
     ASGG A 0 A_Recoil(1)
     ASGG A 0 A_SetPitch (pitch-2)
     ASGG A 1 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
     ASGG A 0 A_GunFlash
     ASGG A 1
     ASGG A 0 A_ReFire
     Goto Ready
   Hold:
    tnt1 a 0 A_JumpIfInventory("riotgunZoomed",1,"Zoomedhold")    
	tnt1 a 0 A_SetCrosshair(5)
     ASGG A 0 A_JumpIfNoAmmo("Click")
     ASGG A 1 A_PlayWeaponSound("weapons/RIOTFIRE")
     ASGG L 1 bright A_FireBullets (10, 8, 10, 4.5, "BulletPuff")
     ASGG L 2 bright
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
     ASGG A 0 A_Recoil(1)
     ASGG A 0 A_SetPitch (pitch-5)
     ASGG A 0 A_quake(2,6,0,1,"NO/SOUND")
     ASGG A 1 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
     ASGG A 0 A_GunFlash
     ASGG A 1
     ASGG A 0 A_ReFire
	tnt1 a 0 A_SetCrosshair(11)
     ASGG Bc 2
     ASGG d 3
     ASGG cB 2
     Goto Ready
  zoomedfire:
TNT1 A 0 A_jumpifinventory("shell2", 2, 1)
		goto clickzoomed
   ASGG L 1 bright A_FireBullets (4.5, 4.5, 10, 2, "phosPuff")
     tnt1 a 0 A_PlayweaponSound("weapons/nuclearmissileburn")
TNT1 A 0 A_takeinventory("shell2", 1)
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 4, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -4, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 2, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -2, 0, 0, Random(2, -2))
     ASGG EL 1 bright
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
     ASGG A 0 A_Recoil(1)
     ASGG A 0 A_SetPitch (pitch-2)
     ASGG A 1 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
     ASGG A 0 A_GunFlash
     ASGG A 1
     ASGG A 0 A_ReFire
     Goto zoomedReady
   zoomedhold:
	tnt1 a 0 A_SetCrosshair(5)
TNT1 A 0 A_jumpifinventory("shell2", 2, 1)
		goto clickzoomed
   ASGG L 1 bright A_FireBullets (4.5, 4.5, 10, 2, "phosPuff")
     tnt1 a 0 A_PlayweaponSound("weapons/nuclearmissileburn")
TNT1 A 0 A_takeinventory("shell2", 1)
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 4, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -4, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, 2, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracer", Random(1, -1), 0, -2, 0, 0, Random(2, -2))
     ASGG L 2 bright
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, 3, 0, 0, Random(2, -2))
    TNT1 A 0 A_FireCustomMissile("tracershotgun", Random(1, -1), 0, -3, 0, 0, Random(2, -2))
     ASGG A 0 A_Recoil(1)
     ASGG A 0 A_SetPitch (pitch-5)
     ASGG A 0 A_quake(2,6,0,1,"NO/SOUND")
     ASGG A 1 A_FireCustomMissile("shellSpawnL",0,0,4,-12)
     ASGG A 0 A_GunFlash
     ASGG A 1
     ASGG A 0 A_ReFire
	tnt1 a 0 A_SetCrosshair(12)
     ASGG Bc 2
     ASGG d 3
     ASGG cB 2
     Goto zoomedReady
 Click:
	tnt1 a 0 A_SetCrosshair(11)
   ASGG A 0 A_PlaySound("weapons/dry")
   ASGG A 6
   Goto Ready
 Clickzoomed:
	tnt1 a 0 A_SetCrosshair(12)
   ASGG A 0 A_PlaySound("weapons/dry")
   ASGG A 6
   Goto zoomedReady
 AltFire:
        tnt1 A 0 A_JumpIfCloser (78,"kick")
    tnt1 a 0 A_JumpIfInventory("riotgunZoomed",1,"UnZoom")
       asgg aaaa 1
       asGG a 0 A_PlaySound("weapons/beep")
       asGG a 0 A_giveInventory("riotgunzoomed", 1)
       asGG a 0 A_SetCrosshair(12)
       asGG a 1 
goto zoomedready
unzoom:
   asGG aaaa 1
       asGG a 0 A_PlaySound("weapons/beep")
	 asGG a 0 A_takeInventory("riotgunzoomed", 1)
       asGG a 0 A_SetCrosshair(11)
       asGG a 1 
goto ready
   Flash:
     TNT1 A 2 Bright A_Light1
     Goto LightDone
 kick:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "Zerkkick")
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  zerkkick:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(20,0,0,"zerkFootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    asGG A 15 A_Light0
    Goto LightDone
Spawn:
     WASG A -1
     Stop
   }
}


ACTOR phosPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	-RANDOMIZE
	RenderStyle Translucent
	scale 0.6
	Alpha .5
	VSpeed 1
	Mass 5
	Damagetype fire
	+noextremedeath
	+puffonactors
	explosiondamage 3
	explosionradius 128
	Obituary "%o was chaorbroiled by %k's RIOT CONTROLLER phosphorus."
	States
	{
	Spawn:
		hpuf A 3 Bright
	TNT1 a 0 A_SpawnItem("splosionspark3",0,0,0,0)
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
		hpuf a 0 A_PlayWeaponSound("weapons/puff")
		tnt1 a 0 a_explode
		hpuf AB 3 Bright
		hpuf CDefg 2 Bright 
		Stop
	}
}

ACTOR Phoscloud
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	Alpha		1
	Scale		.5
	Mass		0
	+missile
	//+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		fire a 1
		fire ABCDE 1  Bright A_SetTranslucent(.8,1)
		fire ABCDEF 1  Bright A_SetTranslucent(.6,1)
		fire aBCDEFGH 1  Bright A_SetTranslucent(.4,1)
		fire aBCDEFGHA 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}


actor BFG9k : BFG9000 replaces BFG9000
{
  Game Doom
  Height 20
  SpawnID 31
  Weapon.SelectionOrder 2800
  Weapon.AmmoUse 40
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell2"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "You got the BFG9000...  oh, shit!"
  Weapon.UpSound "items/plasma"
  Obituary "%o couldn't hide from %k's BFG9k"
  +Weapon.Ammo_Optional 
  States
  {
   ready:
	tnt1 a 0 A_SetCrosshair(9)
    BFGG A 0 A_PlaySound("weapons/hum")
    BFGG A 33 A_WeaponReady
    loop
DESELECT:
     tnt1 a 0 A_Lower
    BFGG A 1 A_Lower
LOOP
  Select:
     tnt1 a 0 A_Raise
    BFGG A 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG B 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG A 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG B 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG A 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG B 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG A 1 A_Raise
     tnt1 a 0 A_Raise
    BFGG B 1 A_Raise
    loop
  Fire:
    BFGG A 0 A_JumpIfNoAmmo("Click")
    BFGG A 0 A_quake(1,40,0,1,"NO/SOUND")
    BFGG A 1 A_BFGSound
    BFGS def 2 
    BFGS B 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS A 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS B 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS A 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS B 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS A 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs c 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGS B 1 A_FireCustomMissile("bfgsparkgenerator",0,0,0,0)
    BFGs fed 1 
    BFGG B 6 A_GunFlash
    BFGG B 1 A_FireBFG
	tnt1 a 0 A_SetBlend("green", .4,15)
      BFGG B 1 A_ZoomFactor(.99)
      BFGG B 1 A_ZoomFactor(.98)
      BFGG B 1 A_ZoomFactor(.97)
      BFGG B 1 A_ZoomFactor(.96)
      BFGG B 1 A_ZoomFactor(.95)
    BFGG B 0  A_recoil(7)
      BFGG B 1 A_ZoomFactor(.96)
      BFGG B 1 A_ZoomFactor(.97)
      BFGG B 1 A_ZoomFactor(.98)
      BFGG B 1 A_ZoomFactor(.99)
      BFGG B 0 A_ZoomFactor(1)
	bfgg D 2
	bfgg e 4
	bfgg D 2
    BFGG B 1 A_ReFire
	BFGG A 1 
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 1 A_FireCustomMissile("bfgsteamgenerator",0,0,0,0)
BFGG A 2 
    goto Ready
 Click:
   BFGG A 2 A_PlaySound("weapons/dry")
   BFGG B 2 A_PlaySound("weapons/bfgdry")
    BFGG A 2
BFGG B 2
BFGG A 2
BFGG B 2 
   Goto Ready
  Flash:
    BFGF A 11 bright A_Light1
    BFGF B 6 bright A_Light2
    Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    BFGG A 15 A_Light0
    Goto LightDone  
Spawn:
    BFUG A 1 A_spawnitem("bm_bfggun",0,0,0,0)
    loop
  }
}

ACTOR BM_bfggun
{
   +NOCLIP
   +NOGRAVITY
   +NOBLOCKMAP
   States
   {
   Spawn:
      BFUG B 2 BRIGHT
      Stop
   }
}

actor bfgvisualFLASH : CustomInventory 
{
  states
  {
  Pickup:
    TNT1 A 0 A_SetBlend("green", .4,15)
    stop
  }
}

ACTOR BFGBall
{
	Game Doom
	SpawnID 128
	Radius 13
	Height 8
	Speed 25
	Damage 100
	Projectile
	+RANDOMIZE
	+EXTREMEDEATH
	RenderStyle Add
	Alpha 0.6
	DeathSound "weapons/bfgx"
	Obituary "$OB_MPBFG_BOOM"
	States
	{
	Spawn:
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 A 1 Bright A_SpawnItem("bfgsmoke",0,0,0,0)
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 A 1 Bright
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 A 1 Bright A_SpawnItem("BFG_laser_firer",0,0,0,0)
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 A 1 Bright
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 B 1 Bright A_SpawnItem("bfgsmoke",0,0,0,0)
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 B 1 Bright
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 B 1 Bright A_SpawnItem("BFG_laser_firer",0,0,0,0)
    tnt1 A 0 BRIGHT A_Spawnitem("BFGGlare",0,-15,0,0)
		BFS1 B 1 Bright
      tnt1 a 0  A_Playsound("weapons/plasfly")
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("greenplasParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
		Loop
	Death:
		tnt1 A 0 A_GiveToTarget("bfgvisualFLASH", 1)
		tnt1 a 0 A_SpawnItem("shockwave",0,0,0,0)
		BFE1 A 8 Bright A_SpawnItem("BFGZAP",0,0,0,0)
		BFE1 A 0 A_quake(2,24,0,500,"NO/SOUND")
		BFE1 B 8 Bright
		BFE1 C 8 Bright A_BFGSpray
		BFE1 DEF 8 Bright
		Stop
	}
}

ACTOR bfgsparkgenerator
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 1
   vspeed 1
   Speed 15
   RENDERSTYLE TRANSLUCENT
   ALPHA 1
   +DONTSPLASH
   States
   {
   Spawn:
 tnt1 a 2
 TNT1 A 1 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
 TNT1 A 1 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
 TNT1 A 1 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
 TNT1 A 1 A_CustomMissile("greenplasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
      Stop
   }
}

ACTOR bfgsteamgenerator
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 1
   vspeed 1
   Speed 20
   RENDERSTYLE TRANSLUCENT
   ALPHA 1
   +DONTSPLASH
   States
   {
   Spawn:
 tnt1 a 2
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))
      Stop
   }
}

 

ACTOR bfgsmoke
{
	Game Doom
	RenderStyle Translucent
	Alpha 0.3
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		GSMK ABC 4 
	Stop
	}
}

ACTOR BFGSPARK
{
	Game Doom
	Alpha 0.75
	+DONTSPLASH
	States
	{
	Spawn:
		GSMK DEFGHI 3 
	Stop
	}
}

ACTOR BFGZAP
{
	Game Doom
	Alpha 0.75
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		GZAP DCBABCD 6 
	Stop
	}
}

ACTOR BFGExtra
{
	+NOBLOCKMAP
	+NOGRAVITY
	+EXTREMEDEATH
	RenderStyle Add
	scale 0.5
	Alpha 0.75
	DamageType "BFGSplash"
	States
	{
	Spawn:
		BFE1 ABCDEF 8 Bright
		Stop
	}
}

ACTOR bfg_laser_firer
{
  +FRIENDLY
  +NOBLOCKMAP
  +nogravity
  Alpha .75
  Health 100000000
  Mass 1000000000
  Radius 1
  Height 4
  Speed 8
  Monster
  RenderStyle Translucent
  PainChance 200
  +FLOORCLIP
  Species "Player"
  translation "16:47=112:127","168:191=112:127"
  States
  {
  Spawn:
    LASR B 1 A_Jumpifcloser(900, "spawn2")
    LASR B 1 A_Look
goto missile
  Spawn2:
    LASR B 1 A_Look
 loop
   Pain:
    Goto See
  See:
    LASR B 2 
   Missile:
    lasr b 2 a_FACETARGET
    LASR B 2 A_customRailgun( 5, 0, "none", "green", RGF_SILENT, 1, 0,"BFG_laserpuff", 0, 0, 0, 5, 0.1, 0)
 Death:
    TNT1 A 0 A_DIE
    TNT1 A -1
    Stop

  }
}

ACTOR BFG_laserPuff
{
	Game Doom
        translation "16:47=112:127","168:191=112:127"
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+alwayspuff
	RenderStyle Translucent
	Alpha 0.75
	Mass 5
	Scale		.5
  Obituary "%o was zapped by %k's BFG."
Damagetype "laser"
	States
	{
	Spawn:
		LASR B 4 BRIGHT
		LASR B 0 Bright A_SpawnDebris("BFG_laserSpark")
		LASR CBC 4 Bright 
		LASR C 0 Bright A_spawnitemex("puffsmoke",0,0,0,0,0)
		Stop
}
}

ACTOR BFG_laserSpark
{
        translation "16:47=112:127","168:191=112:127"
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	Alpha		1
	Scale		.2
	Mass		0
	+missile
	//+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		LASR B 1
		LASR BCBCB 1  Bright A_SetTranslucent(.8,1)
		LASR BCBCBC 1  Bright A_SetTranslucent(.6,1)
		LASR BCBCBCBC 1  Bright A_SetTranslucent(.4,1)
		LASR BCBCBCBCBC 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}



ACTOR freezer : WEAPON
{
	Game Doom
	Weapon.AmmoUse 5
	Weapon.AmmoGive 40
	Weapon.AmmoType "cell2"
	Inventory.PickupMessage "$YOU GOT THE FREEZETHROWER!"
        Weapon.UpSound "items/plasma"
	Obituary "%o was frozen solid by %k's FREEZETHROWER."
  +Weapon.Ammo_Optional 
   States
   {
   Ready:
     FZTG A 1 A_WeaponReady
     Loop
   Deselect:
     tnt1 a 0 A_Lower
     FZTG A 1 A_Lower
     Loop
   Select:
     tnt1 a 0 A_Raise
     FZTG A 1 A_Raise
     Loop
   Fire:
     FZTG A 0 A_JumpIfNoAmmo("Click")
     FZTG A 1 A_PlayWEAPONSound("WEAPONS/freezeSHOT")
     FZTG B 1 bright A_FireCustomMissile ("freezebolt")
     FZTG A 0 A_FireCustomMissile("Smokeshot",0,0,0,0)
     FZTG A 0 A_Recoil(0.2)
     FZTG C 1 
     FZTG A 0 A_ReFire
     Goto Ready
   Hold:
     FZTG A 0 A_JumpIfNoAmmo("Click")
     FZTG A 1 A_PlayWEAPONSound("WEAPONS/freezeSHOT")
     FZTG B 1 bright A_FireCustomMissile ("freezebolt")
     FZTG A 0 A_FireCustomMissile("Smokeshot",0,0,0,0)
     FZTG A 0 A_Recoil(0.2)
     FZTG A 0 A_quake(2,6,0,1,"NO/SOUND")
     FZTG c 1 
     FZTG A 0 A_ReFire
     Goto Ready
 Click:
   FZTG A 0 A_PlaySound("weapons/dry")
   FZTG A 4
   Goto Ready
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    FZTG A 15 A_Light0
    Goto LightDone   
Spawn:
     FZTW A -1
     Stop
   }
}

ACTOR freezebolt
{
	Game Doom
	Radius 4
	Height 4
	Speed 30
	Damage 20
	Projectile
	+RANDOMIZE
   RENDERSTYLE add
   ALPHA 0.3
	MASS 0
	ExplosionDamage 64
	ExplosionRadius 128
	damagetype "ice"
	  decal "ICEBLAST"
	Obituary "%o was frozen solid by %k's FREEZETHROWER."
	DONTHURTSHOOTER
+GRENADETRAIL
	States
	{
	Spawn:
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		FRST A 1 Bright
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))  
		goto death
	Death:
		RSMK A 2 Bright A_EXPLODE
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		RSMK B 2 Bright 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		RSMK C 2 Bright 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))  
		RSMK D 2 Bright 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		RSMK E 2 Bright 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("FREEZEParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("FREEZEParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
		Stop
	}
}

actor FREEZEParticle
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.1
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 bright
        RSMK A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RSMK ABCDE 2 bright A_FadeOut(0.05)
        loop
    }
}

actor FREEZEParticle1
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.4
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 bright
        RSMK A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RSMK ABCDE 2 bright A_FadeOut(0.05)
        loop
    }
}

actor FREEZEParticle2
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.2
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 bright
        RSMK A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        RSMK ABCDE 2 bright A_FadeOut(0.05)
        loop
    }
}

ACTOR IceChunk3 : IceChunk replaces IceChunk
{
	Gravity 0.5
}


Actor UnmakerL : Weapon
{
  Radius 24
  Height 16
  Weapon.UpSound "weapons/umup"
  Inventory.PickupMessage "What the !@#%* is this!" 
  Obituary "%o was ended by %k's Unmaker."
  Weapon.AmmoType "Cell2"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  decal "bulletchip"
  AttackSound "no/sound"
  +Weapon.Ammo_Optional
  states
  {
    Spawn:
      UMKW A -1
      loop
    Ready:
  		TNT1 A 0 A_TakeInventory("unmakerfired",2)
            UMKG AAAAAaaaddddddddeeeeeeeeffffffffffffffffeeeeeeeedddddddd 1 A_WeaponReady
      loop
    Deselect:
     tnt1 a 0 A_Lower
      UMKG A 1 A_Lower
      loop
    Select:
	tnt1 a 0 A_SetCrosshair(7)
     tnt1 a 0 A_Raise
      UMKG A 1 A_Raise
      loop
    Fire:
  UMKG A 0 A_JumpIfNoAmmo("Click")
      UMKR G 1 
      UMKG c 0 A_firecustommissile("umlaserfake")
      UMKG c 0 A_RailAttack ( 20, 0, 5, "none", "none", 0, 0, "laserpuffblind", 0, 0, 0, 5, 0.1, 0)
      UMKG c 1 A_playweaponsound("weapons/laser")
		TNT1 A 0 A_quake(1,6,0,1,"no/sound")
		TNT1 A 0 A_TakeInventory("unmakerfired",2)
      UMKG B 0 A_Recoil(0.2)
      UMKr h 1 
      UMKG b 1 bright
      UMKG A 0 A_ReFire
      goto ready
 Click:
   UMKG A 0 A_PlaySound("weapons/dry")
   UMKG A 4
   Goto Ready
    AltFire:
        tnt1 A 0 A_JumpIfCloser (78,"kick")
TNT1 A 0 A_jumpifinventory("umupgrade", 1, "altfire2")
   UMKG A 0 A_PlaySound("weapons/dry")
    TNT1 A 0 A_Print("something seems to be missing...")
   UMKG A 4 
   Goto Ready
    AltFire2:
TNT1 A 0 A_jumpifinventory("umupgrade", 2, "altfire3")
   UMKG A 0 A_PlaySound("weapons/dry")
    TNT1 A 0 A_Print("still not enough power...")
   UMKG A 4 
   Goto Ready
    AltFire3:
TNT1 A 0 A_jumpifinventory("umupgrade", 3, "altfire4")
TNT1 A 0 A_jumpifinventory("cell2", 4, 1)
		goto click
      UMKr g 1 
		UMKG c 1 A_FireCustomMissile ("umlaser", 1, 0)
		tnt1 a 0 A_FireCustomMissile ("umlaser", -1, 0)
  		TNT1 A 0 A_TakeInventory("cell2",4)
		TNT1 A 0 A_quake(1,6,0,1,"NO/SOUND")
		UMKG B 0 A_PlayweaponSound("weapons/laser")
      UMKG B 0 A_Recoil(0.2)
      UMKr h 1 
      UMKG b 1 bright
      UMKG A 0 A_ReFire
   Goto Ready
    AltFire4:
TNT1 A 0 A_jumpifinventory("cell2", 6, 1)
		goto click
TNT1 A 0 A_jumpifinventory("unmakerfired", 1, "altfire4b")
      UMKr g 1 
      UMKG c 1 A_firecustommissile("umlaser")
		tnt1 a 0  A_FireCustomMissile ("umlaser", 3, 0)
		tnt1 a 0 A_FireCustomMissile ("umlaser", -3, 0)
  		TNT1 A 0 A_TakeInventory("cell2",6)
		TNT1 A 0 A_quake(1,6,0,1,"NO/SOUND")
		UMKG B 0 A_PlayweaponSound("weapons/laser")
      UMKG B 0 A_Recoil(0.2)
  		TNT1 A 0 A_GiveInventory("unmakerfired",1)
      UMKr h 1 
      UMKG b 1 bright
      UMKG A 0 A_ReFire
   Goto Ready
    AltFire4b:
TNT1 A 0 A_jumpifinventory("cell2", 6, 1)
		goto click
TNT1 A 0 A_jumpifinventory("unmakerfired", 2, "altfire4c")
      UMKr g 1 
      UMKG c 1 A_firecustommissile("umlaser")
		tnt1 a 0  A_FireCustomMissile ("umlaser", 4, 0)
		tnt1 a 0 A_FireCustomMissile ("umlaser", -4, 0)
  		TNT1 A 0 A_TakeInventory("cell2",6)
		TNT1 A 0 A_quake(1,6,0,1,"NO/SOUND")
		UMKG B 0 A_PlayweaponSound("weapons/laser")
      UMKG B 0 A_Recoil(0.2)
  		TNT1 A 0 A_GiveInventory("unmakerfired",1)
      UMKr h 1 
      UMKG b 1 bright
      UMKG A 0 A_ReFire
   Goto Ready
    AltFire4c:
TNT1 A 0 A_jumpifinventory("cell2", 6, 1)
		goto click
      UMKr g 1 
      UMKG c 1 A_firecustommissile("umlaser")
		tnt1 a 0  A_FireCustomMissile ("umlaser", 6, 0)
		tnt1 a 0 A_FireCustomMissile ("umlaser", -6, 0)
  		TNT1 A 0 A_TakeInventory("cell2",6)
  		TNT1 A 0 A_TakeInventory("unmakerfired",2)
		TNT1 A 0 A_quake(1,6,0,1,"NO/SOUND")
		UMKG B 0 A_PlayweaponSound("weapons/laser")
      UMKG B 0 A_Recoil(0.2)
      UMKr h 1 
      UMKG b 1 bright
      UMKG A 0 A_ReFire
kick:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "Zerkkick")
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  zerkkick:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(20,0,0,"zerkFootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    UMKG A 15 A_Light0
    Goto LightDone
  }
}

ACTOR laserPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+alwayspuff
	RenderStyle Translucent
	Alpha 0.75
	Mass 5
	Scale		.5
  Obituary "%o was zapped by %k's Unmaker."
Damagetype "laser"
	States
	{
	Spawn:
		LASR B 4 BRIGHT
		LASR B 0 Bright A_SpawnDebris("laserSpark")
		LASR CBC 4 Bright 
		LASR C 0 Bright A_spawnitemex("puffsmoke",0,0,0,0,0)
		Stop
}
}

ACTOR laserPuffblind
{
	Game Doom
	+NOBLOCKMAP
  Obituary "%o was zapped by %k's Unmaker."
Damagetype "laser"
	States
	{
	Spawn:
		tnt1 a 0
		Stop
}
}

ACTOR laserSpark
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	Alpha		1
	Scale		.2
	Mass		0
	+missile
	//+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		LASR B 1
		LASR BCBCB 1  Bright A_SetTranslucent(.8,1)
		LASR BCBCBC 1  Bright A_SetTranslucent(.6,1)
		LASR BCBCBCBC 1  Bright A_SetTranslucent(.4,1)
		LASR BCBCBCBCBC 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}

ACTOR UMlaser : fastprojectile
{
	Radius 4
	Height 4
	Speed 200
	Damage 2
	Projectile
	scale 0.7
	+ripper
	decal "bulletchip"
	Obituary "%o got zapped by %k's Unmaker."
	seesound "weapons/laser"
	TRANSLATION "112:127=176:191"
Damagetype "laser"
missiletype "umlasertrail"
	States
	{
	Spawn:
		UMLZ A 1 Bright 
		Loop
	Death:
		tnt1 a 0 A_spawnitemex("laserPuff",0,0,-5,0,0)
		Stop
	}
}

ACTOR UMlaserfake : fastprojectile
{
	Radius 4
	Height 4
	Speed 200
	Damage 0
	Projectile
	scale 0.7
	+noblockmap
	decal "bulletchip"
	Obituary "%o got zapped by %k's Unmaker."
	seesound "weapons/laser"
	TRANSLATION "112:127=176:191"
Damagetype "laser"
missiletype "umlasertrail"
	States
	{
	Spawn:
		UMLZ A 1 Bright 
		Loop
	Death:
		tnt1 a 0 A_spawnitemex("laserPuff",0,0,-5,0,0)
		Stop
	}
}

ACTOR unmakerfired : Ammo
{
 Inventory.MaxAmount 2
 +IGNORESKILL
}


actor umlaserTrail
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle ADD
	scale 0.7
	alpha 1
	TRANSLATION "112:127=176:191"
	States
	{
		Spawn:
		UMLZ A 1 BRIGHT A_FadeOut(0.1)
		loop
	}
}

ACTOR umupgrade : Ammo
{
 Inventory.MaxAmount 3
 +IGNORESKILL
}

ACTOR unmakerZoomed : Inventory { Inventory.MaxAmount 1 }

actor scopeFLASH : CustomInventory 
{
  states
  {
  Pickup:
    TNT1 A 0 A_SetBlend("black", .9,20)
    stop
  }
}

Actor UnmakerR : Weapon
{
  Radius 24
  Height 16
  Weapon.UpSound "weapons/umup"
  Inventory.PickupMessage "What the !@#%* is this!" 
  Obituary "%o was ended by %k's Unmaker."
  Weapon.AmmoType "Cell2"
  Weapon.AmmoUse 10
  Weapon.AmmoGive 40
  AttackSound "weapons/rbeam"
    decal "bulletchip"
  +Weapon.Ammo_Optional
  states
  {
    Spawn:
      UMKW A -1
      loop
Ready:
	      UMKG x 2
	UMKX abc 2
goto readymain
    Readymain:
    tnt1 a 0 A_JumpIfInventory("unmakerZoomed",1,"ZoomedReady")
      UMKG hhhhhhiiiiiijjjjjjkkkkkk 1 A_WeaponReady
      loop
 ZoomedReady:
    UMKz a 1 A_WeaponReady
	Goto Readymain
    Deselect:
 rail A 0 A_JumpIfInventory("unmakerZoomed",1,"ZoomedDeselect")
     tnt1 a 0 A_Lower
      UMKG x 1 A_Lower
      loop
zoomeddeselect:
    	TNT1 A 0 A_GiveInventory("scopeflash", 1)
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(3)
	UMKG x 1 A_ZoomFactor(2)
	UMKG x 1 A_ZoomFactor(1)
	UMKG x 1 A_takeInventory("unmakerzoomed", 1)
goto deselect
    Select:
	tnt1 a 0 A_SetCrosshair(7)
	hmgG a 0 A_takeInventory("unmakerzoomed", 1)
     tnt1 a 0 A_Raise
      UMKG x 1 A_Raise
      loop
    Fire:
UMKG A 0 A_JumpIfInventory("unmakerZoomed",1,"ZoomedFire")
  UMKG A 0 A_JumpIfNoAmmo("Click")
TNT1 A 0 A_FireCustomMissile("railtracer", 0, 0, 0, 0)
      UMKG y 0 A_FireCustomMissile("RAILTRAIL2", 0, 0, 0, 0)
      UMKG y 1 A_FireCustomMissile("RAILTRAIL", 0, 0, 0, 0)
      UMKG y 1 A_RailAttack ( 240, 0, 5, "none", "none", 0, 0, "RAILpuff")
       UMKG B 0 A_PlaySound("weapons/umfir")
      UMKG LML 2 bright
    		UMKr a 1 A_ZoomFactor(.99)
    		UMKr a 1 A_ZoomFactor(.98)
    		UMKr b 1 A_ZoomFactor(.97)
    		UMKr b 1 A_ZoomFactor(.96)
    		UMKr c 2 A_ZoomFactor(.95)
      UMKr B 0 A_Recoil(4)
    		UMKr d 1 A_ZoomFactor(.96)
    		UMKr d 1 A_ZoomFactor(.97)
    		UMKr e 1 A_ZoomFactor(.98)
    		UMKr e 1 A_ZoomFactor(.99)
      UMKr f 2 A_ZoomFactor(1)
      UMKG x 6
	UMKX abc 2
      UMKG A 0 A_ReFire
      goto Readymain
zoomedfire:
  UMKz a 0 A_JumpIfNoAmmo("Clickzoomed")
TNT1 A 0 A_FireCustomMissile("railtracer", 0, 0, 0, 0)
      UMKG y 0 A_FireCustomMissile("RAILTRAIL2", 0, 0, 0, 0)
      UMKz a 1 A_FireCustomMissile("RAILTRAIL", 0, 0, 0, 0)
      UMKz a 1 A_RailAttack ( 240, 0, 5, "none", "none", 0, 0, "RAILpuff")
       UMKz a 0 A_PlaySound("weapons/umfir")
      UMKz a 1 A_ZoomFactor(4.95)
      UMKz a 1 A_ZoomFactor(4.8)
      UMKz a 1 A_ZoomFactor(4.75)
      UMKz a 1 A_ZoomFactor(4.6)
      UMKz a 2 A_ZoomFactor(4.55)
      UMKz a 0 A_Recoil(4)
      UMKz a 1 A_ZoomFactor(4.6)
      UMKz a 1 A_ZoomFactor(4.75)
      UMKz a 1 A_ZoomFactor(4.8)
      UMKz a 1 A_ZoomFactor(4.95)
      UMKz a 2 A_ZoomFactor(5)
      UMKz a 12
      UMKz a 0 A_ReFire
      goto zoomedReady
 Click:
   UMKG A 0 A_PlaySound("weapons/dry")
   UMKG x 4
   Goto Ready
clickzoomed:
    	TNT1 A 0 A_GiveInventory("scopeflash", 1)
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(3)
	UMKG x 1 A_ZoomFactor(2)
	UMKG x 1 A_ZoomFactor(1)
	UMKG x 1 A_takeInventory("unmakerzoomed", 1)
goto click
  AltFire:
    	TNT1 a 0 A_JumpIfInventory("unmakerZoomed",1,"UnZoom")
        tnt1 A 0 A_JumpIfCloser (78,"kick")
	TNT1 A 0 A_PlayWEAPONSound("weapons/HOLSTER")
   	TNT1 A 0 A_GiveInventory("scopeflash", 1)
   	TNT1 a 1 A_ZoomFactor(1)
	TNT1 a 1 A_ZoomFactor(2)
	TNT1 a 1 A_ZoomFactor(3)
	TNT1 a 1 A_ZoomFactor(4)
	TNT1 a 1 A_ZoomFactor(5)
	TNT1 a 1 A_giveInventory("unmakerzoomed", 1)
	Goto ZoomedReady
unzoom:
	TNT1 A 0 A_PlaySound("weapons/HOLSTER")
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(5)
	UMKG x 1 A_ZoomFactor(3)
	UMKG x 1 A_ZoomFactor(2)
	UMKG x 1 A_ZoomFactor(1)
	UMKG x 1 A_takeInventory("unmakerzoomed", 1)
goto readymain
kick:
	    tnt1 A 0 A_JumpIfInventory("PowerStrength", 1, "Zerkkick")
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Readymain
  zerkkick:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(20,0,0,"zerkFootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Readmain
  AltFlash:
    UMKG IJK 5 A_Light0
    Goto LightDone
  }
}

ACTOR railcore
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 1
   vSpeed 1
   RENDERSTYLE TRANSLUCENT
   ALPHA 1
   States
   {
   Spawn: 
             TNT1 A 0 A_CustomMissile("railcoreParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
       TNT1 A 0 A_CustomMissile("railcoreParticle2",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
             TNT1 A 0 A_CustomMissile("railcoreParticle1",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))
             TNT1 A 0 A_CustomMissile("railcoreParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
       TNT1 A 0 A_CustomMissile("railcoreParticle2",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle", 0, 0, random(-180, 180), 2, random(-180, 180))
             TNT1 A 0 A_CustomMissile("railcoreParticle1",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("railcoreParticle2", 0, 0, random(-180, 180), 2, random(-180, 180))
      stop
   }
}

actor railcoreParticle
{
    Radius 0
    Height 0
    
    Speed 0.2
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.05
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        bal1 CDE 2 A_FadeOut(0.05)
        loop
    }
}

actor railcoreParticle1
{
    Radius 0
    Height 0
    
    Speed 0.2
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.06
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        bal1 CDE 2 A_FadeOut(0.05)
        loop
    }
}

actor railcoreParticle2
{
    Radius 0
    Height 0
    
    Speed 0.2
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.07
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        RBIT A 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        bal1 CDE 2 A_FadeOut(0.05)
        loop
    }
}


ACTOR railtrail : fastprojectile
{
   Radius 1
   Height 1
   PROJECTILE
   +NOclip
   Scale 0.1
   Speed 110
	renderstyle add
	alpha 0.7
   +DONTSPLASH
missiletype "railcore"
States
	{
	Spawn:
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		tnt1 A 1  A_SpawnItem("railtrailtail")
		stop
 death:
tnt1 a 0
stop
}
}

ACTOR railtrailtail
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.1
   Speed 0
   vspeed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA .8
   States
   {
   Spawn: 
RLTR E 1 bright A_SetScale(.1, .1)
RLTR F 1 bright A_SetScale(.2, .2)
RLTR G 1 bright A_SetScale(.3, .3)
RLTR H 1 bright A_SetScale(.4, .4)
RLTR A 1 bright A_SetScale(.5, .5)
RLTR A 1 bright A_FadeOut(0.06)
RLTR B 2 bright A_SetScale(.6, .6)
RLTR B 1 bright A_FadeOut(0.06)
RLTR C 2 bright A_SetScale(0.7, 0.7)
RLTR C 1 bright A_FadeOut(0.06)
RLTR D 2 bright A_SetScale (0.8, 0.8)
RLTR D 1 bright A_FadeOut(0.06)
RLTR E 2 bright A_SetScale(0.9, 0.9)
RLTR E 1 bright A_FadeOut(0.06)
RLTR F 2 bright A_SetScale(1, 1)
RLTR F 1 bright A_FadeOut(0.07)
RLTR G 3 bright A_SetScale(1.1, 1.1)
RLTR G 1 bright A_FadeOut(0.07)
RLTR H 3 bright A_SetScale(1.2, 1.2)
RLTR H 1 bright A_FadeOut(0.07)
RLTR A 3 bright A_SetScale(1.3, 1.3)
RLTR A 1 bright A_FadeOut(0.07)
RLTR B 3 bright A_SetScale(1.4, 1.4)
RLTR B 1 bright A_FadeOut(0.07)
RLTR C 4 bright A_SetScale(1.5, 1.5)
RLTR C 1 bright A_FadeOut(0.08)
RLTR D 4 bright A_SetScale (1.6, 1.6)
RLTR D 1 bright A_FadeOut(0.8)
RLTR E 4 bright A_SetScale(1.7, 1.7)
RLTR E 1 bright A_FadeOut(0.08)
RLTR F 4 bright A_SetScale(1.8, 1.8)
RLTR F 1 bright A_FadeOut(0.08)
RLTR G 4 bright A_SetScale(1.9, 1.9)
RLTR G 1 bright A_FadeOut(0.08)
RLTR H 4 bright A_SetScale(2, 2)
RLTR H 1 bright A_FadeOut(0.08)
      stop
   }
}

ACTOR railtrail2 : fastprojectile
{
   Radius 1
   Height 1
   PROJECTILE
   +NOclip
   Scale 0.1
   Speed 70
	renderstyle add
	alpha 0.7
   +DONTSPLASH
missiletype "railcore"
States
	{
	Spawn:
		tnt1 A 15
		stop
 death:
tnt1 a 0
stop
}
}

ACTOR railtracer : fastprojectile
{
   Radius 1
   Height 1
   PROJECTILE
+noblockmap
   Scale 0.1
   Speed 200
	renderstyle add
	alpha 0.7
   +DONTSPLASH
States
	{
	Spawn:
		tnt1 A 1  
		loop
 death:
		TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
		TNT1 a 0 A_SpawnItem("shockwave6",0,0,0,0)
stop
}
}

ACTOR RAILPuff : bulletpuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+EXTREMEDEATH
	DamageType "UMDEATH"
	RenderStyle Translucent
	scale 0.3
	Alpha 1
	VSpeed 1
	Mass 5
  Obituary "%o was ended by %k's Unmaker."
	States
	{
	Spawn:
		SPRK A 2 Bright
		SPRK A 0 Bright A_SpawnDebris("BulletSpark")
		SPRK B 0 A_PlayWeaponSound("weapons/puff")
		SPRK BCD 2 Bright 
	STOP
}
}

ACTOR unlockedUM : CustomInventory
{
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "Unlocked Unmaker!"
	Scale 0.8
	States
	{
	Spawn:
		UMKW A -1
		Stop
	Pickup:
		TNT1 A 0 A_GiveInventory("UnmakerL",1)
		TNT1 A 0 A_GiveInventory("UnmakerR",1)
		TNT1 A 0 A_GiveInventory("Umupgrade",1)
		Stop
	}
}

Actor Demonrune : CustomInventory 
{
  Inventory.Amount 1
  Inventory.PickupSound "items/skullkey"
  Inventory.DefMaxAmount 
  Inventory.PickupMessage "what the hell is this for?"
  Inventory.Icon DKEYB0
  +Inventory.InvBar
States
  {
  Spawn:
    DKEY A 1 bright
    Loop
  Use:
    TNT1 A 0 A_JumpIfInventory("UnmakerL", 1, "Succeed")
    TNT1 A 0 A_Print("this seems to fit something you don't yet possess...")
    TNT1 A 0 A_GiveInventory("Demonrune", 1)
    Stop
  Succeed:
    TNT1 A 0 A_PlaySound("items/rune")
    TNT1 A 0 A_Print("The unmaker throbs with arcane power!")
    TNT1 A 0 A_GiveInventory("UnmakerR", 1)
    TNT1 A 0 A_GiveInventory("umupgrade", 1)
    Stop
  }
}

Actor LIGHTNINGGUN : Weapon
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.KickBack 40
  Weapon.AmmoType "cell2"
  Inventory.PickupMessage "You got the LIGHTNING GUN!"
  Obituary "%o took %k's shaft."
  Weapon.UpSound "items/plasma"
  +Weapon.Ammo_Optional 
  AttackSound "weapons/wiff"
  States
  {
  Spawn:
    repw a -1
    Loop
  Select:
     tnt1 a 0 A_Raise
    repg A 1 A_Raise
    Loop
  Deselect:
     tnt1 a 0 A_Lower
    repg A 1 A_Lower
    Loop
  Ready:
    repg A 1 A_WeaponReady
    Loop
  Fire:
    repg A 0 A_JumpIfNoAmmo("Click")
    repg A 0 A_RailAttack ( 20, 0, 5, "none", "white", 0, 3, "oblitPUFF", 0, 0, 0, 5, 15, 0, "OBLIT")
    repg A 0 A_FireCustomMissile("OBLITFX1")
    repF Z 1 bright A_PlayWeaponSound("Weapons/obl_zap")
    repG A 0 a_gunflash
    repg A 0 A_Recoil(0.2)
    repg A 0 A_quake(2,6,0,1,"NO/SOUND")
    repG B 1
    repG C 1 
    repG D 1
    repG A 0 A_Refire
    repg a 0 A_PlayWeaponSound("Weapons/obl_Fire")
    repF Z 2 BRIGHT
    repg B 2
    repg C 2
    repg D 2
    repg A 2
    repg B 3
    repg C 3
    repg D 3	
    Goto Ready
 Click:
    repg A 0 A_PlaySound("weapons/dry")
    repg A 1
    repg B 1
    repg C 1
    repg D 1
    repg A 0 A_Refire
    repg A 2
    repg B 2
    repg C 2
    repg D 2
    repg A 2
    repg B 3
    repg C 3
    repg D 3	
    Goto Ready
   Flash:
     TNT1 A 2 Bright A_Light1
     Goto LightDone
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    repg A 15 A_Light0
    Goto LightDone
  }
}

ACTOR OBLITFX1 
{
  PROJECTILE 
  Radius 2
  Height 2
  Speed 60
  +DOOMBOUNCE
  BounceFactor 1.0
  bouncecount 2
  damage 5
  RenderStyle Translucent
  Alpha .5
  decal oblitoratorScorch4
  SEESOUND "weapons/obl_zap"
  DEATHSOUND "weapons/obl_pop"
  Obituary "%o took a load of %k's discharge."
Damagetype "laser"
  SCALE 0.5

States
	{
	Spawn:
		ELEk A 1 BRIGHT A_SpawnItem("OBLITTrail1")
		ELEk B 1 BRIGHT A_SpawnItem("OBLITTrail2")
		loop
	death:
		ELEk A 1 bright
		ELEk A 0 Bright A_SpawnDebris("OBLITSpark")
		ELEk b 1 bright
		STOP
}
}

actor OBLITTrail1
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
  SCALE 0.5
	States
	{
		Spawn:
		ELEk AABBAA 3 A_FadeOut(0.1)
		stop
	}
}

actor OBLITTrail2
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.15
  SCALE 0.5
	States
	{
		Spawn:
		ELEk BBAABB 3 A_FadeOut(0.1)
		stop
	}
}

ACTOR OBLIT
{
	RenderStyle Translucent
	Alpha .5
	scale 0.25
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		ELEk AB 2 BRIGHT 
	stop
	}
}

ACTOR OBLIT2
{
	RenderStyle Translucent
	Alpha .5
	scale 0.080
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		faxe YZ 2 BRIGHT A_FadeOut(0.1)
	stop
	}
}

ACTOR OBLITPUFF
{
	RenderStyle Translucent
	Alpha .5
	scale 0.25
	+ NOGRAVITY
	+DONTSPLASH
	+alwayspuff
        Obituary "%o took %k's shaft."
	decal oblitoratorScorch4
	States
	{
	Spawn:
		faxe rSTU 1 bright
		FAXE U 0 Bright A_SpawnDebris("OBLITSpark")
		faxe vwx 1 bright
	stop
	}
}

ACTOR OBLITSpark
{
	Health 4
	radius 3
	height 6
	speed .1
	RenderStyle ADD
	Alpha		1
	Scale		.080
	Mass		0
	+missile
	//+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	States
	{
		faxe r 1
		faxe rstuv 1  Bright A_SetTranslucent(.8,1)
		faxe rstuvwx 1  Bright A_SetTranslucent(.6,1)
		faxe rstuvwxr 1  Bright A_SetTranslucent(.4,1)
		faxe rstuvwxrst 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}

actor ChaingunSpawner : RandomSpawner replaces Chaingun
{
dropitem SMG
dropitem SMG
dropitem superchaingun
dropitem Magnum
}

actor BFGSpawner : RandomSpawner replaces BFG9000
{
dropitem BFG9k
dropitem BFG9k
dropitem BFG9k
dropitem BFG9k
dropitem unlockedUM
}

actor 92fSpawner : RandomSpawner replaces 92f
{
dropitem pistol2
}

actor plasSpawner : RandomSpawner replaces Plasmarifle
{
dropitem PerkPlasmarifle
dropitem PerkPlasmarifle
dropitem PerkPlasmarifle
dropitem unmakerL
}

actor RLSpawner : RandomSpawner replaces Rocketlauncher
{
dropitem RPG2
dropitem RPG2
dropitem grenadelauncher
}

actor SGSpawner : RandomSpawner replaces Shotgun
{
dropitem MegaShotgunpickup
dropitem MegaShotgunpickup
dropitem MegaShotgunpickup
dropitem MegaShotgunpickup
dropitem PerkSuperShotgun
dropitem PerkSuperShotgun
}

actor SSGSpawner : RandomSpawner replaces Supershotgun
{
dropitem PerkSuperShotgun
dropitem Riotgun2
}

ACTOR Shell2 : ammo replaces Shell
{
	Game Doom
	Inventory.PickupMessage "$GOTSHELLS"
	Inventory.Amount 4
	Inventory.MaxAmount 100
	Ammo.BackpackAmount 4
	Ammo.BackpackMaxAmount 200
	Inventory.Icon "SHELA0"
	inventory.pickupsound "items/shell"
	States
	{
	Spawn:
		SHEL A -1
		Stop
	}
}

actor ShellBoxSpawner : RandomSpawner replaces ShellBox
{
dropitem ShellBox2
dropitem ShellBox3
}

ACTOR ShellBox2 : Shell2 
{
	Game Doom
	Inventory.PickupMessage "$GOTSHELLBOX"
        inventory.pickupsound "items/shell"
	Inventory.Amount 20
	States
	{
	Spawn:
		SBOX A -1
		Stop
	}
}

ACTOR ShellBox3 : Shell2 
{
	Game Doom
	Inventory.PickupMessage "$GOTSHELLBOX"
        inventory.pickupsound "items/shell"
	Inventory.Amount 20
	States
	{
	Spawn:
		SBOX B -1
		Stop
	}
}

ACTOR Clip2 : ammo replaces Clip
{
	Game Doom
	Inventory.PickupMessage "$GOTCLIP"
	Inventory.Amount 10
	Inventory.MaxAmount 400
	Ammo.BackpackAmount 10
	Ammo.BackpackMaxAmount 800
	Inventory.Icon "CLIPA0"
	inventory.pickupsound "items/clip"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR ammobelt : clip2
{
	Game Doom
	Inventory.PickupMessage "Picked up an ammo belt"
	Inventory.Amount 20
	Inventory.MaxAmount 400
	Ammo.BackpackAmount 10
	Ammo.BackpackMaxAmount 800
	Inventory.Icon "beltA0"
	inventory.pickupsound "items/clip"
	States
	{
	Spawn:
		belt A -1
		Stop
	}
}

actor ClipBoxSpawner : RandomSpawner replaces ClipBox
{
dropitem clipBox2
dropitem clipBox3
}

ACTOR ClipBox2 : Clip2 
{
	Game Doom
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.Amount 50
	inventory.pickupsound "items/clip"
	States
	{
	Spawn:
		AMMO A -1
		Stop
	}
}

ACTOR ClipBox3 : Clip2
{
	Game Doom
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.Amount 50
	inventory.pickupsound "items/clip"
	States
	{
	Spawn:
		AMMO B -1
		Stop
	}
}

ACTOR RocketAmmo2 : Ammo replaces RocketAmmo
{
	Game Doom
	Inventory.PickupMessage "$GOTROCKET"
	Inventory.Amount 1
	Inventory.MaxAmount 100
	Ammo.BackpackAmount 1
	Ammo.BackpackMaxAmount 200
	Inventory.Icon "ROCKA0"
	inventory.pickupsound "items/rocket"
	States
	{
	Spawn:
		ROCK A -1
		Stop
	}
}

actor RocketBoxSpawner : RandomSpawner replaces RocketBox
{
dropitem RocketBox2
}

ACTOR RocketBox2 : RocketAmmo2 
{
	Game Doom
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Amount 5
	inventory.pickupsound "items/rocket"
	States
	{
	Spawn:
		BROK A -1
		Stop
	}
}

ACTOR RocketBox3 : RocketAmmo2 
{
	Game Doom
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Amount 5
	inventory.pickupsound "items/rocket"
	States
	{
	Spawn:
		BROK B -1
		Stop
	}
}


ACTOR Cell2 : ammo replaces Cell
{
	Game Doom
	Inventory.PickupMessage "$GOTCELL"
	Inventory.Amount 20
	Inventory.MaxAmount 600
	Ammo.BackpackAmount 20
	Ammo.BackpackMaxAmount 1200
	Inventory.Icon "CELLA0"
	inventory.pickupsound "items/cell"
	States
	{
	Spawn:
		CELL B 1 A_SpawnItem("BM_cell",0,0,0,0)
		loop
	}
}

ACTOR BM_cell
{
   +NOCLIP
   +NOGRAVITY
   +NOBLOCKMAP
   States
   {
   Spawn:
      CELL C 2 BRIGHT
      Stop
   }
}

ACTOR CellPack2 : Cell2 replaces CellPack
{
	Game Doom
	Inventory.PickupMessage "$GOTCELLBOX"
	Inventory.Amount 100 
	inventory.pickupsound "items/cell"
	States
	{
	Spawn:
		CELP B 1 A_SpawnItem("BM_cellpack",0,0,0,0)
		loop
	}
}

ACTOR BM_cellpack
{
   +NOCLIP
   +NOGRAVITY
   +NOBLOCKMAP
   States
   {
   Spawn:
      CELP C 2 BRIGHT
      Stop
   }
}

ACTOR CaseSmoke
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.3
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.3
   +DONTSPLASH
   States
   {
   Spawn:
      RSMK ABCDEABCDE 2 A_FadeOut(0.05)
      Stop
   }
}

actor BulletCasing
{
    +DOOMBOUNCE
    PROJECTILE
    -NOGRAVITY
    -NOBLOCKMAP
    Radius 2
    Damage 0
    SeeSound "weapons/casing1"
    Speed 5
    scale 0.2
    mass 5
    gravity 1
    bouncefactor 0.4
+floorclip
    States
    {
    Spawn:
        PBUL A 0 A_SetGravity (0.5)
        PBUL A 0 ThrustThingZ (0, 12, 0, 1)
        goto See 
    See:
        PBUL A 0 ThrustThingZ(0,6,1,1)
        PBUL ABC 5 A_CustomMissile("CaseSmoke",0,0,0,2,0)
        loop
    Death:
        PBUL A 0 A_Jump (32,3)
        PBUL A 0 A_Jump (64,3)
        PBUL A 0 A_Jump (128,3)
        PBUL C 4000
        Stop
        PBUL D 4000
        Stop
        PBUL E 4000
        Stop
    }
}

actor ShellCasing
{
    +DOOMBOUNCE
    PROJECTILE
    -NOGRAVITY
    -NOBLOCKMAP
    Radius 2
    Damage 0
    SeeSound "weapons/casing2"
    Speed 5
    mass 5
    scale 0.2
    gravity 1
    bouncefactor 0.4
+floorclip
    States
    {
    Spawn:
        PSHE A 0 A_SetGravity (0.5)
        PSHE A 0 ThrustThingZ (0, 12, 0, 1)
        goto See 
    See:
        PSHE A 0 ThrustThingZ(0,6,1,1)
        PSHE ABC 5 A_CustomMissile("CaseSmoke",0,0,0,2,0)
        loop
    Death:
        PSHE A 0 A_Jump (32,3)
        PSHE A 0 A_Jump (64,3)
        PSHE A 0 A_Jump (128,3)
        PSHE C 4000
        Stop
        PSHE D 4000
        Stop
        PSHE E 4000
        Stop
    }
}

ACTOR RifleCasing 		
{						
	Height 2
	Radius 2
	Speed 5
	Scale 0.2	
	BounceFactor 0.4
	Mass 4
	PROJECTILE                    
	+DOOMBOUNCE
	- NOGRAVITY  
	- NOBLOCKMAP
    SeeSound "weapons/casing1"
	States
	{
	Spawn:
	   BRS3 A 0 A_Playsound("NULL")
	   BRS3 A 0 A_Jump(256, "Spin1", "Spin2", "Spin3", "Spin4", "Spin5")
	   Goto Spawn+1
	Spin1:
		BRS3 ABCD 3 A_CustomMissile("CaseSmoke",0,0,0,2,0)
		Loop
	Spin2:
		BRS3 EFGH 3 A_CustomMissile("CaseSmoke",0,0,0,2,0)
		Loop
	Spin3:
		BRS3 IJKL 3 A_CustomMissile("CaseSmoke",0,0,0,2,0)
		Loop
	Spin4:
		BRS3 MNOP 3 A_CustomMissile("CaseSmoke",0,0,0,2,0)
		Loop
	Spin5:
		BRS3 QRST 3 A_CustomMissile("CaseSmoke",0,0,0,2,0)
		Loop
	Death:
	   	BRS3 A 0 A_Jump(256,"Lie1","Lie2","Lie3","Lie4","Lie5","Lie6")
	   	Loop
	Lie1:
		BRS3 I 4000
		Stop
	Lie2:
		BRS3 K 4000
		Stop
	Lie3:
		BRS3 M 4000
		Stop
	Lie4:
		BRS3 O 4000
		Stop
	Lie5:
		BRS3 Q 4000
		Stop
	Lie6:
		BRS3 S 4000
		Stop
	}
} 


// *** NUCLEAR MISSILE LAUNCHER ***

actor nukeitem : custominventory
{
  Inventory.Amount 1
  Inventory.DefMaxAmount
  Inventory.InterHubAmount 25
  +INVENTORY.INVBAR
  inventory.icon NUKWB0
  states
  {
  Spawn:
    NUKW A -1 
    stop
  Use:
    TNT1 A 0 A_JumpIfInventory("rpg", 1, "Succeed")
    TNT1 A 0 A_Print("You need a rocketlauncher to use a nuke!")
    TNT1 A 0 A_GiveInventory("nukeitem", 1)
    Stop
  Succeed:
      TNT1 A 0 A_SelectWeapon("NuclearMissileLauncher")
      TNT1 A 0 A_GiveInventory("nukeitem", 1)
    Stop
  }
}

actor nukepickup : CustomInventory 
{
  Inventory.PickupMessage "Picked up a Nuke."
  inventory.pickupsound "items/rocket"
  states
  {
  Spawn:
    NUKW A -1
    stop
  Pickup:
    TNT1 A 0 A_GiveInventory ("NuclearMissile")
    TNT1 A 0 A_GiveInventory ("nukeitem")
    stop
  }
}

ACTOR NuclearMissileLauncher : Weapon
{
   Inventory.PickupMessage "Picked up a Nuke."
   Obituary "%o was vaped by %k's Nuke."
   Weapon.AmmoType "NuclearMissile"
   Weapon.AmmoGive 0
   Weapon.AmmoUse 1
   +NOAUTOFIRE
   +EXPLOSIVE
   +BFG
   Inventory.PickupSound "items/rocket"
   Weapon.UpSound "items/rlauncher"
  +Weapon.Ammo_Optional 
   States
   {
Ready:
	MISG AEFGH 2
      	MISG H 0 A_PlaySound("weapons/beep")
goto readymain
   Readymain:
	tnt1 a 0 A_SetCrosshair(6)
      MISG C 12 A_WeaponReady
      MISG A 12 A_WeaponReady
      Loop
   Deselect:
     tnt1 a 0 A_Lower
      MISG A 1 A_Lower
      Loop
   Select:
     tnt1 a 0 A_Raise
      MISG A 1 A_Raise
      Loop
Fire:
  MISG B 0 A_JumpIfNoAmmo("Click")
    MISG D 4 A_GunFlash 
    MISG D 4 A_PlaySound("weapons/beep2")
    MISG D 0 A_TakeInventory("nukeitem", 1)
    MISG D 1 A_FireCustomMissile("NuclearMissileShot",0,1,0,5)
    MISG D 1 A_ZoomFactor(.99)
    MISG D 1 A_ZoomFactor(.98)
    MISG D 1 A_ZoomFactor(.97)
    MISG D 1 A_ZoomFactor(.96)
    MISG B 0 A_Recoil(5)
    MISG D 1 A_ZoomFactor(.97)
    MISG D 1 A_ZoomFactor(.98)
    MISG D 1 A_ZoomFactor(.99)
    MISG D 4 A_ZoomFactor(1)
    MISG A 30 
    MISG A 0 A_ReFire
    Goto Readymain
 Click:
   MISG B 0 A_PlaySound("weapons/dry")
   MISG A 8
   Goto Readymain
  Flash:
    MISF A 3 Bright A_Light1
    MISF B 4 Bright
    MISF CD 4 Bright A_Light2
    Goto LightDone

  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FootPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Readymain
  AltFlash:
    MISG C 15 A_Light0
    Goto LightDone  

Spawn:
    NUKW A -1
    Loop
   }
}

ACTOR NuclearMissileShot
{
   Radius 13
   Height 8
   Speed 20
   Damage 220
   PROJECTILE
   +STRIFEDAMAGE
   +NOTARGET
   +FULLVOLDEATH
   +THRUGHOST
   +FORCERADIUSDMG
   -ROCKETTRAIL
   ExplosionDamage 512
   ExplosionRadius 2000
   SeeSound "weapons/rocklf"
   DeathSound "weapons/nuclearmissileexplode"
   Obituary "%o was vaped by a Nuke."
   Decal "Nukecrater"
	damagetype fire
   States
   {
   Spawn:
		MISL E 2 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		tnt1 a 0 A_SpawnItem("rocketsmoker2",0,0,0,0)
      Loop
   Death:
      tnt1 A 0 A_SetTranslucent(0.4,0)
      tnt1 A 0 A_GiveToTarget("Nukeflash", 1)
      tnt1 A 0 A_quake(12,600,0,9999,"NO/SOUND")
      TNT1 a 0 A_SpawnItemEx("mushroomcloud")
      TNT1 a 0 A_SpawnItemEx("mushroomcloud2")
      TNT1 a 1 Bright A_Explode
      TNT1 a 1 Bright A_Explode
      TNT1 a 1 Bright A_Explode
      TNT1 a 1 Bright A_Explode
      TNT1 a 1 Bright A_Explode
      tnt1 A 0 Bright A_CustomMissile("NukeExplosionGenerator",12,-1,315,2)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,8)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,23)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,38)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,53)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,68)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,83)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,98)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,113)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,128)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,143)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,158)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,173)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,187)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,202)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,217)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,232)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,247)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,262)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,277)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,292)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,307)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,322)
      tnt1 A 0 Bright A_CustomMissile("NukeWall",0,0,337)
      tnt1 A 11 Bright A_CustomMissile("NukeWall",0,0,352)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",32,1,45,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",32,1,135,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",32,-1,225,2)
      tnt1 A 16 Bright A_CustomMissile("NukeExplosionGenerator",32,-1,315,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",25,1,0,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",25,1,90,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",25,-1,180,2)
      tnt1 A 16 Bright A_CustomMissile("NukeExplosionGenerator",25,-1,270,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",12,1,45,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",12,1,135,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",12,-1,225,2)
      tnt1 A 16 Bright A_CustomMissile("NukeExplosionGenerator",12,-1,315,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",4,1,0,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",4,1,90,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",4,-1,180,2)
      tnt1 A 16 Bright A_CustomMissile("NukeExplosionGenerator",4,-1,270,2)
      tnt1 A 16 Bright
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",1,1,45,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",1,1,135,2)
      tnt1 A 0 A_CustomMissile("NukeExplosionGenerator",1,-1,225,2)
      tnt1 A 16 Bright A_CustomMissile("NukeExplosionGenerator",1,-1,315,2)
      tnt1 A 160 Bright
      tnt1 A 80 Bright
      Stop
   }
}

ACTOR NukeExplosionGenerator
{
   Radius 6
   Height 4
   Speed 32
   Damage 6
   +NOBLOCKMAP 
   +NOGRAVITY
   +DROPOFF
   +MISSILE
   +RIPPER
   +BLOODLESSIMPACT
   +NOTELEPORT
   +THRUGHOST
   Scale 0.9
   ExplosionDamage 112
   ExplosionRadius 112
   RenderStyle None
   DeathSound "weapons/rocketexplode"
   Obituary "%o was vaped by a Nuke."
	damagetype fire
   States
   {
   Spawn:
      MISL BBB 1
      MISL B 1 A_CustomMissile("DispersionRocketExplosion1",0,0,0,2)
      MISL BBB 1
      MISL B 1 A_CustomMissile("DispersionRocketExplosion2",12,0,0,2)
      MISL BBB 1
      MISL B 1 A_CustomMissile("DispersionRocketExplosion3",32,0,0,2)
      Stop
   Death:
      MISL B 0 A_SetTranslucent(0.4,0)
      MISL B 4 Bright A_Explode
      MISL B 4 Bright A_SpawnItem("dustcloud",0,0,0,0)
      MISL C 6 Bright
      MISL D 4 Bright
      Stop
   }
}

ACTOR NukeWall
{
   Radius 8
   Height 12
   Speed 20
   Damage 5
   +NOBLOCKMAP 
   +DROPOFF 
   +MISSILE 
   +ACTIVATEIMPACT 
   +ACTIVATEPCROSS 
   +RIPPER
   +BLOODLESSIMPACT
   +NOTARGET
   +FLOORHUGGER
   +FIREDAMAGE
   +THRUGHOST
   Renderstyle Translucent
   Alpha 0.4
   ExplosionDamage 96
   ExplosionRadius 64
   Obituary "%o was dissolved by a Nuclear Flamewall."
   DeathSound "weapons/nuclearmissileflamehit"
	damagetype fire
   States
   {
   Spawn:
      FIRE ABC 2 Bright 
      FIRE D 2 Bright A_CustomMissile("NukeFire",0,0,0)
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE EFGAB 2 Bright 
      FIRE C 2 Bright A_CustomMissile("NukeFire",0,0,0)
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE D 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE e 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE f 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE g 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE h 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE a 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE b 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE c 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE D 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
  FIRE e 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE f 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE g 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE h 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE a 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      FIRE b 2 Bright
		tnt1 A 0 Bright A_SpawnDebris("phoscloud")
      Goto Spawn+10
   Death:
      MISL B 4 Bright A_Explode
      MISL B 4 Bright A_SpawnItem("dustcloud",0,0,0,0)
      MISL C 6 Bright
      MISL D 6 Bright
      Stop
   }
}

ACTOR NukeFire
{
   Radius 8
   Height 20
   Health 3000
   Speed 2
   Mass 500
   Damage 123
   +SHOOTABLE
   +DROPOFF
   +FLOORCLIP
   +NOBLOOD
   +NOTARGET
   +FIREDAMAGE
   +THRUGHOST
   +DONTSPLASH
   +noblockmap
   Renderstyle Add
   Alpha 0.4
   ExplosionDamage 64
   ExplosionRadius 160
   Obituary "%o was burned by the Nuclear fire."
   DeathSound "weapons/nuclearmissileburn"
	damagetype fire
   States
   {
   Spawn:
      FIRE A 0 A_Jump(64,6)
      FIRE A 0 A_Jump(64,4)
      FIRE A 0 A_Jump(64,2)
      FIRE A 1 Bright
      FIRE A 1 Bright
      FIRE A 1 Bright
      FIRE A 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE A 4 Bright A_Explode
      FIRE BC 4 Bright A_SpawnDebris("phoscloud")
      FIRE D 4 Bright A_Explode
      FIRE EF 4 Bright A_SpawnDebris("phoscloud")
      FIRE G 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE G 4 Bright A_Explode
      FIRE AB 4 Bright A_SpawnDebris("phoscloud")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright A_SpawnDebris("phoscloud")
      FIRE B 4 Bright A_Explode
      FIRE CD 4 Bright A_SpawnDebris("phoscloud")
      FIRE E 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE E 4 Bright A_Explode
      FIRE FG 4 Bright A_SpawnDebris("phoscloud")
      FIRE A 4 Bright A_Explode
      FIRE BC 4 Bright A_SpawnDebris("phoscloud")
      FIRE D 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE E 4 Bright A_Explode
      FIRE FG 4 Bright A_SpawnDebris("phoscloud")
      FIRE H 4 Bright A_Explode
      FIRE AB 4 Bright A_SpawnDebris("phoscloud")
      FIRE C 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright A_SpawnDebris("phoscloud")
      FIRE B 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright
      FIRE A 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE A 4 Bright A_Explode
      FIRE BC 4 Bright A_SpawnDebris("phoscloud")
      FIRE D 4 Bright A_Explode
      FIRE EF 4 Bright A_SpawnDebris("phoscloud")
      FIRE G 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE G 4 Bright A_Explode
      FIRE AB 4 Bright A_SpawnDebris("phoscloud")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright A_SpawnDebris("phoscloud")
      FIRE B 4 Bright A_Explode
      FIRE CD 4 Bright A_SpawnDebris("phoscloud")
      FIRE E 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE E 4 Bright A_Explode
      FIRE FG 4 Bright A_SpawnDebris("phoscloud")
      FIRE A 4 Bright A_Explode
      FIRE BC 4 Bright A_SpawnDebris("phoscloud")
      FIRE D 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE E 4 Bright A_Explode
      FIRE FG 4 Bright A_SpawnDebris("phoscloud")
      FIRE H 4 Bright A_Explode
      FIRE AB 4 Bright A_SpawnDebris("phoscloud")
      FIRE C 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright A_SpawnDebris("phoscloud")
      FIRE B 0 A_PlaySound("weapons/nuclearmissileburn")
      FIRE C 4 Bright A_Explode
      FIRE DE 4 Bright A_SpawnDebris("phoscloud")
      FIRE F 4 Bright A_Explode
      FIRE GA 4 Bright
   Death:
      FIRE G 5 Bright A_SpawnDebris("phoscloud")
      FIRE H 7 Bright A_SpawnDebris("phoscloud")
      Stop
   }
}

ACTOR NuclearMissileTrail
{
   Radius 3
   Height 4
   Speed 2
   +NOBLOCKMAP
   +NOGRAVITY
   +NOCLIP
   +NOTELEPORT
   +THRUGHOST
   RenderStyle Translucent
   Alpha 0.5
   States
   {
   Spawn:
      MTRL A 2
      MTRL BCD 3
      MTRL E 4 A_SetTranslucent(0.2)
      MTRL F 5 A_SetTranslucent(0.1)
      Stop 
   }
}

ACTOR DispersionRocketExplosion1
{
   Radius 6
   Height 4
   +NOBLOCKMAP
   +NOGRAVITY
   +THRUGHOST
   RenderStyle Add
   Alpha 0.4
   Scale 1
   ExplosionDamage 128
   ExplosionRadius 128
   States
   {
   Spawn:
      MISL B 0
      MISL B 0 A_PlaySound("weapons/dispersionexplode")
      MISL B 2 Bright A_Explode
      MISL B 2 Bright A_SpawnItem("dustcloud",0,0,0,0)
      MISL B 4 Bright
      MISL C 6 Bright
      MISL D 4 Bright
      Stop
   }
}

ACTOR DispersionRocketExplosion2 : DispersionRocketExplosion1
{
   Alpha 0.4
   Scale 0.9
   ExplosionDamage 112
   ExplosionRadius 112
}

ACTOR DispersionRocketExplosion3 : DispersionRocketExplosion1
{
   Alpha 0.4
   Scale 0.8
   ExplosionDamage 104
   ExplosionRadius 104
}


ACTOR NuclearMissile : Ammo
{
   Inventory.Amount 1
   Inventory.MaxAmount 25
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 25
   Inventory.PickupMessage "Picked up a Nuke!"
   Inventory.PickupSound "items/rocket"
   Inventory.Icon "NUKWA0"
   States
   {
   Spawn:
      NUKW A -1
      Stop
   }
}

actor NUKEFLASH : CustomInventory 
{
  states
  {
  Pickup:
    TNT1 A 0 A_SetBlend("white", .9,80)
    stop
  }
}

ACTOR poisonfog
{
Game Doom
RenderStyle Translucent
Alpha 0.5
Damage 1
ExplosionDamage 2
ExplosionRadius 100
+ NODAMAGETHRUST
	+DONTSPLASH
damagetype slime
States
{
Spawn:
TGAS A 4 A_explode
TGAS BCDEFG 4
loop
}
}

ACTOR poisonfog2
{
Game Doom
RenderStyle Translucent
Alpha 0.5
Damage 1
ExplosionDamage 4
ExplosionRadius 128
+ NODAMAGETHRUST
+DONTSPLASH
+FloatBob
damagetype slime
States
{
Spawn:
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
        TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 A_explode
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
tnt1 a 2 
        TNT1 A 0 A_CustomMissile("gasParticle",  0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle1", 0, 0, random(-180, 180), 2, random(-180, 180))
        TNT1 A 0 A_CustomMissile("gasParticle2", 0, 0, random(-180, 180), 2, random(-180, 180)) 
       TNT1 A 0 A_CustomMissile("gasParticle3", 0, 0, random(-180, 180), 2, random(-180, 180)) 
loop
}
}


actor gasParticle
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.1
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        TGAS H 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        TGAS IJKL 2 A_FadeOut(0.05)
        loop
    }
}

actor gasParticle1
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.2
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0
        TGAS H 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        TGAS IJKL 2  A_FadeOut(0.05)
        loop
    }
}

actor gasParticle2
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.4
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        TGAS H 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        TGAS IJKL 2 A_FadeOut(0.05)
        loop
    }
}

actor gasParticle3
{
    Radius 0
    Height 0
    
    Speed 4
    
    +NOINTERACTION
    +CLIENTSIDEONLY
    +FORCEXYBILLBOARD
    
    Scale 0.6
    Renderstyle Add
    Alpha 0.7
    
    States
    {
      Spawn:
        RSMK A 0 
        TGAS H 1 A_Jump(255, "SpawnLoop")
        wait
        
      SpawnLoop:
        TGAS IJKL 2 A_FadeOut(0.05)
        loop
    }
}


ACTOR mushroomcloud
{
	Game Doom
	scale 0.1
	RenderStyle Translucent
	Alpha 0.6
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
tnt1 a 20
nuk2 a 1 bright A_SetScale(0.2, 0.1)
nuk2 a 1 bright A_SetScale(0.3, 0.1)
nuk2 a 1 bright A_SetScale(0.4, 0.2)
nuk2 a 1 bright A_SetScale(0.5, 0.2)
nuk2 a 1 bright A_SetScale(0.6, 0.3)
nuk2 a 1 bright A_SetScale(0.7, 0.3)
nuk2 a 1 bright A_SetScale(0.8, 0.4)
nuk2 a 1 bright A_SetScale(0.9, 0.4)
nuk2 a 2 bright A_SetScale(1, 0.5)
nuk2 a 2 bright A_SetScale(1, 0.6)
nuk2 a 2 bright A_SetScale(1, 0.7)
nuk2 a 2 bright A_SetScale(1, 0.8)
nuk2 a 2 bright A_SetScale(1, 0.9)
nuk2 a 2 bright A_SetScale(1, 1)
nuk2 a 3 bright A_SetScale(1.2, 1.2)
nuk2 a 3 bright A_SetScale(1.3, 1.3)
nuk2 a 3 bright A_SetScale(1.4, 1.4)
nuk2 a 3 bright A_SetScale(1.5, 1.5)
nuk2 a 3 bright A_SetScale(1.6, 1.6)
nuk2 a 3 bright A_SetScale(1.7, 1.7)
nuk2 a 3 bright A_SetScale(1.8, 1.8)
nuk2 a 3 bright A_SetTranslucent(0.4, 0)
nuk2 a 3 bright A_SetScale(1.9, 1.9)
nuk2 a 3 bright A_SetTranslucent(0.3, 0)
nuk2 a 3 bright A_SetScale(2, 2)
nuk2 a 2 bright A_SetTranslucent(0.2, 0)
nuk2 a 1 bright A_SetScale(2.1, 2.1)
nuk2 a 2 bright A_SetTranslucent(0.1, 0)
nuk2 a 1 bright A_SetScale(2.2, 2.2)
nuk2 a 2 bright A_SetTranslucent(0.09, 0)
nuk2 a 1 bright A_SetScale(2.3, 2.3)
nuk2 a 2 bright A_SetTranslucent(0.08, 0)
nuk2 a 1 bright A_SetScale(2.4, 2.4)
nuk2 a 2 bright A_SetTranslucent(0.07, 0)
nuk2 a 1 bright A_SetScale(2.5, 2.5)
nuk2 a 2 bright A_SetTranslucent(0.06, 0)
	Stop
}
}


ACTOR mushroomcloud2
{
	Game Doom
	scale 4.0
	RenderStyle Translucent
	Alpha 0.4
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 2 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 A 0 A_SpawnDebris("firework",0)
		tnt1 a 15 A_SpawnItemEx("Poisonfog2")
		tnt1 a 15 A_SpawnItemEx("Poisonfog2", 70)
		tnt1 a 15 A_SpawnItemEx("Poisonfog2", -80)
		tnt1 a 15 A_SpawnItemEx("Poisonfog2", 0, 100)
		tnt1 a 15 A_SpawnItemEx("Poisonfog2", 0, -90)
	Stop
	}
}

ACTOR mushroomcloudold
{
	Game Doom
	scale 5.0
	RenderStyle Translucent
	Alpha 0.6
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		tnt1 a 40
		BUUM ABCDEFGHIJ 20 bright
	Stop
	}
}

ACTOR mushroomcloud2old
{
	Game Doom
	scale 4.0
	RenderStyle Translucent
	Alpha 0.4
	+ NOGRAVITY
	+DONTSPLASH
	States
	{
	Spawn:
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 2 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM A 0 A_SpawnDebris("firework",0)
		MNSM B 15 A_SpawnItemEx("Poisonfog2")
		MNSM C 15 A_SpawnItemEx("Poisonfog2", 70)
		MNSM D 15 A_SpawnItemEx("Poisonfog2", -80)
		MNSM E 15 A_SpawnItemEx("Poisonfog2", 0, 100)
		MNSM F 15 A_SpawnItemEx("Poisonfog2", 0, -90)
		MNSM GHIJKLMNOPQ 15
	Stop
	}
}

ACTOR fireworkSmoke
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Speed 0
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.4
   States
   {
   Spawn:
	TNT1 a 0 A_SpawnItemex("splosionspark",0,0,0,0)
      MISL BCDBCD 4 bright
      Stop
   }
}

actor firework
{
speed 80
health 1
radius 8
height 8
mass 5
PROJECTILE
- NOGRAVITY
gravity 0.3
bouncefactor 0.4
+CORPSE
+NOTELEPORT
states
	{
	Spawn:
	 MISL B 4 bright A_Spawnitem("fireworksmoke",0,0,0)
	 MISL C 4 bright A_Spawnitem("fireworksmoke",0,0,0)
	 MISL D 4 bright A_Spawnitem("fireworksmoke",0,0,0)
         loop
	Death:
	 MISL BCD 4 bright
	 stop
	}
}



ACTOR BulletSpawnR
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("bulletCasing",30,0,135+random(-15,15),2,35+random(-15,15))
		Stop
	}
}

ACTOR BulletSpawnR2
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("BulletCasing",-6,8,random(-80,-100),2,random(30,60))
		Stop
	}
}

ACTOR BulletSpawnL : BulletSpawnR
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("BulletCasing",-6,-8,random(80,100),2,random(30,60))
		Stop
	}
}

ACTOR shellSpawnL : BulletSpawnR
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("shellCasing",-6,-8,random(80,100),2,random(30,60))
		Stop
	}
}

ACTOR rifleSpawnL : BulletSpawnR
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("rifleCasing",-6,-8,random(80,100),2,random(30,60))
		Stop
	}
}

//////////////////////devastator////////////////////////////

actor DevastatorSide : Ammo
{
 Inventory.MaxAmount 1
 +IGNORESKILL
}

actor Devastator : Weapon
{
    Weapon.AmmoUse 1
    Weapon.AmmoGive 4 
    Weapon.AmmoType "rocketammo2"
    //Obituary "%k devastated %o."
    Inventory.Pickupmessage "You got the Devastator!"
    Weapon.UpSound "items/rlauncher"
    Scale 1
    +Weapon.Ammo_Optional 
    +NOALERT
    States
    {
      Spawn:
        DDEV W -1
        Stop
      Ready:
	DDEV A 1 A_WeaponReady
        DDEV A 0 A_JumpIfTargetInLOS(2)
	DDEV A 0 A_SetCrosshair(2)
	Loop
	DDEV A 0 A_SetCrosshair(8)
	Loop
      Deselect:
     tnt1 a 0 A_Lower
        DDEV A 1 A_Lower
        loop
      Select:
	DDEV A 0 A_SetCrosshair(2)
     tnt1 a 0 A_Raise
        DDEV A 1 A_Raise
        Loop
      Fire:
        TNT1 A 0 A_JumpIfNoAmmo("Click")
      FireRight:
        TNT1 A 0 A_JumpIfInventory("DevastatorSide", 1, "FireLeft")
        TNT1 A 0 A_AlertMonsters
        TNT1 A 0 A_GiveInventory("DevastatorSide", 1)
        DDEV B 1 
        TNT1 A 0 A_GunFlash
        TNT1 A 0 A_PlaySound("WEAPONS/freezeSHOT")
        TNT1 A 0 A_PlayWeaponSound("duke/rocketfire")
        TNT1 A 0 A_FireCustomMissile("DevastatorRocket",Random(6, -6), 1, 5, 0, 0, Random(4, -4))
	TNT1 A 0 A_FireCustomMissile("devSmokeshot", Random(1, -1), 0, 8, 0, 0, Random(1, -1))
 	TNT1 A 0 A_Recoil(0.6)
        DDEV C 2 
        DDEV D 1 A_FireCustomMissile("DevastatorRocket",Random(6, -6), 1, 5, 0, 0, Random(4, -4))
 	TNT1 A 0 A_Recoil(0.6)
        TNT1 A 0 A_PlaySound("WEAPONS/freezeSHOT")
        TNT1 A 0 A_PlayWeaponSound("duke/rocketfire")
        DDEV D 1  
        DDEV CBA 2  
        TNT1 A 0 A_ReFire
        Goto Ready
      FireLeft:
        TNT1 A 0 A_AlertMonsters
        DDEV E 1 
        TNT1 A 0 A_GunFlash
        TNT1 A 0 A_PlaySound("WEAPONS/freezeSHOT")
        TNT1 A 0 A_PlayWeaponSound("duke/rocketfire")
        TNT1 A 0 A_FireCustomMissile("DevastatorRocket",Random(6, -6), 1, -5, 0, 0, Random(3, -3))
	TNT1 A 0 A_FireCustomMissile("devSmokeshot", Random(1, -1), 0, -8, 0, 0, Random(1, -1))
 	TNT1 A 0 A_Recoil(0.6)
        DDEV F 2 
        DDEV G 1 
        TNT1 A 0 A_PlaySound("WEAPONS/freezeSHOT")
        TNT1 A 0 A_PlayWeaponSound("duke/rocketfire")
        TNT1 A 0 A_FireCustomMissile("DevastatorRocket",Random(6, -6), 1, -5, 0, 0, Random(3, -3))
 	TNT1 A 0 A_Recoil(0.6)
        DDEV G 1 
        DDEV FEA 2  
        TNT1 A 0 A_TakeInventory("DevastatorSide", 1)
        TNT1 A 0 A_ReFire
        Goto Ready
 Click:
   DDEV A 0 A_PlaySound("weapons/dry")
   DDEV AB 2
   DDEV A 0 A_PlaySound("weapons/dry")
   DDEV AE 2
   Goto Ready
      Flash:
        TNT1 A 1 A_Light1
        TNT1 A 0
        TNT1 A 1 A_Light0
        stop
  AltFire:
		KICK A 0 A_GunFlash		
		KICK A 1 A_PlayWeaponSound("weapons/wiff")
		KICK BC 1
		FOOT D 1 A_CustomPunch(3,0,0,"FistPuff")
		FOOT E 1 
		FOOT D 2
		KICK CBA 2
		KICK A 0 A_ReFire	
		Goto Ready
  AltFlash:
    DDEV A 15 A_Light0
    Goto LightDone
}
}



ACTOR DevastatorRocket
{
	Radius 3
	Height 2
        Speed 30
	Damage (38)
	Projectile
        +SEEKERMISSILE
	+RANDOMIZE
	-grenadeTRAIL
	+EXTREMEDEATH
	Damagetype Blasted
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "%k devastated %o."
    Scale 0.5
    +FORCERADIUSDMG
    Decal DoomImpScorch
	States
	{
	Spawn:
		MISL A 1 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		tnt1 a 0 A_SpawnItem("rocketsmoker2",0,0,0,0)
	Seek:
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright  A_SpawnItem("rocketsmoker",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright  A_SpawnItem("rocketsmoker2",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright  A_SpawnItem("rocketsmoker",0,0,0,0)
		MISL A 0 A_SeekerMissile(8,8)	MISL A 1 Bright  A_SpawnItem("rocketsmoker2",0,0,0,0)
		Goto Seek
	Death:
	tnt1 a 0 A_SpawnItem("shockwave3",0,0,0,0)
	TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
		MISL f 6 Bright A_Explode(48, 64)
	MISL f 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL f 0 A_quake(1,12,0,300,"NO/SOUND")
      		MISL f 0 A_SpawnItem("devadustcloud",0,0,0,0)
	MISL e 0 A_SpawnItem("BITZGenerator",0,0,0,0)
        misl ghijklm 3 Bright
		Stop
	}
}

ACTOR DevastatorRocket2
{
	Radius 3
	Height 2
        Speed 30
	Damage (38)
	Projectile
	+RANDOMIZE
	-grenadeTRAIL
	+EXTREMEDEATH
	Damagetype Blasted
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "%k devastated %o."
    Scale 0.5
    +FORCERADIUSDMG
    Decal DoomImpScorch
	States
	{
	Spawn:
		MISL A 1 Bright A_SpawnItem("rocketsmoker",0,0,0,0)
		tnt1 a 0 A_SpawnItem("rocketsmoker2",0,0,0,0)
		Loop
	Death:
	tnt1 a 0 A_SpawnItem("shockwave3",0,0,0,0)
	TNT1 a 0 A_SpawnItem("splosionspark",0,0,0,0)
		MISL f 6 Bright A_Explode(48, 64)
	MISL f 0 A_SpawnItem("BITZGenerator",0,0,0,0)
		MISL f 0 A_quake(1,12,0,300,"NO/SOUND")
      		MISL f 0 A_SpawnItem("devadustcloud",0,0,0,0)
	MISL e 0 A_SpawnItem("BITZGenerator",0,0,0,0)
        misl ghijklm 3 Bright
		Stop
	}
}

ACTOR Devadustcloud : dustcloud
{
	scale 0.5 
}

ACTOR devSmokeshot
{
   Radius 1
   Height 1
   PROJECTILE
   +NOCLIP
   Scale 0.2
   vspeed 1
   Speed 4
   RENDERSTYLE TRANSLUCENT
   ALPHA 0.75
   +DONTSPLASH
   States
   {
   Spawn:
      TNT1 A 5
      MISL BCD 2 bright
      Stop
   }
}
