Files
healer-man/src/game/dungeonSimulationTypes.ts
T
2026-09-16 20:00:13 -04:00

173 lines
5.4 KiB
TypeScript

import type { Vector3Tuple } from "./dungeonTypes";
export type DungeonSessionMode = "play" | "spectate-live" | "spectate-replay";
export type DungeonSimulationMode = "full-combat" | "navigation-only";
export type DungeonSimulationSpeed = 0.5 | 1 | 2 | 4;
export type DungeonSpectatorCameraMode = "follow-member" | "free-fly";
export type DungeonRouteReviewStatus = "Candidate" | "Approved" | "NeedsWork";
export type DungeonSimulationResult = "completed" | "wiped" | "stopped" | "recording-limit";
export type DungeonSimulationFindingSeverity = "info" | "warning" | "critical";
export interface DungeonRouteAction {
readonly id: string;
readonly checkpointIndex: number;
readonly kind: "interact-world-object";
readonly objectId: string;
}
export interface DungeonRouteLeg {
readonly id: string;
readonly objectiveId: string;
readonly objectiveName: string;
readonly checkpoints: readonly Vector3Tuple[];
readonly expectedDistance: number;
readonly corridorPlanarDistance: number;
readonly corridorVerticalDistance: number;
readonly actions: readonly DungeonRouteAction[];
}
export interface DungeonRouteDefinitionV1 {
readonly schemaVersion: 1;
readonly id: string;
readonly dungeonId: string;
readonly mapId: number;
readonly hash: string;
readonly generationStatus: "Candidate" | "Rejected";
readonly generationIssues: readonly string[];
readonly legs: readonly DungeonRouteLeg[];
}
export interface DungeonRouteCatalogV1 {
readonly schemaVersion: 1;
readonly generatedAt: string;
readonly source: {
readonly kind: "playerbots-landmark-reference";
readonly auditReport: string;
readonly note: string;
};
readonly routes: readonly DungeonRouteDefinitionV1[];
}
export interface DungeonRouteApproval {
readonly dungeonId: string;
readonly routeId: string;
readonly routeHash: string;
readonly reviewedAt: number;
}
export interface DungeonRouteReview {
readonly dungeonId: string;
readonly routeId: string;
readonly routeHash: string;
readonly status: DungeonRouteReviewStatus;
readonly note: string | null;
readonly criticalOverrideNote: string | null;
readonly reviewedBy: string;
readonly reviewedAt: number;
readonly revision: number;
}
export interface DungeonSimulationFinding {
readonly id: string;
readonly atMs: number;
readonly severity: DungeonSimulationFindingSeverity;
readonly code: string;
readonly message: string;
readonly position?: Vector3Tuple;
readonly actorId?: string;
readonly objectiveId?: string;
readonly checkpointIndex?: number;
readonly actionId?: string;
}
export interface DungeonSimulationPull {
readonly atMs: number;
readonly mobIds: readonly string[];
readonly routeLegId: string | null;
readonly position: Vector3Tuple;
readonly classification: "expected" | "off-route" | "theoretical";
}
export interface DungeonSimulationActorSnapshot {
readonly id: string;
readonly position: Vector3Tuple;
readonly yaw: number;
readonly health: number;
readonly maxHealth: number;
readonly targetId: string | null;
readonly status: string;
}
export interface DungeonReplayFrame {
readonly atMs: number;
readonly keyframe: boolean;
readonly actors: readonly DungeonSimulationActorSnapshot[];
readonly objectiveId: string | null;
readonly checkpointIndex: number;
}
export interface DungeonSimulationReportV1 {
readonly schemaVersion: 1;
readonly dungeonId: string;
readonly routeId: string;
readonly routeHash: string;
readonly seed: string;
readonly mode: DungeonSimulationMode;
readonly startedAt: number;
readonly durationMs: number;
readonly result: DungeonSimulationResult;
readonly roster: readonly { readonly id: string; readonly name: string; readonly role: string; readonly classId: string }[];
readonly findings: readonly DungeonSimulationFinding[];
readonly pulls: readonly DungeonSimulationPull[];
readonly recoveries: number;
readonly objectiveTimings: readonly {
readonly objectiveId: string;
readonly startedAtMs: number;
readonly completedAtMs: number | null;
}[];
readonly actionTimings: readonly {
readonly actionId: string;
readonly objectiveId: string | null;
readonly atMs: number;
}[];
readonly pathDistances: readonly {
readonly objectiveId: string;
readonly actualDistance: number;
}[];
readonly finalObjectiveId: string | null;
readonly finalCheckpointIndex: number;
readonly finalState: readonly DungeonSimulationActorSnapshot[];
}
export interface DungeonReplayV1 {
readonly schemaVersion: 1;
readonly dungeonId: string;
readonly routeId: string;
readonly routeHash: string;
readonly mode: DungeonSimulationMode;
readonly seed: string;
readonly result: DungeonSimulationResult;
readonly startedAt: number;
readonly durationMs: number;
readonly report: DungeonSimulationReportV1;
readonly frames: readonly DungeonReplayFrame[];
readonly events: readonly DungeonSimulationFinding[];
}
export interface DungeonReplaySummary {
readonly id: string;
readonly dungeonId: string;
readonly routeId: string;
readonly routeHash: string;
readonly mode: DungeonSimulationMode;
readonly seed: string;
readonly result: DungeonSimulationResult;
readonly startedAt: number;
readonly durationMs: number;
readonly criticalFindings: number;
readonly submittedBy: string;
readonly createdAt: number;
readonly expiresAt: number;
readonly compressedBytes: number;
}