actor BFG_9000 : Weapon
{
  Game Doom
  Height 20
  Weapon.SelectionOrder 2800
  Weapon.AmmoUse 40
  Weapon.AmmoGive 9999
  Weapon.AmmoType "Cell"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "got the BFG9000, FUCK YEAH!"
  States
  {
  Ready:
	AK47 A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade")
	AK47 A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife")
    BFGG A 1 A_WeaponReady
    loop
  Deselect: 
    BFGG A 0 A_Lower
    BFGG A 0 A_Lower
    BFGG A 1 A_Lower
    loop
  Select:
    BFGG A 0 A_Raise
    BFGG A 0 A_Raise
    BFGG A 1 A_Raise
    loop
  Fire:
    BFGG A 0 A_jumpifinventory("Doubletap",1,"Fire_doubletap")
    BFGG A 20 A_BFGSound
    BFGG B 10 A_GunFlash
    BFGG B 10 A_FireBFG
    BFGG B 20 A_ReFire
    goto Ready
  Fire_doubletap:
    BFGG A 10 A_BFGSound
    BFGG B 5 A_GunFlash
    BFGG B 5 A_FireBFG
    BFGG B 10 A_ReFire
    goto Ready
  Flash:
    BFGG A 0 A_jumpifinventory("Doubletap",1,"Flash_doubletap")
    BFGF A 11 bright A_Light1
    BFGF B 6 bright A_Light2
    Goto LightDone
  Flash_doubletap:
    BFGF A 6 bright A_Light1
    BFGF B 3 bright A_Light2
    Goto LightDone
  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
  Spawn:
    BFUG A -1
    stop
  }
}

ACTOR BFGBall2 replaces BFGBall
{
  Game Doom
  SpawnID 128
  Radius 13
  Height 8
  Speed 25
  Damage (random(100000,100000))
  Projectile
  +RANDOMIZE
  RenderStyle Add
  Alpha 0.75
  DeathSound "weapons/bfgx"
  Obituary "$OB_MPBFG_BOOM"
  States
  {
  Spawn:
    BFS1 AB 4 Bright
    Loop
  Death:
    BFE1 AB 8 Bright
    BFE1 C 8 Bright A_BFGSpray
    BFE1 DEF 8 Bright
    Stop
  }
}

actor PAPBFG_9000 : Weapon
{
  Game Doom
  Height 20
  Weapon.SelectionOrder 2800
  Weapon.AmmoUse 20
  Weapon.AmmoGive 9999
  Weapon.AmmoType "Cell"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "got the BFG9000, FUCK YEAH!"
  States
  {
  Ready:
	AK47 A 0 A_JumpIfInventory("thrownade",1,"ThrowGrenade")
	AK47 A 0 A_JumpIfInventory("Kinfeammo",1,"UseKnife")
    BFGG A 1 A_WeaponReady
    loop
  Deselect: 
    BFGG A 0 A_Lower
    BFGG A 0 A_Lower
    BFGG A 1 A_Lower
    loop
  Select:
    BFGG A 0 A_Raise
    BFGG A 0 A_Raise
    BFGG A 1 A_Raise
    loop
  Fire:
    BFGG A 0 A_jumpifinventory("Doubletap",1,"Fire_doubletap")
    BFGG A 20 A_BFGSound
    BFGG B 10 A_GunFlash
    BFGG B 10 A_FireBFG
    BFGG B 20 A_ReFire
    goto Ready
  Fire_doubletap:
    BFGG A 10 A_BFGSound
    BFGG B 5 A_GunFlash
    BFGG B 5 A_FireBFG
    BFGG B 10 A_ReFire
    goto Ready
  Flash:
    BFGG A 0 A_jumpifinventory("Doubletap",1,"Flash_doubletap")
    BFGF A 11 bright A_Light1
    BFGF B 6 bright A_Light2
    Goto LightDone
  Flash_doubletap:
    BFGF A 6 bright A_Light1
    BFGF B 3 bright A_Light2
    Goto LightDone
  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
  Spawn:
    BFUG A -1
    stop
  }
}