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.Rules.Stats;
|
||||
|
||||
/// <summary>
|
||||
/// Status effects applied during combat or by environment. Phase 5 ships
|
||||
/// the most common subset; the enum is open-ended for additions in later
|
||||
/// phases without renumbering existing values.
|
||||
/// </summary>
|
||||
public enum Condition : byte
|
||||
{
|
||||
None = 0,
|
||||
Prone = 1,
|
||||
Frightened = 2,
|
||||
Restrained = 3,
|
||||
Grappled = 4,
|
||||
Dazed = 5,
|
||||
Blinded = 6,
|
||||
Stunned = 7,
|
||||
Unconscious = 8,
|
||||
Charmed = 9,
|
||||
Poisoned = 10,
|
||||
Deafened = 11,
|
||||
Invisible = 12,
|
||||
Petrified = 13,
|
||||
Incapacitated = 14,
|
||||
/// <summary>1..6 levels per d20; tracked separately on Character.ExhaustionLevel rather than as a binary flag.</summary>
|
||||
Exhausted = 15,
|
||||
}
|
||||
|
||||
public static class ConditionExtensions
|
||||
{
|
||||
public static Condition FromJson(string raw) => raw.ToLowerInvariant() switch
|
||||
{
|
||||
"none" => Condition.None,
|
||||
"prone" => Condition.Prone,
|
||||
"frightened" => Condition.Frightened,
|
||||
"restrained" => Condition.Restrained,
|
||||
"grappled" => Condition.Grappled,
|
||||
"dazed" => Condition.Dazed,
|
||||
"blinded" => Condition.Blinded,
|
||||
"stunned" => Condition.Stunned,
|
||||
"unconscious" => Condition.Unconscious,
|
||||
"charmed" => Condition.Charmed,
|
||||
"poisoned" => Condition.Poisoned,
|
||||
"deafened" => Condition.Deafened,
|
||||
"invisible" => Condition.Invisible,
|
||||
"petrified" => Condition.Petrified,
|
||||
"incapacitated" => Condition.Incapacitated,
|
||||
"exhausted" => Condition.Exhausted,
|
||||
_ => throw new ArgumentException($"Unknown condition: '{raw}'"),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user