Actor AutoRifle : DoomWeapon
{
	Game Doom
	+FLOORCLIP
	Weapon.SelectionOrder 800
	Weapon.SlotNumber 4
	Weapon.AmmoUse 1
	Weapon.AmmoGive 30
	Weapon.AmmoType "Clip"
	Inventory.Icon "VRSAA0"
	Inventory.PickupMessage "You got the Auto Rifle"
	Tag "Auto Rifle"
	Decal BulletChip
	States
	{
	Spawn:
		VRSA E -1
		Stop
	Ready:
		VRSA A 1 A_WeaponReady
		Loop
	Deselect:
		VRSA A 1 A_Lower
		Loop
	Select:
		VRSA A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_Jump(96,"Fire2")
		TNT1 A 0 A_Jump(96,"Fire3")
		VRSA B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		VRSA B 1 BRIGHT A_FireBullets(1, 1, 1, 7, "BulletPuff")
		VRSA B 1 BRIGHT 
		VRSA A 2 BRIGHT 
		VRSA A 0 A_ReFire
		VRSA A 2 A_Light0
		Goto Ready
	Fire2:
		VRSA B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		VRSA C 1 BRIGHT A_FireBullets(1, 1, 1, 7, "BulletPuff")
		VRSA C 1 BRIGHT 
		VRSA A 2 BRIGHT
		VRSA A 0 A_ReFire
		VRSA A 2 A_Light0
		Goto Ready
	Fire3:
		VRSA B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		VRSA D 1 BRIGHT A_FireBullets(1, 1, 1, 7, "BulletPuff")
		VRSA D 1 BRIGHT
		VRSA A 2 BRIGHT
		VRSA A 0 A_ReFire
		VRSA A 2 A_Light0
		Goto Ready
	}
}

Actor EnhancedAutoRifle : DoomWeapon
{
	Game Doom
	+FLOORCLIP
	Weapon.SelectionOrder 100
	Weapon.SlotNumber 4
	Weapon.AmmoUse 1
	Weapon.AmmoGive 30
	Weapon.AmmoType "Clip"
	Inventory.Icon "ERSAA0"
	Inventory.PickupMessage "You got the Enhanced Auto Rifle"
	Tag "Enhanced Auto Rifle"
	Decal "EnhancedBulletChip"
	States
	{
	Spawn:
		VRSA E -1
		Stop
	Ready:
		EVRS A 1 A_WeaponReady
		Loop
	Deselect:
		EVRS A 1 A_Lower
		Loop
	Select:
		EVRS A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_Jump(96,"Fire2")
		TNT1 A 0 A_Jump(96,"Fire3")
		EVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		EVRS B 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 9, "EnhancedPuff")
		EVRS B 1 BRIGHT 
		EVRS A 1 BRIGHT 
		EVRS A 0 A_ReFire
		EVRS A 1 A_Light0
		Goto Ready
	Fire2:
		EVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		EVRS C 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 9, "EnhancedPuff")
		EVRS C 1 BRIGHT 
		EVRS A 1 BRIGHT
		EVRS A 0 A_ReFire
		EVRS A 1 A_Light0
		Goto Ready
	Fire3:
		EVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		EVRS D 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 9, "EnhancedPuff")
		EVRS D 1 BRIGHT
		EVRS A 1 BRIGHT
		EVRS A 0 A_ReFire
		EVRS A 1 A_Light0
		Goto Ready
	}
}

Actor PerfectedAutoRifle : DoomWeapon
{
	Game Doom
	+FLOORCLIP
	Weapon.SelectionOrder 50
	Weapon.SlotNumber 4
	Weapon.AmmoUse 1
	Weapon.AmmoGive 30
	Weapon.AmmoType "Clip"
	Inventory.Icon "PRSAA0"
	Inventory.PickupMessage "You got thePerfected Auto Rifle"
	Tag "Perfected Auto Rifle"
	Decal "PerfectedBulletChip"
	States
	{
	Spawn:
		VRSA E -1
		Stop
	Ready:
		PVRS A 1 A_WeaponReady
		Loop
	Deselect:
		PVRS A 1 A_Lower
		Loop
	Select:
		PVRS A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_Jump(96,"Fire2")
		TNT1 A 0 A_Jump(96,"Fire3")
		PVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		PVRS B 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 11, "PerfectedPuff")
		PVRS B 1 BRIGHT 
		PVRS A 1 BRIGHT 
		PVRS A 0 A_ReFire
		PVRS A 1 A_Light0
		Goto Ready
	Fire2:
		PVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		PVRS C 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 11, "PerfectedPuff")
		PVRS C 1 BRIGHT 
		PVRS A 1 BRIGHT
		PVRS A 0 A_ReFire
		PVRS A 1 A_Light0
		Goto Ready
	Fire3:
		PVRS B 0 A_PlaySound("PULSFIRE", CHAN_WEAPON, 0.7)
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		PVRS D 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 11, "PerfectedPuff")
		PVRS D 1 BRIGHT
		PVRS A 1 BRIGHT
		PVRS A 0 A_ReFire
		PVRS A 1 A_Light0
		Goto Ready
	}
}

Actor GrenadeLauncher : Weapon
{
  Radius 20
  Height 16
  Weapon.SelectionOrder 1000
  Weapon.SlotNumber 5
  +WEAPON.NOAUTOFIRE
  +WEAPON.NOAUTOAIM
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  Tag "Grenade Launcher"
  Weapon.Kickback 100
  Inventory.PickupMessage "You got the grenade launcher!"
  Obituary "%o caught %k's grenade."
  States
  {
  Spawn:
    GLAU A -1
    Stop
  Ready:
    GRLG A 1 A_WeaponReady
    Loop
  Deselect:
    GRLG A 1 A_Lower
    Loop
  Select: 
    GRLG A 1 A_Raise
    Loop
  Fire: 
    GRLG B 8 A_GunFlash
	TNT1 A 0 A_FireCustomMissile("STGrenade", 4, 1, 0, 0, 0, 6.328125)
    GRLG B 12 A_FireCustomMissile("STGrenade", -4, 1, 0, 0, 0, 6.328125)
    GRLG B 0 A_ReFire
    Goto Ready 
  Flash: 
    GRLF A 3 Bright A_Light1
    GRLF B 4 Bright
    GRLF C 4 Bright A_Light2
    GRLF D 4 Bright A_Light2
    Goto LightDone
  }
}

