//===========================================================================
//
// Gargoyle (Code from part of Bitter Heretic and most from Schism) (Borrowed Lost Soul/Cacodemon as somewhat base)
// Modified by LordADHD
//===========================================================================
ACTOR BrutalGargoyle replaces HereticImp//: LostSoul Replaces LostSoul
{
	Game Doom
	Health 40
	GibHealth 25
	Radius 16
	Height 32
	Mass 50
	Speed 16
	DeathHeight 4
	BurnHeight 0
	Damage (5)
	PainChance 255
	PainChance "Kick", 255 	PainChance "Melee", 255 PainChance "PaladinMele", 255 
	damagefactor "GibRemoving", 0.0 damagefactor "HangingHook", 0
	PainChance "Avoid", 255
    damagefactor "sAW", 4.0 damagefactor "Cut", 4.0
	Monster
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    damagefactor "Fatality", 5.0 damagefactor "PussyGrab", 50.0
	damagefactor "TeleportRemover", 0.0
	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
	RenderStyle Normal
	+FLOAT +NOGRAVITY
	+FORCEXYBILLBOARD
	+MISSILEMORE
	+SPAWNFLOAT
	//+MISSILEEVENMORE
	//AttackSound "skull/melee"
	
  SeeSound "himp/sight"
  AttackSound "himp/attack"
  PainSound "himp/pain"
  //DeathSound "himp/death"
  ActiveSound "himp/active"
  
	DeathSound "LSOD"
	
	ActiveSound "skull/active"
	Obituary "$o was clawed to death by an imp"
	//MinMissileChance 50
	BloodType "Brutal_Blood", "SawBlood", "SawBlood"
	damagefactor "ExplosiveImpact", 1.0
	damagefactor "Shrapnel", 1.0
	damagefactor "Explosives", 1.0
	damagefactor "Fire", 0.2
	DamageFactor "Freeze",1.0
	PainChance "Freeze", 255
	Species "Gargoyles"
	Tag "Gargoyle"
    Alpha 1
	States
	{
	Pain.Avoid: 
	  TNT1 A 0
	  TNT1 A 0 A_Jump(255, "AvoidLeft", "AvoidRight")
	  Goto AvoidLeft
	  AvoidLeft:
	    IMPM H 1 A_FaceTarget
	    TNT1 A 0 ThrustThing(angle*256/360+192, 15, 0, 0)
        IMPM H 5 A_FaceTarget
        Goto Missile
	AvoidRight:
	    IMPM H 1 A_FaceTarget
	    TNT1 A 0 ThrustThing(angle*256/360+64, 15, 0, 0)
        IMPM H 5 A_FaceTarget
        Goto Missile
		
	Spawn:
		IMPX A 0
		GARG A 1 A_Look
		Goto Stand
		
	Stand:	
		GARG ABCDEFGHIJL 2 A_Look
		Loop
		
	SearchPlayer:
	    TNT1 A 0 A_ClearTarget
		TNT1 A 0 A_TakeInventory("EnemyMemory", 40)
		GARG A 2 A_Look
		TNT1 A 0 A_SetAngle(angle - 30)
		GARG B 2 A_Look
		TNT1 A 0 A_SetAngle(angle + 30)
		GARG C 2 A_Look
		TNT1 A 0 A_SetAngle(angle + 30)
		GARG D 2 A_Look
		TNT1 A 0 A_SetAngle(angle - 30)
		
		
		GARG A 0 A_Wander
		GARG E 2 A_Look
		GARG A 0 A_Wander
		GARG F 2 A_Look
		GARG A 0 A_Wander
		GARG G 2 A_Look
		GARG A 0 A_Wander
		GARG H 2 A_Look
		GARG A 0 A_Wander
		GARG I 2 A_Look
		GARG A 0 A_Wander
		GARG J 2 A_Look
		GARG A 0 A_Wander
		GARG K 2 A_Look
		GARG A 0 A_Wander
		GARG L 2 A_Look
		GARG A 0 A_Wander
		GARG A 2 A_Look
		GARG A 0 A_Wander
		GARG B 2 A_Look
		GARG A 0 A_Wander
		GARG C 2 A_Look
		GARG A 0 A_Wander
		GARG D 2 A_Look
		GARG A 0 A_Wander
		GARG E 2 A_Look
		GARG A 0 A_Wander
		GARG F 2 A_Look
		GARG A 0 A_Wander
		GARG G 2 A_Look
		GARG A 0 A_Wander
		GARG H 2 A_Look
		GARG A 0 A_Wander
		GARG I 2 A_Look
		GARG A 0 A_Wander
		GARG J 2 A_Look
		GARG A 0 A_Wander
		GARG K 2 A_Look
		GARG A 0 A_Wander
		GARG L 2 A_Look
		
		TNT1 A 0 A_Jump(128, "SearchPlayer")
		GARG A 0 A_Wander
		GARG A 2 A_Look
		GARG A 0 A_Wander
		GARG B 2 A_Look
		GARG A 0 A_Wander
		GARG C 2 A_Look
		GARG A 0 A_Wander
		GARG D 2 A_Look
		GARG A 0 A_Wander
		GARG E 2 A_Look
		GARG A 0 A_Wander
		GARG F 2 A_Look
		GARG A 0 A_Wander
		GARG G 2 A_Look
		GARG A 0 A_Wander
		GARG H 2 A_Look
		GARG A 0 A_Wander
		GARG I 2 A_Look
		GARG A 0 A_Wander
		GARG J 2 A_Look
		GARG A 0 A_Wander
		GARG K 2 A_Look
		GARG A 0 A_Wander
		GARG L 2 A_Look
		Goto SearchPlayer
		
	See:
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_CheckSight("See2")
		GARG A 2 A_Chase
		GARG BCDEFGHIJKL 2 A_Chase ("","")
		TNT1 A 0 A_JumpIfCloser(99, "Melee")
		TNT1 A 0 A_TakeInventory("EnemyMemory", 1)
		Loop
		
	See2:
		GARG ABCDEF 2 A_Chase
		TNT1 A 0 A_JumpIfInventory("EnemyMemory", 25, "SearchPlayer")
		TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
		GARG GHIJKL 2 A_Chase
		TNT1 A 0 A_JumpIfInventory("EnemyMemory", 25, "SearchPlayer")
		TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("IsInvisible", 1, "SearchPlayer")
		Goto See	
		
		
		
	Missile:
		TNT1 A 0 A_Jump(196, "FireMissile")
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		GARG HIJKLABCDEF 2 A_FaceTarget
		GARG G 2 A_SkullAttack
		garg HIJKLABCDEFG 1
		TNT1 A 0 A_JumpIfInventory("MaxLostSoulRange", 10, "See")
		TNT1 A 0 A_giveInventory("MaxLostSoulRange", 1)
		Goto Missile+12
	
	FireMissile:
		TNT1 A 0		
		TNT1 A 0 A_Playsound("SINGE")
		IMPX D 2 A_FaceTarget 
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 20,20, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 20,20, random (0, 140), 2, random (0, 160))
		IMPX D 2 A_FaceTarget 
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 20,20, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 20,20, random (0, 140), 2, random (0, 160))
		IMPX D 2 A_FaceTarget 
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 20,20, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 20,20, random (0, 140), 2, random (0, 160))
		IMPX D 2 A_FaceTarget 
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 20,20, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 20,20, random (0, 140), 2, random (0, 160))
		IMPX D 2 A_FaceTarget 
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 20,20, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 20,20, random (0, 140), 2, random (0, 160))
		IMPX DE 4 BRIGHT A_FaceTarget
		IMPX F 4 BRIGHT A_CustomMissile("GargoyleBall", 34, 0, 0, 0)
		Goto See
	
	Melee:
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "RageMelee")
		IMPX BC 4 A_Facetarget
		IMPM B 5 A_Recoil(-5)
		IMPM ABC 4
		TNT1 A 0 A_CustomMissile("GargoyleSlash", 34, 0, 0, 0)
		IMPM CB 4
	Goto See
	
	RageMelee:
		IMPX BC 3 A_Facetarget
		IMPM B 3 A_Recoil(-7)
		IMPM ABC 3
		TNT1 A 0 A_CustomMissile("GargoyleSlash", 34, 0, 0, 0)
		IMPM I 3 //A_Recoil(-7)
		IMPM HIJ 3
		TNT1 A 0 A_CustomMissile("GargoyleSlash", 34, 0, 0, 0)
		IMPM CB 3
	Goto See
	
	Pain:
		IMPX G 3
        TNT1 A 0 A_Jump (128, 3)
        Goto Avoid
        TNT1 AAA 0
		IMPX G 1 A_Pain
		Goto See
	
	Pain.Kick:
	Pain.HeavyImpact:
	Pain.SuperPunch:
	 Pain.ExtremePunches:
         IMPX A 0 A_Pain
         IMPX A 0 A_FaceTarget
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (15)
		TNT1 A 0 A_Jump(128, "Falldown")
		 IMPX G 8
         Goto See
	
	Falldown:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 1)
		TNT1 A 0 A_changeflag("NOGRAVITY",0)
		TNT1 A 0 A_changeflag("FLOAT",0)
        IMPX H 1 A_Pain
		TNT1 A 0 A_TakeInventory("SKImp", 1)
        TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,20,0,1)
		IMPX H 1 A_facetarget
        IMPX H 6 ThrustThing(angle*256/360+128, 5, 0, 0)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFlag("GHOST", 0)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 0)
        IMPX H 8
		Goto FallingAfterImpact
	
	FallingAfterImpact:
		//IZD4 L 1 A_GiveInventory ("FallingHeight", 1)
		//TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		//TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		IMPX H 1 A_CheckFloor ("GetUp")
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		NULL A 0 A_JumpIf (momz == 0, "GetUp")
		Loop
	
	GetUp:
		TNT1 A 0
		//TNT1 A 0 A_JumpIfInventory ("FallingHeight", 7, "FallingDie")
		MARN A 0 A_SpawnItem("bdbodythud")
		IMPX H 1
		//TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		//TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFlag("GHOST", 0)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 0)
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 1)
		TNT1 A 0 A_GiveInventory("ISDOWN", 1)
		IMPX HHHHHHHH 5 A_JumpIf(momz < 0, "FallingAfterImpact")
		TNT1 A 0 A_TakeInventory("ISDOWN", 1)
		TNT1 A 0 A_ChangeFLag("USESPECIAL", 0)
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 0)
		TNT1 A 0 A_changeflag("NOGRAVITY",1)
		TNT1 A 0 A_changeflag("FLOAT",1)
		//TNT1 A 0 A_TakeInventory("FallingHeight", 100)
		
        TNT1 A 0 A_TakeInventory("IsDown", 1)
		GARR ABCDEF 3
        Goto See
	
	Recover:
		TNT1 A 0 A_pain
		TNT1 A 0 A_changeflag("NOGRAVITY",1)
		TNT1 A 0 A_changeflag("FLOAT",1)
		GARR ABCDEF 3
		goto see
	
	Pain.Freeze:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsSlowed", 1, "Pain")
		TNT1 A 0 ACS_NamedExecute("SlowingFreeze",0)
		TNT1 A 0 A_GiveInventory("IsSlowed", 1)
		Goto Pain
	
	Avoid:
        NULL A 0 A_FaceTarget
        GARG ABCDEF 1 A_FastChase

        NULL A 0 A_FaceTarget
        GARG GHIJKL 1 A_FastChase
		
		NULL A 0 A_FaceTarget
        GARG ABCDEF 1 A_FastChase

        NULL A 0 A_FaceTarget
        GARG GHIJKL 1 A_FastChase

		Goto Missile
	
	Death:
		TNT1 A 0 A_JumpIfInventory("IsDown", 1, "Death.Down")
		TNT1 A 0 A_jump(196, "split", "wingoff", "skullout")
		IMPX G 2 A_Scream
		IMPX H 3 A_NoBlocking
		//TNT1 A 0 A_CustomMissile("CacodemonEyeBall", 50, 0, 0)
        TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyle", 1, -15)
		TNT1 A -1
        Stop
	
	split:
		TNT1 A 0 A_jump(128, "splitM")
		IMSX AB 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("ImpTopHalf",3,-15,24,random(0,1),-1,1)
		IMSX D  1 A_NoBlocking
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleSplit", 1, -15)
		Stop
			
	splitM:
		IMSM AB 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("ImpTopHalf",3,15,24,random(0,1),1,1)
		IMSM D 1 A_NoBlocking
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleSplitM", 1, -15)
		Stop
			
		
	wingoff:
		tnt1 A 0 A_jump(128, "wingoffM")
		IPWG A 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("ImpWing",-1,-15,25,random(0,1),random(-1,0),random(1,2))
		IPWG B 4 A_NoBlocking
		IPWG C 3
		IPWG DE 3
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleWingoff", 1, -15)
		Stop
			
	wingoffM:
		IPWM A 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("ImpWingM",-1,15,25,random(0,1),random(0,1),random(1,2))
		IPWM B 4 A_NoBlocking
		IPWM C 3
		IPWM DE 3
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleWingoffM", 1, -15)
		Stop
			
	skullout:
		tnt1 A 0 A_jump(128, "skulloutM")
		IPSK A 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("impskull",0,0,25,random(0,1),random(-1,0),random(1,2))
		IPSK B 4 A_NoBlocking
		IPSK C 3
		IPSK DE 3
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleSkullOut", 1, -15)
		Stop
			
	skulloutM:
		IPSM A 4 A_Scream
		TNT1 A 0 A_SpawnItemEx("impskullm",0,0,25,random(0,1),random(0,1),random(1,2))
		IPSM B 4 A_NoBlocking
		IPSM C 3
		IPSM DE 3
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_SpawnItem ("DeadGargoyleSkullOutM", 1, -15)
		Stop
	
	Death.Down:
	Death.Trample:
	    TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_Stop
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 2, 0, random (0, 360), 2, random (0, 40))
		IMPX GH 6
		TNT1 A 0 A_SpawnItem("DeadGargoyle")
		TNT1 A -1
		Stop
		
	Death.Fatality:
	Death.ExtremePunches:
	Death.Kick:
		 TNT1 A 0 A_XScream
		 TNT1 A 0 A_NoBlocking
		 TNT1 A 0 A_FaceTarget
		 TNT1 A 0 A_CustomMissile ("ExtremePunchedHImp", 8, 0, random (175, 185), 2, random (10, 20))
		stop
	Death.Melee:
		TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Death.Down")
		Death.Shotgun:
		TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_Recoil (8)
		IMPX GH 8
		TNT1 A 0 A_PlaySound("BODYF",6)
		Goto FallingDeath
	
	FallingDeath:
		IMPX H 1 A_CheckFloor ("DeathLand")
		NULL A 0 A_JumpIf (momz == 0, "DeathLand")
		Loop
	
	DeathLand:
		IMPX H 1
		TNT1 AAAA 0 A_CustomMissile ("XDeath1", 32, 0, random (0, 360), 2, random (50, 130))
		IMPX IJKL 1
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		IMPX L -1
		Stop
	
    Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
		TNT1 A 0 A_GiveInventory("Enraged", 1)
		TNT1 A 0 HealThing(1)
        Goto Missile
    Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("BrutalGargoyle")
        Stop
		
	XDeath:
	Death.Explosive:
	Death.SSG:
	Death.Railgun:
		TNT1 A 0 A_XScream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_FaceTarget
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 AAA 0 A_CustomMissile ("XDeath3", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 A 0 A_CustomMissile ("XDeath2", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 A 0 A_CustomMissile ("XDeath4", 42, 0, random (0, 190), 2, random (10, 60))
  	    //TNT1 A 1 A_CustomMissile ("GargoyleXDeath", 0, 0, random (0, 360), 2, random (0, 160))
		Stop
	
	Death.ExplosiveImpact:
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0
		TNT1 A 0 ThrustThingZ(0,25,0,1)
		TNT1 A 0 A_FaceTarget
		TNT1 A 1
		Goto XDeath
		
	 Death.Stomp:
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TROO KL 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 AAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail8", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAA 0 A_SpawnItemEx ("BodyRemovalThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 1 A_XScream
		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_SpawnItemEx("FrozenGargoyle", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG | SXF_TRANSFERPOINTERS, 0, tid)
		TNT1 A 0 A_GiveToTarget("SoulAmmo", 10)
		Stop
	}
}

