actor EvilBaron
{
//Creator: NaturalxCF
//Origin: ZDoom Monster pack
//Sprite: BOSS
//Title: "Evil Baron"
spawnid 3
obituary "%o was pulverisated by a evil baron."
health 8000
radius 64
height 104
scale 1.8
mass 10000
Species "Hell"
DamageFactor "NobleComet", 0.0
DamageFactor "HellComet", 0.0
DamageFactor "Hell", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "Legendary", 0.01
DamageFactor "LegendaryGuru", 0.01
DamageFactor "LegendaryGuruPlayer", 0.01
DamageFactor "BFGSplash", 0.1
DamageFactor "BFGSpray", 0.1
DamageFactor "PDTBFG", 0.0
DamageFactor "PDTBFGTracer", 0.0
DamageFactor "PlayerDevBall", 0.0
DamageFactor "PlayerDevBall2", 0.0
DamageFactor "PlayerDTBFGRailgunSlug", 0.0
DamageFactor "PlayerDevTracer", 0.0
DamageFactor "Ice", 0.5
DamageFactor "Explosion", 0.1
DamageFactor "PlayerNemesisPlasma", 0.1
DamageFactor "PyroShot", 0.0
DamageFactor "PlayerPyro", 0.0
DamageFactor 0.45
speed 8
Translation "16:47=[51,51,51]:[0,0,0]", "48:79=[48,48,48]:[0,0,0]", "112:127=[102,102,255]:[0,0,128]", "1:2=[0,0,0]:[0,0,0]", "236:239=[48,48,48]:[0,0,0]", "13:15=[16,16,16]:[0,0,0]", "128:151=[64,64,64]:[0,0,0]"
painchance 5
meleedamage 30
seesound "evlba/sight"
painsound "baron/pain"
deathsound "evlba/death"
activesound "baron/active"
bloodcolor blue
MONSTER
Tag "\c[j1]Evil Baron\c-"
+FLOORCLIP
+BOSSDEATH
+BOSS
+MISSILEMORE
+MISSILEEVENMORE
+NOFEAR
+QUICKTORETALIATE
+DONTMORPH
+NORADIUSDMG
+DONTHARMSPECIES
+NOTIMEFREEZE
+NOICEDEATH
states
{
  Spawn:
    BOSS AB 10 A_Look
    loop
  See:
    BOSS AABB 2 A_Chase
    TNT1 A 0 A_SpawnItem("HoofStep",0,0,0,0)
    BOSS CCDD 2 A_Chase
    TNT1 A 0 A_SpawnItem("HoofStep",0,0,0,0)
    Loop
  Missile:
    NULL A 0 A_Jump(100,"Missile2","Missile3","Missile4","Missile5","Missile6")
	BOSS EF 5 A_FaceTarget
    BOSS G 5 A_CustomComboAttack("EvilBall1",50,25,"imp/melee")
    goto See
  Missile2:
	BOSS E 4 A_FaceTarget
    BOSS EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 2 A_CustomMissile("EvilBaronBall",100,40,random(-30,30))
	goto See
  Missile3:
    BOSS EF 5 A_FaceTarget
	BOSS A 0 A_SetInvulnerable
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 5 A_CustomMissile("EvilBaronBall",50,0,-10)  
    BOSS EF 5 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 5 A_CustomMissile("EvilBaronBall",50,0,-10)  
    BOSS EF 5 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-10)  	
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,15)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-15)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,20)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-20)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,25)   
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-25)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,30)  
	BOSS G 5 A_CustomMissile("EvilBaronBall",50,0,-30)
	BOSS A 0 A_UnSetInvulnerable
	goto See
  Missile4:
    BOSS EF 5 A_FaceTarget
	BOSS G 5 A_CustomMissile("EvilBaronBall2",50,0,0)
    BOSS EF 5 A_FaceTarget
	BOSS G 5 A_CustomMissile("EvilBaronBall2",50,0,0)  
    BOSS EF 5 A_FaceTarget
	BOSS G 5 A_CustomMissile("EvilBaronBall2",50,0,0)
	goto See
  Missile5:
    BOSS EF 8 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBall1",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBall1",50,0,5)  
	BOSS G 8 A_CustomMissile("EvilBall1",50,0,-5)  
	BOSS EF 8 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-10)  	
	BOSS G 0 A_CustomMissile("EvilBall1",50,0,15)  
	BOSS G 8 A_CustomMissile("EvilBall1",50,0,-15)
	goto See
  Missile6:
    BOSS EF 3 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 3 A_CustomMissile("EvilBaronBall",50,0,-10)  
    BOSS EF 3 A_FaceTarget
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,0)
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,-5)  
	BOSS G 0 A_CustomMissile("EvilBaronBall",50,0,10)  
	BOSS G 3 A_CustomMissile("EvilBaronBall",50,0,-10)     
	BOSS EF 0 A_SpidRefire
	goto Missile6+2
  Pain:
    BOSS H 2
    BOSS H 2 A_Pain
    goto See
  Death:
    BOSS I 8
    BOSS J 8 A_Scream
    BOSS K 8
    BOSS L 8 A_NoBlocking
    BOSS MN 8
    BOSS O -1 A_BossDeath
    stop
  Death: 
	BOSS II 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS II 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	BOSS J 0 A_Scream
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS JJ 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS JJ 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	BOSS K 0 A_Fall
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS KK 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS KK 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)	
	TNT1 A 0 A_SpawnItemEx("UltraSphere",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("CorruptedSphere",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("Megasphere",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("LegendaryRune",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("InvulnerabilitySphere",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS LLLL 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)		
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS MMMM 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)   
	TNT1 AAA 0 A_CustomMissile("BigBlueBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	BOSS NNNN 2 A_SpawnItemEx("BlueGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 A 0 A_BossDeath
	BOSS O -1 
	Stop 
  Raise:
    BOSS ONMLKJI 8
    goto See
  }
}

actor EvilBall1
{
  Game Doom
  SpawnID 128
  Translation "112:127=[0,0,183]:[0,0,0]", "224:231=[255,255,255]:[48,48,48]"
  Radius 52
  Height 24
  Scale 1.5
  Speed 20
  Damage 80
  Renderstyle Add
  Alpha 0.75
  DeathSound "weapons/bfgx"
  SeeSound "baron/attack"
  Projectile
  +RANDOMIZE
  States
  {
  Spawn:
    BFS1 A 1 bright A_SpawnItemEX("Trail1",-28)
    BFS1 B 1 bright A_SpawnItemEX("Trail2",-28)    
	loop
  Death:
    BFE1 AB 8 bright
    BFE1 C 0 bright A_Burst("EvilBall2")  
	BFE1 C 8 bright A_FadeOut(0.05)
    BFE1 DEF 8 bright
    stop
  }
}

actor EvilBall2: EvilBall1
{
  Game Doom
  SpawnID 128
  Radius 6
  Height 3
  Scale 0.2
  Speed 20
  Damage 4
  Renderstyle Add
  Alpha 0.75
  DeathSound "weapons/bfgx"
  Projectile
  +RANDOMIZE
  -NOGRAVITY
  +LOWGRAVITY
  States
  {
  Spawn:
    BFS1 A 2 bright A_SpawnItemEX("Trail3",-12)
    BFS1 B 2 bright A_SpawnItemEX("Trail4",-12)    
	loop
  Death:
    BFE1 AB 8 bright
	BFE1 C 8 bright A_FadeOut(0.05)
    BFE1 DEF 8 bright
    stop
  }
}

actor Trail1: EvilBall1
{
    RenderStyle Add
	Alpha 0.96
	Speed 0
	Damage 0
	PROJECTILE
	+NOCLIP
	States
	{
	  Spawn:
	  BFS1 A 4 bright A_FadeOut(0.05)
	  stop
  }
}

actor Trail2: EvilBall1
{
    RenderStyle Add
	Alpha 0.96
	Speed 0
	Damage 0
	PROJECTILE
	+NOCLIP
	States
	{
	  Spawn:
	  BFS1 B 4 bright A_FadeOut(0.05)
	  stop
  }
}

actor Trail3: EvilBall2
{
    RenderStyle Add
	Alpha 0.96
	Speed 0
	Damage 0
	PROJECTILE
	+NOCLIP
	States
	{
	  Spawn:
	  BFS1 A 4 bright A_FadeOut(0.05)
	  stop
  }
}

actor Trail4: EvilBall2
{
    RenderStyle Add
	Alpha 0.96
	Speed 0
	Damage 0
	PROJECTILE
	+NOCLIP
	States
	{
	  Spawn:
	  BFS1 B 4 bright A_FadeOut(0.05)
	  stop
  }
}


actor EvilBall3: EvilBall2
{
    damage 7
	speed 25
	PROJECTILE
	+NOGRAVITY
	-LOWGRAVITY
}

actor EvilBaronBall: BaronBall
{
    damage 12
	speed 20
	translation "112:127=[53,53,255]:[0,0,128]"
	renderstyle normal
	alpha 1
}

actor EvilBaronBall2: EvilBaronBall
{
    damage 60
	speed 15
	scale 2.0
	height 22
	radius 24
}