Actor STGrenade
{
  Radius 6
  Height 4
  Speed 25
  Damage 20
  Gravity 0.25
  Projectile
  -NoGravity
  +DoomBounce
  +DehExplosion
  +GrenadeTrail
  +ExplodeOnDeath
  SeeSound "Weapons/GrBnce"
  DeathSound "Weapons/GrenLX"
  States
  {
  Spawn:
    SGRN A 0 Bright
    SGRN A 0 Bright A_StopSound
    SGRN A 0 Bright A_PlaySound("Weapons/GrenLF")
    SGRN A 1 Bright 
    Goto Spawn+3
  Death:
    MISL B 0 Bright A_ChangeFlag("NoGravity", 1)
    MISL B 8 Bright A_Explode
    MISL C 6 Bright
    MISL D 4 Bright
    stop
  }
}

ACTOR AutoShotgun : Weapon
{
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the Auto Shotgun!"
   Obituary "%o is full of lead, courtesy of %k's Auto Shotgun."
   Weapon.AmmoType "Shell"
   Weapon.AmmoGive 8
   Weapon.AmmoUse 1
   Weapon.Kickback 30
   Weapon.SelectionOrder 600
   Weapon.SlotNumber 3
   AttackSound "JACKFIR"
   Tag "Auto Shotgun"
   Decal BulletChip
   States
   {
   Spawn:
      ASHG X -1
      Loop
   Ready:
      ASHG A 1 A_WeaponReady
      Loop
   Deselect:
      ASHG A 1 A_Lower
      ASHG A 0 A_Lower
      Loop
   Select:
      ASHG A 1 A_Raise
      ASHG A 0 A_Raise
      Loop
   Fire:
      ASHF A 0 A_GunFlash
      ASHF A 0 A_FireBullets(8, 0, 7, 5, "BulletPuff")
      ASHF AB 1 BRIGHT
      ASHG BCDCBA 1
      ASHG A 1 A_ReFire
      Goto Ready
   Flash:
       TNT1 A 1 A_Light2
       TNT1 A 1 A_Light1
       TNT1 A 0 A_Light0
       Stop
   }
}

ACTOR EnhancedAutoShotgun : Weapon
{
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the Enhanced Auto Shotgun!"
   Obituary "%o is full of lead, courtesy of %k's Enhanced Auto Shotgun."
   Weapon.AmmoType "Shell"
   Weapon.AmmoGive 8
   Weapon.AmmoUse 1
   Weapon.Kickback 30
   Weapon.SlotNumber 3
   Weapon.SelectionOrder 300
   AttackSound "JACKFIR"
   Tag "Enhanced Auto Shotgun"
   Decal EnhancedBulletChip
   States
   {
   Spawn:
      EASG X -1
      Loop
   Ready:
      EASG A 1 A_WeaponReady
      Loop
   Deselect:
      EASG A 1 A_Lower
      EASG A 0 A_Lower
      Loop
   Select:
      EASG A 1 A_Raise
      EASG A 0 A_Raise
      Loop
   Fire:
      EASF A 0 A_GunFlash
	  TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 2.5)
      EASF A 0 A_FireBullets(6, 0, 7, 7, "EnhancedPuff")
      EASF AB 1 BRIGHT
      EASG CDCBA 1
      EASG A 1 A_ReFire
      Goto Ready
   Flash:
       TNT1 A 1 A_Light2
       TNT1 A 1 A_Light1
       TNT1 A 0 A_Light0
       Stop
   }
}

ACTOR PerfectedAutoShotgun : Weapon
{
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the Perfected Auto Shotgun!"
   Obituary "%o is full of lead, courtesy of %k's Perfected Auto Shotgun."
   Weapon.AmmoType "Shell"
   Weapon.AmmoGive 8
   Weapon.AmmoUse 1
   Weapon.Kickback 30
   Weapon.SlotNumber 3
   Weapon.SelectionOrder 100
   AttackSound "JACKFIR"
   Tag "Perfected Auto Shotgun"
   Decal PerfectedBulletChip
   States
   {
   Spawn:
      EASG X -1
      Loop
   Ready:
      PASG A 1 A_WeaponReady
      Loop
   Deselect:
      PASG A 1 A_Lower
      PASG A 0 A_Lower
      Loop
   Select:
      PASG A 1 A_Raise
      PASG A 0 A_Raise
      Loop
   Fire:
      PASF A 0 A_GunFlash
	  TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 2.5)
      PASF A 0 A_FireBullets(5, 0, 7, 8, "PerfectedPuff")
      PASF AB 1 BRIGHT
      PASG CDCB 1
      PASG A 1 A_ReFire
      Goto Ready
   Flash:
       TNT1 A 1 A_Light2
       TNT1 A 1 A_Light1
       TNT1 A 0 A_Light0
       Stop
   }
}

Actor EnhancedGrenadeLauncher : Weapon
{
  Radius 20
  Height 16
  Weapon.SelectionOrder 100
  Weapon.SlotNumber 5
  +WEAPON.NOAUTOFIRE
  +WEAPON.NOAUTOAIM
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  Tag "Enhanced Grenade Launcher"
  Weapon.Kickback 100
  Inventory.PickupMessage "You got the enhanced grenade launcher!"
  Obituary "%o caught %k's grenade."
  States
  {
  Spawn:
    GLAU A -1
    Stop
  Ready:
    ERLG A 1 A_WeaponReady
    Loop
  Deselect:
    ERLG A 1 A_Lower
    Loop
  Select: 
    ERLG A 1 A_Raise
    Loop
  Fire: 
    ERLG B 8 A_GunFlash
	TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 1.0)
	TNT1 A 0 A_FireCustomMissile("EnhancedGrenade", 4, 1, 0, 0, 0, 6.328125)
	TNT1 A 0 A_FireCustomMissile("EnhancedGrenade", 0, 1, 0, 0, 0, 6.328125)
    ERLG B 12 A_FireCustomMissile("EnhancedGrenade", -4, 1, 0, 0, 0, 6.328125)
    ERLG B 0 A_ReFire
    Goto Ready 
  Flash: 
    ERLF A 3 Bright A_Light1
    ERLF B 4 Bright
    ERLF C 4 Bright A_Light2
    ERLF D 4 Bright A_Light2
    Goto LightDone
  }
}

Actor EnhancedGrenade
{
  Radius 8
  Height 8
  Speed 25
  Damage 25 //20 > 25
  Gravity 0.25
  Projectile
  -NoGravity
  +DoomBounce
  +DehExplosion
  +GrenadeTrail
  +ExplodeOnDeath
  SeeSound "Weapons/GrBnce"
  DeathSound "Weapons/GrenLX"
  States
  {
  Spawn:
    EGRN A 0 Bright
    EGRN A 0 Bright A_StopSound
    EGRN A 0 Bright A_PlaySound("Weapons/GrenLF")
    EGRN A 1 Bright 
    Goto Spawn+3
  Death:
    EISL B 0 Bright A_ChangeFlag("NoGravity", 1)
    EISL B 8 Bright A_Explode
    EISL C 6 Bright
    EISL D 4 Bright
    stop
  }
}


