enderalse/source/scripts/_00e_theriantrophist_howl.psc

37 lines
1.5 KiB
Plaintext

Scriptname _00E_Theriantrophist_Howl extends activemagiceffect
Explosion Property _00E_Theriantrophist_HowlExp Auto
_FS_TheriantrophistControlQuest Property TheriantrophistControlQuest Auto
Message Property _00E_Theriantrophist_NotInWolfForm Auto
Enchantment Property _00E_A3_Theriantrophist_HowlEnch Auto
Spell Property _00E_A3_Theriantrophist_HowlSP Auto
Shout Property _00E_A3_Theriantrophist_Howl Auto
Perk Property _00E_Class_Theriantrophist_P06a_Talent_Howl_01 Auto
Perk Property _00E_Class_Theriantrophist_P06a_Talent_Howl_02 Auto
Perk Property _00E_Class_Theriantrophist_P06a_Talent_Howl_03 Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
if TheriantrophistControlQuest.IsTransformed()
adjustEnchantment()
akCaster.PlaceAtMe(_00E_Theriantrophist_HowlExp)
Else
_00E_Theriantrophist_NotInWolfForm.Show()
(akCaster as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A3_Theriantrophist_Howl, 0)
Endif
Endevent
Function adjustEnchantment()
Int TalentLevel = _00E_TalentLibrary.GetPlayerTalentLevel(_00E_Class_Theriantrophist_P06a_Talent_Howl_01, _00E_Class_Theriantrophist_P06a_Talent_Howl_02, _00E_Class_Theriantrophist_P06a_Talent_Howl_03)
Float damage = _00E_A3_Theriantrophist_HowlSP.getNthEffectMagnitude(TalentLevel)
_00E_A3_Theriantrophist_HowlEnch.setNthEffectMagnitude(0, damage)
if (TalentLevel >= 2)
_00E_A3_Theriantrophist_HowlEnch.setNthEffectMagnitude(1, ((Game.GetPlayer().getLevel() as float) * 1.5) as int)
EndIf
if (TalentLevel >= 3)
_00E_A3_Theriantrophist_HowlEnch.setNthEffectMagnitude(2, 1)
Endif
EndFunction