/** * Item Preset Type Definitions * * Shared types for the modular item preset system. * All preset files should import from here for consistency. */ export type ItemType = 'weapon' | 'armor' | 'consumable' | 'gear' | 'tool' | 'magic' | 'misc' | 'scroll'; export type Rarity = 'common' | 'uncommon' | 'rare' | 'very_rare' | 'legendary' | 'artifact'; export type DamageType = 'slashing' | 'piercing' | 'bludgeoning' | 'fire' | 'cold' | 'lightning' | 'thunder' | 'acid' | 'poison' | 'necrotic' | 'radiant' | 'force' | 'psychic'; export type WeaponCategory = 'simple_melee' | 'simple_ranged' | 'martial_melee' | 'martial_ranged'; export type WeaponProperty = 'ammunition' | 'finesse' | 'heavy' | 'light' | 'loading' | 'range' | 'reach' | 'special' | 'thrown' | 'two_handed' | 'versatile' | 'monk' | 'silvered'; export interface WeaponPreset { name: string; type: 'weapon'; category: WeaponCategory; damage: string; damageType: DamageType; properties: WeaponProperty[]; weight: number; value: number; range?: { normal: number; long: number; }; versatileDamage?: string; description?: string; tags?: string[]; source?: string; } export type ArmorCategory = 'light' | 'medium' | 'heavy' | 'shield'; export interface ArmorPreset { name: string; type: 'armor'; category: ArmorCategory; ac: number; maxDexBonus?: number; minStrength?: number; stealthDisadvantage?: boolean; weight: number; value: number; donTime?: string; doffTime?: string; description?: string; tags?: string[]; source?: string; } export interface GearPreset { name: string; type: 'gear' | 'tool' | 'consumable'; subtype?: string; weight: number; value: number; description?: string; capacity?: number; uses?: number; effect?: string; tags?: string[]; source?: string; } export interface MagicItemPreset { name: string; type: 'magic'; baseItem?: string; rarity: Rarity; requiresAttunement?: boolean | string; charges?: { max: number; recharge?: string; }; attackBonus?: number; damageBonus?: number; acBonus?: number; saveDCBonus?: number; properties?: string[]; effects?: string[]; cursed?: boolean; weight?: number; value?: number; description: string; tags?: string[]; source?: string; } export type ItemPreset = WeaponPreset | ArmorPreset | GearPreset | MagicItemPreset; /** * Interface for preset source modules. * Each file (weapons-phb.ts, armor-phb.ts, etc.) exports this shape. */ export interface PresetSource { /** Unique identifier for this source */ id: string; /** Human-readable name */ name: string; /** Source book abbreviation */ source: string; /** Version for cache invalidation */ version: string; /** The presets from this source, keyed by normalized name */ presets: Record; } export interface ItemSearchCriteria { query?: string; type?: ItemType | ItemType[]; category?: string; rarity?: Rarity | Rarity[]; minValue?: number; maxValue?: number; minWeight?: number; maxWeight?: number; properties?: string[]; tags?: string[]; source?: string; requiresAttunement?: boolean; } export interface SearchResult { key: string; preset: ItemPreset; score: number; matchedFields: string[]; } //# sourceMappingURL=types.d.ts.map