
actor Motherdemon
{
  //$Category Monsters
  game Doom
  obituary "%o was obliterated by the mother of all demons."
  health 10000
  radius 60
  height 110
  mass 1000
  scale 1.1
  painchance 20
  reactiontime 8
  speed 24
  seesound "mother/sight"
  attacksound "mother/attack"
  painsound "mother/pain"
  deathsound "mother/death"
  activesound "mother/active"
  MONSTER
  +BOSS
  +FLOAT
  +NOGRAVITY
  +DONTMORPH
  +NORADIUSDMG
  +MISSILEMORE
  +TELESTOMP
  DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
  DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
  +MISSILEEVENMORE
  +LOOKALLAROUND
  +FORCEXYBILLBOARD
  +NOTARGET
  states
  {
  Spawn:
    MOTH ABCD 9 A_Look
    loop
  See:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(621, 0, 0, 0, 0)//Health Bar
	
  Chasing:	
    MOTH AAABBBCCCDDD 3 A_Chase
    loop
  Missile:
    MOTH E 1 A_FaceTarget
	TNT1 A 0 A_Jump(96, "SuperAttack")
	MOTH E 8 A_FaceTarget
    MOTH E 0 A_PlaySoundEx ("Mother/attack", "Body")
    MOTH G 0 bright A_CustomMissile (MotherFire,0,0,0,2,0)
    MOTH G 0 bright A_CustomMissile (MotherFire,0,0,90,2,0)
    MOTH G 0 bright A_CustomMissile (MotherFire,0,0,-90,2,0)
    MOTH G 14 bright A_CustomMissile (MotherFire,0,0,180,2,0)
    MOTH E 8 A_FaceTarget
    MOTH F 0 bright A_CustomMissile (MotherBall,100,-25,35)
    MOTH F 0 bright A_CustomMissile (MotherBall,50,-25,35)
    MOTH F 0 bright A_CustomMissile (MotherBall,100,25,-35)
    MOTH F 14 bright A_CustomMissile (MotherBall,50,25,-35)
    MOTH E 8
    goto See
	
 SuperAttack:
     TNT1 A 0
	 MOTH E 8 A_FaceTarget
	 MOTH E 0 A_PlaySoundEx ("Mother/attack", "Body")
    MOTH G 0 bright A_CustomMissile ("SuperMotherBall",100)
    MOTH E 8 A_FaceTarget
    MOTH F 8
    MOTH E 8
    goto See
 
  Pain:
    MOTH H 10
    MOTH H 10 A_Pain
    goto See
  Pain.Vertigo:
    MOTH H 0 ThrustThingZ (0, 55, 0, 0)
    MOTH H 10
    MOTH H 10 A_Pain
    Goto See
  Death:
    MOTH I 10
    MOTH I 0 A_Scream
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",0,0,0,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",0,0,0,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",-20,-20,55,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",20,20,110,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",20,20,0,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",0,0,55,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",0,0,110,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",-20,-20,0,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",20,20,55,0,0,0,0,130)
    MOTH I 12 A_SpawnItemEx ("ExplosionSpawner",-20,-20,110,0,0,0,0,130)
	TNT1 AAAAAA 0 A_CustomMissile ("CeilBloodLauncher", 0, 0, random (0, 360), 2, random (50, 130))
		 TNT1 AA 0 A_CustomMissile ("XDeath1", 32, 0, random (0, 360), 2, random (0, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath2", 32, 0, random (0, 360), 2, random (0, 90))
		 TNT1 AA 0 A_CustomMissile ("XDeath3", 32, 0, random (0, 360), 2, random (0, 90))
		 
		 TNT1 AAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 42, 0, random (0, 360), 2, random (0, 90))
		 TNT1 AAAAAA 0 A_CustomMissile ("XBloodmist", 35, 0, random (0, 360), 2, random (0, 90))
		 
		 TNT1 AAAAAAAAAAAAAAA 0 A_CustomMissile ("XBloodmistExtraBig", 45, 0, random (0, 360), 2, random (10, 90))
		 TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("SuperGoreSpawner", 45, 0, random (0, 360), 2, random (10, 90))
    MOTH L 0 A_NoBlocking
    MOTH L 3 A_SpawnItemEx ("ExplosionSpawner",20,20,55,0,0,0,0,130)
    MOTH L 3 A_SpawnItemEx ("ExplosionSpawner",0,0,110,0,0,0,0,130)
    MOTH MNO 3
    TNT1 A 300
    TNT1 A 0 A_BossDeath
	TNT1 A 20 A_BrainDie
    stop
  Crush:
    POL5 A 0
    POL5 A 0 A_PlaySound ("Misc/Gibbed")
    POL5 A -1
    Stop
  }
}









actor MotherBall : RevenantBalls
{
  speed 15
}

actor MotherFire
{
  game Doom
  height 8
  scale 0.8
  radius 6
  damage 5
  speed 15
  renderstyle Translucent
  alpha 0.5
  damagetype "Vertigo"
  seesound "skeleton/attack"
  deathsound "null"
  PROJECTILE
  +RANDOMIZE
  +NODAMAGETHRUST
  +FLOORHUGGER
  states
  {
  Spawn:
    MFIR ABCDE 4 bright A_CustomMissile ("MotherFireTrail",0,0,0,2,0)
    loop
  Death:
    MFIR E 0 bright
    stop
  }
}

actor MotherFireTrail
{
  game Doom
  scale 0.8
  height 8
  radius 6
  speed 0
  damage 0
  RenderStyle translucent
  Alpha 0.6
  +NOGRAVITY
  states
  {
  Spawn:
    TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
	TNT1 A 5 A_CustomMissile ("FireballExplosionFlames", random (0, 8), 0, random (0, 360), 2, random (80, 100))
	TNT1 A 0 A_Explode(15, 35, 1)
    Stop
  }
}


ACTOR SuperMotherBall : CacodemonBall
{
	Radius 8
	Height 8
	Speed 20
	FastSpeed 25
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 1
	Scale 1.0
	States
	{
	Spawn:
		BLHD CD 1 BRIGHT
		TNT1 A 0 A_CustomMissile ("FireballExplosionFlames", 0, 0, random (0, 360), 2, random (80, 100))
		Loop
	Death:
		TNT1 A 0
		TNT1 AAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAA 0 A_CustomMissile ("ExplosionParticle", 0, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAA 0 A_CustomMissile ("BarrelKaboom", 0, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_SpawnItem("ExplosionSpawner")
		TNT1 A 0 A_Explode(200, 200, 1)
        TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 0, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 45, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 90, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 135, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 180, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 225, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 270, CMF_AIMDIRECTION )
		TNT1 A 0 A_CustomMissile("CacodemonBall", 10, 0, 315, CMF_AIMDIRECTION )
		Stop
	}
}

