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
@@ -0,0 +1,32 @@
namespace Theriapolis.Core.Rules.Stats;
/// <summary>
/// Standard d20 proficiency-bonus-by-level table:
/// 1-4 → +2
/// 5-8 → +3
/// 9-12 → +4
/// 13-16 → +5
/// 17-20 → +6
/// Phase 5 only ever evaluates level 1, but the full table ships so
/// future leveling work doesn't have to revisit this file.
/// </summary>
public static class ProficiencyBonus
{
public const int MinLevel = 1;
public const int MaxLevel = 20;
public static int ForLevel(int level)
{
if (level < MinLevel || level > MaxLevel)
throw new ArgumentOutOfRangeException(nameof(level), $"Level must be {MinLevel}..{MaxLevel}, got {level}");
return level switch
{
>= 17 => 6,
>= 13 => 5,
>= 9 => 4,
>= 5 => 3,
_ => 2,
};
}
}