2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_FS_A3_Mage_ThaumaturgicShieldSC extends activemagiceffect
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
|
|
|
|
Debug.MessageBox("_00E_FS_A3_Mage_ThaumaturgicShieldSC Cool.")
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
|
|
|
|
|
|
|
|
If (akAggressor as actor) && (Utility.RandomInt(1, 100) <= fThrowBackChance)
|
|
|
|
|
|
|
|
Debug.MessageBox("_00E_FS_A3_Mage_ThaumaturgicShieldSC Cool 2.")
|
|
|
|
|
|
|
|
akAttacker = akAggressor as Actor
|
|
|
|
|
|
|
|
If (akSource as Spell)
|
|
|
|
|
|
|
|
ReflectSpell(akSource as Spell)
|
|
|
|
|
|
|
|
Elseif (akSource.HasKeyword(WeapTypeBow))
|
|
|
|
|
|
|
|
ReflectArrow(akSource as Weapon)
|
|
|
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
Endif
|
|
|
|
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function ReflectSpell(Spell spSpellToReflect)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function ReflectArrow(Weapon wpBow)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Actor akAttacker
|
|
|
|
|
2024-01-09 22:00:18 +00:00
|
|
|
float fThrowBackChance = 100.0
|
2021-10-05 22:15:58 +00:00
|
|
|
; The likelihood that a spell will be reflected onto the caster
|
|
|
|
|
2024-01-09 22:00:18 +00:00
|
|
|
Spell Property _00E_FS_A3_Mage_ThaumaturgicShieldArrowSP Auto
|
|
|
|
|
|
|
|
Keyword Property WeapTypeBow Auto
|