Actor Schism_LordAfrit
{
	//$Category Monsters
	Health 800
	Speed 16
	FastSpeed 20
	Radius 24
	Height 63
	PainChance 50
	PainChance "Avoid", 100
	PainChance "Kick", 200
	PainChance "Melee", 150
	PainChance "Taunt", 0
	Mass 1500
	Scale 1.2
	SeeSound "Baron/Sight"
	PainSound "Baron/Pain"
	DeathSound "Baron/Death"
	ActiveSound "Baron/Active"
	Monster
	+NoGravity
	+FloatBOB
	+Float
	+DontHurtSpecies
	-MissileEvenMore
	+NEVERFAST
	Obituary "%o was scorched by an Afrit"
	HitObituary "%o found the Afrit too hot to handle."
	Damagefactor "HellFire", 0.0
	DamageFactor "Fire", 0.0
	DamageFactor "Burn", 0.0
	damagefactor "Fatality", 0.5
	DamageFactor "Blood", 0.0 DamageFactor "BlueBlood", 0.0 DamageFactor "GreenBlood", 0.0
	DamageFactor "bloodsplasher", 0.0    DamageFactor "tinybloodsplasher", 0.0    DamageFactor "superbloodsplasher", 0.0    DamageFactor "smallbloodsplasher", 0.0
	DamageFactor "BlueBloodSplasher", 0.0
	DamageFactor "BlueSuperBloodSplasher", 0.0
	damagefactor "Taunt", 0.0
	damagefactor "SSG", 1.5
	damagefactor "HelperMarineFatallity", 3.0
	damagefactor "SuperPunch", 3.0
	damagefactor "Melee", 3.0
	damagefactor "Freeze", 3.0
	damagefactor "Lightning", 1.0
	DamageFactor "Explosive", 0.5
	PainChance "ExplosiveImpact", 200
	PainChance "Stun", 255
	damagefactor "killme", 0.0
	damagefactor "Avoid", 0.0
	Species "FlyingBalls"
	+DONTHARMSPECIES

	States
	{
		Spawn:
			FRIT A 0
			FRIT AABB 4 Bright A_Look
			Goto Spawn+3
		Idle:
			FRIT ABCD 4 Bright A_Look
			Loop
		See:
			FRIT AA 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT AA 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT BB 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT BB 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT CC 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT CC 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT DD 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			FRIT DD 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			Loop
		
		PerformanceSee:
			FRIT AA 2 Bright A_Chase
			FRIT AA 2 Bright A_Chase
			FRIT BB 2 Bright A_Chase
			FRIT BB 2 Bright A_Chase
			FRIT CC 2 Bright A_Chase
			FRIT CC 2 Bright A_Chase
			FRIT DD 2 Bright A_Chase
			FRIT DD 2 Bright A_Chase
			Loop
		
		Melee:
			TNT1 A 0 A_Jump(128, "Melee2")
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT ST 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT U 6 Bright A_CustomComboAttack("AfritFireBall", 44, 10, "Baron/Melee")
			Goto See
		
		
		Melee2:
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT E 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT F 6 Bright A_CustomMissile("HellFire", 44)
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT G 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See

		
		  Missile:
		   // TNT1 A 0 A_JumpIfInventory("PerformanceMode", 1, "PerformanceMissile")
			TNT1 A 0 A_Jump(128, "Missile2")
			
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT S 6 Bright A_FaceTarget
			
			FRIT T 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT U 6 Bright A_CustomComboAttack("AfritLordFireBall", 44, 10, "Baron/Melee")
			
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Jump(128, "Missile2")
			Goto See
			
		  Missile2:
			FRIT E 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT FFFFFFFFF 1 Bright A_CustomMissile("FireBall_", random (28,42) ,10, random (-4, 4))
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT GGG 2 Bright A_CustomMissile("BigFireBall", random (28,45) ,10, random (-4, 4)) //("Comet", 44) - there is no time for astronomy...
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Jump(128, "Missile")
			Goto See

		  Pain:
			//TNT1 A 0 A_JumpIfInventory("PerformanceMode", 1, "PerformancePain")
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT H 4 Bright
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			FRIT H 4 Bright A_Pain
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See
		
		Pain.Stun:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx ("StunElectrocute", random (-4, 4), random (-4, 4),  random (16, 32), 0, 0)
			FRIT H 1 A_Pain
			FRIT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			FRIT H 1 A_Pain
			FRIT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			FRIT H 1 A_Pain
			FRIT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			FRIT H 1 A_Pain
			FRIT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			FRIT H 1 A_Pain
			FRIT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			FRIT H 1 A_Pain
			Goto See
		
		
		Death:
			TNT1 A 0 A_Jump(256,"Death.Vanish", "Death.Dropdown")
			goto Death.Vanish
	  
		Death.Dropdown:
			FRI1 A 6 Bright A_Scream
			TNT1 AAA 0 A_CustomMissile ("MuchBlood2", 35, 0, random (0, 360), 2, random (0, 160))
			FRI1 B 6 Bright A_NoBlocking
			TNT1 AAAA 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 A_SpawnItem("ExplosionParticleSpawner")
			EXPL AAAAAAA 0 A_CustomMissile ("FireballExplosionFlamesBig", 6, 0, random (0, 360), 2, random (0, 360))
			FRI1 CD 6 Bright
			TNT1 A 0 A_SpawnItem ("DeadAfrit")	
			Stop
		
		Death.Vanish:
			TNT1 A 0 A_NoGravity
			FRIT I 6 Bright A_Scream
			FRIT J 5 Bright A_NoBlocking
			TNT1 AAAA 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 A_SpawnItem("ExplosionParticleSpawner")
			EXPL AAAAAAA 0 A_CustomMissile ("FireballExplosionFlamesBig", 6, 0, random (0, 360), 2, random (0, 360))
			FRIT KLMNOPQR 4 Bright
			Stop
		
		Death.SSG:
		Death.Explosive:
		Death.ExplosiveImpact:
		Death.QuadBlast:
		XDeath:
		Death.Cut:
		Death.Saw:
		Death.Massacre:
			TNT1 A 0 A_CustomMissile ("AfritXDeath", 0, 0, random (0, 360), 2, random (0, 160))
			BXDE A  0
			BXDE B  0 A_Scream
			BXDE C  0 A_BossDeath
			BXDE D  0 A_NoBlocking
			BXDE EFGH 0
			TNT1 A 0
			Stop
	  
		
		Death.Fatality:
			TNT1 A 0 A_NoBlocking
			//TNT1 A 0 A_GiveToTarget("GoFatality", 1)
			TNT1 A 0 A_Jump(256, "Death.Fatality3") //"Death.Fatality1",
			Goto Death.Fatality3
				
		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("FrozenAfritLord")
			Stop
	
		Death.Fatality3:
			TNT1 A 0 A_Scream
			//TNT1 A 0 A_GiveToTarget("AfritFatality3", 1)
			Goto Death
  }
}

