/** * CustomEffectsRepository * * Handles CRUD operations for custom effects (divine boons, curses, transformations). */ import Database from 'better-sqlite3'; import { CustomEffect, ApplyCustomEffectArgs, TriggerEvent, ActorType } from '../../schema/improvisation.js'; export declare class CustomEffectsRepository { private db; constructor(db: Database.Database); /** * Apply a new custom effect to a target */ apply(args: ApplyCustomEffectArgs): CustomEffect; /** * Find an effect by ID */ findById(id: number): CustomEffect | null; /** * Find effect by target and name */ findByTargetAndName(targetId: string, targetType: ActorType, name: string): CustomEffect | null; /** * Get all active effects on a target */ getEffectsOnTarget(targetId: string, targetType: ActorType, filters?: { category?: string; source_type?: string; is_active?: boolean; }): CustomEffect[]; /** * Get effects by trigger event */ getEffectsByTrigger(targetId: string, targetType: ActorType, event: TriggerEvent): CustomEffect[]; /** * Remove an effect by ID */ remove(id: number): boolean; /** * Remove effect by target and name */ removeByName(targetId: string, targetType: ActorType, name: string): boolean; /** * Deactivate an effect (keep record but mark inactive) */ deactivate(id: number): CustomEffect | null; /** * Advance round-based durations, deactivating expired effects */ advanceRounds(targetId: string, targetType: ActorType, rounds?: number): { advanced: CustomEffect[]; expired: CustomEffect[]; }; /** * Refresh duration on an existing effect */ refreshDuration(id: number, newDurationValue: number | null): CustomEffect; /** * Increment stacks on a stackable effect */ incrementStacks(id: number): CustomEffect; /** * Decrement stacks on a stackable effect (removes if reaches 0) */ decrementStacks(id: number): CustomEffect | null; /** * Check and remove expired time-based effects */ cleanupExpired(): number; /** * Get all active effects with a specific mechanic type */ getEffectsByMechanicType(targetId: string, targetType: ActorType, mechanicType: string): CustomEffect[]; /** * Calculate total bonus from all effects of a given mechanic type */ calculateTotalBonus(targetId: string, targetType: ActorType, mechanicType: string, condition?: string): number; /** * Convert database row to CustomEffect object */ private rowToEffect; } //# sourceMappingURL=custom-effects.repo.d.ts.map