UNPKG

@zerospacegg/anrubic

Version:

Anrubic - ZeroSpace.gg MCP Server for AI agents to access game data

130 lines (129 loc) 3.61 kB
export interface BasicMechanic { term: string; keywords: string[]; description: string; } export interface Transformation { name: string; type: string; category: string; keywords: string[]; description: string; stackable: boolean; maxStacks: number; conflictsWith: string[]; requirements: { eligibility: { allowedSubtypes: string[]; excludedTags: string[]; }; cost: { formula?: string; supplyMultiplier?: number; baseMultiplier?: number; hexiteMultiplier?: number; fluxMultiplier?: number; }; preventedByTags: string[]; }; statModifications?: { hpMultiplier?: number; damageMultiplier?: number; }; hasPhases: boolean; preDeathPhase?: { speedMultiplier: number; cooldownMultiplier: number; }; postDeathPhase?: { speedMultiplier: number; cooldownMultiplier: number; }; triggersOnDeath: boolean; tagsAdded: string[]; tagsRemoved: string[]; notes?: string; } export interface MechanicsData { mechanics: { basicMechanics: Record<string, BasicMechanic>; transformations: Record<string, Transformation>; }; } export interface FlatMechanic { key: string; category: "basic" | "transformation"; name: string; keywords: string[]; description: string; data: BasicMechanic | Transformation; } export declare class MarkdownFormatter { /** * Format a mechanic as markdown for MCP responses */ static formatMechanic(mechanic: FlatMechanic, detailed?: boolean): string; /** * Format transformation-specific details */ private static formatTransformationDetails; /** * Format mechanics overview with statistics */ static formatMechanicsOverview(mechanics: FlatMechanic[], stats: { basicMechanics: number; transformations: number; totalMechanics: number; }): string; /** * Format error message for mechanic not found */ static formatMechanicNotFound(term: string, availableKeys: string[]): string; /** * Format general error message */ static formatError(message: string): string; } export declare class MechanicsService { private mechanicsData; private __dirname; constructor(); /** * Load mechanics data from the JSON file */ loadMechanics(): Promise<MechanicsData>; /** * Get flattened mechanics for easy searching */ getFlattenedMechanics(): Promise<Record<string, FlatMechanic>>; /** * Search for a specific mechanic by key */ getMechanic(key: string): Promise<FlatMechanic | null>; /** * Get all mechanics with optional filtering */ getAllMechanics(filter?: { category?: "basic" | "transformation"; searchTerm?: string; }): Promise<FlatMechanic[]>; /** * Get statistics about the mechanics system */ getStats(): Promise<{ totalMechanics: number; basicMechanics: number; transformations: number; mechanicsWithKeywords: number; averageKeywords: number; }>; /** * Format a mechanic for display (delegated to MarkdownFormatter) */ formatMechanic(mechanic: FlatMechanic, detailed?: boolean): string; /** * Format mechanics list for overview (delegated to MarkdownFormatter) */ formatMechanicsList(mechanics: FlatMechanic[]): any[]; } export declare const mechanicsService: MechanicsService;