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

649
src/data/level1Rooms.ts Normal file
View File

@@ -0,0 +1,649 @@
import type { RoomTemplate } from "@/types/content";
export const level1RoomTemplates: RoomTemplate[] = [
{
id: "room.level1.normal.empty-room",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "2",
title: "Empty Room",
text: "A bare chamber with little more than dust and stone.",
encounterText: "Nothing here.",
exitHint: "Archways only.",
unique: false,
tags: ["human-ancestry", "empty"],
mvp: true,
},
{
id: "room.level1.normal.abandoned-guard-post",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "3",
title: "Abandoned Guard Post",
text: "A disused guard station with ruined furnishings and signs of looting.",
encounterText: "Search debris for wooden objects beneath collapsed furniture.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "search"],
mvp: true,
},
{
id: "room.level1.normal.guard-post",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "4",
title: "Guard Post",
text: "A still-used guard room with a table, benches, and simple fixtures.",
encounterText: "If occupied, use the martial encounter table.",
exitHint: "Reinforced wooden doors.",
unique: false,
tags: ["human-ancestry", "guards"],
mvp: true,
},
{
id: "room.level1.normal.storage-area",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "5",
title: "Storage Area",
text: "Crates and barrels fill the walls, with spoiled goods hidden among them.",
encounterText: "Roll for food, drink, or crate events while searching.",
exitHint: "Archways.",
unique: false,
tags: ["human-ancestry", "loot"],
mvp: true,
},
{
id: "room.level1.normal.meeting-room",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "6",
title: "Meeting Room",
text: "Simple tables and chairs suggest an old gathering place.",
encounterText: "Workers or a crazed preacher may be present depending on the table roll.",
exitHint: "Wooden doors.",
unique: true,
tags: ["human-ancestry", "social"],
mvp: true,
},
{
id: "room.level1.normal.blacksmith-space",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "7",
title: "Blacksmith Space",
text: "An anvil and cold forge remain in a soot-darkened workshop.",
encounterText: "Roll for weapon loot or a worker-themed encounter.",
exitHint: "Archways.",
unique: false,
tags: ["human-ancestry", "craft"],
mvp: true,
},
{
id: "room.level1.normal.holding-cell",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "8",
title: "Holding Cell",
text: "A grim cell with chains, a chamber pot, and signs of former prisoners.",
encounterText: "Check whether the cell is empty or contains a prisoner.",
exitHint: "Reinforced doors.",
unique: false,
tags: ["human-ancestry", "cell"],
mvp: true,
},
{
id: "room.level1.normal.wash-room",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "9",
title: "Wash Room",
text: "Buckets, basins, and cloths suggest a communal cleaning room.",
encounterText: "May contain slimy or fungal threats and hidden salvage.",
exitHint: "Random roll for exits.",
unique: false,
tags: ["human-ancestry", "utility"],
mvp: true,
},
{
id: "room.level1.normal.kennel",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "10",
title: "Kennel",
text: "A low room littered with straw and the stink of animals.",
encounterText: "Use the level 1 dogs table if occupied.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "animals"],
mvp: true,
},
{
id: "room.level1.normal.snake-pit",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "11",
title: "Snake Pit",
text: "A dusty pit cut into the floor houses a nest of snakes.",
encounterText: "Open the chest only if you survive the pit's occupants.",
exitHint: "Random roll for exits.",
unique: false,
tags: ["human-ancestry", "animals", "hazard"],
mvp: true,
},
{
id: "room.level1.normal.weapon-dump",
level: 1,
sourcePage: 42,
roomClass: "normal",
tableCode: "L1R-P1",
tableEntryKey: "12",
title: "Weapon Dump",
text: "Broken weapons and shields spill from a long-past discard pile.",
encounterText: "Roll for random weapons and possible fungal attackers.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "loot", "weapons"],
mvp: true,
},
{
id: "room.level1.normal.guard-room",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "2",
title: "Guard Room",
text: "A stone room with table, chairs, and signs of routine occupation.",
encounterText: "Use the guards encounter table if occupied.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "guards"],
mvp: true,
},
{
id: "room.level1.normal.pool-room",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "3",
title: "Pool Room",
text: "A raised stone pool dominates the center of this damp chamber.",
encounterText: "Investigating the pool may trigger a slimy or animal threat.",
exitHint: "Wooden doors.",
unique: true,
tags: ["human-ancestry", "water"],
mvp: true,
},
{
id: "room.level1.normal.storage-area-2",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "4",
title: "Storage Area",
text: "Ropes, cloth, and supplies are stacked among the dust.",
encounterText: "Arms and empty chests invite a guarded search.",
exitHint: "Archways.",
unique: false,
tags: ["human-ancestry", "loot"],
mvp: true,
},
{
id: "room.level1.normal.canteen",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "5",
title: "Canteen",
text: "Rough tables and stools fill an old communal eating space.",
encounterText: "Labourers or workers may still be here.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "social"],
mvp: true,
},
{
id: "room.level1.normal.mourning-quarters",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "6",
title: "Mourning Quarters",
text: "An eerie chamber of candles, a shrouded bier, and stale grief.",
encounterText: "A corpse may be present and can trigger a level 1 corpse interaction.",
exitHint: "Random roll for exits.",
unique: true,
tags: ["human-ancestry", "ritual"],
mvp: true,
},
{
id: "room.level1.normal.holding-cell-2",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "7",
title: "Holding Cell",
text: "A bare cell cut off from the rest of the room by bars.",
encounterText: "Check for a prisoner before searching further.",
exitHint: "Reinforced doors.",
unique: false,
tags: ["human-ancestry", "cell"],
mvp: true,
},
{
id: "room.level1.normal.training-room",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "8",
title: "Training Room",
text: "Mannequins, target poles, and old practice gear fill the space.",
encounterText: "Armour and weapons training prompts a follow-up armour or item roll.",
exitHint: "Random roll for exits.",
unique: false,
tags: ["human-ancestry", "training"],
mvp: true,
},
{
id: "room.level1.normal.dorm",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "9",
title: "Dorm",
text: "Hammocks and scattered belongings suggest a once-lived-in barracks room.",
encounterText: "Use the people table if the dorm is occupied.",
exitHint: "Wooden doors.",
unique: false,
tags: ["human-ancestry", "sleeping"],
mvp: true,
},
{
id: "room.level1.normal.apothecary",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "10",
title: "Apothecary",
text: "Shelves of jars and bottles crowd a room thick with old herbs.",
encounterText: "Medicine or potion finds compete with apothecary occupants.",
exitHint: "Random roll for exits.",
unique: true,
tags: ["human-ancestry", "alchemy"],
mvp: true,
},
{
id: "room.level1.normal.damp-space",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "11",
title: "Damp Space",
text: "Moist stone and fungus overrun this clammy side room.",
encounterText: "A fungal encounter may attack when the fungus is disturbed.",
exitHint: "Reinforced doors.",
unique: false,
tags: ["human-ancestry", "fungal"],
mvp: true,
},
{
id: "room.level1.normal.chapel",
level: 1,
sourcePage: 43,
roomClass: "normal",
tableCode: "L1R-P2",
tableEntryKey: "12",
title: "Chapel",
text: "Candles, benches, and a central altar mark a room of devotion.",
encounterText: "Dark clergy or a corpse event can emerge here after the altar is examined.",
exitHint: "Curtains.",
unique: true,
tags: ["human-ancestry", "religious"],
mvp: true,
},
{
id: "room.level1.large.stone-workshop",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "2",
title: "Stone Workshop",
text: "Large tables, stone shelves, and an oversized work area dominate the room.",
encounterText: "No built-in encounter.",
exitHint: "Wooden doors.",
tags: ["human-ancestry", "large", "craft"],
mvp: true,
},
{
id: "room.level1.large.marble-hall",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "3",
title: "Marble Hall",
text: "A ceremonial hall lined with pillars and a raised seating platform.",
encounterText: "No built-in encounter.",
exitHint: "Archways.",
unique: true,
tags: ["human-ancestry", "large", "hall"],
mvp: true,
},
{
id: "room.level1.large.old-mess-hall",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "4",
title: "Old Mess Hall",
text: "Long tables and benches suggest a once-busy common dining area.",
encounterText: "No built-in encounter.",
exitHint: "Wooden doors.",
unique: true,
tags: ["human-ancestry", "large", "social"],
mvp: true,
},
{
id: "room.level1.large.penitentiary",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "5",
title: "Penitentiary",
text: "A chained whipping post and harsh punishments define this grim chamber.",
encounterText: "No built-in encounter.",
exitHint: "Reinforced doors.",
unique: true,
tags: ["human-ancestry", "large", "punishment"],
mvp: true,
},
{
id: "room.level1.large.fountain-room",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "6",
title: "Fountain Room",
text: "A circular fountain and polished floor lend this chamber a sacred tone.",
encounterText: "No built-in encounter.",
exitHint: "Archways.",
tags: ["human-ancestry", "large", "water"],
mvp: true,
},
{
id: "room.level1.large.temple",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "7",
title: "Temple",
text: "Benches and chandeliers frame a formal place of worship.",
encounterText: "No built-in encounter.",
exitHint: "Archways.",
unique: true,
tags: ["human-ancestry", "large", "religious"],
mvp: true,
},
{
id: "room.level1.large.sparring-chamber",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "8",
title: "Sparring Chamber",
text: "Sand, markings, and weapons racks show this room was used for training.",
encounterText: "A warrior can appear here.",
exitHint: "Wooden doors.",
tags: ["human-ancestry", "large", "training"],
mvp: true,
},
{
id: "room.level1.large.crate-store",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "9",
title: "Crate Store",
text: "Crates and stacked stone create shadows and possible hidden spaces.",
encounterText: "No built-in encounter.",
exitHint: "Archways.",
tags: ["human-ancestry", "large", "loot"],
mvp: true,
},
{
id: "room.level1.large.slate-shrine",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "10",
title: "Slate Shrine",
text: "A central slate monolith marks a room of devotion and offering.",
encounterText: "No built-in encounter.",
exitHint: "Archways.",
unique: true,
tags: ["human-ancestry", "large", "religious"],
mvp: true,
},
{
id: "room.level1.large.dormitory",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "11",
title: "Dormitory",
text: "Rows of bunks and sparse belongings line the walls.",
encounterText: "No built-in encounter.",
exitHint: "Wooden doors.",
unique: true,
tags: ["human-ancestry", "large", "sleeping"],
mvp: true,
},
{
id: "room.level1.large.library",
level: 1,
sourcePage: 40,
roomClass: "large",
tableCode: "L1LR",
tableEntryKey: "12",
title: "Library",
text: "Towering bookshelves and guarded knowledge define this vast archive.",
encounterText: "Two guards can be found here.",
exitHint: "Wooden doors.",
unique: true,
tags: ["human-ancestry", "large", "books"],
mvp: true,
},
{
id: "room.level1.small.empty-space",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "2",
title: "Empty Space",
text: "A bare side space with nothing of note.",
encounterText: "Nothing here.",
unique: false,
tags: ["human-ancestry", "small", "empty"],
mvp: true,
},
{
id: "room.level1.small.strange-text",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "3",
title: "Strange Text",
text: "An old message linking the corridor to ancient hunger and warning.",
encounterText: "No encounter.",
unique: false,
tags: ["human-ancestry", "small", "lore"],
mvp: true,
},
{
id: "room.level1.small.grazada-mural",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "4",
title: "Grazada Mural",
text: "A tiled image of the goddess of sacrifice fills the wall.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.intuneric-mosaic",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "5",
title: "Intuneric Mosaic",
text: "A shrine mosaic to the god of influence and gifts.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.maduva-statue",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "6",
title: "Maduva Statue",
text: "A twisted statue of Maduva stands watch in the niche.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.murtayne-effigy",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "7",
title: "Murtayne Effigy",
text: "A rotting fleshy effigy marks a place linked to disease and corruption.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.nevzator-doll",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "8",
title: "Nevzator Doll",
text: "A rope doll symbolizes hidden dealings and quiet bargains.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.radacina-tapestry",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "9",
title: "Radacina Tapestry",
text: "A tapestry of Radacina, deity of teaching, hangs in the space.",
encounterText: "A possible favour interaction.",
unique: true,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.heated-space",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "10",
title: "Heated Space",
text: "Warmth and wavering shadows suggest hidden heat behind the walls.",
encounterText: "No encounter.",
unique: false,
tags: ["human-ancestry", "small", "atmosphere"],
mvp: true,
},
{
id: "room.level1.small.wall-shrine",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "11",
title: "Wall Shrine",
text: "A small offering niche waits at the wall's edge.",
encounterText: "A possible favour interaction.",
unique: false,
tags: ["human-ancestry", "small", "religious"],
mvp: true,
},
{
id: "room.level1.small.banner-arms",
level: 1,
sourcePage: 46,
roomClass: "small",
tableCode: "L1SR",
tableEntryKey: "12",
title: "Banner Arms",
text: "Crossed spears and an old shield suggest a ceremonial martial display.",
encounterText: "No encounter.",
unique: false,
tags: ["human-ancestry", "small", "martial"],
mvp: true,
},
];