SpellImmunityCheck(object, object, int, int)

From NWN Lexicon
Jump to navigationJump to search

Does a spell immunity check.

int SpellImmunityCheck(
    object oTarget,
    object oCaster,
    int nSpellId = -1,
    int bFeedback=TRUE
);

Parameters

oTarget
Target of the check
oCaster
Caster performing the check against oTarget
nSpellId
The spell ID to check immunity of. If -1 it will attempt to be auto-detected.
bFeedback
If TRUE displays feedback automatically, FALSE it suppresses it. (default: TRUE)


Description

Does a spell immunity check. This checks for EffectSpellImmunity and related item properties.

Returns: TRUE if the target is immune to nSpellId, FALSE if failed or an error occured

Remarks

This along with the sister functions SpellXXX functions allow you to do part of ResistSpell as required, even outside of a proper spell script.

nSpellId defaults to GetSpellId in case you want to manipulate the values.


Version

This function was added in 1.89.8193.37 of NWN:EE.

Example

See Also

functions:

GetSpellId, ResistSpell, SpellResistanceCheck, SpellAbsorptionLimitedCheck, SpellAbsorptionUnlimitedCheck