V1.30.0: class features that change a number are worked out on the sheet

- Unarmored Defense (barbarian, monk), Draconic Resilience, Fast Movement,
  Unarmored Movement, Aura of Protection, Diamond Soul, Slippery Mind and
  Jack of All Trades are counted, by level in the class that gives them
- Armor and shields are items marked with what kind they are, so the sheet
  knows when a character is unarmored or in heavy armor; the library's and
  the seeds' are marked
- The sheet lists the class features in force; a speed the DM set is final
- A cantrip can be cast with every spell slot spent (tested end to end)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 11:13:09 +02:00
co-authored by Claude Opus 5.5
parent 9d0a4a2252
commit 16b5ac05ca
30 changed files with 533 additions and 63 deletions
@@ -0,0 +1,15 @@
-- Armor and shields say what kind they are, so the sheet can tell when a
-- character is unarmored (Unarmored Defense, a monk's speed) or in heavy
-- armor (a barbarian's Fast Movement). Copies of the library's armor already
-- in a campaign are marked by name; anything else the DM marks on the item.
-- CreateEnum
CREATE TYPE "ArmorType" AS ENUM ('LIGHT', 'MEDIUM', 'HEAVY', 'SHIELD');
-- AlterTable
ALTER TABLE "items" ADD COLUMN "armorType" "ArmorType";
UPDATE "items" SET "armorType" = 'LIGHT' WHERE "name" IN ('Padded Armor', 'Leather Armor', 'Studded Leather');
UPDATE "items" SET "armorType" = 'MEDIUM' WHERE "name" IN ('Hide Armor', 'Chain Shirt', 'Scale Mail', 'Breastplate', 'Half Plate');
UPDATE "items" SET "armorType" = 'HEAVY' WHERE "name" IN ('Ring Mail', 'Chain Mail', 'Splint Armor', 'Plate Armor');
UPDATE "items" SET "armorType" = 'SHIELD' WHERE "name" = 'Shield';
+11
View File
@@ -597,6 +597,10 @@ model Item {
// item with an AC effect.
effects Json @default("[]")
effectNote String?
// Set on armor and shields. Its AC is still an effect; this says what kind
// it is, so the sheet knows when a character is unarmored (Unarmored
// Defense, a monk's speed) or in heavy armor (a barbarian's Fast Movement).
armorType ArmorType?
createdAt DateTime @default(now())
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
@@ -608,6 +612,13 @@ model Item {
@@map("items")
}
enum ArmorType {
LIGHT
MEDIUM
HEAVY
SHIELD
}
// An Item from the campaign pool held by a character.
model InventoryItem {
id String @id @default(cuid())