93 lines
2.5 KiB
Plaintext
93 lines
2.5 KiB
Plaintext
Scriptname _00E_FS_DreameaterSC extends activemagiceffect
|
|
|
|
;=====================================================================================
|
|
; EVENTS
|
|
;=====================================================================================
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
float fMagnitude = Self.GetMagnitude()
|
|
|
|
fBonusDamage = fMagnitude*akCaster.GetActorValue("Illusion")/3
|
|
|
|
if fBonusDamage < fMagnitude
|
|
|
|
fBonusDamage = fMagnitude
|
|
|
|
endif
|
|
|
|
If IsExtraDamageApplicable(akTarget, akCaster)
|
|
|
|
float fStealthModifier = 2.0
|
|
float fStealthModifierDisplay = 2.0
|
|
|
|
If akCaster.HasPerk(_00E_Class_Manipulation_P04b_)
|
|
|
|
fStealthModifier = _00E_Class_Manipulation_P04b_.GetNthEntryValue(0, 0)
|
|
fStealthModifierDisplay = 3.0
|
|
|
|
EndIf
|
|
|
|
If akCaster == PlayerREF
|
|
_00E_FS_FakeStealthMsg.Show(fStealthModifierDisplay as Float)
|
|
UISneakAttackM.Play(akCaster)
|
|
EndIf
|
|
; akTarget.PlaceAtMe(_00E_FS_PsionicExplosionSmallNoEffects)
|
|
fBonusDamage = fBonusDamage*fStealthModifier + (_00E_FS_DreameaterLastDamageDealt.GetValue()*fStealthModifier - _00E_FS_DreameaterLastDamageDealt.GetValue())
|
|
|
|
endif
|
|
|
|
if akTarget.GetAV("MagicResist") > 0
|
|
fBonusDamage = fBonusDamage*(akTarget.GetAV("MagicResist")/100)
|
|
endif
|
|
|
|
akTarget.DamageAV("Health", fBonusDamage)
|
|
|
|
if akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
|
|
akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP)
|
|
endif
|
|
|
|
EndEvent
|
|
|
|
Bool Function IsExtraDamageApplicable(Actor akTarget, Actor akCaster)
|
|
|
|
If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
|
|
Return True
|
|
EndIf
|
|
|
|
If akCaster.IsDetectedBy(akTarget) == False
|
|
akTarget.GetCombatState()
|
|
Int combatState = akTarget.GetCombatState()
|
|
If combatState != 1
|
|
Return True
|
|
EndIf
|
|
EndIf
|
|
|
|
Return False
|
|
|
|
EndFunction
|
|
|
|
;=====================================================================================
|
|
; PROPERTIES
|
|
;=====================================================================================
|
|
|
|
Actor akCasterActor
|
|
Actor akTargetActor
|
|
|
|
float fBonusDamage
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Perk Property _00E_Class_Manipulation_P04b_ Auto ; 2.5
|
|
|
|
GlobalVariable Property _00E_FS_DreameaterLastDamageDealt Auto
|
|
|
|
Explosion Property _00E_FS_PsionicExplosionSmallNoEffects Auto
|
|
|
|
MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto
|
|
|
|
Message Property _00E_FS_FakeStealthMsg Auto
|
|
|
|
Sound Property UISneakAttackM Auto
|
|
|
|
Spell Property _00E_FS_PsychosisWeaknessSP Auto |