Actor BFG10k : BrutalWeapon
{
  Radius 20
  Height 20
  Weapon.AmmoUse 5
  Weapon.AmmoGive 100
  Weapon.AmmoType "AmmoCell"
  Weapon.Kickback 100
  Weapon.SelectionOrder 3500
  Inventory.Pickupmessage "You got the BFG10000!  HELL YES!"
  Obituary "%o was blasted by %k's BFG10K"
  Decal BFGLightning
  //+WEAPON.CHEATNOTWEAPON
  States
  {
	
  Spawn:
    BFG2 A -1
    Stop
  Ready:
  Ready3:
  SteadY:
	TNT1 A 0
    BG2G A 0 A_PlaySound ("10KIDLE", 1)
    BG2G A 3 A_WeaponReady
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G B 3 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G C 3 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G D 3 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
    Loop
  Deselect:
    BG2G E 1 A_Lower
    Loop
  Select:
	TNT1 A 0 A_Giveinventory("GoSpecial",1)
  	TNT1 A 0 A_Takeinventory("FistsSelected",1)
	TNT1 A 0 A_Takeinventory("SawSelected",1)
	TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
	TNT1 A 0 A_Takeinventory("SSGSelected",1)
	TNT1 A 0 A_Takeinventory("MinigunSelected",1)
	TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
	TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
    TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("BFGSelected",1)
	TNT1 A 0 A_Giveinventory("BFG10kSelected",1)
	TNT1 A 0 A_Takeinventory("RailGunSelected",1)
	TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
	TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
	TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
	TNT1 A 0 A_Takeinventory("HasBarrel",1)
 SelectAnimation:	
    BG2G E 1 A_Raise
	BG2G EEEEEEEE 0 A_Raise
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlaySound("BFGREADY", 3)
	BG2G E 1
    Goto Ready
  Fire:
    BG2G E 20 A_PlaySound("10KSTART", 4)
    BG2G FGHIJ 4 BRIGHT
    Goto Hold
  Hold:
    BG2G K 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	TNT1 A 0 A_PlaySound("10KFIRE", 1)
    BG2G L 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	TNT1 A 0 A_FireBullets(0, 0, 1, 350, "BrutalBFG10kShot", FBF_USEAMMO | FBF_NORANDOM)
	TNT1 A 0 A_RailAttack(0, 0, 0, "none", "green", RGF_FULLBRIGHT, 1, "RailgunPuff2")
	TNT1 A 0 A_SetPitch(-3.0 + pitch)
	TNT1 A 0 A_SetAngle(angle - 2)
    BG2G M 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	BG2G FGHIJ 1 BRIGHT A_SetPitch(0.25 + pitch)
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("10KSTOP", 4)
    Goto Ready
	
	
 CheckSprint:
		BG2G A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		TNT1 A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		BG2G A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		BG2G A 0 offset(-9,32) 
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		PLAY A 0 offset(-9,32) ACS_ExecuteAlways(852, 0, 0, 0, 0)//Makes player faster.
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		TNT1 A 0 offset(-9,32) A_GiveInventory("UsedStamina", 16)
		TNT1 A 0 offset(-9,32)
		BG2G A 0 A_PlaySound ("10KIDLE", 1)
		BG2G A 1 offset(-9,34) A_SetPitch(pitch -0.5)
		BG2G A 1 offset(-6,36) A_SetPitch(pitch -0.5)
		BG2G A 1 offset(-3,38) A_SetPitch(pitch -0.5)
		BG2G B 1 offset(0,38) A_SetPitch(pitch -0.5)
		BG2G B 1 offset(3,36) A_SetPitch(pitch -0.5)
		BG2G B 1 offset(6,34) A_SetPitch(pitch -0.5)
		BG2G C 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 offset(-9,32) A_GiveInventory("UsedStamina", 16)
		TNT1 A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
		BG2G C 1 offset(9,34) A_SetPitch(pitch +0.5)
		BG2G C 1 offset(6,36) A_SetPitch(pitch +0.5)
		BG2G C 1 offset(3,38) A_SetPitch(pitch +0.5)
		BG2G D 1 offset(0,38) A_SetPitch(pitch +0.5)
		BG2G D 1 offset(-3,36) A_SetPitch(pitch +0.5)
		BG2G D 1 offset(-6,34) A_SetPitch(pitch +0.5)
		BG2G D 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		Goto StopSprint
		
	StopSprintTired:
		BG2G A 1
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		TNT1 A 0 A_PlaySound("Tired", 2)
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		Goto Ready
	StopSprint:
		BG2G A 1
		TNT1 A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready
		
	Deselect:
	    TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		BG2G A 1 A_Lower
		Loop	
  }
}


Actor BrutalBFG10kShot
{
  Radius 11
  Height 8
  Speed 20
  
  DamageType "Extreme"
  +NoBlockMap
  +NoGravity
  +ActivateImpact
  +ActivatePCross
  +NoTeleport
  +PuffOnActors
  +PuffGetsOwner
  +EXTREMEDEATH
  +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
	TNT1 A 0 A_SpawnItem("RocketExplosion")
	TNT1 A 0 Radius_Quake(3, 2, 0, 12, 0)
	TNT1 A 0 Bright A_SpawnItem("GreenShockWave",0,0,0)
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleSuperFast", 0, 0, random (0, 360), 2, random (0, 360))
	EXPL AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BFGDeathParticleFast", 0, 0, random (0, 360), 2, random (0, 360))
	    EXPL AAAA 0 A_CustomMissile ("BFGBIGFOG", 0, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAAAAA 0 A_CustomMissile ("GreenExplosionFire", 2, 0, random (0, 360), 2, random (0, 360))
        EXPL AA 0 A_CustomMissile ("BigNeoSmoke", 0, 0, random (0, 360), 2, random (0, 360))

    BFE1 BCDEF 2 Bright
	TNT1 A 0 A_PlaySound("FAREXPL")
	TNT1 AAAA 2 A_CustomMissile ("BigNeoSmoke", 2, 0, random (0, 360), 2, random (0, 360))
    Stop
  }
}




ACTOR GreenExplosionFire
{
	Game Doom
	Radius 1
	Height 1
	Speed 3
	Damage 0 
    +NOBLOCKMAP
    +NOTELEPORT
    +DONTSPLASH
	+MISSILE
	+FORCEXYBILLBOARD
    +CLIENTSIDEONLY
    +NOINTERACTION
	+NOCLIP
	RenderStyle Add
    DamageType Flames
    Scale 2.0
	Alpha 1
	Gravity 0
	States
	{
    Spawn:
        TNT1 A 1
        EXPG ABCDEFG 3 BRIGHT
        Stop
	}
}


ACTOR GreenExplosionFireSmall: GreenExplosionFire
{
    Scale 0.6
}