forked from phenom/healer-man
34 lines
3.1 KiB
TypeScript
34 lines
3.1 KiB
TypeScript
export type LayoutVector = readonly [number, number, number];
|
|
export interface LayoutSpawn { readonly footPosition: LayoutVector; readonly yaw: number }
|
|
export interface BiteSizedLayoutBlocker { readonly position: LayoutVector; readonly yaw: number; readonly halfExtents: LayoutVector }
|
|
export interface BiteSizedMobPlacement { readonly id: string; readonly sourceDungeonId: string; readonly entityId: string; readonly position: LayoutVector; readonly yaw: number; readonly spawnMask?: number; readonly spawnChance?: number }
|
|
export interface BiteSizedSpot {
|
|
readonly id: string; readonly dungeonId: string; readonly sourceDungeonId: string; readonly name: string; readonly revision: number;
|
|
readonly legacyLayout: boolean; readonly partySpawn: LayoutSpawn; readonly mobs: readonly BiteSizedMobPlacement[];
|
|
readonly bossSpawn: LayoutSpawn; readonly bossActivation: "immediate" | "after-mobs";
|
|
}
|
|
export interface BiteSizedConfig { readonly schemaVersion: 1; readonly spots: readonly BiteSizedSpot[] }
|
|
export interface BiteSizedCreatureRef { readonly sourceDungeonId: string; readonly entityId: string }
|
|
export interface BiteSizedBossRef extends BiteSizedCreatureRef { readonly objectiveId: string; readonly name: string }
|
|
export interface BiteSizedRunSelection {
|
|
readonly legacyRandomized?: true;
|
|
readonly schemaVersion: 1; readonly dungeonId: string; readonly spot: BiteSizedSpot; readonly boss: BiteSizedBossRef;
|
|
readonly mobs: readonly (BiteSizedCreatureRef & { readonly placementId: string })[];
|
|
}
|
|
export interface PublishedBiteSizedConfig { readonly revision: number; readonly updatedAt: number | null; readonly config: BiteSizedConfig }
|
|
export const BITE_SIZED_DEFAULT_CONFIG: BiteSizedConfig;
|
|
export const BITE_SIZED_LAYOUT_CATALOG: {
|
|
readonly dungeons: readonly { readonly id: string; readonly sourceDungeonId: string; readonly title: string; readonly expansion: string;
|
|
readonly bounds: { readonly min: LayoutVector; readonly max: LayoutVector }; readonly difficultyIds: readonly string[]; readonly bossCandidates: readonly BiteSizedBossRef[]; readonly legacyBlockers: readonly BiteSizedLayoutBlocker[] }[];
|
|
readonly creatures: readonly (BiteSizedCreatureRef & { readonly kind: "mob" | "boss"; readonly name: string; readonly dungeonTitle: string; readonly modelUrl: string | null })[];
|
|
readonly pools: Readonly<Record<string, readonly (BiteSizedBossRef & { readonly kind: "mob" | "boss"; readonly key: string })[]>>;
|
|
};
|
|
export function normalizeBiteSizedSpot(value: unknown): BiteSizedSpot;
|
|
export function normalizeBiteSizedConfig(value: unknown): BiteSizedConfig;
|
|
export function normalizeBiteSizedSelection(value: unknown): BiteSizedRunSelection;
|
|
export function biteSizedGameplayKey(value: BiteSizedSpot): string;
|
|
export function biteSizedSeedHash(seed: string): number;
|
|
export function isLayoutBiteSizedDungeon(id: string): boolean;
|
|
export function defaultBiteSizedBoardScope(id: string): { readonly spotId: string | null; readonly spotRevision: number | null };
|
|
export function selectBiteSizedRun(config: BiteSizedConfig, dungeonId: string, seed: string, options?: { readonly eligibleDungeonIds?: readonly string[]; readonly spotId?: string }): BiteSizedRunSelection;
|