1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
988 B

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