import type { SquadRole } from "../../combat/squadTactics.js"; /** The role shape a boss fights with in one phase: the same dials a squad role uses. */ export type BossBehaviour = Omit; /** The warning a boss gives while it changes phase, and how long the player has to read it. */ export interface BossTell { /** Game-owned id: an animation, a sound, a HUD banner. */ id: string; /** Seconds the tell stays visible after the phase changes. Default `1.5`. */ telegraphSeconds?: number; } /** One authored phase: the health it starts at, how the boss fights, and its tell. */ export interface BossPhase { id: string; /** Health fraction at or below which this phase is in effect, `0..1`. The opening phase is `1`. */ atHealth: number; /** How the boss fights while this phase holds. */ behaviour: BossBehaviour; /** Warning shown when the boss enters this phase. Omit for a silent phase. */ tell?: BossTell; } /** Serializable boss state: which phase holds, how long it has held, and the tell still on screen. */ export interface BossState { /** Index into the authored phase list. Monotone: it never goes back down. */ phase: number; /** Id of the current phase, for a HUD read without the definition at hand. */ phaseId: string; /** Seconds the current phase has held. */ ageSeconds: number; /** Tell still showing, or null. */ tellId: string | null; /** Seconds left on the showing tell. */ tellRemaining: number; } /** One step of the boss clock. */ export interface BossStep { state: BossState; /** The phase in effect after the step. */ phase: BossPhase; /** True on the step the phase changed. */ changed: boolean; /** The tell to fire now, or null. Only set on a change, so a caller never replays a tell. */ tell: BossTell | null; } /** The phase a boss fights with at a health fraction. Pure read for a HUD; never mutates. */ export declare function bossPhase(phases: readonly BossPhase[], health: number): BossPhase; /** * Fresh boss state for a phase list, opening in phase 0 with no tell showing. * * @capability boss-phase-state fresh serializable boss phase state that opens in the first phase */ export declare function createBossState(phases: readonly BossPhase[]): BossState; /** * Advance the boss by `dt` at a health fraction and return the phase in effect. * * A phase changes when health reaches its threshold, and it changes *behaviour with it*: the phase * carries the same role dials squad combat executes, so a phase change is a different fight (range, * cover, discipline) and a tell the game shows while the player has time to react. Phase order is * monotone hand-written data, so a heal does not rewind the boss into an earlier phase and a caller * cannot stack tells by re-entering the same threshold. Deterministic in `dt` and health. * * @capability boss-phases data-authored boss phases that change behaviour and fire a tell at health thresholds */ export declare function advanceBoss(phases: readonly BossPhase[], state: BossState, health: number, dt: number): BossStep;