Skip to content

Spellcasting System Workflow

This guide explains the current spellcasting workflow and what is already available in the app.

  • spell creation and editing
  • spell browsing and filtering
  • spell deletion (with permissions)
  • class spell list assignment workflows (data/API support)
  • spell and power selection integration for special inventory items (Spell Scroll, Power Crystal)
  1. Create a new spell.
  2. Fill out core fields (name, level, school, range, duration, description).
  3. Configure components (V/S/M), ritual, concentration, and attack/save metadata.
  4. Save changes.

The spell editor also supports temporary effect trigger integration where configured.

Spell and power cards support expression placeholders in these metadata fields:

  • target count
  • range
  • area of effect

Use {...} expressions with parser variables such as slot, spell_mod, and cantrip (for spell cards):

  • Up to {1 + slot} targets
  • {30 + slot * 30} ft
  • {10 + slot * 5} ft radius
  • {cantrip * 1d8} fire

cantrip scales by tier using caster level and defaults to 1 when no level-aware context is available:

  • levels 1-4 -> 1
  • levels 5-10 -> 2
  • levels 11-16 -> 3
  • levels 17-20 -> 4

At runtime, card metadata and per-target damage roll count both use the scaled target value.

Spell queries support:

  • name search
  • level filter
  • school filter
  • ritual filter
  • concentration filter
  • source filter

Results are source-aware and paginated.

Class spell list operations are supported by API and form workflows:

  • search all spells
  • add/remove spells in a class list
  • persist changes in bulk

Spell Scroll and Power Crystal item flows use compendium searches.

  • users choose a spell or power during item creation flow
  • rarity and related metadata are computed for scrolls
  • selected content is linked for quick hover-card lookup

Players can now track spells and slots directly from the character page (/characters/:characterId).

  • spell tracker state is stored in the Character Durable Object
  • tracked spells are stored in a SQL table with spell_id, name, level, and metadata
  • spell slots are stored as a JSON blob keyed by spell level (1-9)
  • AC, total HP, current HP, and temporary HP can be edited in the same view
  • sheet view provides fast cast controls (+/-) for slot usage while playing
  • settings view contains edit forms for HP, tracked spells, and slot configuration

This is intentionally a quick player workflow, not a full rules-enforced magic system.

Some spellcasting features are still in progress:

  • full class spellcasting table builder UI is not fully enabled
  • spell preparation and rules-based validation are not enforced by the tracker

Use the current workflow for spell authoring and source-aware search while these features continue to expand.