IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(SixthNearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(SixthNearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(SixthNearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(SixthNearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(SixthNearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(SixthNearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(SixthNearestEnemyOf(Myself))
      HasImmunityEffects(SixthNearestEnemyOf(Myself))
	See(SixthNearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(FifthNearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(FifthNearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(FifthNearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(FifthNearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(FifthNearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(FifthNearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(FifthNearestEnemyOf(Myself))
      HasImmunityEffects(FifthNearestEnemyOf(Myself))
	See(FifthNearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(FourthNearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(FourthNearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(FourthNearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(FourthNearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(FourthNearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(FourthNearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(FourthNearestEnemyOf(Myself))
      HasImmunityEffects(FourthNearestEnemyOf(Myself))
	See(FourthNearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(ThirdNearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(ThirdNearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(ThirdNearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(ThirdNearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(ThirdNearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(ThirdNearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(ThirdNearestEnemyOf(Myself))
      HasImmunityEffects(ThirdNearestEnemyOf(Myself))
	See(ThirdNearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(SecondNearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(SecondNearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(SecondNearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(SecondNearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(SecondNearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(SecondNearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(SecondNearestEnemyOf(Myself))
      HasImmunityEffects(SecondNearestEnemyOf(Myself))
	See(SecondNearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(NearestEnemyOf(Myself),STATE_BLESS)
      StateCheck(NearestEnemyOf(Myself),STATE_CHANT)
      StateCheck(NearestEnemyOf(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(NearestEnemyOf(Myself),STATE_BLUR)
      StateCheck(NearestEnemyOf(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(NearestEnemyOf(Myself),0,STONESKINS)
      HasBounceEffects(NearestEnemyOf(Myself))
      HasImmunityEffects(NearestEnemyOf(Myself))
	See(NearestEnemyOf(Myself))
	False()
THEN
	RESPONSE #100
		Continue()
END

IF
    OR(2)
		!GlobalTimerNotExpired("CAST","LOCALS")
        CheckStatGT(Myself,0,WIZARD_IMPROVED_ALACRITY)
	HaveSpell(WIZARD_DISPEL_MAGIC)
    OR(8)
      StateCheck(LastSeenBy(Myself),STATE_BLESS)
      StateCheck(LastSeenBy(Myself),STATE_CHANT)
      StateCheck(LastSeenBy(Myself),STATE_DRAWUPONHOLYMIGHT)
      StateCheck(LastSeenBy(Myself),STATE_BLUR)
      StateCheck(LastSeenBy(Myself),STATE_MIRRORIMAGE)
      CheckStatGT(LastSeenBy(Myself),0,STONESKINS)
      HasBounceEffects(LastSeenBy(Myself))
      HasImmunityEffects(LastSeenBy(Myself))
THEN
	RESPONSE #100
		SetGlobalTimer("CAST","LOCALS",6)
		Spell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
END
