enderalse/scripts/source/_00e_a1_rocksolidme.psc

50 lines
1.8 KiB
Plaintext
Raw Normal View History

Scriptname _00E_A1_RocksolidME extends activemagiceffect
Import _00E_TalentLibrary
Import Math
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster)
AdjustPerk()
akCaster.AddPerk(_00E_A1_RocksolidPerk)
MAGAlterationStoneFleshFireSDM.Play(akCaster)
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
_00E_A1_RocksolidOutM.Play(akCaster)
akCaster.RemovePerk(_00E_A1_RocksolidPerk)
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function AdjustPerk()
int iRocksolidIndex = GetPlayerTalentLevel(_00E_Class_Bastion_P05_Talent_Rocksolid, _00E_Class_Bastion_P05_Talent_Rocksolid2, _00E_Class_Bastion_P05_Talent_Rocksolid3)
float iDamageReduction = -((_00E_A1_RocksolidSP.GetNthEffectMagnitude(iRocksolidIndex)/100) - 1)
_00E_A1_RocksolidPerk.SetNthEntryValue(0, 1, iDamageReduction)
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
Sound Property _00E_A1_RocksolidOutM Auto
Sound Property MAGAlterationStoneFleshFireSDM Auto
Perk Property _00E_A1_RocksolidPerk Auto
Perk Property _00E_Class_Bastion_P05_Talent_Rocksolid Auto
Perk Property _00E_Class_Bastion_P05_Talent_Rocksolid2 Auto
Perk Property _00E_Class_Bastion_P05_Talent_Rocksolid3 Auto
Spell Property _00E_A1_RocksolidSP Auto