ACTOR Belphegor2 : BaronofHell 2544
{
	//$category "BD Monsters"
    Scale 1.2
	Game Doom
    GibHealth 25
	+NOICEDEATH
    Health 2500
	Mass 2000
	Obituary "%o was no match for the Belphegor."
	BloodType "Green_Blood", "GreenSawBlood", "GreenSawBlood"
	BloodColor "DarkGreen"
	MaxStepHeight 24
	MaxDropOffHeight 32
	+DONTHARMSPECIES
	+MISSILEMORE
	DeathHeight 4
	BurnHeight 0
    Speed 8
	FastSpeed 12
	Species "BaronofHell"
	Radius 24//62SpriteW(120%=74)
	Height 71//74SpriteH(120%=89)
	Tag "Belphegor"
	Painchance "Slide", 16
	States
	{
	Spawn:

		BOS3 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 B 10 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 D 10 A_Look
		Loop
	See:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Token1", 1, "See2")
		BOS3 AAAA 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 BBBB 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 CCCC 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 BBBB 2 A_Chase
		Loop
		
	See2:
		B0S3 PPP 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		B0S3 QQQ 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		B0S3 RRR 1 A_Chase
		Loop	
		
	Pain.Taunt:
		TNT1 A 0
		TNT1 A 0 A_CHangeFlag("FASTER", 1)
		TNT1 A 0 A_CHangeFlag("NOPAIN", 1)
		TNT1 A 0 A_GiveInventory("Token1", 1)
		B0S3 IJKL 3
		TNT1 A 0 A_PlaySound("baron/see")
		B0S3 MNONMNOMN 3
		B0S3 LKJ 3
		Goto See2
	Melee:
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
        BOS3 F 8
        TNT1 A 0 A_PlaySound("weapons/gswing")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 G 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		TNT1 AAAA 0 A_CustomMissile("KnightAttack",10,0,0,0)
		BOS3 H 8 A_FaceTarget
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		Goto See
		
	Melee2:
		TNT1 AAAA 0 A_CustomMissile("KnightAttack",10,0,0,0)
		TNT1 A 0 A_PlaySound("weapons/gswing")
		BOS3 H 8 A_FaceTarget
        TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		Goto See

    Missile:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Token1", 1, "MissileAngry")
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 F 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 G 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		TNT1 A 0 A_JumpIfCloser(150, "Melee2")
		BOS3 H 8 A_CustomMissile("BelphegorGreenPlasmaBall", 47, 0, 0, 1) 
		Goto See

	 MissileAngry:
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 G 0 A_FaceTarget
		BOS3 FFFF 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		BOS3 G 0 A_FaceTarget
		BOS3 GGGG 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 71)
		TNT1 A 0 A_JumpIfCloser(150, "Melee2")
		BOS3 H 0 A_CustomMissile("BelphegorGreenPlasmaBall", 47, 0, 0, 1) 
		BOS3 G 0 A_FaceTarget
		BOS3 HHHH 1 A_Chase("","")
		Goto See2

	Pain:
		TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget4b", 0, 71)
		TNT1 A 0 A_JumpIfHealthLower(1000, "Pain.Taunt")
		BOS3 E 3
		TNT1 A 0 A_SpawnItem("HeadshotTarget4b", 0, 71)
		BOS3 E 3 A_Pain
		TNT1 A 0 A_Jump(32, "Pain.Taunt")
		Goto See
    Death.SSG:
	XDeath:
	Death.Railgun:
		 TNT1 AA 0 A_CustomMissile ("XDeath2bGreen", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath3bGreen", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath2Green", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath3Green", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath4Green", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath5Green", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath6Green", 55, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_SpawnItem("MuchBlood2Green", 0, 55)
		 TNT1 AAAA 0 A_CustomMissile ("GreenGuts", 52, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeathHellKnightArm", 52, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathOrgan1Green", 55, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathOrgan2Green", 55, 0, random (0, 360), 2, random (0, 160))
		BXDE B  0 A_Scream
		BXDE C  0 A_bossdeath
		BXDE D  0 A_NoBlocking
		BO3G ABCD 8
		TNT1 A 0 A_SpawnItem ("GreenGrowingBloodPool")
		TNT1 A 0 A_SpawnItem ("DeadBelphegorXDeath")
		TNT1 A -1
	    Stop

	Death:
	    BOS3 I 8 A_Scream
		BOS3 J 8 A_bossdeath
		BOS3 K 8 A_NoBlocking
		BOS3 L 8
		TNT1 A 0 A_SpawnItem("DeadBelphegor")
		TNT1 A -1
	    Stop

	Death.head:
		TNT1 AAAAAA 0 A_CustomMissile ("Xdeath1", 82, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("Brains1", 82, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("Brains2", 82, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Brains3", 82, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Brains6", 82, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_bossdeath
		TNT1 A 0 A_NoBlocking
		BOS3 MNOPQR 8
		BOS3 R -1
	    Stop

	Raise:
		BOS3 O 8
		BOS3 NMLKJI  8
		Goto See
    Crush:
		TNT1 A 0
		TNT1 AAAA 0 A_SpawnItemEx ("BodyRemovalThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 1 A_XScream
		Stop

    Pain.Killme:
		TNT1 A 0
		TNT1 A 0 HealThing(1)
		Goto Missile
		
    Death.Eat:
        TNT1 A 0 A_GiveToTarget("EatMe",1)
		 Goto Death+3
        Stop	

   CurbstompMarine:
        TNT1 A 0 A_SetInvulnerable
        BS3F AB 10
	    BS3F CDEF 2
	    EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		BS3F GF 4
		BS3F HHIII 2
		BS3F J 15
		BS3F K 6
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		TNT1 AAA 0 A_CustomMissile ("XDeath2", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath3", 5, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("MuchBlood2", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("XDeath1", 1, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAAA 0 A_CustomMissile ("PlayerFlyingBlood", 50, 0, random (0, 360), 2, random (0, 160))
		BS3F L 15
		BS3F NM 4
		BS3F N 1
	    TNT1 AAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 10, 0, random (0, 360), 2, random (30, 90))
		BS3F NOPPP 3
   
		BS3F NM 4
		BS3F N 1
	    TNT1 AAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 10, 0, random (0, 360), 2, random (30, 90))
		BS3F NOPPP 3
   
		BS3F NM 4
		BS3F N 1
	    TNT1 AAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 10, 0, random (0, 360), 2, random (30, 90))
		BS3F NOPPP 3
   
		BS3F NM 4
		BS3F N 1
	    TNT1 AAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 10, 0, random (0, 360), 2, random (30, 90))
		BS3F NOPPP 3
   
		BS3F NM 4
		BS3F N 1
	    TNT1 AAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		TNT1 AAAA 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 10, 0, random (0, 360), 2, random (30, 90))
		BS3F NOPPP 3
   
		TNT1 A 0 A_TakeInventory("Curbstomp_Marine")
        TNT1 A 0 A_UnSetInvulnerable
	Goto See
	}
}

ACTOR BelphegorGreenPlasmaBall: BaronBall
{
	Radius 10
	Height 16
	Speed 30
	FastSpeed 30
	Projectile 
	+RANDOMIZE
	+FORCEXYBILLBOARD
    +THRUGHOST
    Damage (random(60,60))
	RenderStyle Add
	Alpha 0.9
	Scale 1.6
	SeeSound "baron/attack"
	DeathSound "FAREXPL"
	Decal "Scorch"
	DamageType "ExplosiveImpact"
	States
	{
	Spawn:
	    TNT1 A 0 A_SpawnItem("GreenFlare22",0,0)
		FRPG K 1 BRIGHT A_SpawnItemEx("GreenExplosionFlameTrail", 0, 0, 0, 0, 0, 0, 0, 128) 
		Loop
	
	Death:
		BFE1 A 0 Bright
		EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
		BFE1 A 0 Bright A_Explode(32, 96, 1)
        TNT1 AAAA 0 A_CustomMissile ("GreenExplosionFire", 2, 0, random (0, 360), 2, random (0, 360))
        EXPL A 0 A_CustomMissile ("BigNeoSmoke", 0, 0, random (0, 360), 2, random (0, 360))
		FRPG BCDEF 2 Bright
		TNT1 AAAA 2 A_CustomMissile ("BigNeoSmoke", 2, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

Actor DeadBelphegor: CurbstompedMarine
{
    Radius 12
    Height 18
    Scale 1.2
    Mass 8000
    Health 1000
	BloodType "Green_Blood", "GreenSawBlood", "GreenSawBlood"
	BloodColor "DarkGreen"
	States
    {
    Spawn:
		BOS3 l 1
		BOS3 l -1
        Stop
	Raise:
		BOS3 O 8
		BOS3 NMLKJI  8
        TNT1 A 0 A_SpawnItem ("Belphegor2", 3)
		Stop
    Death:
		 TNT1 A 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AA 0 A_CustomMissile ("XDeath2bGreen", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath3bGreen", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath4Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath5Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath6Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AAA 0 A_SpawnItem("MuchBlood2Green", 0, 25)
		 TNT1 A 0 A_SpawnItem("MuchBlood3Green", 0, 25)
		 TNT1 AAAA 0 A_CustomMissile ("GreenGuts", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeathHellKnightArm", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathOrgan1Green", 15, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathOrgan2Green", 15, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_SpawnItem("DeadBelphegorXDeath")
		 Stop	
    Death.Plasma: Death.Plasma2:
    Death.Flames:
    Death.Burn:
        TNT1 A 0
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		EXPL AAAAA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        BOSB ABCDE 9 A_CustomMissile ("PlasmaSmoke", 24, 0, random (0, 180), 2, random (0, 180))
        BOSB EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 8 A_CustomMissile ("PlasmaSmoke", 16, 0, random (0, 180), 2, random (0, 180))
        BOSB E -1
        Stop
		
	Death.CrushedBodies:
		 TNT1 A 0 A_SetAngle(0)
		 TNT1 A 0 bright A_CustomMissile ("GreenSuperGoreSpawner", 1, -40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 bright A_CustomMissile ("GreenSuperGoreSpawner", 1, 40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 A_CustomMissile ("XDeath1Green", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath2bGreen", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3bGreen", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("GreenBloodMistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("GreenBloodMistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_SetAngle(90)
		 TNT1 A 0 bright A_CustomMissile ("GreenSuperGoreSpawner", 1, -40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 bright A_CustomMissile ("GreenSuperGoreSpawner", 1, 40, random (0, 360), 2, random (25, 45))
		 TNT1 A 0 A_CustomMissile ("XDeath1Green", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath2bGreen", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3bGreen", 1, random (-30, 30), random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("GreenBloodMistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("GreenBloodMistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_NoBlocking
		 GIBS Y 1
		 GIBS Y -1
		Stop
		
		}}

Actor DeadBelphegorXDeath: DeadBelphegor
{
	Health 5000
	States
    {
    Spawn:
		
		BO3G E 1
		BO3G E -1
        Stop
	Raise:
		BOS3 O 8
		BOS3 NMLKJI 8
        TNT1 A 0 A_SpawnItem ("Belphegor2", 3)
		Stop
    Death:
		 TNT1 A 0
	     TNT1 A 0 A_NoBlocking
		 TNT1 AA 0 A_CustomMissile ("XDeath2bGreen", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath3bGreen", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath4Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath5Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath6Green", 25, 0, random (0, 360), 2, random (20, 90))
		 TNT1 AAA 0 A_SpawnItem("MuchBlood2Green", 0, 25)
		 TNT1 A 0 A_SpawnItem("MuchBlood3Green", 0, 25)
		 Stop	
		 }
}

Actor FatalizedBelphegor: DeadBelphegor
{
States
    {
    Spawn:
		TNT1 AAAAAA 0 A_CustomMissile ("GreenBloodMistBig", 50, 0, random (0, 360), 2, random (0, 160))
		BS4F JK 7
		TNT1 AAAAAAAAAA 0 A_CustomMissile ("MuchBloodGreen", 50, 0, random (0, 360), 2, random (0, 160))
		BS4F L -1
        Stop
    }}
