DnD_5e.character_classes.sorcerer module
- class DnD_5e.character_classes.sorcerer.Sorcerer(**kwargs)[source]
Bases:
SpellCaster,CharacterSorcerer character class
- current_eq(other) bool[source]
Compare self and other to determine if they are identical based on the attributes checked in equals and also these attributes: sorcery points
- get_full_sorcery_points() int[source]
- Returns:
full sorcery points
- Return type:
non-negative integer
- spend_sorcery_points(points: int) int[source]
Spend a given number of sorcery points
- Parameters:
points (non-negative integer) – the number of sorcery points to spend
- Returns:
the number of sorcery points spent
- Return type:
positive integer
- Raise:
ValueError if points is invalid or self doesn’t have enough sorcery points
- spell_slot_to_sorcery_points(level: int)[source]
Convert a spell slot to sorcery points
- Parameters:
level (integer between 1 and 9 (inclusive)) – the level of the spell slot being used
- Returns:
None
- Raise:
ValueError if level is invalid