Classes API
classes
Basic Fantasy class definitions and level-1 rules data.
This module defines the supported character classes along with their prime requisites, minimum ability requirements, hit dice, and base saving throws used during character generation.
AbilityName = Literal['CHA', 'CON', 'DEX', 'INT', 'STR', 'WIS']
module-attribute
Ability score identifiers used throughout the rules system.
ClassName = Literal['cleric', 'fighter', 'magic-user', 'thief']
module-attribute
Canonical lowercase identifiers for supported character classes.
SavingThrowName = Literal['death_ray_or_poison', 'magic_wands', 'paralysis_or_petrify', 'dragon_breath', 'spells']
module-attribute
Names of saving throw categories used by Basic Fantasy.
ClassData
Bases: TypedDict
Structured rule data describing a character class.
Attributes:
| Name | Type | Description |
|---|---|---|
prime_requisite |
AbilityName
|
Ability score required for the class. |
min_prime |
int
|
Minimum value required for the prime requisite. |
hit_die |
int
|
Hit die size used to roll level-1 hit points. |
saving_throws |
dict[SavingThrowName, int]
|
Base level-1 saving throw values for the class. |
Source code in src/rpgcharacters/classes.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |