Anvil
Anvil.API.CreatureClassInfo Class Reference

Public Member Functions

void ClearMemorizedKnownSpells (NwSpell spell)
 Clears the specified spell from the creature's spellbook. More...
 
int GetMemorizedSpellSlotCountByLevel (byte spellLevel)
 Gets the number of spell slots available for a specific spell level. More...
 
IReadOnlyList< MemorizedSpellSlotGetMemorizedSpellSlots (byte spellLevel)
 Gets a list of spell slots available at the given spell level. The returned slots can be modified to change and remove spells. More...
 
byte GetRemainingSpellSlots (byte spellLevel)
 Gets the number of remaining, unspent spell slots for the given spell level. More...
 
void SetRemainingSpellSlots (byte spellLevel, byte slotsRemaining)
 Sets the number of unspent spell slots for the given spell level. More...
 

Properties

NwClass Class [get]
 Gets the associated class. More...
 
IArray< NwDomain?> Domains [get]
 Gets the 2 domains set for this class.
Domains can be modified by editing the contents of this array. More...
 
IReadOnlyList< IList< NwSpell > > KnownSpells [get]
 Gets a mutable list of known spells.
The returned array is indexed by spell level, 0 = cantrips, 1 = level 1 spells, etc. More...
 
byte Level [get]
 Gets the amount of levels in this class. More...
 
byte NegativeLevels [get]
 Gets any negative levels applied to this class (e.g. through level drain). More...
 
SpellSchool School [get]
 Gets the spell school for this class. More...
 

Member Function Documentation

◆ ClearMemorizedKnownSpells()

void Anvil.API.CreatureClassInfo.ClearMemorizedKnownSpells ( NwSpell  spell)
inline

Clears the specified spell from the creature's spellbook.

Parameters
spellThe spell to clear.

◆ GetMemorizedSpellSlotCountByLevel()

int Anvil.API.CreatureClassInfo.GetMemorizedSpellSlotCountByLevel ( byte  spellLevel)
inline

Gets the number of spell slots available for a specific spell level.

Parameters
spellLevelThe spell level to query.
Returns
An integer representing the number of spell slots available.

◆ GetMemorizedSpellSlots()

IReadOnlyList<MemorizedSpellSlot> Anvil.API.CreatureClassInfo.GetMemorizedSpellSlots ( byte  spellLevel)
inline

Gets a list of spell slots available at the given spell level. The returned slots can be modified to change and remove spells.

Parameters
spellLevelThe spell level to query.
Returns
A list containing the creature's current spell slots.

◆ GetRemainingSpellSlots()

byte Anvil.API.CreatureClassInfo.GetRemainingSpellSlots ( byte  spellLevel)
inline

Gets the number of remaining, unspent spell slots for the given spell level.

Parameters
spellLevelThe spell level to query.
Returns

◆ SetRemainingSpellSlots()

void Anvil.API.CreatureClassInfo.SetRemainingSpellSlots ( byte  spellLevel,
byte  slotsRemaining 
)
inline

Sets the number of unspent spell slots for the given spell level.

Parameters
spellLevelThe spell level to modify.
slotsRemainingThe new amount of spell slot remaining.

Property Documentation

◆ Class

NwClass Anvil.API.CreatureClassInfo.Class
get

Gets the associated class.

◆ Domains

IArray<NwDomain?> Anvil.API.CreatureClassInfo.Domains
get

Gets the 2 domains set for this class.
Domains can be modified by editing the contents of this array.

By default, a non-domain class will be populated with Domain.Air and Domain.Animal (index 0 and 1 respectively).

◆ KnownSpells

IReadOnlyList<IList<NwSpell> > Anvil.API.CreatureClassInfo.KnownSpells
get

Gets a mutable list of known spells.
The returned array is indexed by spell level, 0 = cantrips, 1 = level 1 spells, etc.

When used on players, you also need to update CreatureLevelInfo.AddedKnownSpells and CreatureLevelInfo.RemovedKnownSpells on the relevant level taken in this class, otherwise players will fail ELC checks.

◆ Level

byte Anvil.API.CreatureClassInfo.Level
get

Gets the amount of levels in this class.

◆ NegativeLevels

byte Anvil.API.CreatureClassInfo.NegativeLevels
get

Gets any negative levels applied to this class (e.g. through level drain).

◆ School

SpellSchool Anvil.API.CreatureClassInfo.School
get

Gets the spell school for this class.


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