Actor DeadAfrit
{
    Radius 12
    Height 12
    +SHOOTABLE
    -SOLID
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
    +USESPECIAL
	+FLOORCLIP
	-DONTGIB
	//+DROPPED
    Mass 2000
    Health 100
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
	
States
    {
    Spawn:
		//TNT1 A 0 A_CustomMissile ("MuchBlood2", 35, 0, random (0, 360), 2, random (0, 160))
        FRI1 E -1
        Stop
	Raise:
		FRI1 D 1
		FRI1 CBA 1
        TNT1 A 0 A_SpawnItem ("Afrit", 3)
		Stop
	Death:	
	XDeath:
	Crush:
	Death:
  	     TNT1 AAA 0 A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath2", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath3", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath4", 5, 0, random (0, 360), 2, random (0, 160))
         TNT1 A 0 A_SpawnItem("GibsZ")
  	    Stop
    }
}


Actor AfritBall
{
  Radius 6
  Height 8
  Speed 30
  Damage 4
  Damagetype "burn"
  Projectile
  RenderStyle Add
  Alpha 0.8
  SeeSound "Imp/Attack"
  DeathSound "Imp/ShotX"
  Decal BaronScorch
  States
  {
  Spawn:
    FRTM AB 5 Bright
    Loop
  Death:
    FRTM CDE 6 Bright
    Stop
  }
}

