Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Can't put spells in spellbooks #20

Description

@tassaron

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'}
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions