IF
	See(NearestEnemyOf(Myself))
	!Range(NearestEnemyOf(Myself),20)
	HaveSpell(CLERIC_GLYPH_OF_WARDING)
THEN
	RESPONSE #100
		Spell(NearestEnemyOf(Myself),CLERIC_GLYPH_OF_WARDING)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	HaveSpell(CLERIC_ANIMATE_DEAD)
THEN
	RESPONSE #100
		Spell(NearestEnemyOf(Myself),CLERIC_ANIMATE_DEAD)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	HaveSpell(CLERIC_HOLD_PERSON)
THEN
	RESPONSE #100
		Spell(NearestEnemyOf(Myself),CLERIC_HOLD_PERSON)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	HaveSpell(CLERIC_HOLD_PERSON)
THEN
	RESPONSE #100
		Spell(LeaderOf(GroupOf([PC])),CLERIC_HOLD_PERSON)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
	StateCheck(LeaderOf(GroupOf([PC])),STATE_HELPLESS)
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	HaveSpell(CLERIC_HOLD_PERSON)
THEN
	RESPONSE #100
		Spell(StrongestOf(GroupOf([PC])),CLERIC_HOLD_PERSON)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
	StateCheck(LeaderOf(GroupOf([ENEMY])),STATE_HELPLESS)
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	!HaveSpell(CLERIC_HOLD_PERSON)
	HaveSpell(CLERIC_ENTANGLE)
THEN
	RESPONSE #100
		Spell(StrongestOf(GroupOf([PC])),CLERIC_ENTANGLE)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
	StateCheck(LeaderOf(GroupOf([ENEMY])),STATE_HELPLESS)
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	!HaveSpell(CLERIC_HOLD_PERSON)
	!HaveSpell(CLERIC_ENTANGLE)
	HaveSpell(CLERIC_COMMAND)
THEN
	RESPONSE #100
		Spell(MostDamagedOf(GroupOf([PC])),CLERIC_COMMAND)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	HPPercentLT(Myself,75)
	HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_LIGHT_WOUNDS)
		Continue()
END

IF
	See(NearestEnemyOf(Myself))
	!HaveSpell(CLERIC_ANIMATE_DEAD)
	!HaveSpell(CLERIC_GLYPH_OF_WARDING)
	!HaveSpell(CLERIC_HOLD_PERSON)
	!HaveSpell(CLERIC_ENTANGLE)
	!HaveSpell(CLERIC_COMMAND)
THEN
	RESPONSE #75
		EquipMostDamagingMelee()
		AttackOneRound(NearestEnemyOf(Myself))
		AttackOneRound(NearestEnemyOf(Myself))
		Continue()
	RESPONSE #75
		ForceSpell(NearestEnemyOf(Myself),SPIDER_SUMMON)
		Continue()
END


