Initial commit: Theriapolis baseline at port/godot branch point
Captures the pre-Godot-port state of the codebase. This is the rollback anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md). All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
namespace Theriapolis.Core.Dungeons;
|
||||
|
||||
/// <summary>
|
||||
/// The slot a room occupies in a dungeon's role mix.
|
||||
///
|
||||
/// Each <see cref="Theriapolis.Core.Data.RoomTemplateDef"/> declares a list
|
||||
/// of role-eligibility tags via <c>roles_eligible</c>. The layout assembler
|
||||
/// pairs templates to roles when filling a dungeon's required + optional
|
||||
/// role slots; the resulting <see cref="Room"/> records its assigned role
|
||||
/// for content-distribution decisions (loot tier, encounter density, etc.).
|
||||
/// </summary>
|
||||
public enum RoomRole : byte
|
||||
{
|
||||
/// <summary>The dungeon's surface entrance. Always one per dungeon.</summary>
|
||||
Entry,
|
||||
/// <summary>Generic in-between room — most rooms in a typical dungeon are transit.</summary>
|
||||
Transit,
|
||||
/// <summary>Carries environmental-storytelling prose; usually no encounter, often unique decor.</summary>
|
||||
Narrative,
|
||||
/// <summary>Optional reward room with a container slot (sometimes locked).</summary>
|
||||
Loot,
|
||||
/// <summary>The dungeon's set-piece final room. Always one in dungeons that declare it.</summary>
|
||||
Boss,
|
||||
/// <summary>A side room off the critical path — exists for exploration reward.</summary>
|
||||
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",
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user