Enderal SE
https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1014 B
31 lines
1014 B
Scriptname abForswornBriarheartScript extends ActiveMagicEffect
|
|
|
|
ingredient property BriarHeart auto
|
|
{The briarheart object.}
|
|
armor property ArmorBriarHeart auto
|
|
armor property ArmorBriarHeartEmpty auto
|
|
|
|
actor property mySelf auto hidden
|
|
|
|
EVENT OnEffectStart(Actor Target, Actor Caster)
|
|
mySelf = caster
|
|
Caster.AddInventoryEventFilter(briarHeart)
|
|
endEVENT
|
|
|
|
EVENT OnItemRemoved(Form objectTaken, int aiItemCount, ObjectReference refTaken, ObjectReference akDestContainer)
|
|
if objectTaken == briarHeart
|
|
; debug.trace("Briarheart warrior "+mySelf+" has had his heart removed!")
|
|
|
|
; kill the warrior, blame it on whoever took the heart
|
|
if myself.isDead() == FALSE
|
|
mySelf.kill(akDestContainer as actor)
|
|
endif
|
|
|
|
; dead or alive, switch to "empty" cavity when the briarheart is taken
|
|
myself.addItem(ArmorBriarHeartEmpty,1)
|
|
utility.wait(0.25)
|
|
mySelf.removeItem(armorBriarHeart,(mySelf.getItemCount(armorBriarHeart)))
|
|
myself.equipItem(ArmorBriarHeartEmpty,TRUE,TRUE)
|
|
endif
|
|
endEVENT
|
|
|