[EVENTS E_STRANGLE]
ON=@DeathCorpse
FINDID.i_strangle_effect.MORE1=0
FINDID.i_strangle_effect.TIMER

[ITEMDEF i_strangle_effect]
ID=i_memory
TYPE=T_EQ_SCRIPT
NAME=Strangle

ON=@Create
ATTR=ATTR_INVIS|ATTR_DECAY

ON=@Timer
IF (!<TOPOBJ.ISCHAR>)
REMOVE
ENDIF
IF (!(<MORE1>))
	IF (<TOPOBJ.ISPLAYER>)
	TOPOBJ.REMOVEBUFF <dDEF.bufficon_strangle>
	TOPOBJ.SYSMESSAGELOC -1,1061687 // You can breath normally again.
	ENDIF
TOPOBJ.EVENTS -E_STRANGLE
REMOVE
ELSE
LOCAL.DAMAGE=<R<TAG0.MINDAMAGE>,<TAG0.MAXDAMAGE>>
FLOAT.DAMAGEMODIFIER=<FLOATVAL (<TOPOBJ.STAM>/<TOPOBJ.MAXSTAM>)*2>
FLOAT.DAMAGE=<FLOATVAL <dLOCAL.DAMAGE>*(3-<FLOAT.DAMAGEMODIFIER>)>
MORE1 --
	IF (<MORE2> > 1)
	MORE2 --
	ENDIF
TOPOBJ.DAMAGE <FEVAL <FLOAT.DAMAGE>> <DEF.DAM_MAGIC> <TAG0.CASTER.UID>
TIMER=<MORE2>
ENDIF
RETURN 1

[Spell 111]
DEFNAME=s_Strangle
NAME=Strangle
SOUND=0
RUNES=
CAST_TIME=2.0
RESOURCES=1 i_reag_nox_crystal,1 i_reag_daemon_blood
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_targ_char|spellflag_harm|spellflag_targ_noself
EFFECT_ID=
EFFECT=
DURATION=0.0
MANAUSE=29
SKILLREQ=SKILL_NECROMANCY 65.0
INTERRUPT=0.0,0.0

ON=@Start
IF (<ISPLAYER>)
SAY @,3,1 In Bal Nox
ENDIF

ON=@Effect
IF (<SRC> == <UID>)
RETURN 1
ENDIF
IF (!(<FINDID.i_strangle_effect>))
SOUND=022F
EFFECT=3,036CB,16,30,5,67,9911
EFFECT=3,0374A,16,30,4,1108,9502
FLOAT.POWER=<FLOATVAL <SRC.SPIRITSPEAK>/10>
	IF (<FEVAL <FLOAT.POWER>> < 4)
	FLOAT.POWER=<FLOATVAL 4>
	ENDIF
LOCAL.MINDAMAGE=<FEVAL <FLOATVAL <FLOAT.POWER>-2.0>>
LOCAL.MAXDAMAGE=<FEVAL <FLOATVAL <FLOAT.POWER>+1.0>>
SERV.NEWITEM i_strangle_effect,1,<UID>
NEW.TIMER=5
NEW.MORE2=5
NEW.TAG.MINDAMAGE=<LOCAL.MINDAMAGE>
NEW.TAG.MAXDAMAGE=<LOCAL.MAXDAMAGE>
NEW.TAG.CASTER.UID=<SRC.UID>
NEW.MORE1=<FEVAL <FLOAT.POWER>>
EVENTS +E_STRANGLE
	IF (<ISPLAYER>)
	ADDBUFF <dDEF.bufficon_strangle> 1075794 1075795 20 <dLOCAL.MINDAMAGE> <dLOCAL.MAXDAMAGE>
	ENDIF
ENDIF

[EOF]