
ACTOR Belphegor2 : BaronofHell //Replaces Belphegor
{
    Scale 1.2
	Game Doom
    GibHealth 25
	+NOICEDEATH
	PainChance "Kick", 255
	damagefactor "Avoid", 0.0
	damagefactor "Head", 2.0
	damagefactor "GibRemoving", 0.0
	damagefactor "MINORHead", 1.0
	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
	damagefactor "TeleportRemover", 0.0
    Health 2000
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    damagefactor "Shrapnel", 0.4
	damagefactor "Explosive", 1.7
	Obituary "%o was no match for the Belphegor."
	BloodType "Green_Blood", "GreenSawBlood", "GreenSawBlood"
	BloodColor "DarkGreen"
	MaxStepHeight 24
	MaxDropOffHeight 32
	+DONTHURTSPECIES
	+MISSILEMORE
	DeathHeight 4
	BurnHeight 0
   Speed 14

	Height 88
	Radius 32
	States
	{
	Spawn:

TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		BOS3 BD 10 A_Look
		Loop
	See:

		BOS3 AAAA 2 A_Chase
		BOS3 A 0 A_CheckSight("SEE2")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 BBBB 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 CCCC 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 BBBB 2 A_Chase
		Loop
	See2:
TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
        TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0)
		BOS3 AABBCCBB 1 A_Chase
		Goto See
	Melee:
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
        BOS3 F 8
        TNT1 A 0 A_PlaySound("weapons/gswing")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 G 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		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
	
    Missile:
TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 F 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 G 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		TNT1 A 0 A_JumpIfCloser(150, "Melee2")
		BOS3 H 8 A_CustomMissile("Belphegor_Green_Plasma_Ball", 50, 0, 0, 1) 
		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

	Pain:
TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_SpawnItem("HeadshotTarget4b", 0, 88,0)
		BOS3 E  3
		TNT1 A 0 A_SpawnItem("HeadshotTarget4b", 0, 88,0)
		BOS3 E  3 A_Pain
		Goto See
    Death.SSG:
	XDeath:
	   TNT1 AAAAAAAAAAAAAAA 0 A_CustomMissile ("SuperWallRedBlood", 40, 0, random (0, 360), 2, random (-5, 5))
	   TNT1 AAAAAAAAAAAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
        TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("CeilBloodLauncherLong", 0, 0, random (0, 360), 2, random (50, 130))
	    TNT1 AA 0 A_CustomMissile ("MuchMeatDeath", 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:
	    BOS3 I 8 A_Scream
		BOS3 J 8 A_bossdeath
		BOS3 K 8 A_NoBlocking
		BOS3 L 8
		
		BOS3 L -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

   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 ("XBloodmistBig", 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 ("XBloodmistBig", 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 ("XBloodmistBig", 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 ("XBloodmistBig", 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 ("XBloodmistBig", 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

    Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
        Goto Missile
    Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("Belphegor")
        Stop
    Death.Eat:
        TNT1 A 0 A_GiveToTarget("EatMe",1)
		 Goto Death+3
        Stop
	}
} 



Actor DeadBelphegor: CurbstompedMarine
{
    Radius 12
    Height 18
    Scale 1.2
    +SHOOTABLE
    -SOLID
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
    Mass 1000
    Health 200
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
States
    {
    Spawn:
		BADD D -1
        Stop
	Raise:
		BOS3 O 8
		BOS3 NMLKJI  8
        TNT1 A 0 A_SpawnItem ("HellKnight2", 3)
		Stop
    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))
         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 ("GreenXBloodmistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("GreenXBloodmistBig", 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 ("GreenXBloodmistBig", 1, -40, random (0, 360), 2, random (30, 90))
		 TNT1 AA 0 A_CustomMissile ("GreenXBloodmistBig", 1, 40, random (0, 360), 2, random (30, 90))
		 TNT1 A 0 A_NoBlocking
		 GIBS Z 1
		 GIBS Z -1
		Stop	
		
		}}

ACTOR Belphegor_Green_Plasma_Ball: BaronBall
{
	Radius 10
	Height 16
	Speed 30
	FastSpeed 30
	Projectile 
	+RANDOMIZE
	+FORCEXYBILLBOARD
    +THRUGHOST
    Damage 7
	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(30, 170, 1)
        TNT1 AAAAAAAAA 0 A_CustomMissile ("GreenExplosionFire", 2, 0, random (0, 360), 2, random (0, 360))
        EXPL AA 0 A_CustomMissile ("BigNeoSmoke", 0, 0, random (0, 360), 2, random (0, 360))
    TNT1 BCDEF 2 Bright
	TNT1 AAAAAAA 2 A_CustomMissile ("BigNeoSmoke", 2, 0, random (0, 360), 2, random (0, 360))
	Stop
	}
}


		
Actor FatalizedBelphegor
{
    Radius 12
    Height 18
    Scale 1.2
    +SHOOTABLE
    -SOLID
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
    Mass 1000
    Health 200
    DamageFactor "Blood", 0.0
    DamageFactor "Trample", 0.0
States
    {
    Spawn:
		TNT1 AAAAAA 0 A_CustomMissile ("GreenXBloodmistBig", 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
	Raise:
		BOS3 O 8
		BOS3 NMLKJI  8
        TNT1 A 0 A_SpawnItem ("Belphegor", 3)
		Stop
    Death:
		 TNT1 AAA 0 A_CustomMissile ("XDeath1Green", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath2Green", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath3Green", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath4Green", 5, 0, random (0, 360), 2, random (0, 160))
         Stop
    }}
