dnd-character
dnd-character copied to clipboard
Can't put spells in spellbooks
Wizards need to store their spells inside spellbooks, which do exist as an item already.
Since all items have a "contents" field, I guess we could store spells in there. However that field is currently used for storing references to other equipment inside of "pack" items like the burglar's pack, so maybe not.
- [ ] Serialize spells inside of spellbooks (maybe all spells and items inside of any items?)
- [ ] Document how to use spellbooks
>>> from dnd_character.equipment import Item
>>> from pprint import pprint
>>> pprint(Item('spellbook'))
_Item(uid='5876bcc2fef0460fad6bb8527bacee52',
contents=[],
cost={'quantity': 50, 'unit': 'gp'},
desc=['Essential for wizards, a spellbook is a leather-bound tome with '
'100 blank vellum pages suitable for recording spells.'],
index='spellbook',
name='Spellbook',
properties=[],
special=[],
url='/api/equipment/spellbook',
weight=3,
quantity=1,
stealth_disadvantage=False,
str_minimum=0,
equipment_category={'index': 'adventuring-gear',
'name': 'Adventuring Gear',
'url': '/api/equipment-categories/adventuring-gear'},
gear_category={'index': 'standard-gear',
'name': 'Standard Gear',
'url': '/api/equipment-categories/standard-gear'}
)
I'm close to a solution for this.