///////////////////////////
//Beast Slam for Charging//
///////////////////////////

actor BeastSlam
{
	+NOBLOCKMAP
	+MISSILE
	Radius 2
	Height 2
	Damagetype ExplosiveImpact
	States   
	{
    Spawn:
		TNT1 A 0
		EXPL A 0 Radius_Quake (6, 50, 0, 22, 0)
		TNT1 A 0 A_Explode(random(26,32),118,0)
		Stop
	}
}

//=========================================================================================================
//
// WereDragon (Beast) (Some code from Bitter Heretic (not much) and Some from Hell Knight/etc. from Schism)
// modified by LordADHD
//=========================================================================================================

ACTOR BrutalBeast replaces Beast
{
    Scale 1.0
    Speed 18
	FastSpeed 22
    Health 500
	Mass 1000 //equal to hell knights
	damagefactor "Crush", 10.0
	damagefactor "GibRemoving", 0.0 PainChance "HangingHook", 0
	PainChance "Kick", 255 PainChance "Leg", 255
	PainChance "ExtremePunches", 255 PainChance "SuperPunch", 255
	PainChance "LowKick", 220
	//PainChance "Head", 150
	PainChance "Explosive", 255
	PainChance 100
	PainChance "Saw", 200
	PainChance "Cut", 255
	PainChance "Minor", 200
	PainChance "Stun", 200
	damagefactor "Fatality", 1.0
	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
	damagefactor "SSG", 1.0	damagefactor "Avoid", 0.0	damagefactor "TeleportRemover", 0.0
	Game Doom
	Monster
	DeathHeight 0
	BurnHeight 0
	Height 74
	Radius 32
    GibHealth 40
	+FLOORCLIP
	+SLIDESONWALLS
	+RANDOMIZE
	+MTHRUSPECIES
	+MISSILEEVENMORE
	MaxStepHeight 24
	MaxDropOffHeight 32
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    SeeSound "demon/sight"
	PainSound "demon/pain"
	DeathSound "demon/death"
	ActiveSound "PINKIDL"
    BloodType "Brutal_Blood", "SawBlood", "SawBlood"
	DropItem "DemonStrengthRune" 3
	Obituary "%o was roasted by a WereDragon." //placeholder shit
	HitObituary  "%o was whittled by a WereDragon."
	DamageType HKF
	+DONTHURTSPECIES
	Tag "WereDragon"
	Species "Beasts"
    MeleeDamage 15
	MeleeThreshold 300 // range for not shooting but approach for melee
	meleerange 65//44
	
	States
	{	
		Spawn:
			WERE B 0
			Stand:
			TNT1 A 0 A_CheckSight("Stand2")
			TNT1 A 0 A_SpawnItem("HeadshotTarget20w", 10, 46,0)
			WERE BB 5 A_Look
			Loop
		Stand2:
			WERE B 11 A_Look
			Goto Stand
		See: 
			BOS2 B 0
			TNT1 A 0 A_CheckSight("SeeNeverSeen")
			Goto Rage
			RAGE:
			TNT1 A 0
			TNT1 A 0 A_CheckSight("See2")
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			BERA ABCD 2
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 42,0)
			BERA EFEG 2
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 42,0)
			BERA EFEG 2
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			BERA DCBA 2 A_FaceTarget
			TNT1 A 0 HealThing(100)
			TNT1 A 0 A_Jump(96, "MissileInRage")
			Goto See2
			See2:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("EnemyMemory", 15)
			See3:
			TNT1 A 0 A_CheckSight("SeeNeverSeen")
			SeeContinue:
			//TNT1 A 0 A_SpawnItemEx("FootSep", 0, 0, 20, 0, 0)
			TNT1 A 0 A_JumpIfInventory("EnemyMemory", 20, "ForgetTarget")
			TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE AAA 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE BBB 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE CCC 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE DDD 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE EEE 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE FFF 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE GGG 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE HHH 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE III 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE JJJ 2 A_Chase
			TNT1 A 0 A_JumpIfInTargetInventory("IsInvisible", 1, "ForgetTarget")
			Loop
		SeeNeverSeen:
			//TNT1 A 0 A_SpawnItemEx("FootSep", 0, 0, 20, 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE AA 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE AA 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE BB 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE BB 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE CC 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE CC 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE DD 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE DD 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE EE 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE EE 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE FF 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE FF 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE GG 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE GG 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE HH 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE HH 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE II 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE II 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE JJ 2 A_Chase
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			WERE JJ 2 A_Chase
			TNT1 A 0 A_JumpIfInTargetInventory("IsInvisible", 1, "ForgetTarget")
			Loop
		Idle:
		LookingForPlayer:
			TNT1 A 0 A_GiveInventory("SKImp", 1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SetAngle(angle - 40)
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SetAngle(angle + 40)
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE B 10 A_Look
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			WERE A 0 A_Wander
			WERE AA 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE B 0 A_Wander
			WERE BB 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE CC 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE DD 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE A 0 A_Wander
			WERE EE 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE B 0 A_Wander
			WERE FF 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE GG 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE HH 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE II 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE JJ 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			TNT1 A 0 A_jump(128, "LookingForPlayer")
			WERE A 0 A_Wander
			WERE AA 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE B 0 A_Wander
			WERE BB 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE CC 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE DD 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE A 0 A_Wander
			WERE EE 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE B 0 A_Wander
			WERE FF 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE GG 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE HH 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE C 0 A_Wander
			WERE II 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			WERE D 0 A_Wander
			WERE JJ 2 A_Look
			TNT1 A 0 A_Recoil(-2)
			Goto LookingForPlayer
		ForgetTarget:
			TNT1 A 0 A_ClearTarget
			TNT1 A 0 A_TakeInventory("EnemyMemory", 25)
			TNT1 A 0 A_GiveInventory("LookingForPlayer", 1)
			Goto LookingForPlayer	
		Melee:
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 10, 46,0)
			BBEA H 6 A_FaceTarget
			TNT1 A 0 A_PlaySound("demon/melee", 4)
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA J 6 A_CustomMissile("BeastBite",10,0,0,0)
			Goto See2
		Melee2:
			BBEA HI 8 A_FaceTarget
			BBEA J 8 A_CustomMissile("BeastBite",10,0,0,0)
			Goto See2
		Missile:
			TNT1 A 0
			TNT1 A 0 A_Jump(64, "MissileInRage")
			TNT1 A 0 A_JumpIfCloser(950, "MaybeCharge")
			TNT1 A 0 A_JumpIfCloser(250, "MaybePOUNCE")
			JustMissile:	
			TNT1 A 0 A_TakeInventory("EnemyMemory", 30)
			TNT1 A 0 A_FaceTarget
			//TNT1 A 0 A_CustomMissile("MonsterTargetCheck", 34, 0, 0, 0)       //may still use these
			//TNT1 A 0 A_CustomMissile("MonsterTargetCheckFaster", 34, 0, 0, 0) //may still use there
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 0, 46,0)
			BBEA H 3 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 2
			
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 15, 40,0)
			BBEA I 8 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 15, 40,0)
			BBEA K 8 A_CustomMissile("AfritFireBall", 36, 0, 0, 1) 
			Goto See2
		
		MissileInRage:
			TNT1 A 0 A_TakeInventory("CantFire", 1)
			//TNT1 A 0 A_CustomMissile("MonsterTargetCheck", 34, 0, 0, 0)       //may still use these
			//TNT1 A 0 A_CustomMissile("MonsterTargetCheckFaster", 34, 0, 0, 0) //may still use these
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 3 A_FaceTarget
			TNT1 A 0 A_JumpIfInventory("CantFire",1, "SeeContinue")
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BBEA H 3 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA K 6 A_CustomMissile("AfritFireBall", 36, 0, 0, 1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA K 6 A_CustomMissile("BeastBall", 36, 0, random(-10, 0), 1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA I 6 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget8w", 15, 40,0)
			BBEA K 6 A_CustomMissile("AfritFireBall", 36, 0, random(0, 10), 1)
			Goto See2
		MaybeCharge:
			TNT1 A 0 A_Jump(208, "JustMissile")
			Goto CHARGE
		MaybePounce:
			TNT1 A 0 A_Jump(208, "JustMissile")
			Goto POUNCE
		CHARGE:
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			BECH AA 2 A_FaceTarget
		//	TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")            //these are still in place just in case anyone wants a sudden "JustMissile" attach here
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_PlaySound("knight/step",4)
			BECH BB 2 A_FaceTarget
		//	TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")            //^
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH CC 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_PlaySound("knight/step",5)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH DD 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH EE 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_PlaySound("knight/step",5)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH FF 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH GG 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_PlaySound("knight/step",5)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH HH 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			BECH II 2 A_FaceTarget
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_PlaySound("knight/step",5)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 15, 40,0)
			BECH JJ 2 A_FaceTarget
			TNT1 A 0 A_Recoil (-6)
			TNT1 A 0 A_JumpIfCloser(400, "POUNCE")
			TNT1 A 0 A_JumpIf(Momx == 0 || Momy == 0, "JustMissile")
			loop
		POUNCE:
			TNT1 A 0 A_Recoil(-10)
			TNT1 A 0 ThrustThingZ(0,17,0,1)
			TNT1 A 0 //ThrustThing(angle,10)
			TNT1 A 0 A_PlaySound("weapons/fistwhoosh", 1)
			BBEA HHHIII 1 A_FaceTarget
			BBEA JJJ 2
			TNT1 A 0 A_PlaySound("CLAP", 2)
			TNT1 A 0 A_CustomMissile("CyberStep",10,0,0,0)
			TNT1 A 0 A_CustomMissile("BeastSlam",10,0,0,0)
			TNT1 A 0 A_CustomMissile("BigRicoChet")
			TNT1 A 0 A_SpawnItem ("BigRicoChet", 0, -30)
			TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
			TNT1 A 0 A_Stop
			BBEA J 25 
			Goto seecontinue
		CheckRetreat: //likely not used here
			TNT1 A 0
			TNT1 A 0 A_JumpIfCloser(500, "Retreat")
			Goto Missile+9
		Retreat: //likely not used here
			TNT1 A 0
			//TNT1 A 0 A_SpawnItemEx("FootSep", 0, 0)
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA HH 2 A_Recoil(2)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA HH 2 A_Recoil(2)
			TNT1 A 0 A_FaceTarget
			
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA II 2 A_Recoil(1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA II 2 A_Recoil(1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA KK 2 A_Recoil(1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA KK 2 A_Recoil(1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA HH 2 A_Recoil(1)
			TNT1 A 0 A_SpawnItem("HeadshotTarget6w", 0, 46,0)
			BBEA HH 2 A_Recoil(1)
			Goto Missile+9
		Pain:
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 10, 46,0)
			BEAS G 3
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 10, 46,0)
			BEAS G 10 A_Pain
			Goto See2
		Pain.Explosive:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx("MuchBlood2", 0, 0, 60)
			TNT1 A 0 ThrustThingZ(0,10,0,1)
			Goto Pain
		Pain.Lightning:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx ("StunElectrocute", random (-4, 4), random (-4, 4),  random (16, 32), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget2w", 0, 46,0)
			BEAS G 1 A_Pain
			Goto See
		Pain.Stun:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx ("StunElectrocute", random (-4, 4), random (-4, 4),  random (16, 32), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget30w", 0, 46,0)
			BEAS G 1 A_Pain
			BEAS GGGGGGGGGG 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			TNT1 A 0 A_SpawnItem("HeadshotTarget2w", 0, 46,0)
			BEAS G 1 A_Pain
			Goto RAGE
			
		Pain.Extremepunches:
		Pain.SuperPunch:
		Pain.HeavyImpact:
		Pain.Kick:
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_ChangeFLag("NOPAIN", 1)
			TNT1 A 0 ThrustThingZ(0,30,0,1)
			TNT1 A 0 A_Recoil(8)
			TNT1 A 0 A_SpawnItem("HeadshotTarget4w", 0, 46,0)
			BEAS G 3
			TNT1 A 0 A_SpawnItem("HeadshotTarget10w", 0, 46,0)
			BEAS G 10 A_Pain
			TNT1 A 0 A_ChangeFLag("NOPAIN", 0)
			Goto See2
		
		Death.Dagger:
			TNT1 A 0 A_GiveToTarget("RuneAmmo",1) //piece of cake...
		Death:
			TNT1 A 0
			BEAL A  6
			BEAL B  6 A_CustomMissile ("XDeathBeastLeg", 32, 0, random (0, 360), 2, random (0, 160))
			BEAL C  6 A_Scream
			BEAL D  6
			BEAL E  6
			BEAL F  6
			BEAL G  6
			BEAL H  6
			BEAL I  6
			BEAL D  0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("DeadBeast")
			TNT1 A -1
			Stop
			
		Death.head:
			TNT1 A 0 A_JumpIfInTargetInventory("HasFreezerWeapon", 1, "Death.Freeze")
			//TNT1 A 0 A_JumpIfInTargetInventory("HasPlasmaWeapon", 1, "Death.Plasma")
			TNT1 A 0 A_CustomMissile ("BloodMistBig", 50, 0, random (0, 360), 2, random (30, 90))
			TNT1 AA 0 A_CustomMissile ("BloodMist", 50, 0, random (0, 360), 2, random (30, 90))
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_PlaySound("misc/xdeath4")
			TNT1 AA 0 A_CustomMissile ("Brains1", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("Brains3", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("Brains6", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("Brains1", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("Brains3", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("Brains6", 60, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAA 0 A_CustomMissile ("SmallBrainPieceFast", random (45, 55), random (5, -5), random (170, 190), 2, random (-10, 10))
			TNT1 AAAA 0 A_CustomMissile ("SmallBrainPiece", 50, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 46, 0, random (170, 190), 2, random (0, 40))
			
			BEAH A 3 A_NoBlocking
			BEAH B 3 A_Scream
			BEAH C 3 A_CustomMissile ("Brutal_LiquidBlood2", 60, 0, random (0, 360), 2, random (10, 40))
			BEAH D 3 A_CustomMissile ("Brutal_LiquidBlood2", 50, 0, random (0, 360), 2, random (10, 40))
			BEAH E 3 A_CustomMissile ("Brutal_LiquidBlood2", 40, 0, random (0, 360), 2, random (10, 40))
			BEAH F 3 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 40))
			BEAH G 3 A_CustomMissile ("Brutal_LiquidBlood2", 25, 0, random (0, 360), 2, random (10, 40))
			BEAH H 3 A_CustomMissile ("Brutal_LiquidBlood2", 20, 0, random (0, 360), 2, random (10, 40))
			TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
			TNT1 A 0 A_SpawnItem("DeadBeast_NoHead")
			TNT1 A -1
			Stop
		
	    Death.GreenFire:
			TNT1 A 0
			TNT1 A 0 A_XScream
			TNT1 A 0 A_NoBlocking
			TNT1 AAAA 0 A_CustomMissile ("Brutal_Blood", 30, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
			EXPL AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("GreenFlameTrails", 50, 0, random (0, 360), 2, random (0, 360))
			XBRN AAAA 2 BRIGHT A_SpawnItem("GreenFlare",0,43)
			Stop
			
		XDeath:
		Death.Explosive:
		Death.ExplosiveImpact:
			TNT1 A 0
			TNT1 A 0 ThrustThingZ(0,35,0,1)
			TNT1 AA 0 A_CustomMissile ("XDeathBeastLeg", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAA 0 A_CustomMissile ("XDeath1", 62, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAA 0 A_CustomMissile ("muchblood", 62, 0, random (0, 360), 2, random (0, 160))
			Death.ExplosiveImpact1:	
			BEAX A  8 A_Scream
			BEAX B  8 A_NoBlocking
			BEAX CCCCCC  8 A_CheckFloor("Land1")
			Goto Land1
			Land1:
			TNT1 A 0 A_SpawnItem ("DeadBeastExplosiveImpact1", 1)
			TNT1 A -1
			Stop
			
		Raise:
			BEAL I 8
			BEAL HGFEDCBA 8
			Goto See2

////////////////////////////////////////////////////////
//In case We want to use this code for a fire death...//
////////////////////////////////////////////////////////

		/*
		Death.Fire:
			TNT1 A 0
			TNT1 A 0 A_Scream
			TNT1 A 0 A_NoBlocking
			BOSB AAAA 2 A_CustomMissile ("FlameTrails", 45, 0, random (0, 360), 2, random (50, 130))
			BOSB BBBB 2 A_CustomMissile ("FlameTrails", 30, 0, random (0, 360), 2, random (50, 130))
			BOSB CCCC 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
			BOSB DDDD 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Playsound("props/redfire")
			BOSB EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
			BOSB EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 10 A_CustomMissile ("SmallSmoke", 25, 0, random (0, 360), 2, random (70, 110))
			BOSB E -1
			Stop
	   */
	   
////////////////////////////
////////////////////////////
	   
		Pain.KillMe:
		Pain.Taunt:
			TNT1 A 0
			TNT1 A 0 HealThing(1)
			Goto Missile
		Death.KillMe:
		Death.Taunt:
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_SpawnItem("BrutalBeast")
			Stop
			
		Death.Ice:
		Death.Freeze:
		Death.Frost:
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_SpawnItem("FrozenBeast")
			Stop
			
		Death.Massacre:
		Goto Death
		Death.Stomp:
			TNT1 A 0 A_Scream
			TNT1 A 0 A_NoBlocking
			BEAL BCD 2
			TNT1 AA 0 A_SpawnItem("MeatDeathSmall")
			TNT1 AAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath2b", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath3b", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
			TNT1 A 0 A_SpawnItem ("CrushedRemains")
			TNT1 A 1
			TNT1 A 1 A_XScream
			Stop
			
		Crush:
			TNT1 A 0
			TNT1 AAAAAA 0 A_SpawnItemEx ("BodyRemovalThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 1 A_XScream
			Stop
	}
}

//////////////////
//Beast Fireball//
//////////////////

ACTOR BeastBall 
{
	Game Doom
	DamageType Burn
	Radius 5
	Height 12
	Speed 16
	FastSpeed 24
	Damage (30)
	PROJECTILE
    +THRUGHOST
	+FORCEXYBILLBOARD
	RenderStyle Add
	Alpha 1
	SeeSound "imp/attack"
	DeathSound "imp/shotx"
	Decal "Scorch"
	Species "Beasts"
	+DONTHURTSPECIES
	Scale 0.5
	States
	{
	StopInAir:
		TNT1 A 0
		EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		Stop
		
	Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		TNT1 A 0 ACS_NamedExecuteAlways("BDCheckJanitor", 0, 0, 0, 0)//Check Effects
		BLHD Ab 1 BRIGHT
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "SpawnCheap")
	
	Spawn1:
		TNT1 A 0 
		BLHD A 1 BRIGHT A_SpawnItem ("CoolAndNewFlameTrails", 0, random( -2, 2))
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrailDarker", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop
		
	SpawnCheap:
		BLHD AB 1 BRIGHT// A_SpawnItem ("CoolAndNewFlameTrails")
		Loop
		
	SpawnUnderwater:
		FR7X A 1 BRIGHT A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		FR7X B 1 BRIGHT A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		Goto Spawn1	
		
	Death:
		//TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		//TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DeathCheap")
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("SmallUnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		//FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-5, 5), random (-5, 5))
		TNT1 A 0 A_SpawnItemEx ("DetectFloorCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_CustomMissile ("BDExplosionparticlesSmall", 10, 0, random (0, 180), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		Stop
	XDeath:
	    TNT1 A 0
		//TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DeathCheap")
		TNT1 A 0 A_SpawnItemEx ("SmallUnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_CustomMissile ("BDExplosionparticlesSmall", 10, 0, random (0, 180), 2, random (40, 90))
	    EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
		TNT1 A 0 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		//FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		Stop
	}
}

///////////////
//Bite Attack//
///////////////

ACTOR BeastBite: BaronBall
{
	Radius 24
	Height 16
	DamageType HKFT
	Projectile 
	+RANDOMIZE
	+FORCEXYBILLBOARD
    +THRUGHOST
	RenderStyle Add
	Alpha 0.6
    Damage 5
    Speed 42
	//HitObituary "$OB_IMPHIT"
	SeeSound "none"
	DeathSound "none"
	Decal "none"
	States
	{
	Spawn:
		TNT1 A 2 BRIGHT
        TNT1 A 2 //A_PlaySound("weapons/gswing")
		Goto Death
	Death:
		TNT1 A 0 BRIGHT
		Stop
	}
}

////////////////////
//Dead Body Actors//
////////////////////

Actor DeadBeast: CurbstompedMarine
{
    Radius 24
    Height 12
    Scale 1.0
    +SHOOTABLE
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
	+FLOORCLIP
	-SOLID
	+THRUACTORS
	damagefactor "Crusher", 50.0
    Mass 5000
    Health 500
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
States
    {
    Spawn:
		BEAL I -1
        Stop
	
	Death:
		 GIBS Y 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AAA 0 A_CustomMissile ("XDeath1", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 16, 0, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_CustomMissile ("XDeathBeastLeg", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_SpawnItem("GibbedBeast")
		 TNT1 A -1
		 Stop	
		 
	XDeath:
		 GIBS Y 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AAAA 0 A_CustomMissile ("XDeath1", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAA 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAA 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAAA 0 A_SpawnItem("MuchBlood2", 0, 25)
		 TNT1 AAAAA 0 A_CustomMissile ("BloodMistBig", 16, 00, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_SpawnItem("MuchBlood3", 0, 25)
		 TNT1 A 0 A_SpawnItem("GibbedBeast")
		 TNT1 A -1
		 Stop	
		 
	Death.CrushedBodies:
		 TNT1 A 0 A_SetAngle(0)
		 TNT1 A 0 bright A_CustomMissile ("SuperGoreSpawner", 1, -40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 bright A_CustomMissile ("SuperGoreSpawner", 1, 40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 A_CustomMissile ("XDeath1", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath2b", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3b", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("BloodMistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("BloodMistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_SetAngle(90)
		 TNT1 A 0 bright A_CustomMissile ("SuperGoreSpawner", 1, -40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 bright A_CustomMissile ("SuperGoreSpawner", 1, 40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 A_CustomMissile ("XDeath1", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath2b", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3b", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("BloodMistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("BloodMistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_NoBlocking
		 GIBS Y 1
		 GIBS Y -1
		Stop
		}}
		

Actor DeadBeast_NoHead: DeadBeast
{States{Spawn:        BEAH H -1        
Stop
Death:
		 GIBS Y 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AAA 0 A_CustomMissile ("XDeath1", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAAAA 0 A_CustomMissile ("BloodMistBig", 1, 0, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeathBeastLeg", 15, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_SpawnItem("GibbedBeast")
		 TNT1 A -1
		 Stop

}}

Actor GibbedBeast : DeadBeast
{
States
	{
	Spawn:
		BEAS Q -1
		Stop
	Death:
		 GIBS Y 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 A 0 A_CustomMissile ("XDeath1", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("BloodMistBig", 16, 0, random (0, 360), 2, random (30, 90))
		 TNT1 A -1
		 Stop
	}
}

Actor DeadBeastExplosiveImpact1: DeadBeast
{Scale 1.2 States{Spawn:        BEAX D -1        
Stop
	
	Death:
		 GIBS Y 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AAA 0 A_CustomMissile ("XDeath1", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath2b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath3b", 25, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 AAA 0 A_CustomMissile ("Guts", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_SpawnItem("GibbedBeast")
		 TNT1 A -1
		 Stop	

}}

/////////
//Limbs//
/////////

ACTOR XDeathBeastLeg: XDeathArm1
{
    Scale 1.1
    Speed 6
	BounceFactor 0.4
    States
    {
    Spawn:
        TNT1 A 0 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		BEPL ABCDEF 3 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		Loop
	Death:
	    TNT1 A 0
		TNT1 A 0 A_SpawnItem("Gib_BeastLeg")
		TNT1 A 0 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
		Stop
    }
}

actor Gib_BeastLeg: LimbBase
{
    Scale 1.1
	Health 80
    States
    {
		Spawn:
		BEPL G 1
		TNT1 A 0 A_QueueCorpse
		BEPL Z 1900
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
		BEPL Z -1
       Stop
	  Death.plasma: Death.Burn: Death.Flames:	   
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece2", random (-15, 15), random (-15, 15))
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
		TNT1 A 0 A_CustomMissile ("XDeathBurnedBeastLeg", 2, 0, random (0, 360), 2, 270)     
		Stop
	  
	  Death:   
	    TNT1 A 0 A_NoBlocking
		TNT1 AA 0 A_CustomMissile ("Brutal_BLood", 2, 0, random (0, 360), 2, random (0, 360))
		TNT1 AA 0 A_CustomMissile ("Xdeath1", 2, 0, random (0, 360), 2, random (10, 90))
		TNT1 A 0 A_CustomMissile ("GibBeastFoot", 5, 0, random (0, 360), 2, random (10, 90))
		TNT1 A 0 A_CustomMissile ("GibBeastLegPart", 5, 0, random (0, 360), 2, random (10, 90))
		Stop
	
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,30,0,1)
	BEPL ABCDEF 2
	Goto Spawn
	
	Death.ExplosiveImpact:
	Death.Kick: Death.SuperPunches: Death.Melee:
	TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 0)
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,40,0,1)
	BEPL A 5
	BEPL ABCDEFABCDEF 5 A_CheckFloor("Landz")
	Goto Landz
	Landz:
	BEPL Z 0 A_SpawnItem("Gib_BeastLeg")
	Stop	}}
	
actor GibBeastFoot: TinyGib
{
    Scale 0.9
    States
    {
	Spawn:
		BEPL Y 1
		TNT1 A 0 A_QueueCorpse
		BEPL Y -1
		Stop
    Death:
		BEPL Y 1
		TNT1 A 0 A_QueueCorpse
		BEPL Y -1
		Stop
}}

actor GibBeastLegPart: TinyGib
{
    Scale 0.9
    States
    {
	Spawn:
		BEPL X 1
		TNT1 A 0 A_QueueCorpse
		BEPL X -1
		Stop
    Death:
		BEPL X 1
		TNT1 A 0 A_QueueCorpse
		BEPL X -1
		Stop
}}

ACTOR XDeathBurnedBeastLeg
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
    Spawn:
        BEPL W 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
        Loop
    Death:
        BEPL WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
        BEPL W -1
        Stop
    }
}

///////////////////////
//Frozen-based Actors//
///////////////////////

ACTOR FrozenBeast : FrozenZombieman 
{
	States
	{
	Spawn:
        TNT1 A 0 NoDelay A_PlaySound("Cryomancy/EnemyFreeze", 1)
		FRDB A 400
		FRDB A 2
		TNT1 A 0 A_PlaySound("ICEBRK1")
		FRDB A 50
		FRDB B 2
		FRDB A 50
		FRDB B 2
		FRDB A 50
		FRDB B 2
		FRDB A 25
		FRDB B 2
		FRDB A 25
		FRDB B 2
		FRDB A 10
		FRDB B 2
		FRDB A 10
		FRDB B 2
		FRDB A 10
		FRDB BABABA 2
		Goto Death.Burn
		Death.Fire:
		Death.Flames:
		Death.Burn:
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
	    TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_PlaySound("Cryomancy/EnemyUnfreeze", 1)
		TNT1 AAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk1", 48, 0, random (0, 360), 2, random (0, 160))
	    TNT1 AAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk2", 48, 0, random (0, 360), 2, random (0, 160))
	    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk3", 48, 0, random (0, 360), 2, random (40, 120))
	    TNT1 A 0 A_NoBlocking
	    TNT1 A 0 A_spawnItem("BeastDamaged")
	    Stop
	Death:	
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_PlaySound("Cryomancy/EnemyShatter", 1)
		TNT1 AAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk1", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk2", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XIceChunk3", 48, 0, random (0, 360), 2, random (40, 120))
		TNT1 AAAA 0 A_CustomMissile ("FrozenMeat1", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAAAA 0 A_CustomMissile ("FrozenMeat2", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath2", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath3", 48, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("Guts", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAAA 0 A_CustomMissile ("MuchBlood", 48, 0, random (0, 360), 2, random (0, 160))
		FRDB C 300
		FRDB CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 1 A_FadeOut(0.01)
		Stop
	Death.Freeze:
	Death.Ice:
	Death.Frost:
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_SpawnItem("FrozenBeast")
		Stop
	}
}

ACTOR BeastDamaged : BrutalBeast
{
	Health 50
	Speed 4
	States
	{
	Death.Head:
	    TNT1 A 0 A_JumpIfInTargetInventory("HasFreezerWeapon", 1, "Death.Freeze")
		Goto Super::Death.Head
	}
}