Skip to content

Commit

Permalink
Merge pull request #731 from absol89/dev
Browse files Browse the repository at this point in the history
Updated Vilkas script to be more compatible with general magic effects
  • Loading branch information
RobbeBryssinck authored Nov 3, 2024
2 parents 23e5d40 + f5d2b63 commit f4f2249
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Binary file modified GameFiles/Skyrim/scripts/C00TrainerScript.pex
Binary file not shown.
32 changes: 16 additions & 16 deletions GameFiles/Skyrim/scripts/source/C00TrainerScript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ int numHits = 0

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
; Debug.Trace("C00: Vilkas hit by magic.")
if (Game.GetPlayer() == akCaster)
GetOwningQuest().SetStage(100)
endif
; if (Game.GetPlayer() == akCaster)
; GetOwningQuest().SetStage(100)
; endif
EndEvent

Event OnEnterBleedout()
Expand All @@ -24,30 +24,30 @@ Function BleedoutChecks()
GetOwningQuest().SetStage(125)
endif
EndFunction

; Change for SkyrimTogetherReborn 1.6.7+animation is to allow more mods by not magic checking the hit which can have combat or perk overhaul hidden effects
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
; Debug.Trace("C00: Vilkas was hit.")
; Debug.Trace("C00: Vilkas hit datums -- " + akAggressor + " " + akSource + " " + akProjectile + " " + abPowerAttack + " " + abSneakAttack + " " + abBashAttack + " " + abHitBlocked)
if (akSource as Spell)
; if (akSource as Spell)
; Debug.Trace("C00: Vilkas hit by spell; bailing out and handling it in the magic effect handler.")
return
elseif (akSource as Explosion)
; return
; elseif (akSource as Explosion)
; Debug.Trace("C00: Vilkas hit by explosion; bailing out and handling it in the other handlers.")
return
endif
; if (Game.GetPlayer() == akAggressor) ; The original script didn't account for remote STR bystanders not hitting
if ((akSource as Spell) != None)
GetOwningQuest().SetStage(100)
return
endif
; return
; endif
; if (Game.GetPlayer() == akAggressor)
; if ((akSource as Spell) != None)
; GetOwningQuest().SetStage(100)
; return
; endif
numHits += 1
if (numHits >= 3)
GetOwningQuest().SetStage(150)
endif
; else; Removing this part lets STR remote or pacifist players get the same quest stage and stopcombat at 3 hits
; else
; ; someone else hit him, stop the quest and have him berate you
; GetOwningQuest().SetStage(110)
; endif; No STR methods needed to reach stopcombat solution suggested in tiltedphoques/TiltedEvolution/issues/598
; endif
EndEvent

Function ResetHits()
Expand Down

0 comments on commit f4f2249

Please sign in to comment.