//------------------------------------------------------------------------------
// ZZ> Breath some fire
GetContent
tmpx = tmpargument
tmpy = 0
IfXIsMoreThanY
  SetTargetToSelf
  tmpargument = 20
  CostTargetMana
    tmpdistance = GRIPRIGHT
    tmpargument = 4
    tmpx = 0
    tmpy = 0
    SpawnParticle
    tmpargument = 3
    SpawnParticle
    tmpdistance = 256 - selfmana << 1
    tmpargument = 2
    SetVolume
  Else
    tmpargument = 0
    SetContent
    tmpargument = 2
    StopSound
    Run
  SetTargetToOldTarget
Else
  IfUsed
    tmpx = selfmana
    tmpy = 1024
    IfXIsMoreThanY
      tmpargument = 1
      SetContent
      tmpargument = 1
      tmpdistance = rand & 4095 + 20000
      PlaySound
      tmpargument = 2
      tmpdistance = 11025
      PlaySoundLooped
      tmpdistance = 0
      SetVolume
      Sneak



//------------------------------------------------------------------------------
IfTimeOut
  tmpx = selfx
  tmpy = selfy
  ClearWaypoints
  AddWaypoint
  tmpargument = 50
  SetTime



//------------------------------------------------------------------------------
// ZZ> Bite characters that it bumps
IfBumped
  SetTargetToWhoeverBumped
  IfTargetIsOnHatedTeam
    IfFacingTarget
      tmpargument = ACTIONTC
      DoAction
  Else
    SetTargetToOldTarget


//------------------------------------------------------------------------------
// ZZ> Handle death by sending a message and other stuff
IfSpawned
  JoinNullTeam  // For rebirth...
IfKilled
  JoinGoodTeam  // For rebirth...

  // Stop fire
  tmpargument = 2
  StopSound


  tmpargument = 5
  tmpdistance = rand & 2047 + 10000
  PlaySound
  tmpargument = 0
  SendMessageNear

  // Drop goodies
  tmpargument = 65535
  DropMoney

  // Make the character body
  tmpargument = 50
  SetBumpHeight
  tmpargument = 43
  SetBumpSize


//------------------------------------------------------------------------------
// ZZ> Handle being attacked by blocking or countering or running away
IfAttacked
  // Drop rider
  tmpx = rand & 255
  tmpy = 190
  IfXIsMoreThanY
    DropWeapons

  tmpargument = rand & 1 + 3
  tmpdistance = rand & 2047 + 10000
  PlaySound



//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------