//////////////////////////////
//Garoyle Melee Attack Actor//
//////////////////////////////

ACTOR GargoyleSlash: ImpAttack
{
    +THRUGHOST
	DamageType Cut
    Damage (2)
}

//////////////////////////////////
//Gargoyle Missile Attack Actors//
//////////////////////////////////

ACTOR GargoyleBall
{
	Game Doom
	DamageType Fire
	Radius 4
	Height 6
	Speed 20
	FastSpeed 30
	Damage 3
	Projectile
	+THRUGHOST
	+FORCEXYBILLBOARD
	RenderStyle Add
	Alpha 1
	SeeSound "SIZZLE3"
	DeathSound "PYROEXP"
	Decal "Scorch"
	Species "Gargoyles"
	+DONTHURTSPECIES
	
	Scale 1.0
	States
	{
	
	StopInAir:
		TNT1 A 0
		EXPL A 0 A_CustomMissile ("GargoyleBallExplosionFlames", 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
		FX10 ABCD 1 BRIGHT A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 B 1 BRIGHT //A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 C 1 BRIGHT A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 D 1 BRIGHT //A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "SpawnCheap")
	
	Spawn1:
		TNT1 A 0 
		FX10 A 1 BRIGHT A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 B 1 BRIGHT //A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 C 1 BRIGHT A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails3", 0, random( -2, 2))
		FX10 D 1 BRIGHT //A_SpawnItem("RedFlare22",0,0) 
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrailDarker", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop
		
	SpawnCheap:
		FX10 ABCD 1 BRIGHT// A_SpawnItem ("CoolAndNewFlameTrails")
		Loop
		
	SpawnUnderwater:
		FX10 A 1 BRIGHT //A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		FX10 B 1 BRIGHT //A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		FX10 C 1 BRIGHT //A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		FX10 D 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 ("GargoyleBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))

		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", 2, 0, random (0, 180), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Jump(256,1,2,3,4)
		TNT1 A 0 A_CustomMissile ("PyromancySparksFlames", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_CustomMissile ("PyromancyHitFlames", 0, 0, random (0, 360), 2, random (0, 360))
        TNT1 A 0 A_CustomMissile ("PyromancyExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_CustomMissile ("PyromancyExplosion2Flames", 0, 0, random (0, 360), 2, random (0, 360))
		EXPL A 0 A_CustomMissile ("GargoyleBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		//TNT1 A 0 A_CustomMissile ("PyromancySparksFlames2", 0, 0, random (0, 360), 2, random (0, 360))
		
		FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		
		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 ("GargoyleBallExplosionFlames", 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))
		
		TNT1 A 0 A_CustomMissile ("PyromancyHitFlames", 0, 0, random (0, 360), 2, random (0, 360))

		FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		Stop
	}
}

ACTOR GargoyleBallExplosionFlames: FlameTrails
{
    Scale 1
	Speed 1
	States
	{
    Spawn:
		FX10 EF 6 BRIGHT
		FX10 G 5 BRIGHT
        Stop
	}
}

////////////////////////
//Dead Gargoyle Actors//
////////////////////////

ACTOR DeadGargoyle
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyle", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyle
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPX S 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPX STUVWXY 3 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Fallen_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}
Actor Fallen_Gargoyle: BigGibBase
{
	States
	{
		Spawn:
			IMPX Z 1900 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
			Loop
	}
}

ACTOR ImpTopHalf
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleHalf", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleHalf
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMSX C 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPX JKL 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Fallen_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

ACTOR DeadGargoyleSplit
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSplit", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAA 0 A_CustomMissile ("Guts2", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSplit
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMSX D 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMSX EF 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Split_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}
Actor Split_Gargoyle: BigGibBase
{
	States
	{
		Spawn:
			IMSX F 1900 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
			Loop
	}
}

ACTOR DeadGargoyleSplitM
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSplitM", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAA 0 A_CustomMissile ("Guts2", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSplitM
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMSM D 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMSM EF 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Split_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}
Actor Split_Gargoyle: BigGibBase
{
	States
	{
		Spawn:
			IMSM F 1900 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
			Loop
	}
}

