using System.Text.Json.Serialization;
namespace Theriapolis.Core.Data;
///
/// Immutable subclass definition loaded from subclasses.json. Phase 5
/// stores these but does not apply mechanics — subclass selection is the
/// level-3 flow that ships with Phase 5.5 / 6 leveling. Loaded so
/// ContentValidate can verify referential integrity from
/// .
///
public sealed record SubclassDef
{
[JsonPropertyName("id")]
public string Id { get; init; } = "";
[JsonPropertyName("class_id")]
public string ClassId { get; init; } = "";
[JsonPropertyName("name")]
public string Name { get; init; } = "";
[JsonPropertyName("flavor")]
public string Flavor { get; init; } = "";
/// Level → feature ids unlocked. Same shape as the class table.
[JsonPropertyName("level_features")]
public SubclassLevelEntry[] LevelFeatures { get; init; } = Array.Empty();
/// Subclass-specific feature descriptions, keyed by feature id.
[JsonPropertyName("feature_definitions")]
public Dictionary FeatureDefinitions { get; init; } = new();
}
public sealed record SubclassLevelEntry
{
[JsonPropertyName("level")]
public int Level { get; init; } = 3;
[JsonPropertyName("features")]
public string[] Features { get; init; } = Array.Empty();
}