UNPKG

@zerospacegg/iolin

Version:

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

55 lines 1.66 kB
/** * Map - RTS map class for ZeroSpace maps * Using functional constructor pattern */ import type { Id } from "./core.js"; import { Entity } from "./entity.js"; export type FluxDistance = "close" | "near" | "medium-far" | "distant"; export type MapSize = "small" | "normal" | "large"; /** * RTS Map class - extends Entity with map-specific properties * Usage: new Map1v1("Ascension 1v1", (map) => { map.xpTowers = 3; }) * * This is abstract - you MUST use Map1v1, Map2v2, MapFFA, or Map1p subclasses */ export declare abstract class Map extends Entity { get type(): string; xpTowers: number; fluxDistance: FluxDistance; mapSize: MapSize; inLadderPool: boolean; constructor(); /** Number of players this map supports */ abstract get players(): number; /** Map type for subtype */ abstract get mapType(): string; /** Public subtype getter - just for JSON serialization */ get subtype(): string; readonly tier = ""; get id(): Id; /** * JSON.stringify() calls this automatically */ toJSON(): Record<string, any>; } export declare abstract class Map1v1 extends Map { get subtype(): string; get mapType(): string; get players(): number; } export declare abstract class Map2v2 extends Map { get subtype(): string; get mapType(): string; get players(): number; } export declare abstract class MapFFA extends Map { get subtype(): string; get mapType(): string; get players(): number; } export declare abstract class Map1p extends Map { get subtype(): string; get mapType(): string; get players(): number; } //# sourceMappingURL=map.d.ts.map