Entropic Blood fixes:
- Controlled actor no longer remains hostile to player. - Fixed floating in the air after save reload or player's death, occurred during victim selection or ghostwalking. - Unmarking attacking actor unmarks its target as well.
This commit is contained in:
parent
343039ddd8
commit
6f96053d76
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -16,11 +16,14 @@ Event OnCrosshairRefChange(ObjectReference ref)
|
||||
lastTarget.blockActivation(false)
|
||||
EndIf
|
||||
lastTarget = ref
|
||||
|
||||
if ref
|
||||
ref.blockActivation(true)
|
||||
endif
|
||||
|
||||
If _00E_A2_EldritchBloodGlobal.GetValueInt() == 1
|
||||
If Ref.GetSelfAsActor() && Ref != Game.GetPlayer()
|
||||
EldritchBloodEffectScript.SelectEnemy(Ref as Actor)
|
||||
If ref as Actor && ref != Game.GetForm(0x14)
|
||||
EldritchBloodEffectScript.SelectEnemy(ref as Actor)
|
||||
EndIf
|
||||
Else
|
||||
UnregisterForCrosshairRef()
|
||||
@ -86,7 +89,6 @@ Function EnterMarkingMode(Float iReach, _00E_A2_EldritchBloodPlayerSC _00E_A2_El
|
||||
|
||||
akSelfRef = Self.GetActorReference()
|
||||
RegisterForAnimationEvent(akSelfRef, "weaponSwing")
|
||||
Game.DisablePlayerControls(false, false, false, false, false, false, false, false)
|
||||
fActivatePickLengthBefore = GetINIFloat("fActivatePickLength:Interface")
|
||||
SetINIFloat("fActivatePickLength:Interface", iReach)
|
||||
EldritchBloodEffectScript = _00E_A2_EldritchBloodMEScript
|
||||
@ -103,7 +105,6 @@ Function ExitMarkingMode()
|
||||
|
||||
iAttackCounter = 0
|
||||
UnregisterForAnimationEvent(akSelfRef, "weaponSwing")
|
||||
Game.EnablePlayerControls()
|
||||
UnregisterForCrosshairRef()
|
||||
SetINIFloat("fActivatePickLength:Interface", 150)
|
||||
|
||||
|
@ -88,15 +88,25 @@ State AddEffect
|
||||
Event OnBeginState()
|
||||
|
||||
A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
|
||||
|
||||
if A2_EldritchBlood_VictimTarget.GetActorReference()
|
||||
A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
endif
|
||||
|
||||
PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP)
|
||||
A2_EldritchBlood_PlayerForScript.ExitMarkingMode()
|
||||
_00E_A2_EldritchBloodSelectionHoldIMOD.Remove()
|
||||
Sound.StopInstance(MarkingLP)
|
||||
QSTDA16SoulGemOffM.Play(PlayerREF)
|
||||
A2_EldritchBlood_Player.Clear()
|
||||
|
||||
if A2_EldritchBlood_Rune.GetReference()
|
||||
A2_EldritchBlood_Rune.GetReference().Delete()
|
||||
endif
|
||||
|
||||
if A2_EldritchBlood_VictimRune.GetReference()
|
||||
A2_EldritchBlood_VictimRune.GetReference().Delete()
|
||||
endif
|
||||
|
||||
A2_EldritchBlood_Rune.Clear()
|
||||
A2_EldritchBlood_VictimRune.Clear()
|
||||
|
||||
@ -108,10 +118,10 @@ Event OnBeginState()
|
||||
MarkingVictimRuneREF.Delete()
|
||||
EndIf
|
||||
|
||||
|
||||
AddFrenzySpell()
|
||||
|
||||
_00E_A2_EldritchBloodGlobal.SetValueInt(0)
|
||||
Sound.StopInstance(MarkingLP)
|
||||
|
||||
EndEvent
|
||||
|
||||
@ -125,38 +135,54 @@ Function AddFrenzySpell()
|
||||
|
||||
float iExpDamage = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex - 1)
|
||||
_00E_A2_EldritchBloodEnchantment.SetNthEffectMagnitude(0, iExpDamage)
|
||||
|
||||
if A2_EldritchBlood_VictimTarget.GetActorReference()
|
||||
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
|
||||
endif
|
||||
|
||||
float iFrenzyDMGMult = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex + 2)
|
||||
Int iFrenzyDuration = _00E_A2_EldritchBloodSP.GetNthEffectDuration(iIndex + 2) as Int
|
||||
|
||||
_00E_A2_EldritchBloodVictimSP.SetNthEffectMagnitude(0, iFrenzyDMGMult)
|
||||
_00E_A2_EldritchBloodVictimSP.SetNthEffectDuration(0, iFrenzyDuration)
|
||||
|
||||
if A2_EldritchBlood_Victim.GetReference()
|
||||
_00E_A2_EldritchBloodVictimSP.Cast(A2_EldritchBlood_Victim.GetReference(), A2_EldritchBlood_Victim.GetReference())
|
||||
|
||||
If iFrezyAttackTargetMarked
|
||||
A2_EldritchBlood_Victim.GetActorReference().StartCombat(A2_EldritchBlood_VictimTarget.GetActorReference())
|
||||
Else
|
||||
A2_EldritchBlood_Victim.GetActorReference().StartCombat(PlayerREF.GetCombatTarget())
|
||||
EndIf
|
||||
endif
|
||||
|
||||
EndFunction
|
||||
|
||||
Function NotMarkedClearUp()
|
||||
|
||||
if A2_EldritchBlood_Victim.GetActorReference()
|
||||
A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
|
||||
endif
|
||||
|
||||
if A2_EldritchBlood_VictimTarget.GetActorReference()
|
||||
A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
|
||||
endif
|
||||
|
||||
(PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A2_EldritchBlood, 0)
|
||||
MAGFail.Play(PlayerREF)
|
||||
PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP)
|
||||
|
||||
if A2_EldritchBlood_PlayerForScript
|
||||
A2_EldritchBlood_PlayerForScript.ExitMarkingMode()
|
||||
endif
|
||||
|
||||
_00E_A2_EldritchBloodSelectionHoldIMOD.Remove()
|
||||
Sound.StopInstance(MarkingLP)
|
||||
QSTDA16SoulGemOffM.Play(PlayerREF)
|
||||
A2_EldritchBlood_Player.Clear()
|
||||
|
||||
if A2_EldritchBlood_Rune.GetReference()
|
||||
A2_EldritchBlood_Rune.GetReference().Delete()
|
||||
endif
|
||||
|
||||
if A2_EldritchBlood_VictimRune.GetReference()
|
||||
A2_EldritchBlood_VictimRune.GetReference().Delete()
|
||||
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
|
||||
endif
|
||||
|
||||
A2_EldritchBlood_Rune.Clear()
|
||||
A2_EldritchBlood_VictimRune.Clear()
|
||||
A2_EldritchBlood_VictimTarget.Clear()
|
||||
@ -170,14 +196,24 @@ Function NotMarkedClearUp()
|
||||
MarkingVictimRuneREF.Delete()
|
||||
EndIf
|
||||
|
||||
Wait(2)
|
||||
if ! PlayerREF.IsDead()
|
||||
Wait(2.0)
|
||||
endif
|
||||
|
||||
_00E_A2_EldritchBloodGlobal.SetValueInt(0)
|
||||
|
||||
if MarkingLP
|
||||
Sound.StopInstance(MarkingLP)
|
||||
endif
|
||||
|
||||
EndFunction
|
||||
|
||||
Function SelectEnemy(Actor iVictim)
|
||||
|
||||
If IsTargetValid(iVictim)
|
||||
If ! IsTargetValid(iVictim)
|
||||
return
|
||||
EndIf
|
||||
|
||||
If !IsTargetMarked(iVictim)
|
||||
If !iFrenzyTargetMarked
|
||||
MarkFrenzyVictim(iVictim)
|
||||
@ -192,9 +228,6 @@ Function SelectEnemy(Actor iVictim)
|
||||
Else
|
||||
UnmarkEnemy(iVictim)
|
||||
EndIf
|
||||
Else
|
||||
Return
|
||||
EndIf
|
||||
|
||||
EndFunction
|
||||
|
||||
@ -224,35 +257,39 @@ EndFunction
|
||||
|
||||
Function UnmarkEnemy(Actor iVictim)
|
||||
|
||||
bool Cleared
|
||||
|
||||
If iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
|
||||
A2_EldritchBlood_Rune.Clear()
|
||||
A2_EldritchBlood_Victim.Clear()
|
||||
MarkingRuneREF.Disable()
|
||||
iFrenzyTargetMarked = False
|
||||
_00E_Levelsystem_sEldritchBloodVictimMarkingRemoved.Show()
|
||||
iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
|
||||
_00E_A2_EldritchBloodMarkedFXS.Stop(iVictim)
|
||||
_00E_A2_GhostwalkDeselectM.Play(PlayerREF)
|
||||
Cleared = True
|
||||
MarkingRuneREF.Delete()
|
||||
MarkingRuneREF = None
|
||||
|
||||
; Unmark attack target too
|
||||
if A2_EldritchBlood_VictimTarget.GetActorReference()
|
||||
UnmarkEnemy(A2_EldritchBlood_VictimTarget.GetActorReference())
|
||||
endif
|
||||
|
||||
Elseif iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
A2_EldritchBlood_VictimRune.Clear()
|
||||
A2_EldritchBlood_VictimTarget.Clear()
|
||||
MarkingVictimRuneREF.Disable()
|
||||
iFrezyAttackTargetMarked = False
|
||||
_00E_Levelsystem_sEldritchBloodAttackVictimMarkingRemoved.Show()
|
||||
iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(iVictim)
|
||||
_00E_A2_GhostwalkDeselectM.Play(PlayerREF)
|
||||
Cleared = True
|
||||
MarkingVictimRuneREF.Delete()
|
||||
MarkingVictimRuneREF = None
|
||||
EndIf
|
||||
|
||||
EndFunction
|
||||
|
||||
bool Function IsTargetValid(Actor CheckVictim)
|
||||
|
||||
If CheckVictim.IsInFaction(PlayerAlliesFaction)
|
||||
If CheckVictim.IsInFaction(PlayerAlliesFaction) || CheckVictim.IsCommandedActor() || CheckVictim.IsPlayerTeammate()
|
||||
Return False
|
||||
ElseIf CheckVictim.HasKeyword(MagicNoEldritchBlood)
|
||||
_00E_Levelsystem_sAbilityEnemyLevelTooHigh.Show()
|
||||
@ -272,21 +309,13 @@ bool Function EnemyLevelTooHigh(Actor LevelVictim)
|
||||
|
||||
Float iAllowedDif = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(6)
|
||||
|
||||
If (LevelVictim.GetLevel() > (PlayerLevel.GetValueInt() + iAllowedDif as Int))
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
EndIf
|
||||
return (LevelVictim.GetLevel() > (PlayerLevel.GetValueInt() + iAllowedDif as Int))
|
||||
|
||||
EndFunction
|
||||
|
||||
bool Function IsTargetMarked(Actor iVictim)
|
||||
|
||||
If iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) || iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
EndIf
|
||||
return iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) || iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
|
||||
|
||||
EndFunction
|
||||
|
||||
|
@ -20,7 +20,7 @@ EndEvent
|
||||
|
||||
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||||
|
||||
Actor PlayerRef = Game.GetPlayer()
|
||||
Actor PlayerRef = Game.GetForm(0x14) as Actor
|
||||
TalentLevel = GetPlayerTalentLevel(_00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood2, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood3)
|
||||
|
||||
Game.ShowFirstPersonGeometry()
|
||||
@ -29,10 +29,6 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||||
|
||||
_00E_A2_EldritchBloodParticelAttachVFX.Play(Victim)
|
||||
|
||||
If Victim.GetCombatTarget() == PlayerRef
|
||||
Victim.StopCombat()
|
||||
EndIf
|
||||
|
||||
; Strip Victim off all its factions
|
||||
VictimFactions = Victim.GetFactions(-128, 127)
|
||||
VictimFactionRanks = CreateIntArray(VictimFactions.Length)
|
||||
@ -55,8 +51,15 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||||
Victim.SetActorValue("Confidence", 4)
|
||||
Victim.SetActorValue("Aggression", 2)
|
||||
|
||||
Victim.EvaluatePackage()
|
||||
AdjustAndAddFrenzyPerk()
|
||||
AdjustAndAddFrenzyPerk(Victim)
|
||||
|
||||
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
|
||||
|
||||
EndEvent
|
||||
|
||||
@ -85,6 +88,7 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||||
EndWhile
|
||||
|
||||
Victim.EvaluatePackage()
|
||||
|
||||
EndEvent
|
||||
|
||||
Event OnDying(Actor akKiller)
|
||||
@ -98,7 +102,7 @@ EndEvent
|
||||
; FUNCTIONS
|
||||
;=====================================================================================
|
||||
|
||||
Function AdjustAndAddFrenzyPerk()
|
||||
Function AdjustAndAddFrenzyPerk(Actor Victim)
|
||||
|
||||
float iDamageMultiplicator = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(TalentLevel + 2)
|
||||
|
||||
@ -113,6 +117,8 @@ Function AdjustAndAddFrenzyPerk()
|
||||
iPerk.SetNthEntryValue(1, 1, iDamageMultiplicator)
|
||||
iPerk.SetNthEntryValue(2, 1, iDamageMultiplicator)
|
||||
|
||||
Victim.AddPerk(iPerk)
|
||||
|
||||
EndFunction
|
||||
|
||||
Function Explode()
|
||||
@ -177,6 +183,7 @@ Function Explode()
|
||||
ObjectReference VictimREF = Victim as ObjectReference
|
||||
(VictimREF as _00E_EPOnDeath).HasBlameSpell = true
|
||||
Victim.SetAlpha(0.0, true)
|
||||
Victim.RemovePerk(iPerk)
|
||||
Victim.Kill(Victim)
|
||||
Victim.SetCriticalStage(Victim.CritStage_DisintegrateEnd)
|
||||
EXPMarker.Delete()
|
||||
|
@ -21,6 +21,11 @@ Event OnPlayerLoadGame()
|
||||
if ControlRepository == None
|
||||
ControlRepository = Game.GetForm(0x493C2) as _00E_EnderalControls
|
||||
endif
|
||||
|
||||
; Restore INI value changed by slow time effects
|
||||
if Utility.GetINIFloat("fInAirFallingCharGravityMult:Havok") < 1.35
|
||||
Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35)
|
||||
endif
|
||||
EndEvent
|
||||
|
||||
_00E_SkillControl function GetSkillControl() Global
|
||||
|
@ -12,6 +12,8 @@ EndEvent
|
||||
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||||
|
||||
_00E_PlayerFunctions.GetVisionControl().UpdateSpeed(akTarget)
|
||||
|
||||
; Also restored on game load in _00E_PlayerFunctions
|
||||
Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35)
|
||||
|
||||
EndEvent
|
||||
|
Loading…
Reference in New Issue
Block a user