IF
  See(NearestEnemyOf(Myself))
  !Range(NearestEnemyOf(Myself),15)
THEN
  RESPONSE #90
    ForceSpell(NearestEnemyOf(Myself),WIZARD_FIREBALL)
    Attack(NearestEnemyOf(Myself))
    Continue()
  RESPONSE #10
    Attack(NearestEnemyOf(Myself))
    Continue()
END

IF
  See(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),14)
  !Range(NearestEnemyOf(Myself),10)
THEN
  RESPONSE #75
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    Attack(NearestEnemyOf(Myself))
    Continue()
  RESPONSE #25
    Attack(NearestEnemyOf(Myself))
    Continue()
END

IF
  See(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),9)
  !Range(NearestEnemyOf(Myself),6)
THEN
  RESPONSE #10
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
    ForceSpell(NearestEnemyOf(Myself),CLERIC_FLAME_STRIKE)
    Continue()
  RESPONSE #20
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MONSTER_SUMMONING_3)
    Continue()
  RESPONSE #10
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    Continue()
  RESPONSE #10
    ForceSpell(NearestEnemyOf(Myself),WIZARD_HOLD_PERSON)
    Continue()
  RESPONSE #10
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARROW)
    Continue()
  RESPONSE #10
    ForceSpell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
    Continue()
  RESPONSE #30
    Attack(NearestEnemyOf(Myself))
    Continue()
END

IF
  See(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),5)
THEN
  RESPONSE #20
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    RunAwayFrom(NearestEnemyOf(Myself),10)
    Continue()
  RESPONSE #20
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MONSTER_SUMMONING_3)
    RunAwayFrom(NearestEnemyOf(Myself),5)
    Continue()
  RESPONSE #20
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    RunAwayFrom(NearestEnemyOf(Myself),15)
    Continue()
  RESPONSE #19
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    AttackOneRound(NearestEnemyOf(Myself))
    ForceSpell(NearestEnemyOf(Myself),WIZARD_HORROR)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RunAwayFrom(NearestEnemyOf(Myself),7)
    Continue()
  RESPONSE #20
    AttackOneRound(NearestEnemyOf(Myself))
    ForceSpell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    RunAwayFrom(NearestEnemyOf(Myself),6)
    Continue()
  RESPONSE #1
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_HORROR)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MONSTER_SUMMONING_3)
END

IF
  StateCheck(NearestEnemyOf(Myself),STATE_INVISIBLE)
THEN
  RESPONSE #100
    ForceSpell(NearestEnemyOf(Myself),WIZARD_TRUE_SIGHT)
END

IF
  !StateCheck(Myself,STATE_HASTED)
THEN
  RESPONSE #100
    ForceSpell(Myself,WIZARD_HASTE)
END

IF
  !StateCheck(Myself,STATE_BLUR)
THEN
  RESPONSE #100
    ForceSpell(Myself,WIZARD_BLUR)
END

