Releases: tassaron/dnd-character
Releases · tassaron/dnd-character
v23.07.29
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 toget_maximum_hp
getModifier
renamed toget_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__
orkeys
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 returnTrue
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
v23.07.22
Breaking Changes
- Finished renaming "armour" to "armor" (in methods of the Character class)
New Features
- Re-added dice functions (thanks to @gergo-szabo) now in
dice.py
- Roll 4d6 and drop the lowest:
from dnd_character.dice import sum_rolls
sum_rolls(d6=4, drop_lowest=True)
- Roll d20 with advantage:
from dnd_character.dice import roll_with_advantage_disadvantage
roll_with_advantage_disadvantage(dice=20, advantage=True)
Minor Changes
- Serialized version of characters is smaller due to not including superfluous copies of data (level 20 bard used to produce a 56kb json file and now produces a 36kb file instead)
View on PyPI
v23.07.12
Small breaking changes - two things have been renamed!
Changes
- Renamed
hp
tocurrent_hp
- Renamed
biography
tobackground
- Added
species
which does nothing currently. - Added
speed
which does nothing currently (defaults to 30). - Added
temp_hp
for temporary HP - Added
personality
,bonds
,ideals
, andflaws
- Added
max_hd
andcurrent_hd
for tracking hit dice (note:hd
is for the dice itself, e.g., d8, d10) - Added
exhaustion
which initializes to 0. Actual exhaustion mechanics will come in a later version.
View on PyPI
v23.06.28
This is a major update - lots of structures changed and things have been renamed!
Changes
- The
json_cache
is updated to be more in line with the new 5e SRD API. Mostly this means that there is a lot more consistency between different entries so you don't have to check if keys exist before accessing them from the dictionary/object. - To match with the SRD as we have it,
armour_class
property on characters has been renamed toarmor_class
View on PyPI
v22.04.18
Changes
chargeWealth
is removed. Its functionality is now rolled intoremoveWealth
. This means that removeWealth returns a boolean and will not reduce the character's wealth if the amount is larger than the current wealth.- Test coverage of the character class increased from 70% to 99% -- the "starting options" are still not tested.
Bugs fixed
- Removing armour from a character with shield equipped will no longer remove the AC bonus from the shield.