DnD_5e.character_classes.wizard module

class DnD_5e.character_classes.wizard.Wizard(**kwargs)[source]

Bases: SpellCaster, Character

Wizard character class

current_eq(other)[source]

Compare self and other to determine if they are identical based on the attributes checked in equals and also these attributes: signature spell slots

Parameters:

other (Wizard) – the Wizard to compare

Returns:

True if self is identical to other, False otherwise

Return type:

bool

get_spell_mastery_names() set[source]
Returns:

name of Spells that self has Spell Mastery for

Return type:

set of strings

has_spell_mastery(item) bool[source]

Determine if self has mastery of a given spell

Parameters:

item (Spell or str) – a Spell or name of a Spell

Returns:

True if self has mastery of the spell item, False otherwise

Return type:

bool

get_signature_spell_slots() dict[source]
Returns:

signature spell slots

Return type:

dict mapping spell names to the number of slots left to use that as a signature spell

get_signature_spells() list[source]
Returns:

singature spell names

Return type:

list of strings

has_signature_spell(item) bool[source]

Determine whether a given spell is a signature spell

Parameters:

item (Spell or str) – a Spell or the name of a Spell

Returns:

True if item is a signature spell, False otherwise

Return type:

bool

spend_spell_slot(level: int, spell=None)[source]

Spend a spell slot of the given level. Deal with spell mastery and signature spells appropriately.

Parameters:
  • level (an integer from 0 to 9 (inclusive)) – the spell level

  • spell (Spell) – the spell that is being used

Returns:

None

Raise:

ValueError if self doesn’t have any spell slots of level level