Anvil
Anvil.API.NwSpell Class Reference

A spell definition. More...

Public Member Functions

string? GetConjureSound (Gender gender)
 Gets the chant/voice that is played when this spell is conjured. More...
 
byte GetSpellLevelForClass (NwClass nwClass)
 Gets the spell class level for the specified class. More...
 

Static Public Member Functions

static ? NwSpell FromSpellId (int? spellId)
 Resolves a NwSpell from a spell id. More...
 
static ? NwSpell FromSpellId (uint? spellId)
 Resolves a NwSpell from a spell id. More...
 
static ? NwSpell FromSpellType (Spell spellType)
 Resolves a NwSpell from a Anvil.API.Spell. More...
 
static implicit operator NwSpell? (Spell spellType)
 

Properties

MetaMagic AllowedMetaMagic [get]
 Gets the type of MetaMagic that may be used with this spell. More...
 
StrRef AltMessage [get]
 Gets the unformatted message shown in the combat log when something casts this spell. More...
 
SpellCastAnimType CastAnim [get]
 Gets the animation type used to cast this spell. More...
 
string? CastGroundVisual [get]
 Gets the ResRef of the visual effect model shown at the ground of the creature when casting this spell. More...
 
string? CastHandVisual [get]
 Gets the ResRef of the visual effect model shown at the creature's hands when casting this spell. More...
 
string? CastHeadVisual [get]
 Gets the ResRef of the visual effect model shown above the creature's head when casting this spell. More...
 
string? CastSound [get]
 Gets the ResRef of the sound that plays when a creature casts this spell. More...
 
TimeSpan CastTime [get]
 Gets the amount of time to cast the spell, once it has been successfully conjured. More...
 
SpellConjureAnimType ConjureAnim [get]
 Gets the animation type used to conjure the spell. More...
 
string? ConjureGroundVisual [get]
 Gets the ResRef of the visual effect model shown at the ground of the creature when conjuring this spell. More...
 
string? ConjureHandVisual [get]
 Gets the ResRef of the visual effect model shown at the creature's hands when conjuring this spell. More...
 
string? ConjureHeadVisual [get]
 Gets the ResRef of the visual effect model shown above the creature's head when conjuring this spell. More...
 
string? ConjureSound [get]
 Gets the ResRef of the sound that plays when a creature conjures this spell. More...
 
TimeSpan ConjureTime [get]
 Gets the amount of time needed to conjure the spell. This is the animation that plays before the spell is cast. More...
 
IReadOnlyList< NwSpell >?? CounterSpells [get]
 Gets a list of spells that may directly counter this spell. More...
 
StrRef Description [get]
 Gets the description of this spell. More...
 
NwFeatFeatReference [get]
 Gets the associated feat if this spell is linked to a feat. More...
 
bool HasProjectile [get]
 Gets if this spell fires a projectile once successfully cast. More...
 
string? IconResRef [get]
 Gets the spell's icon ResRef. More...
 
int Id [get]
 Gets the ID of this spell. More...
 
string? ImpactScript [get]
 Gets the name of the script invoked when the spell impacts a target.
This script is only invoked when the spell was successfully cast. More...
 
byte InnateSpellLevel [get]
 Gets the innate level of this spell.
See GetSpellLevelForClass to get the spell level for a specific class. More...
 
bool IsHostileSpell [get]
 Gets if this spell is considered hostile when cast on other creatures. More...
 
NwSpellMasterSpell [get]
 Gets the parent spell if this spell is a subradial spell. The reverse of RadialSpells. More...
 
StrRef Name [get]
 Gets the name of this spell. More...
 
string? ProjectileModel [get]
 Gets the ResRef of the projectile model. More...
 
SpellProjectileOrientation ProjectileOrientation [get]
 Gets the orientation of this spell's projectile. More...
 
ProjectilePathType ProjectilePathType [get]
 Gets the type of path that this spell's projectile follows by default. More...
 
string? ProjectileSound [get]
 Gets the sound of this spell's projectile. More...
 
SpellProjectileSpawnPoint ProjectileSpawnPoint [get]
 Gets the spawn point of this spell's projectile. More...
 
IReadOnlyList< NwSpellRadialSpells [get]
 Gets the sub-list of spells that appear in the spell's radial menu. More...
 
