Skip to content

Server-side validation: require tradition selection for magicians and mystic adepts #267

@Jasrags

Description

@Jasrags

Parent Epic

Part of #265 — Character Creation Validation Coverage

Problem

The magic validator in lib/rules/validation/character-validator.ts:283-295 checks for a missing tradition on full-mage and mystic-adept paths, but it currently emits a warning instead of an error. This means a magician or mystic adept can be finalized without selecting a tradition (e.g., Hermetic, Shaman), which is invalid per SR5 rules.

Current Behavior

// lib/rules/validation/character-validator.ts:283-295
if (
  (character.magicalPath === "full-mage" || character.magicalPath === "mystic-adept") &&
  !character.tradition
) {
  issues.push({
    code: "MISSING_TRADITION",
    message: "Magical character should have a tradition selected",
    field: "tradition",
    severity: "warning",  // <-- should be "error" at finalization
    suggestion: "Select a magical tradition (e.g., Hermetic, Shaman)",
  });
}

Expected Behavior

  • At finalization, MISSING_TRADITION should be severity "error" to block character creation
  • During creation (live editing), it can remain a "warning" to avoid being disruptive
  • Aspected mages should also be checked (they follow a tradition in SR5)

Suggested Changes

  1. In the magic validator, change MISSING_TRADITION severity to "error" when mode === "finalization"
  2. Consider extending the check to aspected-mage paths (SR5 Core p.69 — aspected mages also select a tradition)
  3. Optionally add the tradition check to the completion checklist in SheetCreationLayout.tsx (added in Display server-side finalization validation errors to user #252)

Files

  • lib/rules/validation/character-validator.ts — upgrade severity for finalization mode
  • app/characters/create/sheet/components/SheetCreationLayout.tsx — optionally add to completion checklist

Priority

P1 — data integrity (tradition affects drain attribute, spirit types, and spell access)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions