Files
TheriapolisV3/Theriapolis.Core/Data/SpeciesDef.cs
T
Christopher Wiebe b451f83174 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>
2026-04-30 20:40:51 -07:00

39 lines
1.3 KiB
C#

using System.Text.Json.Serialization;
namespace Theriapolis.Core.Data;
/// <summary>
/// Immutable species (subrace-equivalent) record loaded from species.json.
/// Refines the parent <see cref="CladeDef"/>: adds a body size, additional
/// ability mods, species-specific traits, and species-specific detriments.
/// </summary>
public sealed record SpeciesDef
{
[JsonPropertyName("id")]
public string Id { get; init; } = "";
[JsonPropertyName("clade_id")]
public string CladeId { get; init; } = "";
[JsonPropertyName("name")]
public string Name { get; init; } = "";
/// <summary>Body size category, snake_case (small / medium / medium_large / large).</summary>
[JsonPropertyName("size")]
public string Size { get; init; } = "medium";
/// <summary>Additional ability mods on top of the clade's mods.</summary>
[JsonPropertyName("ability_mods")]
public Dictionary<string, int> AbilityMods { get; init; } = new();
/// <summary>Base movement speed in feet per turn (5 ft. = 1 tactical tile per d20 standard).</summary>
[JsonPropertyName("base_speed_ft")]
public int BaseSpeedFt { get; init; } = 30;
[JsonPropertyName("traits")]
public TraitDef[] Traits { get; init; } = Array.Empty<TraitDef>();
[JsonPropertyName("detriments")]
public TraitDef[] Detriments { get; init; } = Array.Empty<TraitDef>();
}