enderalse/source/scripts/_00e_phasmalist_seesouls.psc

53 lines
1.8 KiB
Plaintext
Raw Normal View History

Scriptname _00E_Phasmalist_SeeSouls extends activemagiceffect
Formlist Property loadedSouls auto
GlobalVariable Property _00E_Phasmalist_CanSeeSoulsLevel auto
Perk Property _00E_Class_Phasmalist_P01_Talent_SeeSoul auto
Perk Property _00E_Class_Phasmalist_P01_Talent_SeeSoul2 auto
Perk Property _00E_Class_Phasmalist_P01_Talent_SeeSoul3 auto
Shout Property _00E_Phasmalist_A0_TapestryOfSouls Auto
Sound Property _00E_FS_Phasmalist_EnterWorld_Female Auto
VisualEffect Property FXCameraAttachFineMistEffect Auto
Spell Property SeeSoulsSpell auto
ImagespaceModifier Property _00E_Phasmalist_SeeSoulsIMOD auto
ImagespaceModifier Property _00E_Phasmalist_SeeSoulsStartIMOD auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
If (akCaster.hasSpell(SeeSoulsSpell))
self.dispel()
EndIf
int talentLevel = _00E_TalentLibrary.GetPlayerTalentLevel(_00E_Class_Phasmalist_P01_Talent_SeeSoul, _00E_Class_Phasmalist_P01_Talent_SeeSoul2, _00E_Class_Phasmalist_P01_Talent_SeeSoul3)
_00E_Phasmalist_CanSeeSoulsLevel.setValue(talentLevel * 2) ;there are only three different talent levels, but tier I - VI souls
updateSeeSoul(true)
FXCameraAttachFineMistEffect.Play(akCaster)
_00E_Phasmalist_SeeSoulsIMOD.apply()
_00E_FS_Phasmalist_EnterWorld_Female.Play(akCaster)
_00E_Phasmalist_SeeSoulsStartIMOD.apply()
Endevent
Function updateSeeSoul(bool bEffectStart)
int i = loadedSouls.getSize()
While i > 0
i = i - 1
_00E_Phasmalist_Soul soul = loadedSouls.getAt(i) as _00E_Phasmalist_Soul
; some unelegant shenanigans
If bEffectStart
soul.bPerkUpdate = true
EndIf
soul.updateCanSee()
soul.bPerkUpdate = false
EndWhile
Endfunction
Event OnEffectFinish(Actor akTarget, Actor akCaster)
FXCameraAttachFineMistEffect.Stop(akCaster)
_00E_Phasmalist_SeeSoulsIMOD.remove()
updateSeeSoul(false)
Endevent