Files
TheriapolisV3/Theriapolis.Core/Data/CladeDef.cs
T
Christopher Wiebe 66055f9549 M6.14: Single-column card layout with clade/species descriptions
Switch Step 0 (Clade) and Step 1 (Species) from a 3-column card grid
to a 1-column layout, with each card carrying a codex-voice
description paragraph between the meta line and the trait chips.
Rationale: establish the world's tone before mechanics — the player
reads who Canidae or Wolf-Folk *are* before evaluating ability mods
and trait pills. Trade is more vertical scrolling, but the card
content was already going wider than three columns comfortably
allowed once the parchment theme bumped padding.

Schema: CladeDef and SpeciesDef gain a Description field (string,
empty default). Populated for all 7 clades and 19 species, sourced
from the doc's italicized blockquote + a one-sentence summary of
the prose paragraph that follows. Empty descriptions fall through
silently — a species without a description still renders, just
without the paragraph.

UI: MakeGrid in both steps becomes Columns = 1 with ExpandFill;
BuildCard sets card.SizeFlagsHorizontal = ExpandFill (replaces the
fixed CustomMinimumSize 200) and prepends the autowrap description
label after the meta line. Hybrid mode stacks sire and dam single-
column grids vertically — same logic as before, just one card wide
each.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 21:47:00 -07:00

46 lines
1.7 KiB
C#

using System.Text.Json.Serialization;
namespace Theriapolis.Core.Data;
/// <summary>
/// Immutable clade (race-equivalent) record loaded from clades.json.
/// Defines the broad biological family — Canidae, Felidae, etc. —
/// plus the ability mods, traits, and detriments shared by all member
/// species. See clades.md for the authoritative content.
/// </summary>
public sealed record CladeDef
{
[JsonPropertyName("id")]
public string Id { get; init; } = "";
[JsonPropertyName("name")]
public string Name { get; init; } = "";
/// <summary>Codex-voice clade description: usually the doc's italicized
/// blockquote followed by a one-sentence summary. Surfaced on the
/// Step 0 card to establish the world's tone before mechanics.</summary>
[JsonPropertyName("description")]
public string Description { get; init; } = "";
/// <summary>STR/DEX/CON/INT/WIS/CHA → modifier (typically +1 each on two abilities).</summary>
[JsonPropertyName("ability_mods")]
public Dictionary<string, int> AbilityMods { get; init; } = new();
[JsonPropertyName("traits")]
public TraitDef[] Traits { get; init; } = Array.Empty<TraitDef>();
[JsonPropertyName("detriments")]
public TraitDef[] Detriments { get; init; } = Array.Empty<TraitDef>();
[JsonPropertyName("languages")]
public string[] Languages { get; init; } = Array.Empty<string>();
/// <summary>
/// "Predator" / "Prey" — surfaces in dialogue + faction-affinity logic
/// (Phase 6) and gates a few class features in Phase 5 (e.g. Feral
/// level-20 Apex Predator vs Apex Prey).
/// </summary>
[JsonPropertyName("kind")]
public string Kind { get; init; } = "predator";
}