Actor PerfectedGrenadeLauncher : Weapon
{
  Radius 20
  Height 16
  Weapon.SelectionOrder 100
  Weapon.SlotNumber 5
  +WEAPON.NOAUTOFIRE
  +WEAPON.NOAUTOAIM
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  Tag "Perfected Grenade Launcher"
  Weapon.Kickback 100
  Inventory.PickupMessage "You got the perfected grenade launcher!"
  Obituary "%o caught %k's grenade."
  States
  {
  Spawn:
    GLAU A -1
    Stop
  Ready:
    PRGG A 1 A_WeaponReady
    Loop
  Deselect:
   PRGG A 1 A_Lower
    Loop
  Select: 
    PRGG A 1 A_Raise
    Loop
  Fire: 
    PRGG B 8 A_GunFlash
	TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 1.0)
	TNT1 A 0 A_FireCustomMissile("PerfectedGrenade", 4, 1, 0, 0, 0, 6.328125)
	TNT1 A 0 A_FireCustomMissile("PerfectedGrenade", 2, 0, 0, 0, 0, 6.328125)
	TNT1 A 0 A_FireCustomMissile("PerfectedGrenade", 0, 1, 0, 0, 0, 6.328125)
	TNT1 A 0 A_FireCustomMissile("PerfectedGrenade", -2, 0, 0, 0, 0, 6.328125)
    PRGG B 12 A_FireCustomMissile("PerfectedGrenade", -4, 1, 0, 0, 0, 6.328125)
    PRGG B 0 A_ReFire
    Goto Ready 
  Flash: 
    PRGF A 3 Bright A_Light1
    PRGF B 4 Bright
    PRGF C 4 Bright A_Light2
    PRGF D 4 Bright A_Light2
    Goto LightDone
  }
}

Actor PerfectedGrenade
{
  Radius 8
  Height 8
  Speed 25
  Damage 30 //25 > 30
  Gravity 0.25
  Projectile
  -NoGravity
  +DoomBounce
  +DehExplosion
  +GrenadeTrail
  +ExplodeOnDeath
  SeeSound "Weapons/GrBnce"
  DeathSound "Weapons/GrenLX"
  States
  {
  Spawn:
    EGRN A 0 Bright
    EGRN A 0 Bright A_StopSound
    EGRN A 0 Bright A_PlaySound("Weapons/GrenLF")
    EGRN A 1 Bright 
    Goto Spawn+3
  Death:
    EISL B 0 Bright A_ChangeFlag("NoGravity", 1)
    EISL B 8 Bright A_Explode
    EISL C 6 Bright
    EISL D 4 Bright
    stop
  }
}

ACTOR EnhancedPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Translucent
	Alpha 0.5
	VSpeed 1
	Mass 5
	Decal "EnhancedBulletChip"
	States
	{
	Spawn:
		EPUF A 4 Bright A_PlaySound("EnhancedSound")
		EPUF B 4
	Melee:
		EPUF CD 4
		Stop
	}
}

ACTOR PerfectedPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Translucent
	Alpha 0.5
	VSpeed 1
	Mass 5
	Decal "PerfectedBulletChip"
	States
	{
	Spawn:
		PPUF A 4 Bright A_PlaySound("EnhancedSound")
		PPUF B 4
	Melee:
		PPUF CD 4
		Stop
	}
}

ACTOR EnhancedChainsaw : Weapon
{
	Weapon.Kickback 0
	Weapon.SlotNumber 1
	Weapon.SelectionOrder 1200
	Weapon.UpSound "weapons/sawup"
	Weapon.ReadySound "weapons/sawidle"
	Inventory.PickupMessage "Enhanced Chainsaw"
	Obituary "$OB_MPCHAINSAW"
	Tag "Enhanced Chainsaw"
	+WEAPON.MELEEWEAPON		
	Decal "EnhancedBulletChip"
	States
	{
	Ready:
		ESAW CD 4 A_WeaponReady
		Loop
	Deselect:
		ESAW C 1 A_Lower
		Loop
	Select:
		ESAW C 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.8)
		ESAW A 4 A_Saw("weapons/sawfull","weapons/sawhit",8,"EnhancedPuff")
		TNT1 A 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.8)
		ESAW B 4 A_Saw("weapons/sawfull","weapons/sawhit",8,"EnhancedPuff")
		ESAW B 0 A_ReFire
		Goto Ready
	Spawn:
		CSAW A -1
		Stop
	}
}

ACTOR EnhancedPistol : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 900
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "Clip"
	Obituary "$OB_MPPISTOL"
	Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
	Tag "Enhanced Pistol"
	Weapon.SlotNumber 2
	Decal "EnhancedBulletChip"
	States
	{
	Ready:
		EPSG A 1 A_WeaponReady
		Loop
	Deselect:
		EPSG A 1 A_Lower
		Loop
	Select:
		EPSG A 1 A_Raise
		Loop
	Fire:
		EPSG A 3
		TNT1 A 0 A_ZoomFactor(0.99, ZOOM_NOSCALETURNING)
		TNT1 A 0 A_FireBullets (3.5, 0, 1, 20, "EnhancedPuff")
		TNT1 A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 0.8)
		EPSG B 1 A_GunFlash
		TNT1 A 0 A_ZoomFactor(1.00, ZOOM_NOSCALETURNING)
		EPSG B 3 A_GunFlash
		EPSG C 3
		EPSG B 2 A_ReFire
		Goto Ready
	Flash:
		EPSF A 4 Bright A_Light1
		Goto LightDone
		EPSF A 4 Bright A_Light1
		Goto LightDone
 	Spawn:
		PIST A -1
		Stop
	}
}

ACTOR PerfectedPistol : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 100
	Weapon.AmmoUse 10
	Weapon.AmmoGive 50
	Weapon.AmmoType "Clip"
	Obituary "$OB_MPPISTOL"
	Inventory.Pickupmessage "Got the perfected pistol!"
	Tag "Perfected Pistol"
	Weapon.SlotNumber 2
	Decal "PerfectedBulletChip"
	States
	{
	Ready:
		AUMP A 1 A_WeaponReady
		Loop
	Deselect:
		AUMP A 1 A_Lower
		Loop
	Select:
		AUMP A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_PlaySound("AUMPFIR", CHAN_WEAPON, 0.8)
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 0.9)
		TNT1 A 0 A_ZoomFactor(0.98, ZOOM_NOSCALETURNING)
		AUMF A 1 BRIGHT A_FireBullets (1, 0, 1, 60, "PerfectedPuff")
		TNT1 A 0 A_ZoomFactor(1.00, ZOOM_NOSCALETURNING)
		AUMF B 1 BRIGHT
		TNT1 A 0 A_SetPitch(Pitch -2.0)
		AUMP BC 1
		AUMP DE 3
		AUMP FG 2
		AUMP A 9
		AUMP A 0 A_Refire
		Goto Ready
 	Spawn:
		AUPK A -1
		Stop
	}
}

