✨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:
@@ -159,11 +159,15 @@ export const exitTemplateSchema = z.object({
|
||||
export const roomTemplateSchema = z.object({
|
||||
id: z.string().min(1),
|
||||
level: z.number().int().positive(),
|
||||
sourcePage: z.number().int().positive().optional(),
|
||||
roomClass: z.enum(["normal", "small", "large", "special", "start", "stairs"]),
|
||||
tableCode: z.string().min(1),
|
||||
tableEntryKey: z.string().min(1),
|
||||
title: z.string().min(1),
|
||||
text: z.string().optional(),
|
||||
encounterText: z.string().optional(),
|
||||
exitHint: z.string().optional(),
|
||||
unique: z.boolean().optional(),
|
||||
dimensions: z
|
||||
.object({
|
||||
width: z.number().int().positive(),
|
||||
|
||||
Reference in New Issue
Block a user