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