ACTOR ImpWing
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleWing", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleWing
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IWPG AABCD 6
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IWPG E 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Wing_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

Actor WingM_Gargoyle: LimbBase
{
	Scale 1.0
    Speed 6
	Gravity 0.4
	BounceFactor 0.4
	
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_QueueCorpse
		IWPG E 1 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
		IWPG E -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 ("XDeathBurnedArm", 2, 0, random (0, 360), 2, 270)     
		Stop
    Death:    
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		//TNT1 A 0 A_CustomMissile ("GibHand", 0, 0, random (0, 180), 2, random (0, 180))
		//TNT1 A 0 A_CustomMissile ("GibArmPart", 0, 0, random (0, 180), 2, random (0, 180))
		Stop
	Death.Kick:
	Death.Melee:
	Death.SuperPunch:
	    IWPG E 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile ("XDeathGargoyleWingM", 5, 0, random (170, 190), 2, random (20, 40))
		Stop
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,20,0,1)
	IWPG AABCD 3
	Goto Spawn
	
	Death.ExplosiveImpact:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 0)
	TNT1 A 0 ThrustThingZ(0,30,0,1)
	IWPG E 6
	IWPG AABCDAABCDAABCD 6 A_CheckFloor("Landz")
	Goto Landz
	Landz:
	IWPG E 0 A_SpawnItem("WingM_Gargoyle")
	Stop
	}
}


ACTOR ImpWingM
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleWingM", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleWingM
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IWPM AABCD 6
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IWPM E 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("WingM_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

Actor WingM_Gargoyle: LimbBase
{
	Scale 1.0
    Speed 6
	Gravity 0.4
	BounceFactor 0.4
	
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_QueueCorpse
		IWPM E 1 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
		IWPM E -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 ("XDeathBurnedArm", 2, 0, random (0, 360), 2, 270)     
		Stop
    Death:    
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		//TNT1 A 0 A_CustomMissile ("GibHand", 0, 0, random (0, 180), 2, random (0, 180))
		//TNT1 A 0 A_CustomMissile ("GibArmPart", 0, 0, random (0, 180), 2, random (0, 180))
		Stop
	Death.Kick:
	Death.Melee:
	Death.SuperPunch:
	    IWPM E 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile ("XDeathGargoyleWingM", 5, 0, random (170, 190), 2, random (20, 40))
		Stop
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,20,0,1)
	IWPM AABCD 3
	Goto Spawn
	
	Death.ExplosiveImpact:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 0)
	TNT1 A 0 ThrustThingZ(0,30,0,1)
	IWPM E 6
	IWPM AABCDAABCDAABCD 6 A_CheckFloor("Landz")
	Goto Landz
	Landz:
	IWPM E 0 A_SpawnItem("WingM_Gargoyle")
	Stop
	}
}

ACTOR DeadGargoyleWingOff
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleWingOff", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleWingOff
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPWG C 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPWG DEFG 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPM MNOP 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("FallenM_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}
Actor FallenM_Gargoyle: BigGibBase
{
	States
	{
		Spawn:
			IMPM P 1900 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
			Loop
	}
}

ACTOR DeadGargoyleWingOffM
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleWingOffM", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleWingOffM
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPWM C 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPWM DEF 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPX HIJKL 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Fallen_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

ACTOR ImpSkull
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkull", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSkull
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSK FFGHI 3
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSK F 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Skull_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

Actor Skull_Gargoyle: LimbBase
{
	Scale 1.0
    Speed 6
	Gravity 0.4
	BounceFactor 0.4
	
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_QueueCorpse
		IPSK F 1 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
		IPSK F -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 ("XDeathBurnedArm", 2, 0, random (0, 360), 2, 270)     
		Stop
    Death:    
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		//TNT1 A 0 A_CustomMissile ("GibHand", 0, 0, random (0, 180), 2, random (0, 180))
		//TNT1 A 0 A_CustomMissile ("GibArmPart", 0, 0, random (0, 180), 2, random (0, 180))
		Stop
	Death.Kick:
	Death.Melee:
	Death.SuperPunch:
	    IPSK F 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkull", 5, 0, random (170, 190), 2, random (20, 40))
		Stop
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,20,0,1)
	IPSK FFGHI 3
	Goto Spawn
	
	Death.ExplosiveImpact:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 0)
	TNT1 A 0 ThrustThingZ(0,30,0,1)
	IPSK F 6
	IPSK FFGHIFFGHIFFGHI 6 A_CheckFloor("Landz")
	Goto Landz
	Landz:
	IPSK F 0 A_SpawnItem("Skull_Gargoyle")
	Stop
	}
}

