Actor PyroDemon : BaronofHell 30105
{
  //$Title "Pyro Demon"
  //$Category XV117Monsters
  Health 2000
  Radius 24
  Height 64
  Mass 1000
  Speed 8
  PainChance 20
  Monster
  MeleeDamage 10
  Obituary "%o was burnt to a crisp by a pyro demon"
  HitObituary "%o was melted my a pyro demon"
  Bloodcolor "75 25 00"
  +NoTarget
  +FloorClip
  +MissileMore
  +NoRadiusDmg
  +Boss
  +DontHurtSpecies
  SeeSound "pyro/see"
  PainSound "pyro/pain"
  DeathSound "pyro/death"
  ActiveSound "pyro/idle"
  Tag "Pyro Demon"
  States
  {
  Spawn:
    PYRO AB 10 A_Look
    Loop
	
	 SpawnNO:
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_SpawnItemEx ("BaronofHell2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG ,0)
		Stop
	
  See:
    PYRO AA 3 A_Chase
    PYRO A 0 A_SpawnItemEx("WalkFire",0,0,0,1,0,0,0,128)
    PYRO BB 3 A_Chase
    PYRO B 0 A_SpawnItemEx("WalkFire",0,0,0,1,0,0,0,128)
    PYRO CC 3 A_Chase
    PYRO C 0 A_SpawnItemEx("WalkFire",0,0,0,1,0,0,0,128)
    PYRO DD 3 A_Chase
    PYRO D 0 A_SpawnItemEx("WalkFire",0,0,0,1,0,0,0,128)
    Loop
	
	Melee:
	    TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 63,0)
		PYRO E 1
        PYRO F 6
        TNT1 A 0 A_PlaySound("weapons/gswing")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 63,0)
		TNT1 A 0 A_CustomMissile("BaronAttack",10,0,0,0)
		PYRO G 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 63,0)
		Goto See
		
  Missile:
    PYRO B 0 A_Jump(32,29)
    PYRO B 0 A_Jump(32,20)
    PYRO EF 8 Bright A_FaceTarget
    PYRO G 0 Bright A_CustomMissile ("FireShot",28,0,0,0)
    PYRO G 0 Bright A_CustomMissile ("FireShot",28,0,-4,0)
    PYRO G 3 Bright A_CustomMissile ("FireShot",28,0,4,0)
    PYRO H 3 Bright
    PYRO H 0 A_Jump(32,8)
    PYRO IJ 8 Bright A_FaceTarget 
    PYRO K 0 Bright A_CustomMissile ("FireShot",28,0,0,0)
    PYRO K 0 Bright A_CustomMissile ("FireShot",28,0,-4,0)
    PYRO K 3 Bright A_CustomMissile ("FireShot",28,0,4,0)
    PYRO L 3 Bright
    PYRO L 0 A_Jump(32,1)
    Goto See
    PYRO MN 8 Bright A_FaceTarget
    PYRO O 4 Bright A_CustomMissile ("PyroBlast",28,0,0,0)
    PYRO P 4 Bright
    Goto See
    PYRO MN 8 Bright A_FaceTarget
    PYRO O 4 Bright A_CustomMissile ("RainCometNull",28,0,0,0)
    PYRO O 4 Bright A_CustomMissile ("RainCometNull",28,0,90,0)
    PYRO O 4 Bright A_CustomMissile ("RainCometNull",28,0,180,0)
    PYRO O 4 Bright A_CustomMissile ("RainCometNull",28,0,270,0)
    PYRO P 4 Bright
    Goto See
	PYRO O 1 A_FaceTarget
    PYRO O 0 A_CustomMissile ("EscapeExplosion",28,10,0,0)
    PYRO O 0 A_Mushroom ("Pyroball",16)
    PYRO O 3
    PYRO P 3 Bright
    PYRO A 0 A_UnSetShootable
    PYRO A 1 A_PlaySound("pyro/tele")
    PYRO A 1 A_SetTranslucent(0.90)
    PYRO A 1 A_SetTranslucent(0.80)
    PYRO A 1 A_SetTranslucent(0.70)
    PYRO A 1 A_SetTranslucent(0.60)
    PYRO A 1 A_SetTranslucent(0.50)
    PYRO A 1 A_SetTranslucent(0.40)
    PYRO A 1 A_SetTranslucent(0.30)
    PYRO A 1 A_SetTranslucent(0.20)
    PYRO A 1 A_SetTranslucent(0.10)
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TNT1 A 0 A_Jump(128,25)
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_ExtChase(0,0,1,1)
    PYRO A 1 A_PlaySound("pyro/tele")
    PYRO A 1 A_SetTranslucent(0.10)
    PYRO A 1 A_SetTranslucent(0.20)
    PYRO A 1 A_SetTranslucent(0.30)
    PYRO A 1 A_SetTranslucent(0.40)
    PYRO A 1 A_SetTranslucent(0.50)
    PYRO A 1 A_SetTranslucent(0.60)
    PYRO A 1 A_SetTranslucent(0.70)
    PYRO A 1 A_SetTranslucent(0.80)
    PYRO A 1 A_SetTranslucent(0.90)
    PYRO A 1 A_SetTranslucent(1.0)
    PYRO A 0 A_CustomMissile ("EscapeExplosion",28,10,0,0)
    PYRO O 0 A_Mushroom ("Pyroball",16)
    PYRO A 0 A_SetShootable
    Goto See
  Pain:
    PYRO Q 2
    PYRO Q 2 A_Pain
    Goto See
