Expand room generation fidelity and magic item actions

This commit is contained in:
Keith Solomon
2026-03-20 17:06:45 -05:00
parent 37e2b27870
commit 9f494461de
19 changed files with 3800 additions and 6 deletions
+18
View File
@@ -155,12 +155,29 @@ export type CreatureDefinition = {
export type ExitType = "open" | "door" | "locked" | "secret" | "shaft" | "stairs";
export type RoomObjectType =
| "container"
| "altar"
| "corpse"
| "hazard"
| "feature"
| "quest";
export type ExitTemplate = {
direction?: "north" | "east" | "south" | "west";
exitType: ExitType;
destinationLevel?: number;
};
export type RoomObjectTemplate = {
objectType: RoomObjectType;
title: string;
sourceTableCode?: string;
hidden?: boolean;
searchable?: boolean;
notes?: string;
};
export type RoomClass = "normal" | "small" | "large" | "special" | "start" | "stairs";
export type RoomTemplate = {
@@ -180,6 +197,7 @@ export type RoomTemplate = {
height: number;
};
exits?: ExitTemplate[];
objects?: RoomObjectTemplate[];
encounterRefs?: ContentReference[];
objectRefs?: ContentReference[];
tags: string[];
+4
View File
@@ -15,11 +15,13 @@ export type ContentReferenceType =
export type ContentReference = {
type: ContentReferenceType;
id: string;
quantity?: number;
};
export type RuleEffectType =
| "gain-xp"
| "gain-gold"
| "gain-silver"
| "heal"
| "take-damage"
| "modify-shift"
@@ -39,6 +41,8 @@ export type RuleEffectTarget = "self" | "enemy" | "room" | "campaign";
export type RuleEffect = {
type: RuleEffectType;
amount?: number;
diceKind?: DiceKind;
rollCount?: number;
statusId?: string;
target?: RuleEffectTarget;
referenceId?: string;
+10
View File
@@ -25,6 +25,7 @@ export type InventoryState = {
stored: InventoryEntry[];
currency: {
gold: number;
silver: number;
};
rationCount: number;
lightSources: InventoryEntry[];
@@ -121,9 +122,17 @@ export type EncounterState = {
export type RoomObjectState = {
id: string;
objectType: "container" | "altar" | "corpse" | "hazard" | "feature" | "quest";
title: string;
sourceTableCode?: string;
interacted: boolean;
resolved?: boolean;
hidden?: boolean;
searchable?: boolean;
rewardItemId?: string;
rewardGold?: number;
damage?: number;
resolutionLabel?: string;
resolutionEntryKey?: string;
effects?: RuleEffect[];
notes?: string;
};
@@ -240,6 +249,7 @@ export type RunState = {
defeatedCreatureIds: string[];
xpGained: number;
goldGained: number;
silverGained: number;
lootedItems: InventoryEntry[];
log: LogEntry[];
pendingEffects: RuleEffect[];