ACTOR EnhancedShotgun : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 600
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell"
	Inventory.PickupMessage "$GOTSHOTGUN"
	Obituary "$OB_MPSHOTGUN"
	Tag "Enhanced Shotgun"
	Weapon.SlotNumber 3
	Decal "EnhancedBulletChip"
	States
	{
	Ready:
		EHTG A 1 A_WeaponReady
		Loop
	Deselect:
		EHTG A 1 A_Lower
		Loop
	Select:
		EHTG A 1 A_Raise
		Loop
	Fire:
		EHTG A 2
		EHTG A 0 A_FireBullets (4.5, 0, 9, 10, "EnhancedPuff")
		EHTG A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON)
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		EHTG A 7 A_GunFlash
		EHTG BC 4
		EHTG D 3
		EHTG CB 4
		EHTG A 2
		EHTG A 6 A_ReFire
		Goto Ready
	Flash:
		EHTF A 4 Bright A_Light1
		EHTF B 3 Bright A_Light2
		Goto LightDone
	Spawn:
		SHOT A -1
		Stop
	}
}	

ACTOR PerfectedShotgun : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 100
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell"
	Inventory.PickupMessage "Got the perfected shotgun!"
	Tag "PerfectedShotgun"
	Weapon.SlotNumber 3
	Decal "PerfectedBulletChip"
	States
	{
	Ready:
		PSHT A 1 A_WeaponReady
		Loop
	Deselect:
		PSHT A 1 A_Lower
		Loop
	Select:
		PSHT A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_FireBullets (4, 0, 9, 12, "PerfectedPuff")
		TNT1 A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON)
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		PSHF A 2 
		PSHF B 2 A_GunFlash
		PSHT BCDEFGHIJKLCBA 2
		PSHT A 6 A_ReFire
		Goto Ready
	Spawn:
		PTGR A -1
		Stop
	}
}

ACTOR EnhancedChaingun : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 250
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.SlotNumber 4
	Weapon.AmmoType "Clip"
	Obituary "$OB_MPCHAINGUN"
	Tag "Enhanced Chaingun"
	Decal "EnhancedBulletChip"
	States
	{
	Ready:
		EHGG A 1 A_WeaponReady
		Loop
	Deselect:
		EHGG A 1 A_Lower
		Loop
	Select:
		EHGG A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_PlaySound("weapons/chngun", CHAN_WEAPON)
		EHGG A 1 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		EHGG A 0 A_GunFlash
		EHGG A 2 A_FireBullets(4.5, 0, 1, 7, "EnhancedPuff")
		TNT1 A 0 A_PlaySound("weapons/chngun", CHAN_WEAPON)
		EHGG B 1 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		EHGG B 2 A_FireBullets(4.5, 0, 1, 7, "EnhancedPuff")
		EHGG B 0 A_ReFire
		Goto Ready
	Flash:
		EHGF A 3 Bright A_Light1
		EHGF B 3 Bright A_Light2
		Goto LightDone
	Spawn:
		MGUN A -1
		Stop
	}
}

ACTOR PerfectedChaingun : Weapon
{
	Weapon.AmmoType "Clip"
	Weapon.SelectionOrder 90
	Weapon.SlotNumber 4
	Weapon.AmmoGive 20
	Weapon.AmmoUse 1
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "Picked up a perfected chaingun!"
	Obituary "%o was shredded by %k's minigun."
	AttackSound "weapons/minigunfire"
	Tag "Perfected Chaingun"
	Decal "PerfectedBulletChip"
	States
	{
	Spawn:
		MNGN A -1
		Loop
	Ready:
		MNGG A 1 A_WeaponReady
		Loop
	Deselect:
		MNGG A 1 A_Lower
		Loop
	Select:
		MNGG A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_PlaySound("weapons/minigunfire", CHAN_WEAPON,0.7)
		MNGG A 1 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		MNGG A 0 A_GunFlash
		MNGG A 1 A_FireBullets(3, 3, 1, 9, "PerfectedPuff")
		TNT1 A 0 A_PlaySound("weapons/minigunfire", CHAN_WEAPON,0.7)
		MNGG B 0 A_PlaySound("Enhanced", CHAN_AUTO, 0.7)
		MNGG B 1 A_FireBullets(3, 3, 1, 9, "PerfectedPuff")
		MNGG B 1 A_ReFire
		MNGG B 1
		MNGG A 2
		Goto Ready
	Flash:
		MNGF A 2 BRIGHT A_Light1
		MNGF B 2 BRIGHT A_Light0
		Stop
	}
}



