/** * Concentration System - Manages concentration spell mechanics * Handles concentration checks, breaking concentration, and duration tracking */ import { ConcentrationState, ConcentrationCheckResult, BreakConcentrationRequest } from '../../schema/concentration.js'; import { Character, NPC } from '../../schema/character.js'; import { ConcentrationRepository } from '../../storage/repos/concentration.repo.js'; import { CharacterRepository } from '../../storage/repos/character.repo.js'; /** * Calculate the DC for a concentration save after taking damage * DC = 10 or half the damage taken, whichever is higher */ export declare function calculateConcentrationDC(damageAmount: number): number; /** * Roll a constitution saving throw for concentration */ export declare function rollConcentrationSave(constitutionModifier: number): { roll: number; total: number; }; /** * Check if concentration is maintained after taking damage */ export declare function checkConcentration(character: Character | NPC, damageAmount: number, concentrationRepo: ConcentrationRepository): ConcentrationCheckResult; /** * Break concentration for a character * This handles: * - Automatic breaks (incapacitated, death, new spell) * - Voluntary breaks * - Failed concentration saves */ export declare function breakConcentration(request: BreakConcentrationRequest, concentrationRepo: ConcentrationRepository, characterRepo: CharacterRepository): ConcentrationCheckResult; /** * Start concentration on a spell */ export declare function startConcentration(characterId: string, spellName: string, spellLevel: number, currentRound: number, maxDuration: number | undefined, targetIds: string[] | undefined, concentrationRepo: ConcentrationRepository, characterRepo: CharacterRepository): void; /** * Check if concentration has exceeded its duration */ export declare function checkConcentrationDuration(characterId: string, currentRound: number, concentrationRepo: ConcentrationRepository, characterRepo: CharacterRepository): ConcentrationCheckResult | null; /** * Get active concentration for a character */ export declare function getConcentration(characterId: string, concentrationRepo: ConcentrationRepository): ConcentrationState | null; /** * Check for automatic concentration breaks (incapacitated, death) * This should be called when a character's conditions change */ export declare function checkAutomaticConcentrationBreak(character: Character | NPC, concentrationRepo: ConcentrationRepository, characterRepo: CharacterRepository): ConcentrationCheckResult | null; //# sourceMappingURL=concentration.d.ts.map