4
Fork 0

Removed sneak attack bonus from Dreameater, because

a) the perk specifically targets bow attacks,
b) this bonus is not used anywhere else,
c) to make it consistent, it is better to use an engine level solution, see the Magic Sneak Attacks mod by po3.
development
Eddoursul 3 months ago
parent ed4fd50836
commit b1e0dac27a
  1. BIN
      Enderal - Forgotten Stories.esm
  2. BIN
      scripts/_00e_fs_dreameatersc.pex
  3. 37
      source/scripts/_00e_fs_dreameatersc.psc

Binary file not shown.

Binary file not shown.

@ -26,20 +26,7 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
If fBonusDamage < fMagnitude
fBonusDamage = fMagnitude
EndIf
; Sneak bonus
If IsExtraDamageApplicable(akTarget, akCaster)
Float fStealthModifier = Game.GetGameSettingFloat("fCombatSneakBowMult")
If akCaster.HasPerk(_00E_Class_Infiltrator_P03_B_HeartShot)
fStealthModifier = fStealthModifier * _00E_Class_Infiltrator_P03_B_HeartShot.GetNthEntryValue(0, 0)
EndIf
If akCaster == PlayerREF
_00E_FS_FakeStealthMsg.Show(fStealthModifier)
UISneakAttackM.Play(akCaster)
EndIf
fBonusDamage = fBonusDamage * fStealthModifier
EndIf
; Target's magic resistance
Float fMagicResist = akTarget.GetActorValue("MagicResist")
If fMagicResist > 0
@ -54,22 +41,6 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
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()
If akTarget.GetCombatState() != 1
Return True
EndIf
EndIf
Return False
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
@ -79,13 +50,7 @@ String Property sActorValue = "FavorActive" Auto
Actor Property PlayerREF Auto
Perk Property _00E_Class_Infiltrator_P03_B_HeartShot Auto ; 2.5
MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto
Message Property _00E_FS_FakeStealthMsg Auto
Sound Property UISneakAttackM Auto
Spell Property _00E_FS_PsychosisWeaknessSP Auto
Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto

Loading…
Cancel
Save