Death.Cut:
TNT1 AA 0 A_SpawnItemEx("ArmorCrueltyBonus2", 0, 0, 32, random (-2.5, 2.5), random (-2.5, 2.5), 5)
TNT1 AA 0 A_SpawnItemEx("ArmorCrueltyBonus2", 0, 0, 32, random (-2.5, 2.5), random (-2.5, 2.5), 5)

Death.Saw:
TNT1 AA 0 A_SpawnItemEx("ArmorCrueltyBonus2", 0, 0, 32, random (-2.5, 2.5), random (-2.5, 2.5), 5)
TNT1 AA 0 A_SpawnItemEx("ArmorCrueltyBonus2", 0, 0, 32, random (-2.5, 2.5), random (-2.5, 2.5), 5)
  Death:
    PYRO R 10 Bright A_Scream
    PYRO S 10 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
	 TNT1 A 0 A_CustomMissile("ShrapnelParticle2",0,0,0,2,0) 
	 TNT1 A 0 A_CustomMissile("SmokeSpawner",0,0,0,2,0)
    PYRO T 10 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180)) 
	TNT1 A 0 A_CustomMissile("ShrapnelParticle2",0,0,0,2,0) 
    PYRO U 10 Bright A_NoBlocking
    PYRO VW 6 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
	TNT1 A 0 A_CustomMissile("ShrapnelParticle2",0,0,0,2,0) 
	 TNT1 A 0 A_CustomMissile("SmokeSpawner",0,0,0,2,0)
    PYRO X 6 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
	TNT1 A 0 A_CustomMissile("ShrapnelParticle2",0,0,0,2,0) 
    PYRO Y 3 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
	 TNT1 A 0 A_CustomMissile("SmokeSpawner",0,0,0,2,0)
    PYRO Z -1 Bright A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
    Stop
  }
}

Actor FireShot
{
  Radius 3
  Height 3
  Speed 15
  Damage 3
  Projectile
  RenderStyle Add
  Alpha 0.67
  DamageType Fire
  SeeSound "pyro/flame"
  DeathSound "pyro/flamepoof"
  Decal RevenantScorch
  States
  {
  Spawn:
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    FSHT A 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    Loop
  Death:
    FSHT A 0 Bright 
    FSHT B 0 Bright
    FSHT B 3 Bright
    FSHT C 3 Bright
    FSHT D 3 Bright
    FSHT E 3 Bright
    Stop
  }
}

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

Actor EscapeExplosion 
{
  SeeSound "pyro/explosion"
  Radius 8
  Height 56
  Speed 0
  States
  {
  Spawn:
    NKXP B 3 Bright
    NKXP C 3 Bright
    NKXP D 3 Bright A_Explode(20, 192)
    NKXP EFGHIJKLMNOPQRSTUV 3 Bright
    Stop
  }
}

Actor PyroBall
{
  Radius 10
  Height 8
  Speed 15
  SeeSound "pyro/bomb"
  DeathSound "pyro/bombhit"
  Projectile  
  RenderStyle Add
  Alpha 0.7
  -NoGravity
  +DoomBounce
  +LowGravity
  +FireDamage
  +SeekerMissile
  Decal RevenantScorch
  States
  {
  Spawn:
    RBAL A 0 Bright
    RBAL A 0 Bright A_AlertMonsters
    RBAL AAAABBBB 1 Bright 
    Goto Spawn +2
  Death:
    RBAL DEFGHI 4 Bright 
    Stop
  }
}

