enderalse/scripts/source/_00e_apparitionspectralistscript.psc
2021-10-06 00:59:59 +02:00

35 lines
1.0 KiB
Plaintext

Scriptname _00E_ApparitionSpectralistScript extends activemagiceffect
Message Property _00E_FS_Affinity_Spectralist_ApparationBoost Auto
GlobalVariable Property _00E_Phasmalist_IsApparitionSummoned Auto
Actor Property PlayerREF Auto
Actor Target
; ATTACK_DAMAGE_MULT_BOOST must match the magnitude of "Spectral Binding" (_00E_FS_Affinity_SpectralistME) in _00E_FS_Affinity_AbSpectralist
Float Property ATTACK_DAMAGE_MULT_BOOST = 0.2 AutoReadOnly
Event OnEffectStart(Actor akTarget, Actor akCaster)
Target = akTarget
If Target == PlayerREF
Target = None ; Just in case
EndIf
SetBoost(ATTACK_DAMAGE_MULT_BOOST)
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
If _00E_Phasmalist_IsApparitionSummoned.GetValue() > 0.0 ; The apparition is not being unsummoned?
SetBoost(-ATTACK_DAMAGE_MULT_BOOST)
EndIf
EndEvent
Function SetBoost(Float fBoost)
If Target
Target.ModAV("AttackDamageMult", fBoost)
; Meh!
; If fBoost > 0.0
; _00E_FS_Affinity_Spectralist_ApparationBoost.Show()
; EndIf
EndIf
EndFunction