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:
	BG2G A 0
    BG2G A 0 A_PlaySound ("10KIDLE", 1)
    BG2G A 3 A_WeaponReady
	BG2G A 0 A_GunFlash
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		BG2G A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G B 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		BG2G A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G C 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		BG2G A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		
		    BG2G D 3 A_WeaponReady
	BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		BG2G A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		BG2G A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
    Loop
  Deselect:
    BG2G E 1 A_Lower
    Loop
  Select:
	BG2G A 0 A_Giveinventory("GoSpecial",1)
  	BG2G A 0 A_Takeinventory("FistsSelected",1)
	BG2G A 0 A_Takeinventory("SawSelected",1)
	BG2G A 0 A_Takeinventory("ShotgunSelected",1)
	BG2G A 0 A_Takeinventory("SSGSelected",1)
	BG2G A 0 A_Takeinventory("MinigunSelected",1)
	BG2G A 0 A_Takeinventory("PlasmaGunSelected",1)
	BG2G A 0 A_Takeinventory("RocketLauncherSelected",1)
    BG2G A 0 A_Takeinventory("GrenadeLauncherSelected",1)
	BG2G A 0 A_Takeinventory("BFGSelected",1)
	BG2G A 0 A_Giveinventory("BFG10kSelected",1)
	BG2G A 0 A_Takeinventory("RailGunSelected",1)
	BG2G A 0 A_Takeinventory("SubMachineGunSelected",1)
	BG2G A 0 A_Takeinventory("RevenantLauncherSelected",1)
	BG2G A 0 A_Takeinventory("LostSoulSelected",1)
	BG2G A 0 A_Takeinventory("FlameCannonSelected",1)
	BG2G A 0 A_Takeinventory("HasBarrel",1)
 SelectAnimation:	
    BG2G E 1 A_Raise
	BG2G EEEEEEEE 0 A_Raise
	BG2G A 0 A_GunFlash
	BG2G A 0 A_PlaySound("BFGREADY", 3)
	BG2G E 1
    Goto Ready
  Fire:
    BG2G E 20 A_PlaySound("10KSTART", 4)
    BG2G FGHIJ 2 BRIGHT
    Goto Hold
  Hold:
    BG2G K 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	BG2G A 0 A_PlaySound("10KFIRE", 1)
    BG2G L 1 BRIGHT A_FireCustomMissile("BFG10K_Ball",0,1,0,0)
    BG2G M 1 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
	BG2G FGHIJ 1 BRIGHT
    BG2G N 0 A_ReFire
    BG2G O 35 A_PlaySound("10KSTOP", 4)
    Goto Ready
	
	
 CheckSprint:
		BG2G A 1 A_WeaponReady(WRF_NOFIRE)
		BG2G A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		BG2G A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		BG2G A 1 A_WeaponReady(WRF_NOFIRE)
		BG2G A 0 A_Takeinventory("Zoomed",1)
		BG2G A 0 A_Takeinventory("ADSmode",1)
		BG2G A 0 A_ZoomFactor(1.0)
		BG2G A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		BG2G A 0 offset(-9,32) 
		BG2G A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		BG2G 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.
		BG2G A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		BG2G A 0 offset(-9,32) A_GiveInventory("UsedStamina", 16)
		BG2G 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)
		BG2G A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		BG2G A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        BG2G A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		BG2G A 0 offset(-9,32) A_GiveInventory("UsedStamina", 16)
		BG2G 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)
		BG2G A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		BG2G 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.
		BG2G A 0 A_PlaySound("Tired", 2)
		BG2G A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		BG2G A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		BG2G A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		BG2G A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		BG2G A 0 A_TakeInventory("UsedStamina", 2)
		BG2G A 5 A_WeaponReady
		Goto Ready
	StopSprint:
		BG2G A 1
		BG2G 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
		BG2G A 0 A_TakeInventory("TossGrenade", 1)
		BG2G A 1 A_Lower
		Loop	
  }
}


ACTOR BFG10K_Ball: FastProjectile
{
	Radius 10
	Height 2
	Speed 200
	Damage (random(300, 300))
    DamageType Extreme
	Decal "SmallerScorch"
	Projectile
	+RANDOMIZE
	+SPECTRAL
	//+SHOOTABLE
	-NOBLOCKMAP
	+NOBLOOD
	+NORADIUSDMG
	+THRUSPECIES
	+MTHRUSPECIES
	+FORCEXYBILLBOARD
	Species "Marines"
	Scale 1.0
	renderstyle ADD
	alpha 0.99
	Scale 0.4
	DeathSound "weapons/plasmax"
    SeeSound "None"
	Obituary "$OB_MPPLASMARIFLE"
	States
	{

	Spawn:
        BFS1 AB 1 BRIGHT A_CustomMissile ("BFGDeathParticleFast", 0, 0, random (0, 360), 2, random (0, 360))
		Loop

	Death:
		BFE1 A 0 Bright
		BFE1 A 3 Bright
		BG2G A 0 A_SpawnItem("RocketExplosion")
		BG2G A 0 Radius_Quake(3, 2, 0, 12, 0)
		BG2G 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
		BG2G 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
}