Actor FirebombExplosion1
{
  Radius 11
  Height 8
  Speed 18
  Damage 3
  +NoBlockMap
  +DropOff
  +Missile
  +ActivateImpact
  +ActivatePCross
  Obituary "%o was killed by a firebomb explosion."
  States
  {
  Spawn:
     FRME A 1 Bright
     Loop
  Death:
     FRME A 0
     FRME A 0 A_PlaySound("pyro/blastexplosion")
     FRME A 3 Bright A_Explode(10, 100)
     FRME B 1 Bright A_Mushroom("Pyroball",8)
     FRME B 2 Bright A_CustomMissile("FirebombExplosion2",25,0,180)
     FRME CDEFGHIJKLMNOPQRS 3 Bright
     Stop
  }
}

Actor FirebombExplosion2 : FirebombExplosion1
{
  States
  {
  Death:
    FRME A 0
    FRME A 0 A_PlaySound("pyro/blastexplosion")
    FRME A 3 Bright A_Explode(10, 100)
    FRME B 1 Bright
    FRME B 2 Bright A_CustomMissile("FirebombExplosion3",20,0,180)
    FRME CDEFGHIJKLMNOPQRS 3 Bright
    Stop
  }
}

Actor FirebombExplosion3 : FirebombExplosion1
{
  Speed 14
  Damage 3
  States
  {
  Death:
    FRME A 0
    FRME A 0 A_PlaySound("pyro/blastexplosion")
    FRME A 3 Bright A_Explode(10, 100)
    FRME BCDEFGHIJKLMNOPQRS 3 Bright
    Stop
  }
}

Actor PyroBlast
{
  Projectile
  +SeekerMissile
  +NoGravity
  RenderStyle Add
  Alpha 0.4
  SeeSound "pyro/blast"
  DeathSound "pyro/flamepoof"
  Speed 17
  Height 10
  Radius 10
  Decal Scorch
  states
  {
  Spawn:
    SBLL ABCDEFGHIJ 1 Bright A_SpawnItemEx("FireTail",0,0,0,0,0,0,0,128)
    SBLL A 0 Bright A_SeekerMissile(0,2)
    Goto Spawn+1
  Death:
    SBLL K 0 A_CustomMissile("FirebombExplosion1",1,0,45)
    SBLL K 0 A_CustomMissile("FirebombExplosion1",1,0,135)
    SBLL K 0 A_CustomMissile("FirebombExplosion1",1,0,225)
    SBLL K 0 A_CustomMissile("FirebombExplosion1",1,0,315)
    SBLL LMNOPQRSTUVW 1 Bright
    Stop
  }
}

Actor WalkFire
{
  +NoClip
  +Missile
  +DropOff
  +Randomize
  Scale 1.5
  Speed 1
  RenderStyle Add
  Alpha 0.67
  States
  {
  Spawn:
    TNT1 A 8
    FRTF A 3 Bright
    FRTF A 0 
    FRTF B 3 Bright
    FRTF B 0 
    FRTF C 3 Bright
    FRTF C 0 
    FRTF C 0 
    FRTF C 0 A_Jump(191,4)
    FRTF C 0 A_CustomMissile("WalkFire", 0, 24, 0)
    FRTF C 0 A_CustomMissile("WalkFire", 0, 0, 0)
    FRTF C 0 A_CustomMissile("WalkFire", 0, -24, 0)
    FRTF DEFGHIJKLMNO 3 Bright
    Stop
  }
}

Actor RainCometNull
{
  Radius 0
  Height 0
  Speed 8
  Projectile
  +FloorClip
  +Ripper
  +DoomBounce
  +CeilingHugger
  +DontHurtSpecies
  States
  {
  Spawn:
    ZAP5 A 0 A_Jump(5,8)
    ZAP5 AAAAAA 1 A_Wander
    ZAP5 A 8 A_CustomMissile("FallingComet",-24,random(0,128),random(0,360),2,random(1,89))
    Loop
  Death:
    ZAP5 A 0
    Stop
  }
}

Actor FallingComet
{
  Radius 6
  Height 8
  Speed 5
  Damage 5
  ExplosionDamage 40
  ExplosionRadius 80
  Scale 0.55
  Projectile
  SeeSound "pyro/comet"
  DeathSound "pyro/cometdeath"
  -NoGravity
  -Float
  +FloorClip
  +DontHurtSpecies 
  +SpawnCeiling
  Decal RevenantScorch
  States
  {
  Spawn:
    COMT AAAABBBBCCCC 1 Bright A_SpawnItemEx("FireTail", 0, 0, 0, 0, 0, 0, 0, 128)
    Loop
  Death:
    COMT D 3 Bright A_SpawnItemEx("CometDeathGlow", 0, 0, 0, 0, 0, 0, 0, 128)
    COMT E 3 Bright A_Explode(10,128,0)
    COMT E 0 A_SpawnItemEx("CometDeath", 0, 0, 0, 0, 0, 0, 0, 128)
    Stop
  }
}

Actor CometDeathGlow : FireTail
{
  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
  }
}
