Table of Contents

Method ActionCastSpellAt

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

ActionCastSpellAt(NwSpell, NwGameObject, MetaMagic, bool, int, ProjectilePathType, bool, NwClass?, bool)

Casts a spell at an object.

public Task ActionCastSpellAt(NwSpell spell, NwGameObject target, MetaMagic metaMagic = MetaMagic.Any, bool cheat = false, int domainLevel = 0, ProjectilePathType projectilePathType = ProjectilePathType.Default, bool instant = false, NwClass? spellClass = null, bool spontaneousCast = false)

Parameters

spell NwSpell

The spell to cast.

target NwGameObject

The target for the spell.

metaMagic MetaMagic

Metamagic that should be applied to the spell. If class is specified, cannot be Any.

cheat bool

If true, this object doesn't have to be able to cast the spell. Ignored if class is specified.

domainLevel int

Specifies the spell level if the spell is to be cast as a domain spell.

projectilePathType ProjectilePathType

The type of projectile path to use for this spell.

instant bool

If true, the spell is cast immediately.

spellClass NwClass

If specified, the spell will be cast using that class specifically. Null will use spell abilities instead.

spontaneousCast bool

If true, the creature will attempt to cast the given spell spontaneously. Requires class parameter is set to a valid class with spontaneous cast spells.

Returns

Task

ActionCastSpellAt(NwSpell, Location, MetaMagic, bool, ProjectilePathType, bool, NwClass?, bool, int)

Casts a spell at an location.

public Task ActionCastSpellAt(NwSpell spell, Location target, MetaMagic metaMagic = MetaMagic.Any, bool cheat = false, ProjectilePathType projectilePathType = ProjectilePathType.Default, bool instant = false, NwClass? spellClass = null, bool spontaneousCast = false, int domainLevel = 0)

Parameters

spell NwSpell

The spell to cast.

target Location

The target for the spell.

metaMagic MetaMagic

Metamagic that should be applied to the spell.

cheat bool

If true, this object doesn't have to be able to cast the spell.

projectilePathType ProjectilePathType

The type of projectile path to use for this spell.

instant bool

If true, the spell is cast immediately.

spellClass NwClass

If specified, the spell will be cast using that class specifically. Null will use spell abilities instead.

spontaneousCast bool

If true, the creature will attempt to cast the given spell spontaneously. Requires class parameter is set to a valid class with spontaneous cast spells.

domainLevel int

Specifies the spell level if the spell is to be cast as a domain spell.

Returns

Task