UNPKG

farming-weight

Version:

Tools for calculating farming weight and fortune in Hypixel Skyblock

112 lines (111 loc) 5.03 kB
import type { Crop } from '../constants/crops.js'; import { type Rarity, type Reforge, ReforgeTarget, type ReforgeTier } from '../constants/reforges.js'; import { type SpecialCrop } from '../constants/specialcrops.js'; import { Stat } from '../constants/stats.js'; import { type FortuneSourceProgress, type FortuneUpgrade, type StatQueryOptions } from '../constants/upgrades.js'; import type { Effect, EffectEnvironment } from '../effects/types.js'; import { type ArmorSetBonus, type FarmingArmorInfo, GearSlot } from '../items/armor.js'; import type { PlayerOptions } from '../player/playeroptions.js'; import { FarmingEquipment } from './farmingequipment.js'; import type { EliteItemDto } from './item.js'; import type { UpgradeableInfo } from './upgradeable.js'; import { UpgradeableBase } from './upgradeablebase.js'; export interface ActiveArmorSetBonus { count: number; from: GearSlot[]; bonus: ArmorSetBonus; special?: SpecialCrop[]; } export declare class ArmorSet { helmet?: FarmingArmor; chestplate?: FarmingArmor; leggings?: FarmingArmor; boots?: FarmingArmor; get armor(): (FarmingArmor | null)[]; necklace?: FarmingEquipment; cloak?: FarmingEquipment; belt?: FarmingEquipment; gloves?: FarmingEquipment; get equipment(): (FarmingEquipment | null)[]; pieces: FarmingArmor[]; equipmentPieces: FarmingEquipment[]; armorFortune: number; equipmentFortune: number; get fortune(): number; setBonuses: ActiveArmorSetBonus[]; equipmentSetBonuses: ActiveArmorSetBonus[]; options?: PlayerOptions; constructor(armor: FarmingArmor[], equipment?: FarmingEquipment[], options?: PlayerOptions); setArmor(armor: FarmingArmor[]): void; setEquipment(equipment: FarmingEquipment[]): void; setOptions(options: PlayerOptions): void; resetChosenPieces(): void; updateArmorSlot(piece: FarmingArmor): void; updateEquipmentSlot(piece: FarmingEquipment): void; getPiece(slot: GearSlot): FarmingArmor | FarmingEquipment | undefined; getStartingPiece(slot: GearSlot): FarmingArmor | FarmingEquipment | undefined; setPiece(armor: FarmingArmor | FarmingEquipment): void; private recalculateFamilies; static getSetBonusFrom(armor: (FarmingArmor | FarmingEquipment | null)[]): { count: number; from: GearSlot[]; bonus: ArmorSetBonus; special: SpecialCrop[] | undefined; }[]; getStat(stat: Stat, crop?: Crop): number; /** * Returns the declarative `Effect[]` for the entire armor set: every armor * piece's effects, every equipment piece's effects, and the armor / equipment * set bonuses keyed by current piece count. */ getEffects(env: EffectEnvironment): Effect[]; getFortuneBreakdown(reloadFamilies?: boolean): Record<string, number>; specialDropsCalc(blocksBroken: number, crop: Crop): { id: string; type: SpecialCrop; amount: number; npc: number; } | null; specialDropsCount(crop: Crop): 0 | 1 | 2 | 3 | 4; getProgress(stats?: Stat[], zeroed?: boolean): FortuneSourceProgress[]; getUpgrades(options?: StatQueryOptions): FortuneUpgrade[]; getPieceProgress(slot: GearSlot): FortuneSourceProgress[]; get slots(): Record<GearSlot, FarmingArmor | FarmingEquipment | undefined>; get slotOptions(): Record<GearSlot, (FarmingArmor | FarmingEquipment)[]>; } export declare class FarmingArmor extends UpgradeableBase { readonly item: EliteItemDto; readonly info: FarmingArmorInfo; get type(): ReforgeTarget; get armor(): FarmingArmorInfo; get slot(): GearSlot | undefined; readonly rarity: Rarity; readonly reforge: Reforge | undefined; readonly reforgeStats: ReforgeTier | undefined; readonly recombobulated: boolean; get potential(): number; fortune: number; fortuneBreakdown: Record<string, number>; options?: PlayerOptions; constructor(item: EliteItemDto, options?: PlayerOptions); setOptions(options: PlayerOptions): void; getStat(stat: Stat, crop?: Crop): number; /** * Returns the declarative `Effect[]` representation of every contribution * this armor piece makes: base stats, per-farming-level stats, reforge, * gems, and enchants. Set bonuses are handled at the `ArmorSet` level (see * {@link ArmorSet.getEffects}). */ getEffects(env: EffectEnvironment): Effect[]; getFortune(): number; getUpgrades(options?: StatQueryOptions): FortuneUpgrade[]; getItemUpgrade(): import("../constants/upgrades.js").Upgrade | undefined; getLastItemUpgrade(): { upgrade: import("../constants/upgrades.js").Upgrade; info: UpgradeableInfo; } | undefined; getProgress(stats?: Stat[], zeroed?: boolean): FortuneSourceProgress[]; static isValid(item: EliteItemDto): boolean; static fromArray(items: EliteItemDto[], options?: PlayerOptions): FarmingArmor[]; static fakeItem(info: UpgradeableInfo, options?: PlayerOptions): FarmingArmor | undefined; }