actor CometTail
{
+CLIENTSIDEONLY
+NOINTERACTION
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.4
States
{
Spawn:
FRTB ABCDEFGHI 1 Bright
Stop
}
}

actor Comet
{
	Radius 6
	Height 8
	Speed 30
	Damage 25
	SpawnID 250
	ExplosionDamage 80
	ExplosionRadius 80
	Scale .55
	PROJECTILE
	+MTHRUSPECIES
	SeeSound "comet/launch"
	DeathSound "comet/explosion"
	Decal Scorch
	States
	{
		Spawn:
		COMT AAAABBBBCCCC 1 Bright A_SpawnItemEx("CometTail", 0, 0, 0, 0, 0, 0, 0, 128)
		goto Spawn
		Death:
		COMT D 3 Bright A_SpawnItemEx("CometDeathGlow", 0, 0, 0, 0, 0, 0, 0, 128)
		COMT E 3 Bright A_Explode
		COMT E 0 A_SpawnItemEx("CometDeath", 0, 0, 0, 0, 0, 0, 0, 128)
		Stop
	}
}

ACTOR Afrit : FPlus_Monster 3120
{
	spawnid 235
	//$Category "ZDoom Monster pack"
	Health 2500
	Speed 10
	Radius 24
	Height 72
	PainChance 50
	Mass 0x7FFFFFF
	Meleedamage 10
	SeeSound "baron/sight"
	PainSound "baron/pain"
	DeathSound "baron/death"
	ActiveSound "baron/active"
	MeleeSound "baron/melee"
	Missiletype "AfritBall"
	MissileHeight 44
	REACTIONTIME 8
	+NOGRAVITY
	+NOBLOOD
	+FLOATBOB
	+FLOAT
	+DONTHURTSPECIES
	Obituary "%o was scorched by an Afrit"
	HitObituary "%o found the Afrit too hot to handle."
	Damagefactor "HellFire", 0.0
		
	States
	{
		Spawn:
		FRIT A 0
		//FRIT A 0 A_CustomMissile("OrbitComet", 44, 0, 0, 2, 0)
		//FRIT A 0 A_CustomMissile("OrbitComet2", 44, 0, 180, 2, 0)
		FRIT ABCD 4 Bright A_Look
		Goto Spawn+3
		Idle:
		FRIT ABCD 4 Bright A_Look
		goto Idle
		See:
		FRIT AABBCCDD 2 Bright A_Chase
		goto See
		
		Melee:
		//FRIT S 0 A_Jump(64,4)
		FRIT ST 6 Bright A_FaceTarget
		FRIT U 6 Bright A_ComboAttack
		//Goto See +2
		FRIT E 6 Bright A_FaceTarget
		FRIT F 6 Bright A_CustomMissile("HellFire", 44, 0, 0)
		FRIT G 6 Bright A_FaceTarget
		Goto See +2
		
		Missile:
		//FRIT S 0 A_Jump(64,8)
		//FRIT S 0 A_Jump(128,4)
		FRIT ST 6 Bright A_FaceTarget
		FRIT U 6 Bright A_ComboAttack
		//Goto See +2
		FRIT EF 6 Bright A_FaceTarget
		FRIT G 6 Bright A_CustomMissile("Comet", 44, 0, 0)
		Goto See +2
		FRIT E 6 Bright A_FaceTarget
		FRIT F 6 Bright A_CustomMissile("HellFire", 44, 0, 0)
		FRIT G 6 Bright A_FaceTarget
		Goto See +2
		
		Pain:
		FRIT HH 4 Bright A_Pain
		Goto See +2
		
		MonDeath:
		TNT1 A 0 A_GiveInventory("FPMToken_Hard", 1)
		FRIT I 0 Bright A_NoGravity
		FRIT I 6 Bright A_Scream
		FRIT J 5 Bright A_NoBlocking
		FRIT KLMNOPQR 4 Bright
		Stop
	}
}

actor AfritBall
{
Radius 6
Height 8
Speed 15
Damage 25
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.8
SeeSound "imp/attack"
DeathSound "imp/shotx"
Decal BaronScorch
+MTHRUSPECIES
States
{
Spawn:
FRTM AB 5 Bright
goto Spawn
Death:
FRTM CDE 6 Bright
Stop
}
}

actor OrbitComet : Comet
{
SeeSound ""
+NOCLIP
Scale .28
Speed 5
States
{
Spawn:
COMT AABBCC 1 Bright A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
COMT A 0 A_CustomMissile("OrbitComet", 0, 0, 75)
COMT 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)
COMT A 0 A_CustomMissile("OrbitComet2", 0, 0, -75)
COMT A 0 A_SpawnItemEx("OrbitCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
Stop
}
}

ACTOR HellFire
{
+NOBLOCKMAP
+MISSILE
+DROPOFF
Speed 5
Damage 0
DeathSound "dragonfam/attack"

States
{
Spawn:
NULL A 1
goto Spawn
Death:
NULL A 0 Bright A_CustomMissile("HellFire1", 0, 0, -180)
//NULL A 0 Bright A_CustomMissile("HellFire1", 0, 16, -175)
//NULL A 0 Bright A_CustomMissile("HellFire1", 0, 32, -170)
//NULL A 0 Bright A_CustomMissile("HellFire1", 0, -16, -185)
//NULL A 0 Bright A_CustomMissile("HellFire1", 0, -32, -190)
Stop
}
}

actor OrbitCometTail : CometTail
{
Scale .5
}

ACTOR HellFire1
{
+NOCLIP
+MISSILE
+DROPOFF
Speed 2
Damage 2
+MTHRUSPECIES
States
{
Spawn:
NULL A 10 A_CustomMissile("HellFire2", 0, 0, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, -16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 0, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, -16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 0, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, -16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 0, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, -16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 0, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, 16, 0)
NULL A 10 A_CustomMissile("HellFire2", 0, -16, 0)
Stop
}
}

actor CometDeathGlow : CometTail
{
Scale 2.0
Alpha 0.6
+CLIENTSIDEONLY
+NOINTERACTION
States
{
Spawn:
FRTB ABCDEFGHI 3 Bright
Stop
}
}

actor CometDeath
{
+CLIENTSIDEONLY
+NOINTERACTION
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.7
States
{
Spawn:
COMT FGHI 3 Bright
Stop
}
}

ACTOR HellFire2
{
+NOCLIP
+MISSILE
+DROPOFF
+RANDOMIZE
Scale 1.5
Speed 1
Damage 2
RENDERSTYLE ADD
ALPHA 0.67
ExplosionDamage 3
ExplosionRadius 64
DeathSound "dragonfam/attack"
Damagetype "HellFire"
+MTHRUSPECIES
States
{
Spawn:
NULL A 8
FRTF A 3 Bright
FRTF A 0 A_Explode
FRTF B 3 Bright
FRTF B 0 A_Explode
FRTF C 3 Bright
FRTF C 0 A_Explode
FRTF C 0
FRTF C 0 A_Jump(191,4)
FRTF C 0 A_CustomMissile("HellFire2", 0, 24, 0)
FRTF C 0 A_CustomMissile("HellFire2", 0, 0, 0)
FRTF C 0 A_CustomMissile("HellFire2", 0, -24, 0)
FRTF DEFGHIJKLMNO 3 Bright
Stop
}
}