sandhill-road
Version:
A narrative-driven startup simulation game where you guide a founder from garage to exit
34 lines (33 loc) • 1.15 kB
TypeScript
import { GameStage } from './gameState';
export type EventChoice = {
id: string;
text: string;
requires?: Partial<Record<string, number>>;
result: Partial<Record<string, number>>;
resultText: string;
nextEvent?: string;
};
export type GameEvent = {
id: string;
title: string;
description: string;
image?: string;
choices: EventChoice[];
requirements?: Partial<Record<string, number>>;
stage: GameStage | GameStage[];
repeatable?: boolean;
weight?: number;
};
export declare const loadEvents: () => Promise<void>;
export declare const getAvailableEvents: () => GameEvent[];
export declare const selectRandomEvent: () => GameEvent | null;
export declare const getCurrentEvent: () => GameEvent | null;
export declare const startEvent: (eventId?: string) => GameEvent | null;
export declare const makeChoice: (choiceId: string) => {
success: boolean;
resultText: string;
nextEvent?: string;
};
export declare const clearCurrentEvent: () => void;
export declare const getStageDescription: (stage: GameStage) => string;
export declare const progressToNextStage: () => GameStage;