[FUNCTION F_NOBLESACRIFICE_STUFF]
EFFECT 3,0375A,3,30
IF (<FLAGS>&STATF_DEAD)
SPELLEFFECT S_RESURRECTION,100.0,<SRC.UID>
LOCAL.SACRIFICE=1
ELIF (<HITS> < <MAXHITS>)
//int toHeal = ComputePowerValue( 10 ) + Utility.RandomMinMax( 0, 2 );
LOCAL.TOHEAL=<EVAL <SRC.F_COMPUTE_POWERLEVEL 10>+<R0,2>>
	IF (<LOCAL.TOHEAL> < 8)
	LOCAL.TOHEAL=8
	ELIF (<LOCAL.TOHEAL> > 24)
	LOCAL.TOHEAL=24
	ENDIF
	IF (<EVAL <LOCAL.TOHEAL>+<HITS>> > <MAXHITS>)
	LOCAL.TOHEAL=<EVAL <MAXHITS>-<HITS>>
	ENDIF
HITS += <LOCAL.TOHEAL>
LOCAL.SACRIFICE=1
ENDIF
IF (<FLAGS>&STATF_Poisoned)
SPELLEFFECT S_CURE,1000.0,<SRC.UID>
LOCAL.SACRIFICE=1
ENDIF

[Spell 208]
DEFNAME=s_Noble_Sacrifice
NAME=Noble Sacrifice
SOUND=
RUNES=
CAST_TIME=1.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast|spellflag_no_castanim
EFFECT_ID=
EFFECT=30
DURATION=0.0
MANAUSE=20
SKILLREQ=SKILL_CHIVALRY 65.0
INTERRUPT=0.0,0.0

ON=@Start
SAY @,,2 1060725

ON=@Effect
LOCAL.CASTER=<UID>
LOCAL.DAMAGE=<EVAL <F_COMPUTE_POWERLEVEL 10>+<R0,2>>
SOUND=0244
EFFECT 3,03709,3,30,0,5
EFFECT 3,0376A,3,30,0,5
EFFECT 3,0375A,3,30
FORCHARS 6
	IF (<ISBENEFICIAL <LOCAL.CASTER>>) && (<SRC.UID> != <UID>)
		IF (<CANSEELOS <LOCAL.CASTER>>)
		CALL F_NOBLESACRIFICE_STUFF
			IF (<LOCAL.SACRIFICE>)
			SRC.SOUND=0423
			SRC.HITS=1
			SRC.STAM=1
			SRC.MANA=1
			ENDIF
		ENDIF
	ENDIF
ENDFOR

[EOF]