Breaking Changes
- Things previously represented solely by dicts (monsters, spells, items) are now represented by their own serializable objects. Actually, they are dataclasses from the standard library. See the updated README.
- Character `class_spellcasting` was removed to reduce redundancy in the character data
- Previous wealth-changing methods have been replaced with the new `change_wealth` (lower wealth with negative input)
- Every remaining camelCase method was replaced with snake_case
- `maximum_hp` renamed to `get_maximum_hp`
- `getModifier` renamed to `get_ability_modifier`
Bug fixes
- Character `spell_slots` is no longer blank. Instead, it is a dict containing the maximum spell slots, cantrips known, and spells known for the character's class level.
- Character class no longer defines `__getitem__` or `keys` so it does not itself function like a dict. Instead it defines `__iter__`, which accomplishes the same end-result of allowing Character to become a dict without the undesired side-effect of acting like it already is one. This is also consistent with dataclasses.
- `repr(character)` now prints a statement that will reconstruct the object in Python, as it does for dataclasses
New Features
- Character now defines `__eq__` and will return `True` if compared against an identical character (or a dict of an identical character)
- Wealth is now a float with 1.00 equal to 1 gp.
- Other coins are stored in a new optional property, `wealth_detailed`
- `{'pp': 0, 'gp': 0, 'ep': 0, 'sp': 0, 'cp': 0}`
- Added `conditions` dict for storing conditions as booleans:
- blinded
- charmed
- deafened
- frightened
- grappled
- incapacitated
- invisible
- paralyzed
- petrified
- poisoned
- prone
- restrained
- stunned
- unconscious
- All conditions start out as False, of course.
[View on PyPI](https://pypi.org/project/dnd-character/23.7.29/)