ACTOR EnhancedSuperShotgun : DoomWeapon 
{
	Game Doom
	Weapon.SelectionOrder 500
	Weapon.AmmoUse 2
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell"
	Weapon.SlotNumber 3
	Tag "Enhanced Super Shotgun"
	Decal "EnhancedBulletChip"
	States
	{
	Ready:
		ESSG A 1 A_WeaponReady
		Loop
	Deselect:
		ESSG A 1 A_Lower
		Loop
	Select:
		ESSG A 1 A_Raise
		Loop
	Fire:
		ESSG A 2
		ESSG A 0 A_FireBullets (7.5, 4.5, 20, 7, "EnhancedPuff")
		ESSG A 0 A_PlaySound ("weapons/sshotf", CHAN_WEAPON)
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		ESSG A 6 A_GunFlash
		ESSG B 6
		ESSG C 6 A_CheckReload
		ESSG D 6 A_OpenShotgun2
		ESSG E 6
		ESSG F 6 A_LoadShotgun2
		ESSG G 5
		ESSG H 5 A_CloseShotgun2
		ESSG A 5 A_ReFire
		Goto Ready
	Flash:
		EHT2 I 3 Bright A_Light1
		EHT2 J 3 Bright A_Light2
		Goto LightDone
	Spawn:
		SGN2 A -1
		Stop
	}
}
actor PerfectedSuperShotgun : Weapon
{
	Tag "Perfected Super Shotgun"
	Obituary "%o was obliterated by %k's Perfected Super Shotgun!"
	Radius 20
	Height 16
	Inventory.pickupmessage "You got the Perfected Super Shotgun!"
	Weapon.SlotNumber 3
	Weapon.SlotPriority 0
	weapon.SelectionOrder 100
	weapon.kickback 350
	Weapon.AmmoType1 "Shell"
	Weapon.AmmoGive 8
	Weapon.AmmoUse1 4
	+Weapon.NoAlert
	Decal "PerfectedBulletChip"
	states
	{
	Ready:
		SHT4 A 1 A_WeaponReady
		loop
	Deselect: 
		SHT4 A 1 A_Lower
		loop
	Select:
		SHT4 A 1 A_Raise
		loop
	Fire: //Quad-Shot (Need at least 4 shells & not fired Primary Shot yet)
		TNT1 A 0 Bright A_AlertMonsters
		TNT1 A 0 A_ZoomFactor(0.97, ZOOM_NOSCALETURNING)
		QSSF B 0 Bright A_FireBullets (5, 5, 40, 9, "PerfectedPuff")
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		SHT4 A 2 Bright A_PlaySound("QuadShotgun/QuadFire",Chan_Weapon)
		TNT1 A 0 A_ZoomFactor(1.00, ZOOM_NOSCALETURNING)
		SHT4 B 6 Bright
		SHT4 ABCDEFGHI 2
		SHT4 J 2 A_PlaySound("QuadShotgun/Open",6)
		SHT4 KL 3
		TNT1 A 0 A_PlaySound("QuadShotgun/ReloadAll",Chan_Auto)
		SHT4 MNO 3
		SHT4 P 3 A_PlaySound("QuadShotgun/Close",6)
		SHT4 QRS 3
		Goto Ready
	Flash:
		SH4X I 2 Bright A_Light1
		SH4X J 2 Bright A_Light2
		TNT1 A 0 A_Light0
		Goto LightDone
	Spawn:
		QSGW A -1
		stop
	}
}

ACTOR EnhancedRocketLauncher : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 1500
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "RocketAmmo"
	+WEAPON.NOAUTOFIRE
	Scale 1.1
	Weapon.SlotNumber 5
	Tag "Enhanced Rocket Launcher"
	States
	{
	Ready:
		EISG A 1 A_WeaponReady
		Loop
	Deselect:
		EISG A 1 A_Lower
		Loop
	Select:
		EISG A 1 A_Raise
		Loop
	Fire:
		EISG B 6 A_GunFlash
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		EISG B 10 A_FireCustomMissile ("EnhancedRocket")
		EISG B 0 A_ReFire
		Goto Ready
	Flash:
		EISF A 3 Bright A_Light1
		EISF B 3 Bright
		EISF CD 3 Bright A_Light2
		Goto LightDone
	Spawn:
		LAUN A -1
		Stop
	}
}

ACTOR EnhancedRocket
{
	Game Doom
	Radius 11
	Height 8
	Speed 25
	Damage 25
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	+ROCKETTRAIL
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	Decal "BigScorch"
	States
	{
	Spawn:
		EISL A 1 Bright
		Loop
	Death:
		TNT1 A 0 A_PlaySound("Enhanced")
		EISL B 8 Bright A_Explode(125, 152, XF_HURTSOURCE)
		EISL C 6 Bright
		EISL D 4 Bright
		Stop
	}
}

ACTOR PerfectedRocketLauncher : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 100
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "RocketAmmo"
	+WEAPON.NOAUTOFIRE
	Scale 1.1
	Weapon.SlotNumber 5
	Tag "Perfected Rocket Launcher"
	States
	{
	Ready:
		PRLG A 1 A_WeaponReady
		Loop
	Deselect:
		PRLG A 1 A_Lower
		Loop
	Select:
		PRLG A 1 A_Raise
		Loop
	Fire:
		PRLG B 4 A_GunFlash
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		PRLG B 8 A_FireCustomMissile ("PerfectedRocket")
		PRLG B 0 A_ReFire
		Goto Ready
	Flash:
		PRLF A 2 Bright A_Light1
		PRLF B 2 Bright
		PRLF CD 2 Bright A_Light2
		Goto LightDone
	Spawn:
		LAUN A -1
		Stop
	}
}

ACTOR PerfectedRocket
{
	Game Doom
	Radius 11
	Height 8
	Speed 30
	Damage 30
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	+ROCKETTRAIL
	Scale 1.1
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	Decal "BigScorch"
	States
	{
	Spawn:
		PRLL A 1 Bright
		Loop
	Death:
		TNT1 A 0 A_PlaySound("Enhanced")
		TNT1 A 0 A_SetScale(1.2,1.2)
		PRLL B 8 Bright A_Explode(152, 186, XF_HURTSOURCE)
		PRLL C 6 Bright
		PRLL D 4 Bright
		Stop
	}
}

ACTOR EnhancedPlasmaRifle : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 50
	Weapon.SlotNumber 6
	Weapon.AmmoUse 1
	Weapon.AmmoGive 50
	Weapon.AmmoType "Cell"
	Tag "Enhanced Plasma Rifle"
	States
	{
	Ready:
		EESG A 1 A_WeaponReady
		Loop
	Deselect:
		EESG A 1 A_Lower
		Loop
	Select:
		EESG A 1 A_Raise
		Loop
	Fire:
		EESF A 2
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		TNT1 A 0 A_PlaySound ("EnhancedPlasma/Fire", CHAN_AUTO, 1)
 		EESF B 1 BRIGHT A_FireCustomMissile("EnhancedPlasmaBall",0,1,0,0,0,0)
		EESG B 15 BRIGHT A_ReFire
		Goto Ready
	Spawn:
		ENPL A -1
		Stop
	}
}

ACTOR EnhancedPlasmaBall
{
	Game Doom
	Radius 13
	Height 8
	Speed 32
	Damage 7
	Scale 0.7
	Projectile
	+RANDOMIZE
	RenderStyle Add
	//DamageType Fire
	Decal EnhancedPlasmaScorch
	Alpha 0.75
	//SeeSound "EnhancedPlasma/Fire"
	DeathSound "weapons/plasmax"
	States
	{
	Spawn:
		EPLS AB 6 Bright
		Loop
	Death:
		//TNT1 A 0 A_PlaySound("EnhancedSound")
		EPLF ABCDE 4 Bright
		Stop
	}
}

