Actor DarknessRift 15001
{
	//$Category Monsters
	//$Title Darkness Rift
	//$Sprite DRFTA0
  Health 1000
  Radius 40
  Height 60
  cameraheight 45
  Mass 3000000
  Speed 4
  Bloodtype None
  Monster
  MeleeRange 128
  MeleeDamage 1
  MinMissileChance 232
  ActiveSound "DarkRift/Active"
  +FLOORCLIP
  +NOBLOODDECALS
  -SOLID
  +FLOAT
  +NOGRAVITY
  +NOTARGET
  +LOOKALLAROUND
  +GHOST
  +DONTMORPH
  +DONTSQUASH
  +NOICEDEATH
  +NOTELEOTHER
  HitObituary "$OB_DARKNESSRIFTH"
  Obituary "$OB_DARKNESSRIFT"
  States
  {
  Spawn:
    TNT1 A 0 A_PlaySoundEx("DarkRift/Loop", "SoundSlot7", 1)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_Look
    Loop
  See:
    TNT1 A 0 A_PlaySoundEx("DarkRift/Loop", "SoundSlot7", 1)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_Chase
    Loop
  Melee:
    TNT1 A 0 A_PlaySoundEx("DarkRift/Loop", "SoundSlot7", 1)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_MeleeAttack
    Goto See
  Missile:
    TNT1 A 0 A_PlaySoundEx("DarkRift/Loop", "SoundSlot7", 1)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 0 A_Jump(200, 2)
    TNT1 A 2 A_SpawnItem("RiftMonsterSpawner")
    Goto See
    TNT1 A 0 A_Jump(128, 4)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 0 A_CustomMissile("DarkRiftSpear", 30, 10, 0)
    TNT1 A 2 A_CustomMissile("DarkRiftSpear", 30, -10, 0)
    Goto See
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2 A_CustomMissile("DarkRiftBall", Random(0, 60), Random(-40, 40))
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 2
    TNT1 A 0 A_Jump(192, 2)
    TNT1 A 0 A_SpidReFire
    Goto Missile+8
    TNT1 A 0
    Goto See
  Death:
    TNT1 A 0 A_StopSoundEx("SoundSlot7")
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 0 A_SpawnItemEx("RiftCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    TNT1 A 1
    Stop
  }
}

Actor RiftCloudSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("RiftCloud", 0, 0, 0, random(-4, 4), random(-4, 4), random(-2, 2))
    Stop
  }
}

Actor RiftCloud
{
  renderstyle translucent
  alpha 0.7
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    DRFT A 0
    DRFT A 0 A_Jump(128, 6)
    DRFT ABCDE 3 A_FadeOut(0.05)
    Goto Spawn+1
    DRFT F 0 A_Jump(128, 6)
    DRFT FGHIJ 3 A_FadeOut(0.05)
    Goto Spawn+7
    DRFT KLMNO 3 A_FadeOut(0.05)
    Goto Spawn+12
  }
}

Actor RiftMonsterSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 0 A_SpawnItem("HPWraith")
    Stop
    TNT1 A 0 A_Jump(192, 2)
    TNT1 A 0 A_SpawnItem("HPWraith")
    Stop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 0 A_SpawnItem("HPWraith")
    Stop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 0 A_SpawnItem("HPWraith")
    Stop
    TNT1 A 0 A_SpawnItem("HPWraith")
    Stop
  }
}

Actor DarkRiftBall
{
    Radius 6
    Height 8
    Speed 8
    FastSpeed 18
    Damage (10)
    Projectile
    Renderstyle Translucent
    +RANDOMIZE
    Alpha 0.8
    Scale 0.4
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    States
    {
    Spawn:
        DRBL AABBCCDDEEFFGGHH 1 bright A_BishopMissileWeave
        Loop
    Death:
        DRBL AIJKLM 3 bright
        Stop
    }
}

Actor DarkRiftSpear
{
  Radius 4
  Height 4
  Speed 30
  Damage (20)
  Projectile
  +RANDOMIZE
  RenderStyle Translucent
  Alpha 0.7
  SeeSound "DarkRift/Fire"
  DeathSound "DarkRift/Hit"
  Decal PlasmaScorchLower
  States
  {
  Spawn:
    DRBT A 1 bright
    Loop
  Death:
    DRBT BCDE 5 bright
    Stop
  }
}
