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:
Christopher Wiebe
2026-04-30 20:40:51 -07:00
commit b451f83174
525 changed files with 75786 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
namespace Theriapolis.Core.Rules.Stats;
/// <summary>
/// Saving-throw categories. There's exactly one per ability; this enum is
/// a thin alias of <see cref="AbilityId"/> kept distinct so callsites read
/// clearly ("MakeSave(SaveId.DEX, dc)" vs "Mod(AbilityId.DEX)").
/// </summary>
public enum SaveId : byte
{
STR = 0,
DEX = 1,
CON = 2,
INT = 3,
WIS = 4,
CHA = 5,
}
public static class SaveIdExtensions
{
public static AbilityId Ability(this SaveId s) => (AbilityId)(byte)s;
public static SaveId FromJson(string raw) => raw.ToUpperInvariant() switch
{
"STR" => SaveId.STR,
"DEX" => SaveId.DEX,
"CON" => SaveId.CON,
"INT" => SaveId.INT,
"WIS" => SaveId.WIS,
"CHA" => SaveId.CHA,
_ => throw new ArgumentException($"Unknown save: '{raw}'"),
};
}