/** * Spell Scroll System - Handles scroll creation, validation, and usage * Implements D&D 5e spell scroll rules */ import { Character } from '../../schema/character.js'; import { Item } from '../../schema/inventory.js'; import { ScrollProperties, ScrollUsageResult } from '../../schema/scroll.js'; import { SpellcastingClass } from '../../schema/spell.js'; import { InventoryRepository } from '../../storage/repos/inventory.repo.js'; /** * Validate if a character can use a spell scroll * Rules: * 1. If spell is on character's class list AND they can cast spells of that level: auto-success * 2. If spell is on character's class list BUT spell level too high: DC 10 + spell level Arcana check * 3. If spell is NOT on character's class list: DC 10 + spell level Arcana check */ export declare function validateScrollUse(character: Character, scrollProperties: ScrollProperties): { requiresCheck: boolean; checkDC: number | null; reason: string; }; /** * Roll an Arcana check for scroll use * Uses Intelligence modifier + proficiency bonus (if proficient in Arcana) */ export declare function rollArcanaCheck(character: Character): { roll: number; total: number; modifier: number; }; /** * Use a spell scroll * Handles validation, Arcana checks, and scroll consumption */ export declare function useSpellScroll(character: Character, scroll: Item, inventoryRepo: InventoryRepository): ScrollUsageResult; /** * Create a spell scroll item */ export declare function createSpellScroll(spellName: string, spellLevel: number, spellClass?: SpellcastingClass, customDC?: number, customAttackBonus?: number, customValue?: number, customDescription?: string): Omit; /** * Get scroll details from an item */ export declare function getScrollDetails(scroll: Item): { valid: boolean; spellName?: string; spellLevel?: number; scrollDC?: number; scrollAttackBonus?: number; spellClass?: string; rarity?: string; error?: string; }; /** * Check if a character can use a specific scroll * (Doesn't consume the scroll, just checks) */ export declare function checkScrollUsability(character: Character, scroll: Item): { canUse: boolean; requiresCheck: boolean; checkDC: number | null; reason: string; message: string; }; /** * Calculate effective spell DC/attack bonus for a scroll * Uses the higher of caster's spellcasting DC or scroll's default DC */ export declare function getEffectiveScrollDC(character: Character, scroll: Item): { spellDC: number; spellAttackBonus: number; usingCasterStats: boolean; }; //# sourceMappingURL=scroll.d.ts.map