58 lines
1.8 KiB
Plaintext
58 lines
1.8 KiB
Plaintext
|
Scriptname _00E_A2_StarlingdummyDebuffSC extends activemagiceffect
|
||
|
|
||
|
|
||
|
;=====================================================================================
|
||
|
; EVENTS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||
|
|
||
|
_00E_Ability_StaggerSelfSpell.Cast(akTarget, akTarget)
|
||
|
SelfActor = akTarget
|
||
|
UpdateHealth(SelfActor)
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
||
|
|
||
|
iDamage = Health - SelfActor.GetActorValue("Health")
|
||
|
UpdateHealth(SelfActor)
|
||
|
|
||
|
if (iDamage > 0)
|
||
|
AugmentDamage()
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Function AugmentDamage()
|
||
|
|
||
|
Float iDamageToDeal = iDamage*((_00E_A2_StarlingdummyDebuffEnch.GetNthEffectMagnitude(0))/100)
|
||
|
_00E_A2_StarlingdummyPoisonSP.SetNtheffectMagnitude(0, iDamageToDeal)
|
||
|
_00E_A2_StarlingdummyPoisonSP.RemoteCast(SelfActor, Game.GetPlayer(), SelfActor)
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
|
||
|
Function UpdateHealth(Actor HealthActor)
|
||
|
|
||
|
Health = HealthActor.GetActorValue("Health")
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
;=====================================================================================
|
||
|
; PROPERTIES
|
||
|
;=====================================================================================
|
||
|
|
||
|
Actor SelfActor
|
||
|
|
||
|
float Health
|
||
|
float iDamage
|
||
|
|
||
|
Enchantment Property _00E_A2_StarlingdummyDebuffEnch Auto
|
||
|
|
||
|
Spell Property _00E_A2_StarlingdummyPoisonSP Auto
|
||
|
Spell Property _00E_Ability_StaggerSelfSpell Auto
|