Actor STBFG10K : Weapon
{
  Radius 20
  Height 20
  Weapon.Selectionorder 2800
  Weapon.AmmoUse 5
  Weapon.AmmoGive 999
  Weapon.AmmoType "BFG10kammo"
  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 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    Loop
  Deselect: 
    BG2G E 0 A_Lower
    BG2G E 0 A_Lower
    BG2G E 1 A_Lower
    loop
  Select:
    BG2G E 0 A_Raise
    BG2G E 0 A_Raise
    BG2G E 1 A_Raise
    loop
  Fire:
    BG2G E 0 A_jumpifinventory("doubletap",1,"Fire_doubletap")
    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 E 0 A_jumpifinventory("doubletap",1,"hold_doubletap")
    BG2G K 2 A_GunFlash
    BG2G L 2 A_FireBullets(0, 0, 1, 0, "STBFG10kShot")
    BG2G M 2
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("Weapons/BFG10KCool")
    Goto Ready
  Fire_doubletap:
    BG2G E 10 A_PlaySound("Weapons/BFG10KF")
    BG2G F 2
    BG2G G 1
    BG2G H 1
    BG2G I 1
    BG2G J 1
    Goto Hold_doubletap
  Hold_doubletap:
    BG2G K 1 A_GunFlash
    BG2G L 1 A_FireBullets(0, 0, 1, 0, "STBFG10kShot")
    BG2G M 1
    BG2G N 0 A_ReFire
    BG2G O 20 A_PlaySound("Weapons/BFG10KCool")
    Goto Ready
  Useknife:
     KNFG A 0 A_jumpifinventory("Machete",1,"UseMachete")
     KNFG ABC 2
	 KNFG C 0 A_CustomPunch (110,1,0,"KnifePuff")
	 KNFG DEF 2
	 KNFG F 0 A_TakeInventory("Kinfeammo")
	 goto ready
  UseMachete:
     MHT4 ABC 2
	 MHT4 C 0 A_CustomPunch (450,1,0,"Machetepuff")
	 MHT4 DEFG 2
	 MHT4 G 0 A_TakeInventory("Kinfeammo")
	 goto ready
  ThrowGrenade:
     HNDG BCD 1
     HNDG E 1 A_PlaySound("weapons/grenadepin")
     HNDG FGHH 1
     HNDG I 1 A_PlaySound("weapons/grenadethr") 
     HNDG J 0 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
     HNDG J 0 A_PlaySound("weapons/grenadethr")
     HNDG JKLMNOPQ 1
     HNDG Q 0 A_TakeInventory("thrownade")
     Goto Ready
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 3 bright
    Goto LightDone
  }
}


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

ACTOR BFG10kammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 300
    inventory.maxamount 300
    ammo.backpackamount 300
    ammo.backpackmaxamount 300
    +IGNORESKILL
    inventory.pickupmessage "Got Shotgun Shells!!"  
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}

Actor PAPSTBFG10K : Weapon
{
  Radius 20
  Height 20
  Weapon.Selectionorder 2800
  Weapon.AmmoUse 3
  Weapon.AmmoGive 999
  Weapon.AmmoType "PAPBFG10kammo"
  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 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G A 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G B 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G C 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    BG2G D 1 A_WeaponReady
    BG2G A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade") 
    BG2G A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife") 
    Loop
    Loop
  Deselect: 
    BG2G E 0 A_Lower
    BG2G E 0 A_Lower
    BG2G E 1 A_Lower
    loop
  Select:
    BG2G E 0 A_Raise
    BG2G E 0 A_Raise
    BG2G E 1 A_Raise
    loop
  Fire:
    BG2G E 0 A_jumpifinventory("doubletap",1,"Fire_doubletap")
    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 E 0 A_jumpifinventory("doubletap",1,"hold_doubletap")
    BG2G K 2 A_GunFlash
    BG2G L 2 A_FireBullets(0, 0, 1, 0, "PAPSTBFG10kShot")
    BG2G M 2
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("Weapons/BFG10KCool")
    Goto Ready
  Fire_doubletap:
    BG2G E 10 A_PlaySound("Weapons/BFG10KF")
    BG2G F 2
    BG2G G 1
    BG2G H 1
    BG2G I 1
    BG2G J 1
    Goto Hold_doubletap
  Hold_doubletap:
    BG2G K 1 A_GunFlash
    BG2G L 1 A_FireBullets(0, 0, 1, 0, "PAPSTBFG10kShot")
    BG2G M 1
    BG2G N 0 A_ReFire
    BG2G O 20 A_PlaySound("Weapons/BFG10KCool")
    Goto Ready
  Useknife:
     KNFG A 0 A_jumpifinventory("Machete",1,"UseMachete")
     KNFG ABC 2
	 KNFG C 0 A_CustomPunch (110,1,0,"KnifePuff")
	 KNFG DEF 2
	 KNFG F 0 A_TakeInventory("Kinfeammo")
	 goto ready
  UseMachete:
     MHT4 ABC 2
	 MHT4 C 0 A_CustomPunch (450,1,0,"Machetepuff")
	 MHT4 DEFG 2
	 MHT4 G 0 A_TakeInventory("Kinfeammo")
	 goto ready
  ThrowGrenade:
     HNDG BCD 1
     HNDG E 1 A_PlaySound("weapons/grenadepin")
     HNDG FGHH 1
     HNDG I 1 A_PlaySound("weapons/grenadethr") 
     HNDG J 0 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
     HNDG J 0 A_PlaySound("weapons/grenadethr")
     HNDG JKLMNOPQ 1
     HNDG Q 0 A_TakeInventory("thrownade")
     Goto Ready
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 3 bright
    Goto LightDone
  }
}


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

ACTOR PAPBFG10kammo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 666
    inventory.maxamount 666
    ammo.backpackamount 666
    ammo.backpackmaxamount 666
    +IGNORESKILL
    inventory.pickupmessage "Got Shotgun Shells!!"  
    States
    {
    Spawn:
      CLIP A -1
      Stop
    }
}