Scriptname SuH_sexES_NPCattacker extends activemagiceffect  

SuH_Fun property _Fun auto

;ent/ Actors
Actor property PlayerRef auto
Actor char
;end/
GlobalVariable property SuH_rank_deviouspartner auto
MiscObject property Gold001 auto
int devious

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == PlayerRef
		debug.trace("SuH ERROR : NPCattacker set on PC - NULL Effect", 2) ;Error report to log
	else
		char = akTarget
		RegisterForSingleUpdate(5.0)
	endIf
	devious = SuH_rank_deviouspartner.GetValue() as int
endEvent

Event OnUpdate()
	_Fun.STATcalc(char, aPreset="PCsubmit", stat="All")
	if devious > 0
		char.RemoveItem(Gold001, devious, true, PlayerRef)
	endIf
	RegisterForSingleUpdate(5.0)
endEvent