Skip to content

Commit

Permalink
leveling None handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gergo-szabo committed Aug 8, 2023
1 parent 25e109e commit 12bd687
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions dnd_character/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,15 @@ def apply_class_level(self) -> None:
if new_cfd is None:
self.class_features_data = None
else:
self.class_features_data = {
k: v
if "available" not in k and "days" not in k
else self.class_features_data[k]
for k, v in new_cfd.items()
}
if self.class_features_data is None:
self.class_features_data = new_cfd
else:
self.class_features_data = {
k: v
if "available" not in k and "days" not in k
else self.class_features_data[k]
for k, v in new_cfd.items()
}

def set_spell_slots(self, new_spell_slots: dict[str, int]) -> dict[str, int]:
default_spell_slots = {
Expand Down

0 comments on commit 12bd687

Please sign in to comment.