35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
|
Scriptname _00E_A2_Sporecrowngas_EncDamageScript extends activemagiceffect
|
||
|
|
||
|
Sound Property _00E_UISneakAttackBonusMark Auto
|
||
|
Actor Property PlayerREF Auto
|
||
|
Float Health
|
||
|
Actor Victim
|
||
|
Perk Property _00E_A2_Ghostwalk_Perk Auto
|
||
|
|
||
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||
|
Victim = akTarget
|
||
|
Health = Victim.GetActorValue("Health")
|
||
|
RegisterForSingleUpdate(0.25)
|
||
|
PlayerREF.AddPerk(_00E_A2_Ghostwalk_Perk) ;Delete later, for testing
|
||
|
EndEvent
|
||
|
|
||
|
Event OnUpdate()
|
||
|
Health = Victim.GetActorValue("Health")
|
||
|
RegisterForSingleUpdate(0.25)
|
||
|
EndEvent
|
||
|
|
||
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, \
|
||
|
bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
||
|
|
||
|
;if abSneakAttack == true && abHitBlocked == false
|
||
|
if abHitBlocked == false
|
||
|
Float Damage = Health - Victim.GetActorValue("Health")
|
||
|
if Damage > 0
|
||
|
Debug.Notification("30% unblockbarer Schleichschaden durch Sporenkronengift!")
|
||
|
Float UltraDamage = (Damage*0.30)
|
||
|
_00E_UISneakAttackBonusMark.Play(PlayerREF)
|
||
|
Victim.DamageAV("Health", -UltraDamage)
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
EndEvent
|