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

25 lines
942 B
Plaintext

Scriptname _00E_FS_Affinity_Ghostblade_OnAttack extends activemagiceffect
_FS_Phasmalist_ControlQuest Property PhasmalistControlQuest Auto
Weapon Property _00E_FS_Affinity_Ghostblade_EtherealDagger Auto
Spell Property _00E_FakeArrowSP Auto
Spell Property _00E_FS_Ghostblade_FakeAttackSpellSP Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef()
If akApparition
Int iEquippedItemType = akApparition.GetEquippedItemType(1)
If iEquippedItemType <= 6
akApparition.MoveTo(akTarget)
Debug.SendAnimationEvent(akApparition, "attackPowerStartInPlace")
Utility.Wait(1)
akApparition.RemoveItem(_00E_FS_Affinity_Ghostblade_EtherealDagger, 1)
ElseIf iEquippedItemType == 7
_00E_FakeArrowSP.Cast(akApparition, akTarget)
Else
_00E_FS_Ghostblade_FakeAttackSpellSP.Cast(akApparition, akTarget)
EndIf
akTarget.DamageAV("Health", 80)
EndIf
EndEvent