V1.1.0: gear levels, encounter overhaul, guided builder, trading, docs
Characters - Builder: pick-then-Next on every step with live preview, Back button, plain-language help throughout, and "Suggest for me" for ability scores - Motivation is picked from a list; new steps for special abilities, background and appearance, all composed from fixed lists and DM-only to edit afterwards - Copy a character to another campaign - Characters can give gold, weapons, items and spells to each other - Money tracker: gold only changes through a logged ledger - Fixes: level/XP/location are DM-only, HP stays within 0..max, physical dice ability rolls, every die is rolled once Gear - DM-managed item pool; weapons, items and spells are handed out by the DM - Starting-option flag per pool entry - Gear levels 1-9 per held copy with a damage ladder, growth rate and starting level; spells gated by spell level with a fixed damage value - Spell library carries default damage; damage is picked from a list Encounters - Battle and NPC quest modes, turn tracking, scene description, DM notes - NPCs, richer combatant cards, conditions from a list - Rewards (gold, weapons, items) lined up and awarded, with gold splitting - Character HP is shared between the sheet and the encounter - Monster stat blocks and NPC secrets are never sent to players Other - Dice roller on every page - Docs for characters, weapons, spells, items, encounters, monsters and NPCs, with full lists generated from the data (npm run docs:lists) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,3 +86,24 @@ export function extractErrorMessage(err: unknown): string {
|
||||
if (err instanceof Error) return err.message;
|
||||
return 'Something went wrong.';
|
||||
}
|
||||
|
||||
// A cantrip is spell level 0. It is always called a cantrip, never "level 0"
|
||||
// or "level 1".
|
||||
export function spellLevelLabel(level: number): string {
|
||||
return level === 0 ? 'Cantrip' : `Level ${level}`;
|
||||
}
|
||||
|
||||
// Who can use a spell: a character of at least its level; cantrips, anyone.
|
||||
export function spellRequirementLabel(level: number): string {
|
||||
return level === 0 ? 'any character can use it' : `needs character level ${level}`;
|
||||
}
|
||||
|
||||
// The damage values offered for a spell, grouped by how many dice are rolled.
|
||||
const SPELL_DIE_SIZES = [4, 6, 8, 10, 12];
|
||||
const SPELL_DIE_COUNTS = [1, 2, 3, 4, 5, 6, 8, 10];
|
||||
export const SPELL_DAMAGE_GROUPS: { label: string; options: string[] }[] = SPELL_DIE_COUNTS.map((count) => ({
|
||||
label: count === 1 ? '1 die' : `${count} dice`,
|
||||
options: SPELL_DIE_SIZES.map((size) => `${count}d${size}`),
|
||||
}));
|
||||
// Values the spell library uses that don't fit the pattern above.
|
||||
export const SPELL_DAMAGE_SPECIALS = ['3d4+3', '2d8+4d6', '20'];
|
||||
|
||||
Reference in New Issue
Block a user