Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname UDA_DragonAspect_Arms extends ActiveMagicEffect
- import game
- import utility
- import debug
- ;properties
- Actor Property PlayerREF Auto
- ;variables
- int weapLeftBaseDmg = 0
- int weapRightBaseDmg = 0
- int weapLeftModDmg = 0
- int weapRightModDmg = 0
- string avCarryWeight = "CarryWeight"
- float playerCarryWeightBase = 0.0
- float playerCarryWeightMod = 0.0
- float fUDA_ModValue = 0.25
- Event OnEffectStart(Actor akTarget, Actor akCaster)
- ;initialize and set base values
- initWeaponBaseDamage(true) ;LeftHand
- initWeaponBaseDamage(false) ;RightHand
- initCarryWeight()
- ;Modify Values
- modWeaponValues(true);Left Hand
- modWeaponValues(false);Right Hand
- modCarryWeight()
- EndEvent
- Event onEffectFinish(Actor akTarget, Actor akCaster)
- resetWeaponValues(true);Reset weapon Values Left hand
- resetWeaponValues(false);Reset weapon Values Right hand
- resetCarryWeight() ;Reset carry Weight
- EndEvent
- ;Weapon functions
- int Function initWeaponBaseDamage(bool isLeftHand)
- If (isLeftHand == true)
- weapLeftBaseDmg = PlayerREF.GetEquippedWeapon(true).GetBaseDamage()
- return weapLeftBaseDmg
- ElseIf (isLeftHand == false)
- weapRightBaseDmg = PlayerREF.GetEquippedWeapon(false).GetBaseDamage()
- return weapRightBaseDmg
- EndIf
- EndFunction
- int Function modWeaponValues(bool isLeftHand)
- if (isLeftHand == true)
- weapLeftModDmg = (weapLeftBaseDmg + (weapLeftBaseDmg * fUDA_ModValue)) as int
- PlayerREF.GetEquippedWeapon(true).SetBaseDamage(weapLeftModDmg) ;Set weapon damage to modified value
- return weapLeftModDmg
- elseif (isLeftHand == false)
- weapRightModDmg = (weapRightBaseDmg + (weapRightBaseDmg * fUDA_ModValue)) as int
- PlayerREF.GetEquippedWeapon(false).SetBaseDamage(weapRightModDmg) ;set weapon damge to modified Value
- return weapRightModDmg
- EndIf
- EndFunction
- Function resetWeaponValues(bool isLeftHand)
- if(isLeftHand == true)
- PlayerREF.GetEquippedWeapon(true).SetBaseDamage(weapLeftBaseDmg)
- elseif(isLeftHand == false)
- PlayerREF.GetEquippedWeapon(false).SetBaseDamage(weapRightBaseDmg)
- EndIf
- weapLeftBaseDmg = 0
- weapLeftModDmg = 0
- weapRightBaseDmg = 0
- weapRightModDmg = 0
- EndFunction
- ;Carry Weight Functions
- float Function initCarryWeight()
- playerCarryWeightBase = PlayerREF.GetAV(avCarryWeight)
- return playerCarryWeightBase
- EndFunction
- float Function modCarryWeight()
- playerCarryWeightMod = (playerCarryWeightBase + (playerCarryWeightBase * fUDA_ModValue))
- PlayerREF.SetAV(avCarryWeight, playerCarryWeightMod)
- return playerCarryWeightMod
- EndFunction
- Function resetCarryWeight()
- PlayerREF.SetAV(avCarryWeight, playerCarryWeightBase)
- playerCarryWeightBase = 0.0
- playerCarryWeightMod = 0.0
- EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement