import { PlayerCtor } from '@rpgjs/common'; export interface ClassData { id?: string; name?: string; description?: string; icon?: string; skillsToLearn?: Array<{ level: number; skill: unknown; source?: string; }>; [key: string]: unknown; } export interface ActorData { id?: string; name?: string; initialLevel?: number; finalLevel?: number; expCurve?: Record; parameters?: Record; startingEquipment?: unknown[]; class?: ClassInput; graphic?: string | number | (string | number)[]; hitbox?: { width: number; height: number; }; /** Animation names mapped to graphics, consumed by optional combat modules. */ animations?: Record; [key: string]: unknown; } export type ClassConstructor = new () => ClassData; export type ClassInput = ClassConstructor | ClassData | string; export type ActorConstructor = new () => ActorData; export type ActorInput = ActorConstructor | ActorData | string; /** * Class Manager Mixin * * Provides class and actor management capabilities to any class. This mixin handles * character class assignment and actor setup, including automatic parameter configuration, * starting equipment, and skill progression based on class definitions. * * @param Base - The base class to extend with class management * @returns Extended class with class management methods * * @example * ```ts * class MyPlayer extends WithClassManager(BasePlayer) { * constructor() { * super(); * // Class system is automatically initialized * } * } * * const player = new MyPlayer(); * player.setClass(Fighter); * player.setActor(Hero); * ``` */ export declare function WithClassManager(Base: TBase): TBase; /** * Interface for Class Manager functionality * * Provides class and actor management capabilities including character class assignment * and actor setup. This interface defines the public API of the ClassManager mixin. */ export interface IClassManager { /** * Assign a class to the player * * @param _class - The class constructor or class ID to assign to the player * @returns The instantiated class object */ setClass(_class: ClassInput): ClassData; /** * Set up the player as a specific actor archetype * * @param actor - The actor constructor, database ID, or resolved actor object to assign to the player * @returns The resolved actor object */ setActor(actor: ActorInput): ActorData; /** * Change the active actor without granting starting equipment or resetting * the player's acquired progression. * * @param actor - The actor constructor, database ID, or resolved actor object to apply * @returns The resolved actor object */ changeActor(actor: ActorInput): ActorData; }