IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_IRONSKIN)
	CheckStatGT(Myself,1,ARMORCLASS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_IRONSKIN)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_BLADE_BARRIER)
	Global("blade","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobal("blade","LOCALS",1)
		Spell(Myself,CLERIC_BLADE_BARRIER)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_ARMOR_OF_FAITH)
	CheckStatGT(Myself,1,ARMORCLASS)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_ARMOR_OF_FAITH)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	Range(LastSeenBy(Myself),10)
	OR(2)
		HaveSpell(CLERIC_STRENGTH_OF_ONE)
		HaveSpell(CLERIC_HOLY_POWER)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_STRENGTH_OF_ONE)
		Spell(Myself,CLERIC_HOLY_POWER)
		Continue()
END

IF
	HPPercentLT(Myself,10)
	HaveSpell(CLERIC_HEAL)
THEN
	RESPONSE #100
		Spell(Myself,0)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	Range("Saerileth",4)
	HPPercentLT(Myself,20)
THEN
	RESPONSE #100
		RunAwayFrom(LastSeenBy(Myself),10)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",4)
	HaveSpell(CLERIC_CURE_CRITICAL_WOUNDS)
	HPPercentLT(Myself,20)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",4)
	HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
	HPPercentLT(Myself,20)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_SERIOUS_WOUNDS)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",5)
	HaveSpell(CLERIC_CURE_MEDIUM_WOUNDS)
	HPPercentLT(Myself,40)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_MEDIUM_WOUNDS)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",10)
	HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
	HPPercentLT(Myself,50)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CURE_LIGHT_WOUNDS)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",4)
	StateCheck(Myself,STATE_POISONED)
	HaveSpell(CLERIC_NEUTRALIZE_POISON)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_NEUTRALIZE_POISON)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",4)
	StateCheck(Myself,STATE_POISONED)
	HaveSpell(CLERIC_SLOW_POISON)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_SLOW_POISON)
END

IF
	HaveSpell(CLERIC_SILENCE_15_FOOT)
	OR(2)
		See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
		See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
	!Range(LastSeenBy(Myself),15)
	Range(LastSeenBy(Myself),50)
	!StateCheck(LastSeenBy(Myself),STATE_SILENCED)
THEN
	RESPONSE #100
		Spell(LastSeenBy(Myself),CLERIC_SILENCE_15_FOOT)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_SLAY_LIVING)
	Range("Saerileth",5)
	HPGT("Saerileth",20)
THEN
	RESPONSE #100
		Spell(LastSeenBy(Myself),0)
		AttackOneRound(LastSeenBy(Myself))
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_FLAME_STRIKE)
THEN
	RESPONSE #100
		Spell("Saerileth",CLERIC_FLAME_STRIKE)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_CONFUSION)
	!StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
	HPGT(LastSeenBy(Myself),20)
THEN
	RESPONSE #100
		Spell(LastSeenBy(Myself),CLERIC_CONFUSION)
		Continue()
END

IF
	Detect("Saerileth")
	!Dead("Saerileth")
	!See("Saerileth")
	HaveSpell(CLERIC_TRUE_SIGHT)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_TRUE_SIGHT)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_RAISE_DEAD)
THEN
	RESPONSE #100
		Spell(LastSeenBy(Myself),CLERIC_RAISE_DEAD)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_ANIMAL_SUMMONING_3)
THEN
	RESPONSE #100
		Spell(LastSeenBy(Myself),0)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_MENTAL_DOMINATION)
	!StateCheck(LastSeenBy(Myself),STATE_STUNNED)
	!HasBounceEffects(LastSeenBy(Myself))
	HPGT(LastSeenBy(Myself),20)
THEN
	RESPONSE #100
		Spell("Saerileth",CLERIC_MENTAL_DOMINATION)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_CLOAK_OF_FEAR)
	HPGT(LastSeenBy(Myself),20)
	Range(LastSeenBy(Myself),10)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_CLOAK_OF_FEAR)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_COMMAND)
	!HasBounceEffects(LastSeenBy(Myself))
	HPGT(LastSeenBy(Myself),20)
THEN
	RESPONSE #100
		Spell("Saerileth",CLERIC_COMMAND)
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	HaveSpell(CLERIC_FLAME_BLADE)
	!HasItem("FBLADE",Myself)
	!HasItem("SHILLE",Myself)
	!HasItem("SHAMMR",Myself)
	!HasItem("CHILLT",Myself)
	!HasItem("GHOULT",Myself)
	!HasItem("SGRASP",Myself)
THEN
	RESPONSE #100
		Spell(Myself,CLERIC_FLAME_BLADE)
		AttackOneRound("Saerileth")
		AttackOneRound("Saerileth")
		Continue()
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	Range("Saerileth",5)
THEN
	RESPONSE #100
		EquipMostDamagingMelee()
		AttackReevaluate("Saerileth",30)
END

IF
	See("Saerileth")
	!Dead("Saerileth")
	!Range("Saerileth",5)
THEN
	RESPONSE #100
		EquipRanged()
		AttackReevaluate("Saerileth",30)
END

IF
	OR(2)
		Dead("Saerileth")
		!Detect("Saerileth")
	CombatCounter(0)
	!Allegiance(Myself,ENEMY)
	Global("NSSaeriAnoFight","GLOBAL",1)
	See([PC])
THEN
	RESPONSE #100
		SetGlobal("NSSaeriAnoFight","GLOBAL",2)
		StartDialogueNoSet([PC])
END

IF
	OR(2)
		Dead("Saerileth")
		!Detect("Saerileth")
	CombatCounter(0)
	Global("NSSaeriAnoFight","GLOBAL",1)
	!See([PC])
THEN
	RESPONSE #100
		EscapeArea()
END


