78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
Scriptname _60E_FS_Mystical_ThoughtImplosionSC extends ActiveMagicEffect
|
|
|
|
;=====================================================================================
|
|
; EVENTS
|
|
;=====================================================================================
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
Int iChance = Utility.RandomInt(1, 100)
|
|
|
|
If iChance < 33
|
|
; Do nothing
|
|
ElseIf iChance < 66 || akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
|
|
PushBack(akTarget)
|
|
Else
|
|
Weaken(akTarget)
|
|
EndIf
|
|
EndEvent
|
|
|
|
;=====================================================================================
|
|
; FUNCTIONS
|
|
;=====================================================================================
|
|
|
|
Function PushBack(Actor Target)
|
|
MAGAlterationTelekinesisThrow.Play(Target)
|
|
|
|
Float fPushStrength = PlayerREF.GetActorValue("Illusion") / 10.0
|
|
If fPushStrength < 4
|
|
_00E_FS_PsionicPushStaggerSP.Cast(Target, Target)
|
|
Else
|
|
PlayerREF.PushActorAway(Target, fPushStrength)
|
|
EndIf
|
|
EndFunction
|
|
|
|
Function Weaken(Actor Target)
|
|
Spell weaknessSpell
|
|
If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist)
|
|
weaknessSpell = _00E_FS_PsychosisWeaknessSP
|
|
Else
|
|
weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow
|
|
EndIf
|
|
|
|
_00E_FS_Psychosis_Weakened.Show()
|
|
|
|
Float fResist = PlayerREF.GetActorValue("Illusion") * 0.5
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(0, fResist)
|
|
weaknessSpell.SetNthEffectMagnitude(1, fResist)
|
|
weaknessSpell.SetNthEffectMagnitude(2, fResist)
|
|
weaknessSpell.SetNthEffectMagnitude(3, fResist)
|
|
weaknessSpell.SetNthEffectMagnitude(4, fResist)
|
|
weaknessSpell.SetNthEffectMagnitude(5, fResist)
|
|
|
|
weaknessSpell.Cast(Target, Target)
|
|
|
|
Target.RemoveSpell(_00E_FS_PsychosisCounter_01_SP)
|
|
Target.RemoveSpell(_00E_FS_PsychosisCounter_02_SP)
|
|
EndFunction
|
|
|
|
;=====================================================================================
|
|
; PROPERTIES
|
|
;=====================================================================================
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Spell Property _00E_FS_PsionicPushStaggerSP Auto
|
|
|
|
Sound Property MAGAlterationTelekinesisThrow Auto
|
|
|
|
Message Property _00E_FS_Psychosis_Weakened Auto
|
|
|
|
Perk Property _00E_Class_Sinistrope_P08_C_Illusionist Auto
|
|
Spell Property _00E_FS_PsychosisWeaknessSP Auto
|
|
Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto
|
|
MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto
|
|
|
|
Spell Property _00E_FS_PsychosisCounter_01_SP Auto
|
|
Spell Property _00E_FS_PsychosisCounter_02_SP Auto
|