Feature: add level 1 content including room templates, encounter tables, and room generation logic

- Introduced contentHelpers for table and room template lookups.
- Created level1Rooms.ts with various room templates for level 1.
- Added level1Tables.ts containing encounter tables for animals, martial, dogs, people, fungal, guards, workers, and room types.
- Implemented room generation functions in rooms.ts to create rooms based on templates and tables.
- Added tests for room generation logic in rooms.test.ts to ensure correct functionality.
This commit is contained in:
Keith Solomon
2026-03-15 12:54:46 -05:00
parent 6bf48df74c
commit 120e144b3f
10 changed files with 1263 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
import type { ContentPack } from "@/types/content";
import { contentPackSchema } from "@/schemas/content";
import { level1RoomTemplates } from "./level1Rooms";
import { level1EncounterTables } from "./level1Tables";
const samplePack = {
version: "0.1.0",
@@ -10,6 +12,7 @@ const samplePack = {
"Source/2D6 Dungeon - Play Sheet.pdf",
],
tables: [
...level1EncounterTables,
{
id: "table.weapon-manoeuvres-1",
code: "WMT1",
@@ -169,6 +172,7 @@ const samplePack = {
{
id: "room.level1.entry",
level: 1,
sourcePage: 42,
roomClass: "start",
tableCode: "L1R",
tableEntryKey: "entry",
@@ -182,6 +186,7 @@ const samplePack = {
tags: ["starter", "entry"],
mvp: true,
},
...level1RoomTemplates,
],
townServices: [
{