
define HEN_NORMAL_STRENGTH    5
define HEN_TOUGHER_STRENGTH   12
define HEN_DAMAGE_TO_PLAYER  -1

action HEN_ANIMATIONS  0  7  5  1  7
action HEN_FROZEN      1  1  1  1  1

// action HEN2_ANIMATIONS 36 7  5  1  14

move HEN_SPEEDS     32
move HEN_RUN        48
move HEN_RUN_FAST   72
move HEN_STOPPED

ai AIHEN_BOUNCE HEN_ANIMATIONS HEN_SPEEDS fleeenemy
ai AIHEN_RUN HEN_ANIMATIONS HEN_RUN fleeenemy
ai AIHEN_FAST HEN_ANIMATIONS HEN_RUN_FAST dodgebullet
ai AIHEN_PISSED HEN_ANIMATIONS HEN_RUN faceplayer

// useractor enemy HEN HEN_NORMAL_STRENGTH
useractor enemy HEN HEN_TOUGHER_STRENGTH
  fall

  ifai AIHEN_PISSED {
    ifpdistl 1024
     {
        ifrnd 128
          sound HEN1

        ifrnd 128 {
          addphealth HEN_DAMAGE_TO_PLAYER
          ai AIHEN_BOUNCE
        }
     }
  }

  ifrnd 1
  {
    ifrnd 8 {
      ifpdistl 8192 {
        sound HEN3
      }
    }
    else {
      ifrnd 16 {
        ifrnd 128
          sound HEN1
        else
          sound HEN2
      }
    }
  }
  
  ifcount 48
    ifrnd 16
      ai AIHEN_BOUNCE

  ifpdistl 1024
  ifrnd 16
  {
    sound HEN1
    ifrnd 128
      ai AIHEN_RUN
    else
      ai AIHEN_FAST
  }

  ifhitweapon
  {
    feathers 5
    ifwasweapon CROWBAR {
      guts JIBS1 1
      addkills 1
      feathers 8
      sound HENDEATH
      killit
      break
    }
    ifdead {
      guts JIBS1 1
      addkills 1
      feathers 8
      sound HENDEATH
      killit
      break
    }
    else {
      ai AIHEN_PISSED
    }
  }
enda
