Dreameater no SKSE

This commit is contained in:
Eddoursul 2024-02-10 16:59:20 +01:00
parent fa97be05da
commit 7438de4e64
3 changed files with 21 additions and 3 deletions

BIN
Dreameater update.esp Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,11 +1,27 @@
Scriptname _00E_FS_DreameaterSC extends activemagiceffect Scriptname _00E_FS_DreameaterSC extends activemagiceffect
{Dreameater bonus damage}
;===================================================================================== ;=====================================================================================
; EVENTS ; EVENTS
;===================================================================================== ;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster) event OnEffectStart(Actor akTarget, Actor akCaster)
Float fMagnitude = Self.GetMagnitude() if SKSE.GetVersion()
fMagnitude = GetMagnitude()
endif
endevent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
if ! fMagnitude
fMagnitude = - akTarget.GetActorValue(sActorValue)
endif
if akTarget.IsDead()
return
endif
akTarget.RestoreActorValue(sActorValue, fMagnitude)
Float fBonusDamage = fMagnitude * akCaster.GetActorValue("Illusion") / 3.0 Float fBonusDamage = fMagnitude * akCaster.GetActorValue("Illusion") / 3.0
If fBonusDamage < fMagnitude If fBonusDamage < fMagnitude
fBonusDamage = fMagnitude fBonusDamage = fMagnitude
@ -30,7 +46,6 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
fBonusDamage = fBonusDamage * (100.0 - fMagicResist) / 100.0 fBonusDamage = fBonusDamage * (100.0 - fMagicResist) / 100.0
EndIf EndIf
akTarget.DamageActorValue("Health", fBonusDamage) akTarget.DamageActorValue("Health", fBonusDamage)
If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
@ -59,6 +74,9 @@ EndFunction
; PROPERTIES ; PROPERTIES
;===================================================================================== ;=====================================================================================
float fMagnitude
String Property sActorValue = "FavorActive" Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Perk Property _00E_Class_Infiltrator_P03_B_HeartShot Auto ; 2.5 Perk Property _00E_Class_Infiltrator_P03_B_HeartShot Auto ; 2.5