Files
TheriapolisV3/Theriapolis.Core/Data/SubclassDef.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

43 lines
1.4 KiB
C#

using System.Text.Json.Serialization;
namespace Theriapolis.Core.Data;
/// <summary>
/// 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
/// <c>ContentValidate</c> can verify referential integrity from
/// <see cref="ClassDef.SubclassIds"/>.
/// </summary>
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; } = "";
/// <summary>Level → feature ids unlocked. Same shape as the class table.</summary>
[JsonPropertyName("level_features")]
public SubclassLevelEntry[] LevelFeatures { get; init; } = Array.Empty<SubclassLevelEntry>();
/// <summary>Subclass-specific feature descriptions, keyed by feature id.</summary>
[JsonPropertyName("feature_definitions")]
public Dictionary<string, ClassFeatureDef> 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<string>();
}