SpellRange Range [get]
 Gets the range of this spell. More...
 
SpellComponents SpellComponents [get]
 Gets the spell components needed to cast this spell. More...
 
SpellSchool SpellSchool [get]
 Gets the spell school for this spell. More...
 
Spell SpellType [get]
 Gets the associated Spell type for this spell. More...
 
bool SpontaneouslyCast [get]
 Gets if this spell can be spontaneously cast (e.g. cleric heal spells). More...
 
TalentCategory TalentCategory [get]
 Gets the talent category that this spell is assigned to. More...
 
SpellTargetTypes TargetTypes [get]
 Gets the types of targets that this spell is valid for. More...
 
bool UseConcentration [get]
 Gets if this spell should trigger concentration checks. More...
 
SpellUserType UserType [get]
 Gets the UserType for this spell. More...
 

Detailed Description

A spell definition.

Member Function Documentation

◆ FromSpellId() [1/2]

static ? NwSpell Anvil.API.NwSpell.FromSpellId ( int?  spellId)
inlinestatic

Resolves a NwSpell from a spell id.

Parameters
spellIdThe id of the spell to resolve.
Returns
The associated NwSpell instance. Null if the spell id is invalid.

◆ FromSpellId() [2/2]

static ? NwSpell Anvil.API.NwSpell.FromSpellId ( uint?  spellId)
inlinestatic

Resolves a NwSpell from a spell id.

Parameters
spellIdThe id of the spell to resolve.
Returns
The associated NwSpell instance. Null if the spell id is invalid.

◆ FromSpellType()

static ? NwSpell Anvil.API.NwSpell.FromSpellType ( Spell  spellType)
inlinestatic

Resolves a NwSpell from a Anvil.API.Spell.

Parameters
spellTypeThe spell type to resolve.
Returns
The associated NwSpell instance. Null if the spell type is invalid.

◆ GetConjureSound()

string? Anvil.API.NwSpell.GetConjureSound ( Gender  gender)
inline

Gets the chant/voice that is played when this spell is conjured.

Parameters
genderThe gender of the caster.
Returns
The ResRef of the sound to play for the specified gender.

◆ GetSpellLevelForClass()

byte Anvil.API.NwSpell.GetSpellLevelForClass ( NwClass  nwClass)
inline

Gets the spell class level for the specified class.

Parameters
nwClassThe class to query.
Returns
The spell level for the specified class.

Property Documentation

◆ AllowedMetaMagic

MetaMagic Anvil.API.NwSpell.AllowedMetaMagic
get

Gets the type of MetaMagic that may be used with this spell.

◆ AltMessage

StrRef Anvil.API.NwSpell.AltMessage
get

Gets the unformatted message shown in the combat log when something casts this spell.

◆ CastAnim

SpellCastAnimType Anvil.API.NwSpell.CastAnim
get

Gets the animation type used to cast this spell.

◆ CastGroundVisual

string? Anvil.API.NwSpell.CastGroundVisual
get

Gets the ResRef of the visual effect model shown at the ground of the creature when casting this spell.

◆ CastHandVisual

string? Anvil.API.NwSpell.CastHandVisual
get

Gets the ResRef of the visual effect model shown at the creature's hands when casting this spell.

◆ CastHeadVisual

string? Anvil.API.NwSpell.CastHeadVisual
get

Gets the ResRef of the visual effect model shown above the creature's head when casting this spell.

◆ CastSound

string? Anvil.API.NwSpell.CastSound
get

Gets the ResRef of the sound that plays when a creature casts this spell.

◆ CastTime

TimeSpan Anvil.API.NwSpell.CastTime
get

Gets the amount of time to cast the spell, once it has been successfully conjured.

◆ ConjureAnim

SpellConjureAnimType Anvil.API.NwSpell.ConjureAnim
get

Gets the animation type used to conjure the spell.

◆ ConjureGroundVisual

string? Anvil.API.NwSpell.ConjureGroundVisual
get

Gets the ResRef of the visual effect model shown at the ground of the creature when conjuring this spell.

◆ ConjureHandVisual

string? Anvil.API.NwSpell.ConjureHandVisual
get

Gets the ResRef of the visual effect model shown at the creature's hands when conjuring this spell.

◆ ConjureHeadVisual