ACTOR ImpSkullM
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkullM", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSkullM
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+DOOMBOUNCE
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSM FFGHI 3
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSM F 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("SkullM_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

Actor SkullM_Gargoyle: LimbBase
{
	Scale 1.0
    Speed 6
	Gravity 0.4
	BounceFactor 0.4
	
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_QueueCorpse
		IPSM F 1 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
		IPSM F -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))
		Stop
    Death:    
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		Stop
	Death.Kick:
	Death.Melee:
	Death.SuperPunch:
	    IPSM F 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkullM", 5, 0, random (170, 190), 2, random (20, 40))
		Stop
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,20,0,1)
	IPSM FFGHI 3
	Goto Spawn
	
	Death.ExplosiveImpact:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 0)
	TNT1 A 0 ThrustThingZ(0,30,0,1)
	IPSM F 6
	IPSM FFGHIFFGHIFFGHI 6 A_CheckFloor("Landz")
	Goto Landz
	Landz:
	IPSM F 0 A_SpawnItem("SkullM_Gargoyle")
	Stop
	}
}

ACTOR DeadGargoyleSkullOut
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkullOut", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSkullOut
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSK E 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IMPX HIJKL 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("Fallen_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

ACTOR DeadGargoyleSkullOutM
{
	Radius 1
	Height 1
	Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
	+NOBLOCKMAP
	+NOTELEPORT
	+MOVEWITHSECTOR
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	States
	{
		Spawn:
			TNT1 AAA 0 A_CustomMissile ("brutal_FlyingBlood", 40, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("XDeathGargoyleSkullOutM", 32, 0, random (0, 360), 2, random (0, 160))
		Death:
			TNT1 A 0
			Stop
	}
}

ACTOR XDeathGargoyleSkullOutM
{
	Radius 8
	Height 8
	Scale 1.0
	Speed 0 //was 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+MISSILE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOTELEPORT
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPSK E 12
			Loop
		Death:
			TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			IPWG G 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1) //uses a wing-off based sprite so this is setup strange
			IMPM MNOP 4 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
			TNT1 A 0 A_SpawnItem("FallenM_Gargoyle",0,0,0,1)
			TNT1 A 0
			Stop
	}
}

