import type { GameModelAPI } from '../domains/gameModel.js'; import type { Scalars } from '../generated/graphql.js'; import type { EngineDetector, EngineInvokeResult } from './engine.js'; import { type ContactDamageEvent } from './wire.js'; /** Options for {@link MobsKit}. Must match the deployed mob engine. */ export interface MobsKitOptions { /** The compute module serving `attack_mob`/`status`. Defaults to `'mob-engine'`. */ moduleName?: string; /** The mob-definition container type. Defaults to `'MobDef'`. */ defTypeName?: string; /** The mob slot container type. Defaults to `'Mob'`. */ slotTypeName?: string; } /** A parsed mob definition container. */ export interface KitMobDef { containerId: string; displayName: string; mobId: string; maxHealth: number; damage: number; speed: number; hostile: boolean; spawnTime: string; properties: Record; } /** A parsed mob slot container (durable state; live poses ride the mob lane). */ export interface KitMobSlot { containerId: string; displayName: string; mobId: string; actorUuid: string; health: number; x: number; y: number; z: number; /** health > 0 — the slot is live and being simulated. */ alive: boolean; properties: Record; } /** The referee's verdict for an accepted/denied attack. */ export interface KitAttackResult { success: boolean; /** Remaining health after an accepted hit. */ health?: number; killed?: boolean; /** The referee's denial reason ("out of range", "mob not live", ...). */ reason?: string; } /** * Runtime helpers for compute-module mob engines (the Wave 1 `mob-engine` * template / BWF's `bwf-mobs`): definition + slot reads off the model, the * refereed `attack_mob` invoke, and the type-77 contact-damage event parser. * * Live mob poses arrive on the actor stream (FLAG_MOB, container-id * suffix) — decode them with `kit/wire`'s {@link engineLanes} + * `enginePoseCodec` in your world session; this kit reads the durable side. * * Obtained via `client.kit(appId).mobs`. */ export declare class MobsKit { private readonly appId; private readonly gameModel; private readonly engines; private readonly moduleName; private readonly defTypeName; private readonly slotTypeName; constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, engines: EngineDetector, options?: MobsKitOptions); /** Is the mob engine deployed + enabled (cached per session)? */ engineAvailable(): Promise; /** * Attack a live mob slot through the server referee: presence, range and * damage clamps are validated engine-side before health moves. Denials * resolve with `success: false` and the referee's `reason`. */ attack(containerId: string, amount?: number): Promise; /** The engine's `status` snapshot (mob/def counts, tick counter). */ status(): Promise; /** List mob definitions with parsed stats. */ defs(): Promise; /** List mob slots (durable positions/health; `alive` = health > 0). */ slots(): Promise; /** * Parse a server-event payload as engine contact damage (type 77), or * null when it is another event type. Feed it your world session's * server-event stream and apply the damage to your own player when * `targetUuid` matches your actor uuid. */ parseContactDamage(payload: Uint8Array): ContactDamageEvent | null; } //# sourceMappingURL=mobs.d.ts.map