2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _60E_FS_Mystical_ThoughtImplosionSC extends ActiveMagicEffect
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
2021-10-12 02:10:35 +00:00
|
|
|
Int iChance = Utility.RandomInt(1, 100)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
If iChance < 33
|
2021-10-05 22:15:58 +00:00
|
|
|
; Do nothing
|
2021-10-12 02:10:35 +00:00
|
|
|
ElseIf iChance < 66 || akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
|
2021-10-05 22:15:58 +00:00
|
|
|
PushBack(akTarget)
|
2021-10-12 02:10:35 +00:00
|
|
|
Else
|
2021-10-05 22:15:58 +00:00
|
|
|
Weaken(akTarget)
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function PushBack(Actor Target)
|
|
|
|
MAGAlterationTelekinesisThrow.Play(Target)
|
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
Float fPushStrength = PlayerREF.GetActorValue("Illusion") / 10.0
|
|
|
|
If fPushStrength < 4
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_FS_PsionicPushStaggerSP.Cast(Target, Target)
|
|
|
|
Else
|
2021-10-12 02:10:35 +00:00
|
|
|
PlayerREF.PushActorAway(Target, fPushStrength)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function Weaken(Actor Target)
|
2021-10-12 02:10:35 +00:00
|
|
|
Spell weaknessSpell
|
|
|
|
If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist)
|
|
|
|
weaknessSpell = _00E_FS_PsychosisWeaknessSP
|
|
|
|
Else
|
|
|
|
weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow
|
|
|
|
EndIf
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
_00E_FS_Psychosis_Weakened.Show()
|
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
Float fResist = PlayerREF.GetActorValue("Illusion") * 0.5
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
weaknessSpell.SetNthEffectMagnitude(0, fResist)
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(1, fResist)
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(2, fResist)
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(3, fResist)
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(4, fResist)
|
|
|
|
weaknessSpell.SetNthEffectMagnitude(5, fResist)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
weaknessSpell.Cast(Target, Target)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
Target.RemoveSpell(_00E_FS_PsychosisCounter_01_SP)
|
|
|
|
Target.RemoveSpell(_00E_FS_PsychosisCounter_02_SP)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
|
|
|
|
Spell Property _00E_FS_PsionicPushStaggerSP Auto
|
|
|
|
|
|
|
|
Sound Property MAGAlterationTelekinesisThrow Auto
|
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
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
|