import { type LootComparisonOptions } from "../loot/lootGen.js"; /** The least a worn item must expose to be scored: its stat block, plus optional level and rarity for the gear-score terms. */ export interface GearSlotItem { stats: Readonly>; /** Item level, added as `levelWeight × level` when the option is set. */ level?: number; /** Rarity id, looked up in `rarityScore` when the option names one. */ rarity?: string; } /** Caller policy for a loadout score: stat weights, which stats read better small, and what level, rarity and an empty slot are worth. */ export interface GearScoreOptions extends Pick { /** Points added per item level (default `0`, so level is ignored). */ levelWeight?: number; /** Points added per rarity id (default none). */ rarityScore?: Readonly>; /** Slot ids a complete loadout fills; named slots that are empty are reported and penalized. */ expectedSlots?: readonly string[]; /** Points removed per empty slot (default `0`). */ emptySlotPenalty?: number; } /** A scored loadout: the total, each slot's share, each stat's signed contribution, and how complete it is. */ export interface GearScore { /** `Σ slotScore - emptySlotPenalty × emptySlots`. */ score: number; /** Score per filled slot id. */ bySlot: Readonly>; /** Signed weighted contribution per stat, summed across items. */ byStat: Readonly>; /** Number of filled slots. */ items: number; /** `score / items`, or `0` for an empty loadout. */ average: number; /** Filled slots over expected slots, `1` when no slots are expected. */ coverage: number; /** Expected slot ids with no item. */ emptySlots: readonly string[]; } /** * Score a whole loadout with one documented formula: * * `slotScore = Σ_stat value × weight × (lowerIsBetter ? -1 : 1) + levelWeight × level + rarityScore[rarity]` * * `score = Σ slotScore - emptySlotPenalty × emptySlots`, and `byStat` sums the stat term alone. The * stat term is `scoreLootStats`, the same weight policy `compareLootItems` uses, so an item swap and * a loadout total agree. Ties are exact; nothing here reads a clock or RNG. * * @capability gear-score score a loadout from stat weights, level, rarity and slot coverage */ export declare function gearScore(set: Readonly>, options?: GearScoreOptions): GearScore; /** Compare two loadouts; negative means `a` scores lower. */ export declare function compareGearSets(a: Readonly>, b: Readonly>, options?: GearScoreOptions): { a: GearScore; b: GearScore; delta: number; better: "a" | "b" | "equal"; };