UNPKG

@zerospacegg/iolin

Version:

Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)

108 lines 3.1 kB
/** * Game Mechanic Engine - Base classes for game mechanics * * This module provides the foundational classes for defining and managing * game mechanics in ZeroSpace. Mechanics represent core gameplay systems * and rules that apply across factions and units. */ /** * Base class for all game mechanics * Represents a core gameplay system or rule */ export declare class GameMechanic { readonly name: string; uuid: string; keywords: string[]; description: string; constructor(name: string, builder?: (mechanic: GameMechanic) => void); /** * Get a summary of this mechanic */ get summary(): string; /** * Check if this mechanic matches a search term */ matches(searchTerm: string): boolean; /** * Get mechanic data as a plain object */ toJSON(): Record<string, unknown>; } /** * Basic mechanic - represents fundamental gameplay concepts */ export declare class BasicMechanic extends GameMechanic { constructor(name: string, builder?: (mechanic: BasicMechanic) => void); } /** * Transformation mechanic - represents complex multi-phase systems */ export declare class TransformationMechanic extends GameMechanic { category: string; stackable: boolean; maxStacks: number; conflictsWith: string[]; hasPhases: boolean; triggersOnDeath: boolean; tagsAdded: string[]; tagsRemoved: string[]; notes: string; constructor(name: string, builder?: (mechanic: TransformationMechanic) => void); /** * Get transformation mechanic data as a plain object */ toJSON(): Record<string, unknown>; } /** * Stat modifications for transformations */ export interface StatModifications { hpMultiplier?: number; damageMultiplier?: number; speedMultiplier?: number; cooldownMultiplier?: number; armorAddition?: number; energyMultiplier?: number; } /** * Transformation eligibility rules */ export interface TransformationEligibility { allowedSubtypes: string[]; excludedTags: string[]; allowedFactions?: string[]; } /** * Transformation cost calculation */ export interface TransformationCost { formula: string; baseMultiplier?: number; supplyMultiplier?: number; hexiteMultiplier?: number; fluxMultiplier?: number; additionalCost?: number; } /** * Transformation requirements */ export interface TransformationRequirements { eligibility: TransformationEligibility; cost: TransformationCost; preventedByTags: string[]; } /** * Advanced transformation mechanic with detailed rules */ export declare class AdvancedTransformationMechanic extends TransformationMechanic { requirements?: TransformationRequirements; statModifications?: StatModifications; preDeathPhase?: StatModifications; postDeathPhase?: StatModifications; constructor(name: string, builder?: (mechanic: AdvancedTransformationMechanic) => void); /** * Get advanced transformation mechanic data as a plain object */ toJSON(): Record<string, unknown>; } //# sourceMappingURL=mechanic.d.ts.map