/** * Aura System - Manages area-effect auras centered on characters * Handles aura creation, position-based effect triggers, and movement integration */ import { AuraState, AuraEffect, AuraEffectResult, CreateAuraRequest, AuraTrigger } from '../../schema/aura.js'; import { Position, Token } from '../../schema/encounter.js'; import { AuraRepository } from '../../storage/repos/aura.repo.js'; /** * Calculate distance in feet between two positions * Assumes each grid square is 5 feet */ export declare function calculateDistance(pos1: Position, pos2: Position): number; /** * Check if a position is within an aura's radius * @param auraCenter - Position of the aura's owner * @param targetPosition - Position to check * @param radius - Aura radius in feet */ export declare function isInAuraRange(auraCenter: Position, targetPosition: Position, radius: number): boolean; /** * Create a new aura */ export declare function createAura(request: CreateAuraRequest, auraRepo: AuraRepository): AuraState; /** * End an aura by ID */ export declare function endAura(auraId: string, auraRepo: AuraRepository): boolean; /** * End all auras owned by a character */ export declare function endAurasByOwner(ownerId: string, auraRepo: AuraRepository): number; /** * Get all active auras */ export declare function getActiveAuras(auraRepo: AuraRepository): AuraState[]; /** * Get auras affecting a specific position * @param tokens - All tokens in the encounter (to find aura owner positions) * @param targetPosition - Position to check * @param auraRepo - Aura repository */ export declare function getAurasAtPosition(tokens: Token[], targetPosition: Position, auraRepo: AuraRepository): AuraState[]; /** * Check if a target should be affected by an aura * @param aura - The aura to check * @param target - The target token * @param ownerIsAlly - Whether the aura owner is an ally of the target */ export declare function shouldAffectTarget(aura: AuraState, target: Token, ownerIsAlly: boolean): boolean; /** * Roll a saving throw * @param abilityModifier - The ability modifier for the save * @returns Object with roll and total */ export declare function rollSave(abilityModifier: number): { roll: number; total: number; }; /** * Roll damage or healing dice * @param dice - Dice notation (e.g., "3d8") * @returns Total result */ export declare function rollDice(dice: string): number; /** * Apply a single aura effect to a target * @param aura - The aura * @param effect - The specific effect to apply * @param target - The target token * @returns Result of the effect application */ export declare function applyAuraEffect(aura: AuraState, effect: AuraEffect, target: Token, trigger: AuraTrigger): AuraEffectResult; /** * Check aura effects for a specific target and trigger * @param tokens - All tokens in the encounter * @param targetId - ID of the target to check * @param trigger - The trigger type (enter, exit, start_of_turn, etc.) * @param auraRepo - Aura repository * @returns Array of effect results */ export declare function checkAuraEffectsForTarget(tokens: Token[], targetId: string, trigger: AuraTrigger, auraRepo: AuraRepository): AuraEffectResult[]; /** * Check if aura has exceeded its duration */ export declare function checkAuraDuration(aura: AuraState, currentRound: number): boolean; /** * Clean up expired auras * @param currentRound - Current combat round * @param auraRepo - Aura repository * @returns Array of expired aura IDs */ export declare function expireOldAuras(currentRound: number, auraRepo: AuraRepository): string[]; //# sourceMappingURL=aura.d.ts.map