import type { FigureSpec } from "../image/testFixtures.js";
import { DEFAULT_FIGURE } from "../image/testFixtures.js";

/**
 * Cast definitions for the Ashgrove Precinct campaign.
 *
 * Each entry is a synthetic, measurable figure used when no Grok reference is
 * available. Proportions and palettes are distinct so the code-drawn meshes
 * read as different people at 240p.
 */

export interface CastMember {
  id: string;
  name: string;
  height: number;
  /** Role in the campaign — player, ambient body, or both. */
  role: "player" | "ambient" | "both";
  description: string;
  figure: FigureSpec;
}

export const CAST: CastMember[] = [
  {
    id: "survivor",
    name: "Survivor",
    height: 1.72,
    role: "player",
    description: "Lone survivor in a canvas jacket — the default player body.",
    figure: {
      ...DEFAULT_FIGURE,
      colors: {
        hair: { r: 42, g: 38, b: 34 },
        skin: { r: 168, g: 128, b: 102 },
        torso: { r: 86, g: 92, b: 60 },
        arm: { r: 74, g: 80, b: 52 },
        leg: { r: 48, g: 50, b: 58 },
        foot: { r: 92, g: 66, b: 44 },
      },
      backpack: {
        fromY: 0.2,
        toY: 0.48,
        width: 0.28,
        color: { r: 62, g: 56, b: 44 },
      },
    },
  },
  {
    id: "researcher",
    name: "Dr. Hale",
    height: 1.68,
    role: "ambient",
    description: "Manor researcher in a pale lab coat — found in the study.",
    figure: {
      ...DEFAULT_FIGURE,
      neckY: 0.13,
      shoulderY: 0.19,
      crotchY: 0.54,
      torsoWidth: 0.24,
      armReach: 0.36,
      colors: {
        hair: { r: 210, g: 200, b: 185 },
        skin: { r: 210, g: 178, b: 152 },
        torso: { r: 220, g: 218, b: 210 },
        arm: { r: 210, g: 208, b: 200 },
        leg: { r: 55, g: 58, b: 72 },
        foot: { r: 40, g: 40, b: 48 },
      },
    },
  },
  {
    id: "officer",
    name: "Sgt. Marrow",
    height: 1.82,
    role: "ambient",
    description: "Uniformed officer — slumped in the cellar.",
    figure: {
      ...DEFAULT_FIGURE,
      neckY: 0.12,
      shoulderY: 0.18,
      crotchY: 0.52,
      torsoWidth: 0.3,
      headWidth: 0.095,
      legWidth: 0.1,
      armWidth: 0.085,
      armReach: 0.4,
      colors: {
        hair: { r: 28, g: 28, b: 30 },
        skin: { r: 145, g: 110, b: 88 },
        torso: { r: 40, g: 52, b: 48 },
        arm: { r: 36, g: 46, b: 42 },
        leg: { r: 32, g: 36, b: 40 },
        foot: { r: 28, g: 28, b: 28 },
      },
    },
  },
  {
    id: "groundskeeper",
    name: "Ellis",
    height: 1.75,
    role: "ambient",
    description: "Groundskeeper in a stained work coat — foyer and kitchen.",
    figure: {
      ...DEFAULT_FIGURE,
      crotchY: 0.56,
      torsoWidth: 0.28,
      legWidth: 0.095,
      colors: {
        hair: { r: 90, g: 70, b: 50 },
        skin: { r: 175, g: 130, b: 100 },
        torso: { r: 120, g: 78, b: 48 },
        arm: { r: 100, g: 70, b: 48 },
        leg: { r: 70, g: 72, b: 78 },
        foot: { r: 55, g: 48, b: 40 },
      },
    },
  },
];
