enderalse/scripts/source/_00e_restorecooldownselfsc.psc

26 lines
988 B
Plaintext
Raw Normal View History

Scriptname _00E_RestoreCooldownSelfSC extends activemagiceffect
Event OnEffectStart(actor akTarget, Actor akCaster)
float ManaRequired = PlayerREF.GetBaseActorValue("Magicka")*(_10E_ChannelEnergy.GetNthEffectMagnitude(1)/100)
if (PlayerREF.GetActorValue("Magicka") <= ManaRequired)
MAGFail.Play(PlayerREF)
Debug.Notification("Nicht genug Mana!")
Else
MAGAlterationReleaseSDM.Play(PlayerREF)
AbsorbBlueFXS.Play(PlayerREF)
Float iQuicken = _10E_ChannelEnergy.GetNthEffectMagnitude(0)
; Debug.MessageBox("Player cooldown is" + (PlayerREF.GetVoiceRecoveryTime() as Int) + ", quicken by " + iQuicken as Int)
Float Manacost = Self.GetMagnitude()
PlayerREF.SetVoiceRecoveryTime((PlayerRef.GetVoiceRecoveryTime() - iQuicken))
PlayerREF.DamageAV("Magicka", ManaRequired)
EndIf
EndEvent
Actor Property PlayerREF Auto
Spell Property _10E_ChannelEnergy Auto
Sound Property MAGFail Auto
Sound Property MAGAlterationReleaseSDM Auto
EffectShader Property AbsorbBlueFXS Auto