2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_A2_EldritchBloodSC extends activemagiceffect
|
|
|
|
|
|
|
|
Import _00E_TalentLibrary
|
|
|
|
Import Utility
|
|
|
|
|
2024-07-31 13:45:26 +00:00
|
|
|
int function _GetScriptVersion() Global
|
|
|
|
return 1
|
|
|
|
endFunction
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
|
|
|
|
if akSource == _00E_A2_SkyfallBoltSP
|
2023-12-08 02:45:53 +00:00
|
|
|
if (Victim.GetActorValue("Health") - _00E_A2_SkyfallBoltSP.GetNthEffectMagnitude(0)) <= - 10
|
2021-10-05 22:15:58 +00:00
|
|
|
bSynergySkyfallExplosion = True
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
|
2024-07-30 02:48:26 +00:00
|
|
|
Actor PlayerRef = Game.GetForm(0x14) as Actor
|
2021-10-05 22:15:58 +00:00
|
|
|
TalentLevel = GetPlayerTalentLevel(_00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood2, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood3)
|
|
|
|
|
|
|
|
Game.ShowFirstPersonGeometry()
|
|
|
|
Victim = akTarget
|
|
|
|
A2_EldritchBlood_Victim.ForceRefTo(Victim)
|
|
|
|
|
|
|
|
_00E_A2_EldritchBloodParticelAttachVFX.Play(Victim)
|
|
|
|
|
|
|
|
; Strip Victim off all its factions
|
|
|
|
VictimFactions = Victim.GetFactions(-128, 127)
|
|
|
|
VictimFactionRanks = CreateIntArray(VictimFactions.Length)
|
|
|
|
Int i = 0
|
|
|
|
While i < VictimFactions.Length
|
|
|
|
If VoiceFactions.HasForm(VictimFactions[i]) ; Skip voice factions
|
|
|
|
VictimFactions[i] = None
|
|
|
|
Else
|
|
|
|
VictimFactionRanks[i] = Victim.GetFactionRank(VictimFactions[i])
|
|
|
|
Victim.RemoveFromFaction(VictimFactions[i])
|
|
|
|
EndIf
|
|
|
|
i += 1
|
|
|
|
EndWhile
|
|
|
|
|
|
|
|
Victim.AddToFaction(PlayerAlliesFaction)
|
|
|
|
Victim.AddToFaction(EPFaction)
|
|
|
|
|
|
|
|
Victim.SetRelationshipRank(PlayerRef, 3)
|
|
|
|
|
|
|
|
Victim.SetActorValue("Confidence", 4)
|
|
|
|
Victim.SetActorValue("Aggression", 2)
|
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
AdjustDamageMult(Victim)
|
2024-07-30 02:48:26 +00:00
|
|
|
|
|
|
|
Victim.StopCombat()
|
|
|
|
|
|
|
|
If A2_EldritchBlood_VictimTarget.GetActorReference()
|
|
|
|
A2_EldritchBlood_Victim.GetActorReference().StartCombat(A2_EldritchBlood_VictimTarget.GetActorReference())
|
|
|
|
ElseIf PlayerREF.GetCombatTarget()
|
|
|
|
A2_EldritchBlood_Victim.GetActorReference().StartCombat(PlayerREF.GetCombatTarget())
|
|
|
|
EndIf
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
EndEvent
|
|
|
|
|
|
|
|
|
|
|
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
Victim.SetActorValue("attackdamagemult", fInitialAttackDamageMult)
|
|
|
|
Victim.SetActorValue("destructionpowermod", fInitialDestructionPowerMod)
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_A2_EldritchBloodMarkedFXS.Stop(Victim)
|
|
|
|
A2_EldritchBlood_Victim.Clear()
|
|
|
|
A2_EldritchBlood_VictimTarget.Clear()
|
|
|
|
_00E_A2_EldritchBloodParticelAttachVFX.Stop(Victim)
|
|
|
|
|
|
|
|
; Restore old factions of Victim
|
|
|
|
Victim.RemoveFromFaction(PlayerAlliesFaction)
|
|
|
|
Victim.RemoveFromFaction(EPFaction)
|
|
|
|
|
|
|
|
Int i = 0
|
|
|
|
While i < VictimFactions.Length
|
|
|
|
If VictimFactions[i]
|
|
|
|
Victim.AddToFaction(VictimFactions[i])
|
|
|
|
If VictimFactionRanks[i] != 0
|
|
|
|
Victim.SetFactionRank(VictimFactions[i], VictimFactionRanks[i])
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
i += 1
|
|
|
|
EndWhile
|
|
|
|
|
|
|
|
Victim.EvaluatePackage()
|
2024-07-30 02:48:26 +00:00
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnDying(Actor akKiller)
|
|
|
|
|
|
|
|
Explode()
|
|
|
|
Self.Dispel()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
Function AdjustDamageMult(Actor Victim)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
float iDamageMultiplicator = GetMagnitude()
|
2024-07-30 02:48:26 +00:00
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
fInitialAttackDamageMult = Victim.GetActorValue("attackdamagemult")
|
|
|
|
fInitialDestructionPowerMod = Victim.GetActorValue("destructionpowermod")
|
|
|
|
|
|
|
|
Victim.SetActorValue("attackdamagemult", fInitialAttackDamageMult * iDamageMultiplicator)
|
|
|
|
Victim.SetActorValue("destructionpowermod", fInitialDestructionPowerMod + (100 * iDamageMultiplicator))
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function Explode()
|
|
|
|
|
|
|
|
Victim.SetCriticalStage(Victim.CritStage_DisintegrateStart)
|
|
|
|
|
|
|
|
If bSynergySkyfallExplosion
|
|
|
|
AtronachUnsummonDeathFXS.Play(Victim)
|
|
|
|
Else
|
|
|
|
_00E_A1_DevourSoul_DisintegrateFXS.Play(Victim)
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
Wait(1.5)
|
|
|
|
Game.ShakeCamera(afStrength = 1.0)
|
|
|
|
ObjectReference EXPMarker = Victim.PlaceAtMe(XMarker, 1)
|
|
|
|
EXPMarker.MoveTo(Victim, 0.0, 0.0, 50.0)
|
|
|
|
|
|
|
|
If bSynergySkyfallExplosion
|
|
|
|
|
|
|
|
bSynergySkyfallExplosion = False
|
|
|
|
If TalentLevel == 1
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion, 1)
|
|
|
|
Elseif TalentLevel == 2
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion02, 1)
|
|
|
|
Elseif TalentLevel == 3
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion03, 1)
|
|
|
|
EndIf
|
|
|
|
_00E_A2_SynergyEldritchBloodSkyfallDMGEnch.SetNthEffectMagnitude(0, (_00E_A2_EldritchBloodEnchantment.GetNthEffectMagnitude(0)*1.5))
|
|
|
|
_00E_MQ16_EchoScreamsM.Play(Victim)
|
|
|
|
EXPMarker.PlaceAtMe(_00E_A2_SynergyEldritchBloodSkyfallExp, 1)
|
|
|
|
Victim.AttachAshPile(_00E_NPCOorbayaAshPile)
|
|
|
|
Victim.KnockAreaEffect(0.5, 256)
|
|
|
|
|
|
|
|
If _00E_Synergy_EldritchBloodSkyfall.GetValueInt() == 0
|
|
|
|
_00E_Synergy_EldritchBloodSkyfall.SetValueInt(1)
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_PlayerFunctions.GetSkillControl().ShowSynergyMessage()
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
Else
|
|
|
|
|
|
|
|
If TalentLevel == 1
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion, 1)
|
|
|
|
Elseif TalentLevel == 2
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion02, 1)
|
|
|
|
Elseif TalentLevel == 3
|
|
|
|
EXPMarker.PlaceAtMe(_00E_MAGEldritchShockExplosion03, 1)
|
|
|
|
EndIf
|
|
|
|
EXPMarker.PlaceAtMe(_00E_FS_MAGGoreExplosion, 1)
|
|
|
|
_00E_A2_ShatterSoulExpIMOD.Apply()
|
|
|
|
Victim.AttachAshPile(_00E_EldritchPile)
|
|
|
|
|
2024-07-30 02:48:26 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
ObjectReference VictimREF = Victim as ObjectReference
|
|
|
|
(VictimREF as _00E_EPOnDeath).HasBlameSpell = true
|
|
|
|
Victim.SetAlpha(0.0, true)
|
|
|
|
Victim.Kill(Victim)
|
|
|
|
Victim.SetCriticalStage(Victim.CritStage_DisintegrateEnd)
|
|
|
|
EXPMarker.Delete()
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
2024-07-31 23:19:11 +00:00
|
|
|
float fInitialAttackDamageMult
|
|
|
|
float fInitialDestructionPowerMod
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
Faction[] VictimFactions
|
|
|
|
Int[] VictimFactionRanks
|
|
|
|
FormList Property VoiceFactions Auto
|
|
|
|
Faction Property PlayerAlliesFaction Auto
|
|
|
|
Faction Property EPFaction Auto
|
|
|
|
|
|
|
|
int TalentLevel
|
|
|
|
|
|
|
|
bool bSynergySkyfallExplosion
|
|
|
|
|
|
|
|
Actor Victim
|
|
|
|
Perk iPerk
|
|
|
|
|
|
|
|
Perk Property _00E_A2_EldritchBloodPerk01 Auto
|
|
|
|
Perk Property _00E_A2_EldritchBloodPerk02 Auto
|
|
|
|
Perk Property _00E_A2_EldritchBloodPerk03 Auto
|
|
|
|
|
|
|
|
Sound Property _00E_MQ16_EchoScreamsM Auto
|
|
|
|
|
|
|
|
Enchantment Property _00E_A2_EldritchBloodEnchantment Auto
|
|
|
|
Enchantment Property _00E_A2_SynergyEldritchBloodSkyfallDMGEnch Auto
|
|
|
|
|
|
|
|
Perk Property _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood Auto
|
|
|
|
Perk Property _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood2 Auto
|
|
|
|
Perk Property _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood3 Auto
|
|
|
|
|
|
|
|
Static Property XMarker Auto
|
|
|
|
|
|
|
|
Activator Property _00E_EldritchPile Auto
|
|
|
|
Activator Property _00E_NPCOorbayaAshPile Auto
|
|
|
|
|
|
|
|
VisualEffect Property _00E_A2_EldritchBloodParticelAttachVFX Auto
|
|
|
|
|
|
|
|
Spell Property _00E_A2_EldritchBloodSP Auto
|
|
|
|
Spell Property _00E_A2_SkyfallBoltSP Auto
|
|
|
|
|
|
|
|
GlobalVariable Property _00E_Synergy_EldritchBloodSkyfall Auto
|
|
|
|
|
|
|
|
EffectShader Property _00E_A1_DevourSoul_DisintegrateFXS Auto
|
|
|
|
EffectShader Property _00E_A2_EldritchBloodMarkedFXS Auto
|
|
|
|
EffectShader Property AtronachUnsummonDeathFXS Auto
|
|
|
|
|
|
|
|
ImageSpaceModifier Property _00E_A2_ShatterSoulExpIMOD Auto
|
|
|
|
|
|
|
|
ReferenceAlias Property A2_EldritchBlood_Victim Auto
|
|
|
|
ReferenceAlias Property A2_EldritchBlood_VictimTarget Auto
|
|
|
|
|
|
|
|
Explosion Property _00E_MAGEldritchShockExplosion Auto
|
|
|
|
Explosion Property _00E_MAGEldritchShockExplosion02 Auto
|
|
|
|
Explosion Property _00E_MAGEldritchShockExplosion03 Auto
|
|
|
|
Explosion Property _00E_A2_SynergyEldritchBloodSkyfallExp Auto
|
|
|
|
Explosion Property _00E_FS_MAGGoreExplosion Auto
|