IF
	See(NearestEnemyOf(Myself))
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_ARMOR)
	RandomNum(2,1)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(Myself,WIZARD_ARMOR)
END

IF
	See(NearestEnemyOf(Myself))
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_MIRROR_IMAGE)
	!StateCheck(Myself,STATE_MIRRORIMAGE)
	RandomNumGT(3,1)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(Myself,WIZARD_MIRROR_IMAGE)
END

IF
	See(NearestEnemyOf(Myself))
	See(NearestMyGroupOfType)
	!StateCheck(NearestMyGroupOfType,STATE_HASTED)
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_HASTE)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(NearestMyGroupOfType,WIZARD_HASTE)
END

IF
	See(NearestEnemyOf(Myself))
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_MELF_ACID_ARROW)
	OR(2)
		RandomNumGT(4,2)
		!HaveSpell(WIZARD_HORROR)
	OR(2)
		RandomNumGT(4,2)
		!HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARROW)
END

IF
	See(NearestEnemyOf(Myself))
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_HORROR)
	OR(2)
		RandomNum(2,1)
		!HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(NearestEnemyOf(Myself),WIZARD_HORROR)
END

IF
	See(NearestEnemyOf(Myself))
	Range(NearestEnemyOf(Myself),5)
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_COLOR_SPRAY)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(NearestEnemyOf(Myself),WIZARD_COLOR_SPRAY)
END

IF
	See(NearestEnemyOf(Myself))
	!GlobalTimerNotExpired("Cast","LOCALS")
	HaveSpell(WIZARD_LARLOCH_MINOR_DRAIN)
THEN
	RESPONSE #100
		SetGlobalTimer("Cast","LOCALS",6)
		Spell(NearestEnemyOf(Myself),WIZARD_LARLOCH_MINOR_DRAIN)
END