Actor Comet
{
  Radius 6
  Height 8
  Speed 20
  Damage 5
  Damagetype "Fire"
  SpawnID 250
  Scale 0.55
  Projectile
  SeeSound "Afrit/CometFire"
  DeathSound "belphegor/missile"
  Decal Scorch
  +DONTSPLASH
  States
  {
  Spawn:
  
    COMT A 1 Bright A_SpawnItemEx("CometTail",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("FireballFlare",0,0)
	TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 0, 0, random (0, 360), 2, random (50, 130))
	TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails")
    COMT B 1 Bright A_SpawnItemEx("CometTail",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("FireballFlare",0,0)
	TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 0, 0, random (0, 360), 2, random (50, 130))
	TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails")
    COMT C 1 Bright A_SpawnItemEx("CometTail",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("FireballFlare",0,0)
	TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 0, 0, random (0, 360), 2, random (50, 130))
	TNT1 A 0 A_SpawnItem ("CoolAndNewFlameTrails")

    Loop
  Death:
	TNT1 A 0 A_Explode(random(23,28), 60, 0)
	TNT1 AAAA 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	EXPL A 0 A_SpawnItem("ExplosionParticleSpawner")
	EXPL AAA 0 A_CustomMissile ("FlamethrowerFireParticles", 6, 0, random (0, 360), 2, random (0, 90))
	TNT1 AA 0 A_CustomMissile ("FireworkSFXType2", 0, 0, random (0, 360), 2, random (30, 60))
    COMT D 2 Bright A_SpawnItemEx("CometDeathGlow", 0, 0, 0, 0, 0, 0, 0, 128)
    COMT E 2 Bright 
    TNT1 A 0 A_SpawnItemEx("CometDeath", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 20 A_CustomMissile ("BigBlackSmoke", 0, 0, random (0, 360), 2, random (40, 160))
    Stop
  }
}

Actor CometTail
{
  Projectile
  +NoClip
  RenderStyle Add
  Alpha 0.4
  States
  {
  Spawn:
    FRTB ABCDEFGHI 1 Bright
    Stop
  }
}

Actor CometDeathGlow : CometTail
{
  Scale 2.0
  Alpha 0.6
  States
  {
  Spawn:
    FRTB ABCDEFGHI 3 Bright
    Stop
  }
}

Actor CometDeath
{
  Projectile
  RenderStyle Add
  +NoClip
  Alpha 0.7
  States
  {
  Spawn:
    COMT FGHI 3 Bright
    Stop
  }
}

Actor OrbitComet : Comet
{
  SeeSound ""
  +NoClip
  Scale 0.28
  Speed 5
  States
  {
  Spawn:
    COMT AABBCC 1 Bright A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 A 0 A_CustomMissile("OrbitComet", 0, 0, 75)
    TNT1 A 0 A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
    Stop
  }
}

Actor OrbitComet2 : OrbitComet
{
  States
  {
  Spawn:
    COMT AABBCC 1 Bright A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 A 0 A_CustomMissile("OrbitComet2", 0, 0, -75)
    TNT1 A 0 A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
    Stop
  }
}

Actor OrbitCometTail : CometTail
{
  Scale 0.5
}

Actor HellFire
{
  +NoBlockMap
  +Painless
  +BloodlessImpact
  +Missile
  +DropOff
  +DONTSPLASH
  States
  {
  Spawn:
    TNT1 A 1
    Loop
  Death:
    TNT1 A 0 Bright A_CustomMissile("HellFire1", 0, 0, -180)
    TNT1 A 0 Bright A_CustomMissile("HellFire1", 0, 16, -175)
    TNT1 A 0 Bright A_CustomMissile("HellFire1", 0, 32, -170)
    TNT1 A 0 Bright A_CustomMissile("HellFire1", 0, -16, -185)
    TNT1 A 0 Bright A_CustomMissile("HellFire1", 0, -32, -190)
    TNT1 A 10 Bright A_PlaySound("Afrit/Hellfire")
    Stop
  }
}

Actor HellFire1
{
  +Ripper
  +NoExplodeFloor
  +Painless
  +BloodlessImpact
  +Missile
  +DropOff
  +DONTSPLASH
  Speed 2
  States
  {
  Spawn:
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 0, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, -16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 0, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, -16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 0, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, -16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 0, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, -16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 0, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, 16, 0)
     TNT1 A 10 A_CustomMissile("HellFire2", 0, -16, 0)
     Stop
  }
}

Actor HellFire2
{
  +Ripper
  +NoExplodeFloor
  +BloodlessImpact
  +DropOff
  +Randomize
  +DONTSPLASH
  Scale 1.5
  Speed 1
  RenderStyle Add
  Alpha 0.67
  Damagetype "Burn"
  Obituary "%o was scorched by an Afrit"
  States
  {
  Spawn:
    TNT1 A 8
    FRTF A 3 Bright
    FRTF BC 3 Bright A_Explode(2, 64)
    TNT1 A 0 A_Explode(2, 64)
    TNT1 A 0 A_Jump(191, 4)
    TNT1 A 0 A_CustomMissile("HellFire2", 0, 24, 0)
    TNT1 A 0 A_CustomMissile("HellFire2", 0, 0, 0)
    TNT1 A 0 A_CustomMissile("HellFire2", 0, -24, 0)
    FRTF DEFGHIJKLMNO 3 Bright
    Stop
  }
}

ACTOR AfritXDeath
{
    Radius 1
    Height 1
    Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFACTOR 0.5
	BounceType "Doom"
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
    +MOVEWITHSECTOR
    +NOGRAVITY
    +NOCLIP
    +DONTSPLASH
    States
    {
    Spawn:
	     TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 35, 0, random (0, 360), 2, random (0, 160))
	     TNT1 AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		 TNT1 A 0 A_CustomMissile ("XDeathAfritTorso", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathAfritHead5", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeath1", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeath2", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeath3", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath4", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_SpawnItem ("BigBloodSpot")
	Death:
	    TNT1 A 0
        Stop
    }
}

//Afrit Gibs
ACTOR XDeathAfritTorso: XDeathArm1
{
    Scale 1.3
    Speed 12
	BounceFactor 0.4
    States
    {
    Spawn:
        TNT1 A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		G4FD ABCD 4 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 360), 2, random (0, 360))
		Loop
	Death:
        TNT1 A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
	    G4FD E 1
        HNDC A 0 A_SpawnItem("Gib_AfritTorso",0,0,0,1)
        Stop
    }
}

ACTOR Gib_AfritTorso: LimbBase
{
    Scale 1.3
    States
    {
		Spawn:
			G4FD E 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
			G4FD E -1
			Stop
		Death.plasma: 
		Death.Burn: 
		Death.Flames:	    
			TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))        Stop
		Death:    
			TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 AAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_CustomMissile ("Xdeath1", 0, 0, random (0, 360), 2, random (0, 360))
			Stop
	}
}

ACTOR XDeathAfritHead5: XDeathBullArm1
{
-CLIENTSIDEONLY
    Scale 1.2
    States
    {
	Spawn:
        TNT1 A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		TNT1 A 0 A_JumpIf(momz == 0, "Death")
		XH4F ABCD 6
		Loop
   	Death:
        TNT1 A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
	    XH4F A 1
        XH4F A 1 A_SpawnItem("AfritHead",0,0,0,1)
        Stop
}
}

ACTOR AfritHead: LimbBase
{
DamageFactor "Kick", 9.0
DamageFactor "SuperKick", 12.0
DamageFactor "Melee", 9.0
DamageFactor "SuperPunch", 9.0
-CLIENTSIDEONLY
    Radius 10
    
	Mass 12
	Health 60
    Scale 1.2
    States
    {
    Spawn:
XH4F A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
XH4F A -1
       Stop

    Death:
        TNT1 AAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 360), 2, random (60, 140))
        TNT1 A 0 A_PlaySound("misc/xdeath4")
		TNT1 AAAA 0 A_CustomMissile ("Brains1", 5, 0, random (0, 360), 2, random (60, 140))
		TNT1 A 0 A_CustomMissile ("Brains2", 5, 0, random (0, 360), 2, random (60, 140))
		TNT1 A 0 A_CustomMissile ("Brains3", 5, 0, random (0, 360), 2, random (60, 140))
		TNT1 A 0 A_CustomMissile ("Brains4", 5, 0, random (0, 360), 2, random (60, 140))
		TNT1 A 0 A_CustomMissile ("Brains5", 5, 0, random (0, 360), 2, random (60, 140))
		TNT1 AAAAAA 0 A_CustomMissile ("SmallBrainPiece", 5, 0, random (0, 360), 2, random (60, 140))
        Stop
    Death.Trample:
	Crush:
        TNT1 AAAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 360), 2, random (60, 140))
        TNT1 A 0 A_PlaySound("misc/xdeath4")
        CRS1 B 5
        CRS1 B 2002
        Stop
    Death.plasma:
        TNT1 A 0
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedSkull", 32, 0, random (0, 360), 2, random (0, 160))
		EXPL A 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        TNT1 A 0
        Stop
	Death.Melee:
	Death.SuperPunch:
	Death.Kick:
	Death.SuperKick:
	    XH4F A 1 A_Pain
	    XH4F A 1 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_CustomMissile ("XDeathAfritHeadKicked", 5, 0, random (170, 190), 2, random (20, 40))
		Stop
	
	Pain:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,20,0,1)
	XH4F ABCD 3
	Goto Spawn
	
	Death.ExplosiveImpact:
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 ThrustThingZ(0,50,0,1)
	XH4F ABCD 6
	XH4F I 0 A_SpawnItem("XDeathAfritHead5")
	Stop
}}

ACTOR XDeathAfritHeadKicked: XDeathAfritHead5
{
-BOUNCEONACTORS
DamageType KickBall
Damage 4
Speed 13
BounceFactor 0.4
}

Actor Schism_Afrit : Schism_LordAfrit
{
	Scale 0.8
	Health 500
	States
	{
		Spawn:
			AFRT A 0
			AFRT AABB 4 Bright A_Look
			Goto Spawn+3
		Idle:
			AFRT ABCD 4 Bright A_Look
			Loop
		See:
			AFRT AA 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT AA 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT BB 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT BB 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT CC 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT CC 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT DD 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			AFRT DD 2 Bright A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			Loop
		
		PerformanceSee:
			AFRT AA 2 Bright A_Chase
			AFRT AA 2 Bright A_Chase
			AFRT BB 2 Bright A_Chase
			AFRT BB 2 Bright A_Chase
			AFRT CC 2 Bright A_Chase
			AFRT CC 2 Bright A_Chase
			AFRT DD 2 Bright A_Chase
			AFRT DD 2 Bright A_Chase
			Loop
		
		Melee:
			TNT1 A 0 A_Jump(128, "Melee2")
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT ST 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT U 6 Bright A_CustomComboAttack("AfritFireBall", 44, 10, "Baron/Melee")
			Goto See
		
		
		Melee2:
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT E 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT F 6 Bright A_CustomMissile("HellFire", 44)
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT G 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See

		
		  Missile:
		   // TNT1 A 0 A_JumpIfInventory("PerformanceMode", 1, "PerformanceMissile")
			TNT1 A 0 A_Jump(128, "Missile2")
			
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT S 6 Bright A_FaceTarget
			
			AFRT T 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT U 6 Bright A_CustomComboAttack("AfritFireBall", 44, 10, "Baron/Melee")
			
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See
			
		  Missile2:
			AFRT E 6 Bright A_FaceTarget
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_FaceTarget 
			AFRT F 6 Bright //A_CustomMissile("FireBall_", 44 ,10, random (-4, 4), 2, random (-4, 4))
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT G 6 Bright A_CustomComboAttack("AfritFireBall", 44, 10, "Baron/Melee") //("Comet", 44) - there is no time for astronomy...
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See

		  Pain:
			//TNT1 A 0 A_JumpIfInventory("PerformanceMode", 1, "PerformancePain")
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT H 4 Bright
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			AFRT H 4 Bright A_Pain
			TNT1 A 0 A_CustomMissile("BurnParticles", 15 ,0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			Goto See
		
		Pain.Stun:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx ("StunElectrocute", random (-4, 4), random (-4, 4),  random (16, 32), 0, 0)
			AFRT H 1 A_Pain
			AFRT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			AFRT H 1 A_Pain
			AFRT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			AFRT H 1 A_Pain
			AFRT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			AFRT H 1 A_Pain
			AFRT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			AFRT H 1 A_Pain
			AFRT HHHHHHHHHH 3 A_SpawnItemEx ("StunElectrocute", random (-12, 12), random (-12, 12),  random (16, 52), 0, 0)
			AFRT H 1 A_Pain
			Goto See
		
		
		Death:
			TNT1 A 0 A_Jump(256,"Death.Vanish", "Death.Dropdown")
			goto Death.Vanish
	  
		Death.Dropdown:
			FRI1 A 6 Bright A_Scream
			TNT1 AAA 0 A_CustomMissile ("MuchBlood2", 35, 0, random (0, 360), 2, random (0, 160))
			FRI1 B 6 Bright A_NoBlocking
			TNT1 AAAA 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 A_SpawnItem("ExplosionParticleSpawner")
			EXPL AAAAAAA 0 A_CustomMissile ("FireballExplosionFlamesBig", 6, 0, random (0, 360), 2, random (0, 360))
			FRI1 CD 6 Bright
			TNT1 A 0 A_SpawnItem ("DeadAfrit")	
			Stop
		
		Death.Vanish:
			TNT1 A 0 A_NoGravity
			AFRT I 6 Bright A_Scream
			AFRT J 5 Bright A_NoBlocking
			TNT1 AAAA 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 A_SpawnItem("ExplosionParticleSpawner")
			EXPL AAAAAAA 0 A_CustomMissile ("FireballExplosionFlamesBig", 6, 0, random (0, 360), 2, random (0, 360))
			AFRT KLMNOPQR 4 Bright
			Stop
		
		Death.SSG:
		Death.Explosive:
		Death.ExplosiveImpact:
		Death.QuadBlast:
		XDeath:
		Death.Cut:
		Death.Saw:
		Death.Massacre:
			TNT1 A 0 A_CustomMissile ("AfritXDeath", 0, 0, random (0, 360), 2, random (0, 160))
			BXDE A  0
			BXDE B  0 A_Scream
			BXDE C  0 A_BossDeath
			BXDE D  0 A_NoBlocking
			BXDE EFGH 0
			TNT1 A 0
			Stop
	  
		
		Death.Fatality:
			TNT1 A 0 A_NoBlocking
			//TNT1 A 0 A_GiveToTarget("GoFatality", 1)
			TNT1 A 0 A_Jump(256, "Death.Fatality3") //"Death.Fatality1",
			Goto Death.Fatality3
				
		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("FrozenAfrit")
			Stop
	
		Death.Fatality3:
			TNT1 A 0 A_Scream
			//TNT1 A 0 A_GiveToTarget("AfritFatality3", 1)
			Goto Death
	}
}

Actor AfritDamaged : Schism_Afrit
{
	Health 80
	Speed 5
}

Actor AfritLordDamaged : Schism_LordAfrit
{
	Health 110
	Speed 5
}