Actor ChasmPhantomLesser Replaces PainElemental
{
    Health 420
    Radius 22
    Height 52
    Speed 6
    PainChance 24
	PainChance "Laser", 127
	Mass 1000
    Monster
	+DONTHARMSPECIES
	+FLOAT
	+NOGRAVITY
	+DONTFALL
	+SPAWNFLOAT
    SeeSound "Phantom/See"
    PainSound "Phantom/Pain"
    DeathSound "Phantom/Death"
	ActiveSound "Phantom/Active"
    Obituary "%o was killed by a Lesser Phantom."
	BloodColor "Red"
	BloodType "RedBlood", "RedBlood"
	Species "Fantasy"
	Tag "Lesser Phantom"
    States
    {
    Spawn:
	    TNT1 A 0 NoDelay
        PLW1 ABCDEF 2 A_Look
		TNT1 A 0 A_PlaySound("Phantom/Fly", 4, 0.40)
		PLW1 GHIJKL 2 A_Look
        Loop
    See:
        PLW1 ABCDEF 2 A_Chase
		TNT1 A 0 A_PlaySound("Phantom/Fly", 4, 0.40)
		PLW1 GHIJKL 2 A_Chase
        Loop
	Missile:
		PLA1 ABCDEFGHIJKLMNOP 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("Phantom/Fire", 1)
		PLA1 D 0 A_PainAttack("BatMonster")
		PLA1 Q 4 BRIGHT
		PLA1 RSTUVWXY 2
		Goto See
	Melee:
	    PLA1 ABCDEFGHIJKLMNOP 1 A_FaceTarget
		TNT1 A 0 A_PlaySound("Phantom/Melee", 1)
		PLA1 Q 0 A_CustomBulletAttack(1, 1, 1, 12, "PhantomMeleePuff", 50, CBAF_AIMFACING)
		PLA1 Q 2 BRIGHT
		PLA1 RSTUVWXY 1
		Goto See
  Pain:
    PLP1 A 2 A_Pain
    PLP1 BCDEFGHIJKLM 2
    Goto See
  Death:
    PLP1 M 1 A_SetTranslucent(0.90)
	PLP1 M 1 A_SetTranslucent(0.85)
	PLP1 M 1 A_SetTranslucent(0.80)
	PLP1 M 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SetTranslucent(0.70)
    PLP1 L 1 A_Scream
	PLP1 L 1 A_SetTranslucent(0.65)
	PLP1 L 1 A_SetTranslucent(0.60)
	PLP1 L 1 A_SetTranslucent(0.55)
	PLP1 K 1 A_SetTranslucent(0.50)
    PLP1 K 3 A_NoBlocking
	PLP1 J 4
	PLP1 IHG 4
	PLP1 F 6
	TNT1 A 0 A_PlaySound("Flesh/Gib", 4)
	TNT1 AAAA 0 A_CustomMissile("GoreBloodSpawner", random(10,40), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 AAAA 0 A_CustomMissile("GoreBloodSpawner", random(10,40), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAAA 0 A_CustomMissile("GoreSpawner", random(10,40), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAAA 0 A_CustomMissile("GoreSpawner", random(10,40), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("BloodGiblet", random(10,40), random(0, -20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("BloodGiblet", random(10,40), random(0, 20), random (0, 360), 2, random (0, 160))
    TNT1 A 0 A_PainDie("BatMonster")
	Stop
    }
}

Actor BatMonster
{
    Health 40
    Radius 16
    Height 56
    Speed 6
    PainChance 78
	PainChance "Laser", 255
	Mass 100
	Damage 2
    Monster
	+DONTHARMSPECIES
	+FLOAT
	+NOGRAVITY
	+DROPOFF
	+SPAWNFLOAT
    SeeSound "Bat/See"
    PainSound "Bat/Pain"
    DeathSound "Bat/Death"
	ActiveSound "Bat/Active"
    Obituary "%o was killed by a Vampire bat."
	BloodColor "Red"
	BloodType "RedBlood", "RedBlood"
	Species "Fantasy"
	Tag "Bat"
    States
    {
    Spawn:
	    TNT1 A 0 NoDelay
        BATX ABCD 2 A_Look
        Loop
    See:
        BATX ABCD 2 A_Chase
        Loop
	Missile:
		BATX ABCDA 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("Bat/Attack", 1)
		BATX B 2 A_SkullAttack
		BATX CD 2
		BATX ABCDABCDABCD 2
		Goto See
  Pain:
    BATX A 2 A_Pain
    BATX BCD 2
    Goto See
  Death:
	TNT1 A 0 A_Scream
	TNT1 A 0 A_NoBlocking
    BATX E 10
	BATX F 10
	BATX F -1
    Stop
    }
}

Actor HereticBatMonster : BatMonster Replaces HereticImp
{
    Game Heretic
    Health 50
}

Actor HereticBatMonsterLeader : BatMonster Replaces HereticImpLeader
{
    Game Heretic
    Health 60
    Radius 16
    Height 56
    Speed 6
    PainChance 78
	PainChance "Laser", 255
	Mass 100
	Damage 2
    Monster
	+DONTHARMSPECIES
	+FLOAT
	+NOGRAVITY
	+DROPOFF
	+SPAWNFLOAT
    SeeSound "Bat/See"
    PainSound "Bat/Pain"
    DeathSound "Bat/Death"
	ActiveSound "Bat/Active"
    Obituary "%o was killed by a Spitting Vampire bat."
	BloodColor "Red"
	BloodType "RedBlood", "RedBlood"
	Species "Fantasy"
	Tag "Bat"
	MeleeRange 256
	MaxTargetRange 500
    States
    {
    Spawn:
	    TNT1 A 0 NoDelay
        BATX ABCD 2 A_Look
        Loop
    See:
        BATX ABCD 2 A_Chase
        Loop
	Melee:
		BATX ABCDA 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("Bat/Attack", 1)
		BATX B 2 A_SkullAttack
		BATX CD 2
		BATX ABCDABCDABCD 2
		Goto See
	Missile:
	   	BATX ABCDABCDA 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("Bat/Attack", 1)
		TNT1 A 0 A_CustomMissile("BatPoop")
		BATX B 2
		BATX CD 2
		BATX ABCDABCDABCD 2
		Goto See
  Pain:
    BATX A 2 A_Pain
    BATX BCD 2
    Goto See
  Death:
	TNT1 A 0 A_Scream
	TNT1 A 0 A_NoBlocking
    BATX E 10
	BATX F 10
	BATX F -1
    Stop
    }
}

ACTOR BatPoop
{
  Radius 12
  Height 8
  Speed 10
  Damage 2
  Projectile
  +RANDOMIZE
  Alpha 1
  DeathSound "BatPoop/Hit"
  Scale 0.50
  States
  {
  Spawn:
  	TNT1 A 0 NoDelay
    POO1 CCC 1 A_SpawnItemEx("PooTrail",0,0,0,0,0,0,0,2)
    Loop
  Death:
	TNT1 A 0 A_Scream
	Stop
  }
}

ACTOR PooTrail
{ 
	Scale 0.50
	+NOGRAVITY
	States
	{
	Spawn:
	    POO1 C 1
		POO1 C 1 A_SetScale(0.40)
        POO1 B 1
		POO1 B 1
		POO1 A 1
		POO1 A 1
		Stop
	}
}