ACTOR PerfectedPlasmaRifle : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 10
	Weapon.SlotNumber 6
	Weapon.AmmoUse 1
	Weapon.AmmoGive 50
	Weapon.AmmoType "Cell"
	Tag "Perfected Plasma Rifle"
	States
	{
	Ready:
		PPRF B 1 A_WeaponReady
		Loop
	Deselect:
		PPRF B 1 A_Lower
		Loop
	Select:
		PPRF B 1 A_Raise
		Loop
	Fire:
		PPRF C 1
		TNT1 A 0 A_PlaySound ("Enhanced", CHAN_AUTO, 1)
		TNT1 A 0 A_PlaySound ("EnhancedPlasma/Fire", CHAN_AUTO, 1)
		TNT1 A 0 BRIGHT A_FireCustomMissile("PerfectedPlasmaBall",5,0,0,0,0,0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("PerfectedPlasmaBall",-5,1,0,0,0,0)
 		PPRF D 1 BRIGHT A_FireCustomMissile("PerfectedPlasmaBall",0,1,0,0,0,0)
		PPRF B 1
		Goto Ready
	Spawn:
		PPRF A -1
		Stop
	}
}

ACTOR PerfectedPlasmaBall
{
	Radius 13
	Height 8
	Speed 25
	Damage 7
	Projectile
	+RANDOMIZE
	RenderStyle Add
	//DamageType Fire
	Decal PerfectedPlasmaScorch
	Alpha 0.75
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	States
	{
	Spawn:
		PPLS AB 6 Bright
		Loop
	Death:
		PPLE ABCDE 4 Bright
		Stop
	}
}

ACTOR EnhancedBFG9000 : DoomWeapon
{
	Game Doom
	Height 20
	Weapon.SelectionOrder 1000
	Weapon.AmmoUse 40
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell"
	Weapon.SlotNumber 7
	+WEAPON.NOAUTOFIRE
	Decal EnhancedBFGLightning
	Tag "Enhanced BFG9000"
	States
	{
	Ready:
		EFGG A 1 A_WeaponReady
		Loop
	Deselect:
		EFGG A 1 A_Lower
		Loop
	Select:
		EFGG A 1 A_Raise
		Loop
	Fire:
		EFGG A 20 A_BFGsound
		EFGG B 10 A_GunFlash
		TNT1 A 0 A_PlaySound("Enhanced")
		EFGG B 10 A_FireCustomMissile("EnhancedBFGBall")
		EFGG B 20 A_ReFire
		Goto Ready
	Flash:
		EFGF A 11 Bright A_Light1
		EFGF B 6 Bright A_Light2
		Goto LightDone
	Spawn:
		EFUG A -1
		Stop
	OldFire:
		EFGG A 10 A_BFGsound
		EFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
		EFGG B 0 A_Light0
		EFGG B 20 A_ReFire
		Goto Ready
	}
}


ACTOR EnhancedBFGBall
{
	Game Doom
	Radius 13
	Height 8
	Speed 30
	Damage 125
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	Decal EnhancedBFGLightning
	DeathSound "weapons/bfgx"
	Obituary "$OB_MPBFG_BOOM"
	States
	{
	Spawn:
		EFS1 AB 4 Bright
		Loop
	Death:
		EBE1 AB 8 Bright A_PlaySound("Enhanced")
		EBE1 C 8 Bright A_BFGSpray("EnhancedBFGExtra",50,20)
		EBE1 DEF 8 Bright
		Stop
	}
}
		
ACTOR EnhancedBFGExtra
{
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.75
	DamageType "BFGSplash"
	States
	{
	Spawn:
		EFE2 ABCD 8 Bright
		Stop
	}
}

ACTOR PerfectedBFG9000 : DoomWeapon
{
	Game Doom
	Height 20
	Weapon.SelectionOrder 500
	Weapon.AmmoUse 40
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell"
	Weapon.SlotNumber 7
	+WEAPON.NOAUTOFIRE
	Decal PerfectedBulletChip
	Tag "Perfected BFG9000"
	States
	{
	Ready:
		PFGG A 1 A_WeaponReady
		Loop
	Deselect:
		PFGG A 1 A_Lower
		Loop
	Select:
		PFGG A 1 A_Raise
		Loop
	Fire:
		PFGG A 20 A_BFGsound
		PFGG B 10 A_GunFlash
		TNT1 A 0 A_PlaySound("Enhanced")
		TNT1 A 0 A_RailAttack(25,0,0,"Purple","White",0,0,"PerfectedPuff",0)
		TNT1 A 0 A_RailAttack(25,0,0,"Purple","White",0,0,"PerfectedPuff",-10)
		TNT1 A 0 A_RailAttack(25,0,0,"Purple","White",0,0,"PerfectedPuff",-20)
		TNT1 A 0 A_RailAttack(25,0,0,"Purple","White",0,0,"PerfectedPuff",10)
		TNT1 A 0 A_RailAttack(25,0,0,"Purple","White",0,0,"PerfectedPuff",20)
		PFGG B 10 A_FireCustomMissile("PerfectedBFGBall")
		PFGG B 20 A_ReFire
		Goto Ready
	Flash:
		PFGF A 11 Bright A_Light1
		PFGF B 6 Bright A_Light2
		Goto LightDone
	Spawn:
		EFUG A -1
		Stop
	}
}


ACTOR PerfectedBFGBall
{
	Game Doom
	Radius 13
	Height 8
	Speed 30
	Damage 150
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	Decal PerfectedBFGLightning
	DeathSound "weapons/bfgx"
	Obituary "$OB_MPBFG_BOOM"
	States
	{
	Spawn:
		PFS1 AB 4 Bright
		Loop
	Death:
		PFE1 AB 8 Bright A_PlaySound("Enhanced")
		PFE1 C 8 Bright A_BFGSpray("PerfectedBFGExtra",60,25)
		PFE1 DEF 8 Bright
		Stop
	}
}
		
ACTOR PerfectedBFGExtra
{
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.75
	DamageType "BFGSplash"
	States
	{
	Spawn:
		PFE2 ABCD 8 Bright
		Stop
	}
}

Actor BFG10K : DoomWeapon
{
  Radius 20
  Height 20
  Weapon.Selectionorder 2800
  Weapon.AmmoUse 5
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Weapon.Kickback 100
  Inventory.Pickupmessage "You got the BFG10000!  Hell, yes!"
  Obituary "%o was blasted by %k's BFG10K"
  +Weapon.NoAutoFire
  Decal BFGLightning
  States
  {
  Spawn:
    BFG2 A -1
    Stop
  Ready:
    BG2G A 0 A_PlaySound ("Weapons/BFG10KIdle")
    BG2G A 1 A_WeaponReady
    BG2G A 1 A_WeaponReady
    BG2G A 1 A_WeaponReady
    BG2G B 1 A_WeaponReady
    BG2G B 1 A_WeaponReady
    BG2G B 1 A_WeaponReady
    BG2G C 1 A_WeaponReady
    BG2G C 1 A_WeaponReady
    BG2G C 1 A_WeaponReady
    BG2G D 1 A_WeaponReady
    BG2G D 1 A_WeaponReady
    BG2G D 1 A_WeaponReady
    Loop
  Deselect:
    BG2G E 1 A_Lower
    Loop
  Select:
    BG2G E 1 A_Raise
    Loop
  Fire:
    BG2G E 20 A_PlaySound("Weapons/BFG10KF")
    BG2G F 4
    BG2G G 1
    BG2G H 1
    BG2G I 1
    BG2G J 1
    Goto Hold
  Hold:
    BG2G K 2 A_GunFlash
    BG2G L 2 A_FireBullets(0, 0, 1, 0, "BFG10kShot")
    BG2G M 2
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("Weapons/BFG10KCool")
    Goto Ready
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 3 bright
    Goto LightDone
  }
}


