actor DoomImp_2 : RGAMonster
{
  spawnid 5
  obituary "%o was burned by an imp."
  hitobituary "%o was slashed by an imp."
  health 40
  radius 20
  height 56
  mass 100
  speed 8
  painchance 200
  seesound "imp/sight"
  painsound "imp/pain"
  deathsound "imp/death"
  activesound "imp/active"
  MONSTER
  +FLOORCLIP
  +MISSILEMORE
  dropitem "HealthBonus" 196
  dropitem "HealthBonus" 196
  Species "Imp"
  states
  {
  Spawn:
    POSS A 0 
    POSS A 0 Thing_SetSpecial(0,226,613,0,random(6,12))
    POSS A 0 A_GiveInventory("XPAmount", random(6, 12))
    POSS P 0 ACS_ExecuteAlways(651,0,0,0,0)
    TROO AB 10 A_Look
    goto Spawn+4
  See:
    TROO AABBCCDD 3 A_Chase
    loop
  Melee:
  Missile:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_CustomComboAttack("DoomImpBall",32,5,"imp/melee")
    goto See
  Missile2:
    TROO EF 8 A_FaceTarget
    TROO G 0 A_CustomMissile("DoomImpBall_2",30,0,5)
    TROO G 0 A_CustomMissile("DoomImpBall_2",30,0,-5)
    TROO G 6 A_CustomMissile("DoomImpBall_2",30,0,0)
    goto See
  Pain:
    TROO H 2
    TROO H 2 A_Pain
	TNT1 G 0 A_AlertMonsters
    goto See
  Death:
    TROO I 8
	TROO I 0 A_JumpIfHealthLower(random(-500,-110),"XDeath")
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_NoBlocking
    TROO L 0 ACS_ExecuteAlways(648,0,0,0,0)
    TROO M -1 A_Jump(15,"Res")
    stop
  Res:
    TROO MM 60
	TROO M 0 A_Jump(192, "Res")
    TROO M 5 A_PlaySound("imp/sight")
    TROO M -1 A_SpawnItemEx("DoomImpRes",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
    stop
  XDeath:
    TROO N 5
    TROO O 5 A_XScream
    TROO P 5
    TROO Q 5 A_NoBlocking
    TROO Q 0 ACS_ExecuteAlways(648,0,0,0,0)
    TROO RST 5
    TROO U -1
    stop
  Raise:
    TROO ML 8
    TROO KJI 6
    goto See
  }
}

actor DoomImpBall_2: DoomImpBall
{
  Speed 18
}
