
ACTOR BossBelphegor : BaronofHell 8362
{
    Scale 1.5
	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 "CauseObjectsToSplash", 0.0
	damagefactor "TeleportRemover", 0.0
    Health 5000
	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 a Belphegor."
	MaxStepHeight 24
	MaxDropOffHeight 32
	+DONTHURTSPECIES
	+MISSILEMORE
   Speed 7

	Height 88
	Radius 32
	States
	{
	Spawn:

		BOS3 B 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		BOS3 B 10 A_Look
		Loop
	See:

		BOS3 AAAA 1 A_Chase
		BOS3 A 0 A_CheckSight("SEE2")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 BBBB 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 CCCC 1 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget8b", 0, 88,0)
		BOS3 BBBB 1 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("BossBelphAttack",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("SuperBelphegorGreenPlasmaBall", 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:
	    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 A_PlaySound("misc/xdeath4")
        CRS2 C 5
        CRS2 C -1
        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

    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("LordBelphegor")
        Stop
    Death.Eat:
        TNT1 A 0 A_GiveToTarget("EatMe",1)
		 Goto Death+3
        Stop
	}
} 



Actor DeadBelphegor
{
    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}}

ACTOR SuperBelphegorGreenPlasmaBall: 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)
		TNT1 A 0 A_SpawnItem("RocketSmokeTrail",0,0)
		Loop
	
	Death:
    BFE1 A 0 Bright
	EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
    BFE1 A 0 Bright A_Explode(50, 170, 1)
	TNT1 A 0 A_SpawnItem("GreenExplosionMushroom")
        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 GreenExplosionMushroom
{
+THRUACTORS
+NOGRAVITY
DAmagetype "InstakillMarines"
+EXTREMEDEATH
+MISSILE
States
{
Spawn:
	TNT1 A 0 A_Explode(20, 20)
	TNT1 A 0 A_PlaySound("FAREXPL", 1)
	TNT1 A 0 A_PlaySound("weapons/rocklx", 3)
	GPGX BCDEFGHIJKLMNOPQRSTUV 1 BRIGHT
	Stop
}
}



ACTOR BossBelphAttack: BaronBall
{
	Radius 24
	Height 16
	DamageType HKFT
	Projectile 
	+RANDOMIZE
	+FORCEXYBILLBOARD
    +THRUGHOST
	RenderStyle Add
	Alpha 0.6
    Damage 50
    Speed 42
	//HitObituary "$OB_IMPHIT"
	SeeSound "none"
	DeathSound "none"
	Decal "none"
	States
	{
	Spawn:
		TNT1 A 2 BRIGHT
        TNT1 A 2 //A_PlaySound("weapons/gswing")
		Goto Death
	Death:
		TNT1 A 0 BRIGHT
		Stop
	}
}
actor BossBelphegorSpot : CustomMonsterInvasionSpot 8363
{
DropItem BossBelphegor
} 