Table of Contents

Method SpellResistanceCheck

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

SpellResistanceCheck(NwGameObject, NwSpell?, int?, int?, bool)

Performs a spell resistance check.

public bool SpellResistanceCheck(NwGameObject target, NwSpell? spell = null, int? casterLevel = null, int? spellResistance = null, bool feedback = true)

Parameters

target NwGameObject

The target creature of the spell.

spell NwSpell

The spell to use for the check. If null, will auto-detect based on the current running spell script.

casterLevel int?

The caster level for the spell. If null, will use the caster's level.

spellResistance int?

The spell resistance to penetrate. If null, will use the spell resistance of the target.

feedback bool

If true, will show feedback for the spell resistance roll.

Returns

bool

True if the target successfully resisted the spell, otherwise false.