Actor BFG10kShot
{
  Radius 11
  Height 8
  Speed 20
  Damage 160
  DamageType BFG10K
  +NoBlockMap
  +NoGravity
  +ActivateImpact
  +ActivatePCross
  +NoTeleport
  +PuffOnActors
  +PuffGetsOwner
  +ForceRadiusDmg
  Renderstyle Add
  Alpha 0.75
  SeeSound "Weapons/BFG10KX"
  AttackSound "Weapons/BFG10KX"
  States
  {
  Spawn:
    BFE1 A 0 Bright
    BFE1 A 3 Bright A_Explode(160, 128, 1)
    BFE1 BCDEF 3 Bright
    Stop
  }
}

/*
Actor PlasmaRepeater : Weapon
{
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the plasma repeater!"
  Obituary "%o was disintegrated by %k's repeater."
  Weapon.SlotNumber 6
  Weapon.AmmoType1 "Cell"
  Weapon.AmmoGive 40
  Weapon.AmmoUse 2
  Weapon.SelectionOrder 1000
  +Weapon.Explosive
  +Weapon.NoAlert
  AttackSound "Weapons/RepeaterFire"
  States
  {
  Spawn:
    REPG I -1
    Loop
  Ready:
    REPG A 0 A_TakeInventory("RepeaterSpin", 3)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG A 1 A_WeaponReady
    Loop
  Deselect:
    REPG A 0 A_TakeInventory("RepeaterSpin", 3)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG A 1 A_Lower
    Loop
  Select:
    REPG A 1 A_Raise
    Loop
  Fire:
    //===========Spinup
    REPG A 0 A_PlaySound("Weapons/RepeaterSpinup")
    REPG A 0 A_JumpIfInventory("RepeaterSpin", 1, 8)
    REPG A 0 A_JumpIfInventory("RepeaterB", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterC", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterD", 1, 4)
    REPG A 4
    REPG B 4
    REPG C 4
    REPG D 4 A_GiveInventory("RepeaterFrameA")
    REPG A 0 A_JumpIfInventory("RepeaterSpin", 2, 9)
    REPG A 0 A_GiveInventory("RepeaterSpin", 1)
    REPG A 0 A_JumpIfInventory("RepeaterB", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterC", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterD", 1, 4)
    REPG A 3
    REPG B 3
    REPG C 3
    REPG D 3 A_GiveInventory("RepeaterFrameA")
    REPG A 0 A_JumpIfInventory("RepeaterB", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterC", 1, 4)
    REPG A 0 A_JumpIfInventory("RepeaterD", 1, 4)
    REPG A 2
    REPG B 2
    REPG C 2
    REPG D 2 A_GiveInventory("RepeaterFrameA")
    //===========Fire
    REPG A 0 A_Refire
    //===========Spindown
    REPG A 0 A_PlaySound("Weapons/RepeaterSpindown")
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DD 1 A_WeaponReady(11)
    REPG A 0 A_TakeInventory("RepeaterSpin", 1)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDD 1 A_WeaponReady(11)
    REPG A 0 A_TakeInventory("RepeaterSpin", 1)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDDD 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDDD 1 A_WeaponReady(11)
    Goto Ready
  Hold:
    //===========Fire
    REPG E 0 Bright A_Gunflash
    REPG E 0 Bright A_AlertMonsters
    REPG E 2 Bright A_FireBullets(5, 4, 2, 6, "RepPuff", 1, 10240)
    REPG F 2 Bright
    REPG G 0 Bright A_AlertMonsters
    REPG G 2 Bright A_FireBullets(5, 4, 2, 6, "RepPuff", 1, 10240)
    REPG H 2 Bright
    REPG A 0 A_Refire
    //===========Spindown
    REPG A 0 A_PlaySound("Weapons/RepeaterSpindown")
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DD 1 A_WeaponReady(11)
    REPG A 0 A_TakeInventory("RepeaterSpin", 1)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDD 1 A_WeaponReady(11)
    REPG A 0 A_TakeInventory("RepeaterSpin", 1)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDDD 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameA", 1)
    REPG AAAA 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameB", 1)
    REPG BBBB 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameC", 1)
    REPG CCCC 1 A_WeaponReady(11)
    REPG A 0 A_GiveInventory("RepeaterFrameD", 1)
    REPG DDDD 1 A_WeaponReady(11)
    Goto Ready
  Flash:
    TNT1 A 2 A_Light2
    TNT1 A 2 A_Light1
    TNT1 A 0 A_Light0
    Stop
  }
}

Actor RepeaterSpin : Inventory { Inventory.MaxAmount 2 }
Actor RepeaterB : Inventory { Inventory.MaxAmount 1 }
Actor RepeaterC : Inventory { Inventory.MaxAmount 1 }
Actor RepeaterD : Inventory { Inventory.MaxAmount 1 }

Actor RepeaterFrameA : CustomInventory
{
  Inventory.MaxAmount 0
  +Inventory.AutoActivate
  States
  {
  Spawn:
    TNT1 A 1
    Stop
  Use:
    TNT1 A 0 A_TakeInventory("RepeaterB", 1)
    TNT1 A 0 A_TakeInventory("RepeaterC", 1)
    TNT1 A 0 A_TakeInventory("RepeaterD", 1)
    Stop
  }
}

Actor RepeaterFrameB : RepeaterFrameA
{
  States
  {
  Spawn:
    TNT1 A 1
    Stop
  Use:
    TNT1 A 0 A_GiveInventory("RepeaterB", 1)
    TNT1 A 0 A_TakeInventory("RepeaterC", 1)
    TNT1 A 0 A_TakeInventory("RepeaterD", 1)
    Stop
  }
}

Actor RepeaterFrameC : RepeaterFrameA
{
  States
  {
  Spawn:
    TNT1 A 1
    Stop
  Use:
    TNT1 A 0 A_TakeInventory("RepeaterB", 1)
    TNT1 A 0 A_GiveInventory("RepeaterC", 1)
    TNT1 A 0 A_TakeInventory("RepeaterD", 1)
    Stop
  }
}

Actor RepeaterFrameD : RepeaterFrameA
{
  States
  {
  Spawn:
    TNT1 A 1
    Stop
  Use:
    TNT1 A 0 A_TakeInventory("RepeaterB", 1)
    TNT1 A 0 A_TakeInventory("RepeaterC", 1)
    TNT1 A 0 A_GiveInventory("RepeaterD", 1)
    Stop
  }
}

Actor RepPuff
{
  Radius 3
  Height 3
  RenderStyle Add
  Alpha 0.75
  +AlwaysPuff
  +PuffOnActors
  +NoGravity
  +NoBlockMap
  +PuffGetsOwner
  +ForceRadiusDmg
  +BloodlessImpact
  Decal MummyScorch
  States
  {
  Spawn:
    RPUF A 1 Bright
    RPUF A 0 Bright A_PlaySound("Weapons/RepeaterHit")
    RPUF A 2 Bright A_Explode(7, 44, 0)
    RPUF BCDEFG 3 Bright
    Stop
  }
}
 
Actor Railgun : DoomWeapon
{
  Radius 20
  Height 16
  Weapon.Selectionorder 300
  Weapon.SlotNumber 6
  Weapon.AmmoUse 5
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.Pickupmessage "You got the railgun!"
  Obituary "%o was railed by %k."
  Decal RailScorch
  States
  {
  Ready:
    RLGG A 1 A_WeaponReady
    Loop
  Deselect:
    RLGG A 1 A_Lower
    Loop
  Select:
    RLGG A 1 A_Raise
    Loop
  Fire:
    RLGG A 4
    RLGG B 4
    RLGG C 4
	RLGG D 4 A_FireRailgun
	RLGG E 14
	RLGG E 4 A_ReFire
	Goto Ready
  Reloaded:
    RLGG A 6
    RLGG M 0 A_ReFire
    Goto Ready
  Flash:
    TNT1 A 5 bright A_Light1
    TNT1 A 5 bright A_Light2
    TNT1 A 0 bright A_Light0
    Goto LightDone
  Spawn:
    RAIL A -1
    Stop
  }
}
*/

