IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_INVISIBILITY)
THEN
    RESPONSE #100
        Spell(Myself,WIZARD_INVISIBILITY)
        RunAwayFrom(NearestEnemyOf(Myself),7)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_MIRROR_IMAGE)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_MIRROR_IMAGE)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_HASTE)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_HASTE)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_MELF_ACID_ARROW)
    !Range(NearestEnemyOf(Myself),10)
    See([PC.0.0.MAGE])
THEN
    RESPONSE #100
        Spell([PC.0.0.MAGE],WIZARD_MELF_ACID_ARROW)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_HORROR)
    !Range(NearestEnemyOf(Myself),7)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_HORROR)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_LIGHTNING_BOLT)
    !Range(NearestEnemyOf(Myself),7)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_FLAME_ARROW)
    !Range(NearestEnemyOf(Myself),7)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_MAGIC_MISSILE)
    !Range(NearestEnemyOf(Myself),7)
    See([PC.0.0.CLERIC])
THEN
    RESPONSE #100
        Spell([PC.0.0.CLERIC],WIZARD_MAGIC_MISSILE)
END

IF
    See(NearestEnemyOf(Myself))
THEN
    RESPONSE #100
        Attack(NearestEnemyOf(Myself))
END


