magicReflect⚓︎
This event is triggered before a magic reflection check. It allows changing the reflection chance. Note that some magic effects that the player casts are unreflectable (usually non-damage effects, see magic effect flags) and do not trigger this event.
Each reflect effect active on a target will roll separately; the reflect chances are independent. This event also occurs once per effect in a spell, so a multi-effect spell may trigger this multiple times.
--- @param e magicReflectEventData
local function magicReflectCallback(e)
end
event.register(tes3.event.magicReflect, magicReflectCallback)
Tip
This event can be filtered based on the target
event data.
Tip
An event can be claimed by setting e.claim
to true
, or by returning false
from the callback. Claiming the event prevents any lower priority callbacks from being called.
Event Data⚓︎
mobile
(tes3mobileActor): Read-only. The mobile actor that may reflect the spell.reflectChance
(number): The % chance that the magic is reflected. May be modified.reflectEffect
(tes3activeMagicEffect): Read-only. The specific reflect effect being tested. This is ates3activeMagicEffect
instead of a more common magic instance. You can lookup the magic source instance or effect instance withtes3activeMagicEffect
accessors.source
(tes3alchemy, tes3enchantment, tes3spell): Read-only. The magic source.sourceInstance
(tes3magicSourceInstance): Read-only. The unique instance of the magic source.target
(tes3reference): Read-only. The actor that may reflect the spell.