/*
ACTOR Stiletto : DoomWeapon
{
	Weapon.SelectionOrder 1900
	Weapon.SlotNumber 8
	Weapon.AmmoUse 2
	Weapon.AmmoGive 30
	Weapon.AmmoType "Cell"
	Inventory.Pickupmessage "Got the Stiletto!"
	Tag "Stiletto"
	States
	{
	Ready:
		CPIS A 1 A_WeaponReady
		Loop
	Deselect:
		CPIS A 1 A_Lower
		Loop
	Select:
		CPIS A 1 A_Raise
		Loop
	Fire:
		CPIS A 4
		CPIS B 0 A_GunFlash
		CPIS B 4 A_FireCustomMissile("StilettoPlasma",0,1,0,0,0,0)
		CPIS C 4
		CPIS B 4 A_ReFire
		Goto Ready
	Flash:
		CPIF A 5 Bright A_Light1
		Goto LightDone
		CPIF A 5 Bright A_Light1
		Goto LightDone
 	Spawn:
		LPST A -1
		Stop
	}
}

ACTOR StilettoPlasma
{
	Game Doom
	Radius 13
	Height 8
	Speed 40
	Damage 7
	+RIPPER
	+RANDOMIZE
	Projectile
	RenderStyle Add
	Alpha 0.70
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	States
	{
	Spawn:
		PLS2 AB 4 Bright
		Loop
	Death:
		PL2D ABCDE 4 Bright
		Stop
	}
}

Actor AK47 : Weapon
{
	Obituary "%o was begded down by %k's AK47."
	AttackSound "Weapons/AK47FIR"
	Inventory.PickupMessage "You got the AK47!"
	Weapon.SlotNumber 4
	Weapon.Kickback 100
	Weapon.AmmoType "Clip"
	Weapon.SelectionOrder 1500
	Weapon.AmmoUse 2
	Weapon.AmmoGive 40
	Decal "BulletChip"
	States
	{
	Ready:
		AK47 A 1 A_WeaponReady
		Loop
	Deselect:
		AK47 A 1 A_Lower
		Loop
	Select:
		AK47 A 1 A_Raise
		Loop
	Fire:
		AK4F A 1 bright A_FireBullets (2,2,1,9,"BulletPuff")
		AK47 A 2 
		AK4F B 1 bright A_FireBullets (2,2,1,9,"BulletPuff")
		AK47 B 2 
		AK47 B 0 A_ReFire
		Goto Ready
	Flash:
		TNT1 A 2 bright
		Stop
	Spawn:
		AK4I A -1
		Stop
	}
}

Actor EnhancedAK47 : Weapon
{
	Obituary "%o was begded down by %k's Enhanced AK47."
	AttackSound "Weapons/AK47FIR"
	Inventory.PickupMessage "You got the Enhanced AK47!"
	Weapon.SlotNumber 4
	Weapon.Kickback 100
	Weapon.AmmoType "Clip"
	Weapon.AmmoUse 2
	Weapon.AmmoGive 40
	Decal "BulletChip"
	Tag "Enhanced AK47"
	Weapon.SelectionOrder 1000
	States
	{
	Ready:
		EK47 A 1 A_WeaponReady
		Loop
	Deselect:
		EK47 A 1 A_Lower
		Loop
	Select:
		EK47 A 1 A_Raise
		Loop
	Fire:
		EK4F A 1 bright A_FireBullets (2,2,1,12,"BulletPuff")
		EK47 A 2 
		EK4F B 1 bright A_FireBullets (2,2,1,12,"BulletPuff")
		EK47 B 2 
		EK47 B 0 A_ReFire
		Goto Ready
	Flash:
		TNT1 A 2 bright
		Stop
	Spawn:
		EK4I A -1
		Stop
	}
}


//Redefining base weapons
ACTOR NewFist : Fist replaces Fist
{
	States
	{
	Deselect:
		TNT1 A 0 A_TakeInventory("HoldingFist")
		PUNG A 1 A_Lower
		Loop
	Select:
		TNT1 A 0 A_GiveInventory("HoldingFist")
		PUNG A 1 A_Raise
		Loop
	}
}

ACTOR NewPistol : Pistol replaces Pistol 5010
{
	States
	{
	Deselect:
		TNT1 A 0 A_TakeInventory("HoldingPistol")
		PISG A 1 A_Lower
		Loop
	Select:
		TNT1 A 0 A_GiveInventory("HoldingPistol")
		PISG A 1 A_Raise
		Loop
	}
}
*/