string? Anvil.API.NwSpell.ConjureHeadVisual
get

Gets the ResRef of the visual effect model shown above the creature's head when conjuring this spell.

◆ ConjureSound

string? Anvil.API.NwSpell.ConjureSound
get

Gets the ResRef of the sound that plays when a creature conjures this spell.

◆ ConjureTime

TimeSpan Anvil.API.NwSpell.ConjureTime
get

Gets the amount of time needed to conjure the spell. This is the animation that plays before the spell is cast.

◆ CounterSpells

IReadOnlyList<NwSpell>?? Anvil.API.NwSpell.CounterSpells
get

Gets a list of spells that may directly counter this spell.

◆ Description

StrRef Anvil.API.NwSpell.Description
get

Gets the description of this spell.

◆ FeatReference

NwFeat? Anvil.API.NwSpell.FeatReference
get

Gets the associated feat if this spell is linked to a feat.

◆ HasProjectile

bool Anvil.API.NwSpell.HasProjectile
get

Gets if this spell fires a projectile once successfully cast.

◆ IconResRef

string? Anvil.API.NwSpell.IconResRef
get

Gets the spell's icon ResRef.

◆ Id

int Anvil.API.NwSpell.Id
get

Gets the ID of this spell.

◆ ImpactScript

string? Anvil.API.NwSpell.ImpactScript
get

Gets the name of the script invoked when the spell impacts a target.
This script is only invoked when the spell was successfully cast.

◆ InnateSpellLevel

byte Anvil.API.NwSpell.InnateSpellLevel
get

Gets the innate level of this spell.
See GetSpellLevelForClass to get the spell level for a specific class.

◆ IsHostileSpell

bool Anvil.API.NwSpell.IsHostileSpell
get

Gets if this spell is considered hostile when cast on other creatures.

◆ MasterSpell

NwSpell? Anvil.API.NwSpell.MasterSpell
get

Gets the parent spell if this spell is a subradial spell. The reverse of RadialSpells.

◆ Name

StrRef Anvil.API.NwSpell.Name
get

Gets the name of this spell.

◆ ProjectileModel

string? Anvil.API.NwSpell.ProjectileModel
get

Gets the ResRef of the projectile model.

◆ ProjectileOrientation

SpellProjectileOrientation Anvil.API.NwSpell.ProjectileOrientation
get

Gets the orientation of this spell's projectile.

◆ ProjectilePathType

ProjectilePathType Anvil.API.NwSpell.ProjectilePathType
get

Gets the type of path that this spell's projectile follows by default.

◆ ProjectileSound

string? Anvil.API.NwSpell.ProjectileSound
get

Gets the sound of this spell's projectile.

◆ ProjectileSpawnPoint

SpellProjectileSpawnPoint Anvil.API.NwSpell.ProjectileSpawnPoint
get

Gets the spawn point of this spell's projectile.

◆ RadialSpells

IReadOnlyList<NwSpell> Anvil.API.NwSpell.RadialSpells
get

Gets the sub-list of spells that appear in the spell's radial menu.

◆ Range

SpellRange Anvil.API.NwSpell.Range
get

Gets the range of this spell.

◆ SpellComponents

SpellComponents Anvil.API.NwSpell.SpellComponents
get

Gets the spell components needed to cast this spell.

◆ SpellSchool

SpellSchool Anvil.API.NwSpell.SpellSchool
get

Gets the spell school for this spell.

◆ SpellType

Spell Anvil.API.NwSpell.SpellType
get

Gets the associated Spell type for this spell.

◆ SpontaneouslyCast

bool Anvil.API.NwSpell.SpontaneouslyCast
get

Gets if this spell can be spontaneously cast (e.g. cleric heal spells).

◆ TalentCategory

TalentCategory Anvil.API.NwSpell.TalentCategory
get

Gets the talent category that this spell is assigned to.

◆ TargetTypes

SpellTargetTypes Anvil.API.NwSpell.TargetTypes
get

Gets the types of targets that this spell is valid for.

◆ UseConcentration

bool Anvil.API.NwSpell.UseConcentration
get

Gets if this spell should trigger concentration checks.

◆ UserType

SpellUserType Anvil.API.NwSpell.UserType
get

Gets the UserType for this spell.


The documentation for this class was generated from the following file: