[Spell 204]
DEFNAME=s_Dispel_Evil
NAME=Dispel Evil
SOUND=
RUNES=
CAST_TIME=0.3
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast|spellflag_no_castanim
EFFECT_ID=
EFFECT=10
DURATION=0.0
MANAUSE=10
SKILLREQ=SKILL_CHIVALRY 35.0
INTERRUPT=0.0,0.0

ON=@Start
SAY @,,2 1060721

ON=@Effect
LOCAL.POWER=<F_COMPUTE_POWERLEVEL 2>
SOUND=0299
effect 3,037C4,1,20,0,0,5
FORCHARS 7
	IF (<ISFIGHTINGME <SRC.UID>>) || (!(<ISBENEFICIAL <SRC.UID>>))
		IF (<CANSEELOS>)
			IF (!(<ISPLAYER>))
				IF (<FLAGS>&STATF_CONJURED)
					IF (<LOCAL.POWER> > <R100>)
					SPELLEFFECT S_DISPEL,<EVAL <LOCAL.POWER>*10>,<SRC>
					ENDIF
				ELSE
				FLOAT.FLEECHANCE=<FLOATVAL (SQRT(((<FAME>/2)*<SRC.CHIVALRY>*<dLOCAL.POWER>)))>
				FLOAT.FLEECHANCE=<FLOATVAL <FLOAT.FLEECHANCE>/1000000>
					IF (<FLOAT.FLEECHANCE> > <RANDOMDOUBLE>)
					FLAGS &= ~statf_war
					FLEE
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDFOR

[EOF]