//////////////////////
//Frozen Actor Types//
//////////////////////

ACTOR FrozenGargoyle : FrozenZombieman 
{
	States
	{
	Spawn:
        TNT1 A 0 NoDelay A_PlaySound("Cryomancy/EnemyFreeze", 1)
		FRDI A 400
		FRDI A 2
		TNT1 A 0 A_PlaySound("ICEBRK1")
		FRDI A 50
		FRDI B 2
		FRDI A 50
		FRDI B 2
		FRDI A 50
		FRDI B 2
		FRDI A 25
		FRDI B 2
		FRDI A 25
		FRDI B 2
		FRDI A 10
		FRDI B 2
		FRDI A 10
		FRDI B 2
		FRDI A 10
		FRDI 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("GargoyleDamaged")
	    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))
		FRDI C 300
		FRDI 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("FrozenGargoyle")
		Stop
	}
}

ACTOR GargoyleDamaged : BrutalGargoyle
{
	Health 10
	Speed 4
}



ACTOR ExtremePunchedHImp
{
	Radius 16
	Height 16
	Speed 30
	Damage (random(50, 50))
	+MISSILE
    Scale 1.0
	+FORCEXYBILLBOARD
	-NOGRAVITY
	+NOEXTREMEDEATH
	+SKYEXPLODE
	+SHOOTABLE
	+NOEXTREMEDEATH
	+THRUGHOST
	+THRUSPECIES
	Species "Marines"
	Health 30
	Gravity 1.0
	DamageType melee
	DamageFactor "Cut", 2.00 DamageFactor "Saw", 2.00 damagefactor "PussyGrab", 10.0
	Decal BrutalBloodSuper
	States
	{
	Spawn:
		TNT1 A 0
	Flying:
        IMPP A 2
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 0)
		IMPP BCDEFGHI 2
		Loop
		
    Death:
	XDeath:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_CheckCeiling("HitCeil")
		TNT1 A 0 A_CheckFloor("DeathNormal")
		TNT1 A 0 A_JumpIfHealthLower(-40, "Death.Gibs")
		TNT1 A 0 A_JumpIfHealthLower(1, "Death.Shotgun")
		TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
		IMPX S 3
	    TNT1 A 0 A_SpawnItem("MuchBlood2")
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
		IMPX TUVWXX 3
		Stop
	
	HitCeil:
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
		IMPX ST 3
	    TNT1 A 0 A_SpawnItem("MuchBlood2")
		IMPX UVWXX 3
		Stop
		
	Crashing:
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_NoBlocking
		IMPX HI 3
	    TNT1 A 0 A_SpawnItem("MuchBlood2")
		IMPX JKL 3
		TNT1 A 3
		Stop
		
	DeathNormal:	
	Death.Melee:
	Death.Fatality:
	Death.ExtremePunches:
	Death.Kick:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_StopSound(1)
		IMPX HI 3
	    TNT1 A 0 A_SpawnItem("MuchBlood2")
		IMPX JKL 3
		Stop
	
	Death.Gibs:
	Death.Explosives:
	Death.Shotgun:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("MuchBlood2")
		Stop
	}
}
//////////////////////////////////////////////////////////
//COULD WORK ON THIS AGAIN ONCE I GET THE SPRITES FOR IT//
/////////////////////Burning Gargoyle/////////////////////
//////////////////////////////////////////////////////////

