Something went wrong. Try again.
A Social Deduction / Deception Game
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748// Deduction mode — core types (PURE, no network).//// Single-player detective variant of Sabotage Town: a pool of suspects is drawn from real// `actor.rpg.generator` records (each describes a character as a stack of recolored layers —// hat, hair, shirt, held items, …). One suspect is the culprit; the player identifies them by// *what they are wearing*, working from clues found by investigating the map and interviewing the// innocent suspects.//// This module is the attribute substrate the deduction engine sits on: it normalizes a generator// record into structured `SuspectAttributes`, the only thing evidence fragments quantify over.// `construct.ts` turns these into the incriminating fragment lattice, `evidence.ts` into questionable// pieces, and `generate.ts` into a full case. Everything is deterministic given its inputs — fetching// lives in server/src/deduction.
/** A normalized worn or held layer: a category, the item's title, and its main colour. */export interface Trait { /** Generator layer id, e.g. 'headwear', 'tops', 'glasses', 'righthand'. */ category: string /** Human-readable item name from the generator, e.g. 'Spartan Helm', 'Basic Shirt'. */ title: string /** The layer's main colour as authored (hex), if any. */ colorHex?: string /** `colorHex` bucketed into a named colour family ('green', 'blue', …) for clue phrasing. */ colorBucket?: string}
/** * A suspect's appearance, normalized from one `actor.rpg.generator` record. `worn` and `held` carry * the clue-worthy attire (base/under layers like `body`/`undies` are dropped); `bodyType`, `skin`, * and `eye` carry the body facts. This is the *only* thing clues quantify over. */export interface SuspectAttributes { did: string /** A display alias for the suspect (sprite `name`, handle, or a generated label). */ name: string bodyType?: string skinHex?: string skinBucket?: string eyeHex?: string eyeBucket?: string /** Worn attire (hat, shirt, glasses, beard, …), one entry per generator layer. */ worn: Trait[] /** Items held in hand (game controller, sword, …). */ held: Trait[] /** Freeform overlay items the generator lists (e.g. 'popcorn'). */ items: string[]}