// Ideal targetting for each eye is vastly more trouble than I can be bothered with. Here lies the only one I ever got round to doing.

// Paralyzing Eye

IF
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")

    OR(2)
        See(Myself)
        !See(Myself)

    OR(5)
        !See(NearestEnemyOf(Myself))
        Gender(NearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(NearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(10,4)
    OR(8)
        !See(NearestEnemyOf(Myself))
        Gender(NearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",NearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",NearestEnemyOf(Myself)
        StateCheck(NearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(10,4)
    OR(11)
        !See(NearestEnemyOf(Myself))
        Gender(NearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",NearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",NearestEnemyOf(Myself))
        HasItemEquiped("RING09",NearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",NearestEnemyOf(Myself))
        HasItemEquiped("SPER07",NearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",NearestEnemyOf(Myself))
        Kit(NearestEnemyOf(Myself),INQUISITOR)
        Kit(NearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(NearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(NearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(NearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(NearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(NearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(SecondNearestEnemyOf(Myself))
        Gender(SecondNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SecondNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(SecondNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SecondNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(11,4)
    OR(8)
        !See(SecondNearestEnemyOf(Myself))
        Gender(SecondNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SecondNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SecondNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SecondNearestEnemyOf(Myself)
        StateCheck(SecondNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SecondNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(11,4)
    OR(11)
        !See(SecondNearestEnemyOf(Myself))
        Gender(SecondNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SecondNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SecondNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SecondNearestEnemyOf(Myself))
        HasItemEquiped("RING09",SecondNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",SecondNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",SecondNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",SecondNearestEnemyOf(Myself))
        Kit(SecondNearestEnemyOf(Myself),INQUISITOR)
        Kit(SecondNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(SecondNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(SecondNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(SecondNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(SecondNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(SecondNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SecondNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(ThirdNearestEnemyOf(Myself))
        Gender(ThirdNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(ThirdNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(ThirdNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(ThirdNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(12,5)
    OR(8)
        !See(ThirdNearestEnemyOf(Myself))
        Gender(ThirdNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(ThirdNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",ThirdNearestEnemyOf(Myself)
        StateCheck(ThirdNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(ThirdNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(12,5)
    OR(11)
        !See(ThirdNearestEnemyOf(Myself))
        Gender(ThirdNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(ThirdNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("RING09",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",ThirdNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",ThirdNearestEnemyOf(Myself))
        Kit(ThirdNearestEnemyOf(Myself),INQUISITOR)
        Kit(ThirdNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(ThirdNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(ThirdNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(ThirdNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(ThirdNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(ThirdNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(ThirdNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(FourthNearestEnemyOf(Myself))
        Gender(FourthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FourthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(FourthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FourthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(13,5)
    OR(8)
        !See(FourthNearestEnemyOf(Myself))
        Gender(FourthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FourthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",FourthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",FourthNearestEnemyOf(Myself)
        StateCheck(FourthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FourthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(13,5)
    OR(11)
        !See(FourthNearestEnemyOf(Myself))
        Gender(FourthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FourthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",FourthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",FourthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",FourthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",FourthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",FourthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",FourthNearestEnemyOf(Myself))
        Kit(FourthNearestEnemyOf(Myself),INQUISITOR)
        Kit(FourthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(FourthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(FourthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(FourthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(FourthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(FourthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FourthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(FifthNearestEnemyOf(Myself))
        Gender(FifthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FifthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(FifthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FifthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(14,6)
    OR(8)
        !See(FifthNearestEnemyOf(Myself))
        Gender(FifthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FifthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",FifthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",FifthNearestEnemyOf(Myself)
        StateCheck(FifthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FifthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(14,6)
    OR(11)
        !See(FifthNearestEnemyOf(Myself))
        Gender(FifthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(FifthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",FifthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",FifthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",FifthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",FifthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",FifthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",FifthNearestEnemyOf(Myself))
        Kit(FifthNearestEnemyOf(Myself),INQUISITOR)
        Kit(FifthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(FifthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(FifthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(FifthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(FifthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(FifthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(FifthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(SixthNearestEnemyOf(Myself))
        Gender(SixthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SixthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(SixthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SixthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(15,7)
    OR(8)
        !See(SixthNearestEnemyOf(Myself))
        Gender(SixthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SixthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SixthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SixthNearestEnemyOf(Myself)
        StateCheck(SixthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SixthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(15,7)
    OR(11)
        !See(SixthNearestEnemyOf(Myself))
        Gender(SixthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SixthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SixthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SixthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",SixthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",SixthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",SixthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",SixthNearestEnemyOf(Myself))
        Kit(SixthNearestEnemyOf(Myself),INQUISITOR)
        Kit(SixthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(SixthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(SixthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(SixthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(SixthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(SixthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SixthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(SeventhNearestEnemyOf(Myself))
        Gender(SeventhNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SeventhNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(SeventhNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SeventhNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(16,8)
    OR(8)
        !See(SeventhNearestEnemyOf(Myself))
        Gender(SeventhNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SeventhNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SeventhNearestEnemyOf(Myself)
        StateCheck(SeventhNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SeventhNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(16,8)
    OR(11)
        !See(SeventhNearestEnemyOf(Myself))
        Gender(SeventhNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(SeventhNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("RING09",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",SeventhNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",SeventhNearestEnemyOf(Myself))
        Kit(SeventhNearestEnemyOf(Myself),INQUISITOR)
        Kit(SeventhNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(SeventhNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(SeventhNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(SeventhNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(SeventhNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(SeventhNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(SeventhNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(EighthNearestEnemyOf(Myself))
        Gender(EighthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(EighthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(EighthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(EighthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(17,9)
    OR(8)
        !See(EighthNearestEnemyOf(Myself))
        Gender(EighthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(EighthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",EighthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",EighthNearestEnemyOf(Myself)
        StateCheck(EighthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(EighthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(17,9)
    OR(11)
        !See(EighthNearestEnemyOf(Myself))
        Gender(EighthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(EighthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",EighthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",EighthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",EighthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",EighthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",EighthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",EighthNearestEnemyOf(Myself))
        Kit(EighthNearestEnemyOf(Myself),INQUISITOR)
        Kit(EighthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(EighthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(EighthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(EighthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(EighthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(EighthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(EighthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(NinthNearestEnemyOf(Myself))
        Gender(NinthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NinthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(NinthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NinthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(18,10)
    OR(8)
        !See(NinthNearestEnemyOf(Myself))
        Gender(NinthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NinthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",NinthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",NinthNearestEnemyOf(Myself)
        StateCheck(NinthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NinthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(18,10)
    OR(11)
        !See(NinthNearestEnemyOf(Myself))
        Gender(NinthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(NinthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",NinthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",NinthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",NinthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",NinthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",NinthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",NinthNearestEnemyOf(Myself))
        Kit(NinthNearestEnemyOf(Myself),INQUISITOR)
        Kit(NinthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(NinthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(NinthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(NinthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(NinthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(NinthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(NinthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    OR(5)
        !See(TenthNearestEnemyOf(Myself))
        Gender(TenthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(TenthNearestEnemyOf(Myself),0,SANCTUARY)
        StateCheck(TenthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(TenthNearestEnemyOf(Myself),D0_STATE_DISABLED)
    OR(2)
        !GlobalTimerNotExpired("IgnoreBounce","LOCALS") // Don't check anything below here if I'm ignoring bounce (and hence also immunity)
        RandomNumGT(20,10)
    OR(8)
        !See(TenthNearestEnemyOf(Myself))
        Gender(TenthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(TenthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",TenthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",TenthNearestEnemyOf(Myself)
        StateCheck(TenthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(TenthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
    OR(2)
        !GlobalTimerNotExpired("IgnoreImmunity","LOCALS") // Don't check anything below here if I'm ignoring immunity
        RandomNumGT(20,10)
    OR(11)
        !See(TenthNearestEnemyOf(Myself))
        Gender(TenthNearestEnemyOf(Myself),SUMMONED)
        !CheckStat(TenthNearestEnemyOf(Myself),0,SANCTUARY)
        HasItemEquiped("CLCK26",TenthNearestEnemyOf(Myself))
        HasItemEquiped("WA2SHIEL",TenthNearestEnemyOf(Myself))
        HasItemEquiped("RING09",TenthNearestEnemyOf(Myself))
        HasItemEquiped("SHLD25",TenthNearestEnemyOf(Myself))
        HasItemEquiped("SPER07",TenthNearestEnemyOf(Myself))
        HasItemEquiped("SW1H27",TenthNearestEnemyOf(Myself))
        Kit(TenthNearestEnemyOf(Myself),INQUISITOR)
        Kit(TenthNearestEnemyOf(Myself),UNDEADHUNTER)
        CheckStatGT(TenthNearestEnemyOf(Myself),50,RESISTMAGIC)
        CheckStatGT(TenthNearestEnemyOf(Myself),0,SAVEVSSPELL)
        CheckStatGT(TenthNearestEnemyOf(Myself),0,CLERIC_FREE_ACTION)
        StateCheck(TenthNearestEnemyOf(Myself),STATE_BERSERK)
        StateCheck(TenthNearestEnemyOf(Myself),STATE_REALLY_DEAD)
        StateCheck(TenthNearestEnemyOf(Myself),D0_STATE_DISABLED)
        GlobalTimerNotExpired("IgnoreImmunity","LOCALS")

    False()
THEN
    RESPONSE #100
        Continue()
END

IF
    Difficulty(EASIEST)
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("CLCK26",LastSeenBy(Myself))
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("WA2SHIEL",LastSeenBy(Myself))
    CheckStat(LastSeenBy(Myself),0,SANCTUARY)
    !StateCheck(LastSeenBy(Myself),STATE_REALLY_DEAD)
    !StateCheck(LastSeenBy(Myself),D0_STATE_DISABLED)
    !Range(LastSeenBy(Myself),0)
THEN
    RESPONSE #100
        SetGlobalTimer("UseParalyzeEye","LOCALS",8)
        FaceObject(LastSeenBy(Myself))
        ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
END

IF
    Difficulty(EASY)
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("CLCK26",LastSeenBy(Myself))
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("WA2SHIEL",LastSeenBy(Myself))
    CheckStat(LastSeenBy(Myself),0,SANCTUARY)
    !StateCheck(LastSeenBy(Myself),STATE_REALLY_DEAD)
    !StateCheck(LastSeenBy(Myself),D0_STATE_DISABLED)
    !Range(LastSeenBy(Myself),0)
THEN
    RESPONSE #100
        SetGlobalTimer("UseParalyzeEye","LOCALS",7)
        FaceObject(LastSeenBy(Myself))
        ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
END

IF
    Difficulty(NORMAL)
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("CLCK26",LastSeenBy(Myself))
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("WA2SHIEL",LastSeenBy(Myself))
    CheckStat(LastSeenBy(Myself),0,SANCTUARY)
    !StateCheck(LastSeenBy(Myself),STATE_REALLY_DEAD)
    !StateCheck(LastSeenBy(Myself),D0_STATE_DISABLED)
    !Range(LastSeenBy(Myself),0)
THEN
    RESPONSE #100
        SetGlobalTimer("UseParalyzeEye","LOCALS",6)
        FaceObject(LastSeenBy(Myself))
        ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
END

IF
    Difficulty(HARD)
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("CLCK26",LastSeenBy(Myself))
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("WA2SHIEL",LastSeenBy(Myself))
    CheckStat(LastSeenBy(Myself),0,SANCTUARY)
    !StateCheck(LastSeenBy(Myself),STATE_REALLY_DEAD)
    !StateCheck(LastSeenBy(Myself),D0_STATE_DISABLED)
    !Range(LastSeenBy(Myself),0)
THEN
    RESPONSE #100
        SetGlobalTimer("UseParalyzeEye","LOCALS",5)
        FaceObject(LastSeenBy(Myself))
        ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
END

IF
    Difficulty(HARDEST)
    !StateCheck(Myself,STATE_BLIND)
    Global("ParalyzeEyeLost","LOCALS",0)
    !GlobalTimerNotExpired("UseParalyzeEye","LOCALS")
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("CLCK26",LastSeenBy(Myself))
    OR(2)
        GlobalTimerNotExpired("IgnoreBounce","LOCALS")
        !HasItemEquiped("WA2SHIEL",LastSeenBy(Myself))
    CheckStat(LastSeenBy(Myself),0,SANCTUARY)
    !StateCheck(LastSeenBy(Myself),STATE_REALLY_DEAD)
    !StateCheck(LastSeenBy(Myself),D0_STATE_DISABLED)
    !Range(LastSeenBy(Myself),0)
THEN
    RESPONSE #100
        SetGlobalTimer("UseParalyzeEye","LOCALS",4)
        FaceObject(LastSeenBy(Myself))
        ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
END