/*
actor BurningGargoyle
{   Radius 1
    Height 1
    +NOTELEPORT
    +MOVEWITHSECTOR
	+NOICEDEATH
    Mass 1000
    Health 100
States    {
    Spawn:
       TNT1 A 0 BRIGHT
       DBRN A 1 BRIGHT
       DBRN AABBCCDDEE 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
       DBRN FFGGHH 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
       DBRN IIJJKKLL 3 BRIGHT A_CustomMissile ("BurnParticles", 28, 0, random (0, 180), 2, random (0, 180))
       DBRN MMN 3 BRIGHT A_CustomMissile ("BurnParticles", 32, 0, random (0, 180), 2, random (0, 180))
       DBRN NOOPP 3 BRIGHT A_CustomMissile ("BurnParticles", 22, 0, random (0, 180), 2, random (0, 180))
       DBRN QQ 3 BRIGHT A_CustomMissile ("BurnParticles", 18, 0, random (0, 180), 2, random (0, 180))
       //TNT1 A 0 A_PlaySound("DSFDTHE")
       DBRN RRSSTTSSRRSSTTSSRRSSTTRRSSTTSSRRSSTTSSRRSSTTSSTT 3 BRIGHT A_CustomMissile ("SmallBurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
       DBRN UU 3 BRIGHT A_CustomMissile ("BurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
	   TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
       DBRN VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 9 A_CustomMissile ("PlasmaSmoke", 8, 0, random (0, 360), 2, random (90, 110))
       DBRN V -1


    Spawn2:
       TNT1 A 0 BRIGHT
       //TNT1 A 0 A_PlaySound("DSFDTHG")
       TNT1 A 0 BRIGHT
       DBRN A 1 BRIGHT
       DBRN AABBCCDDEE 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
       DBRN FFGGHH 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
       DBRN IIJJKKLL 3 BRIGHT A_CustomMissile ("BurnParticles", 28, 0, random (0, 180), 2, random (0, 180))
       DBRN MMN 3 BRIGHT A_CustomMissile ("BurnParticles", 32, 0, random (0, 180), 2, random (0, 180))
       DBRN NOOPP 3 BRIGHT A_CustomMissile ("BurnParticles", 22, 0, random (0, 180), 2, random (0, 180))
       DBRN QQ 3 BRIGHT A_CustomMissile ("BurnParticles", 18, 0, random (0, 180), 2, random (0, 180))
       //TNT1 A 0 A_PlaySound("DSFDTHG")
       DBRN RRSSTTSSRRSSTTSSRRSSTTRRSSTTSSRRSSTTSSRRSSTTSSTT 3 BRIGHT A_CustomMissile ("SmallBurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
       DBRN UU 3 BRIGHT A_CustomMissile ("BurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
	   TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
       DBRN VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 9 A_CustomMissile ("PlasmaSmoke", 8, 0, random (0, 360), 2, random (90, 110))
       DBRN V -1
       Stop}}
*/