namespace Theriapolis.Core.Dungeons; /// /// The slot a room occupies in a dungeon's role mix. /// /// Each declares a list /// of role-eligibility tags via roles_eligible. The layout assembler /// pairs templates to roles when filling a dungeon's required + optional /// role slots; the resulting records its assigned role /// for content-distribution decisions (loot tier, encounter density, etc.). /// public enum RoomRole : byte { /// The dungeon's surface entrance. Always one per dungeon. Entry, /// Generic in-between room — most rooms in a typical dungeon are transit. Transit, /// Carries environmental-storytelling prose; usually no encounter, often unique decor. Narrative, /// Optional reward room with a container slot (sometimes locked). Loot, /// The dungeon's set-piece final room. Always one in dungeons that declare it. Boss, /// A side room off the critical path — exists for exploration reward. DeadEnd, } internal static class RoomRoleExtensions { public static RoomRole Parse(string raw) => raw switch { "entry" => RoomRole.Entry, "transit" => RoomRole.Transit, "narrative" => RoomRole.Narrative, "loot" => RoomRole.Loot, "boss" => RoomRole.Boss, "dead-end" => RoomRole.DeadEnd, _ => throw new System.ArgumentException($"Unknown room role: '{raw}'"), }; public static string ToTag(this RoomRole r) => r switch { RoomRole.Entry => "entry", RoomRole.Transit => "transit", RoomRole.Narrative => "narrative", RoomRole.Loot => "loot", RoomRole.Boss => "boss", RoomRole.DeadEnd => "dead-end", _ => "transit", }; }