farming-weight
Version:
Tools for calculating farming weight and fortune in Hypixel Skyblock
29 lines (28 loc) • 1.58 kB
TypeScript
import type { Effect, EffectEnvironment } from '../../effects/types.js';
import type { PlayerOptions } from '../../player/playeroptions.js';
/**
* Compute the effect list contributed by an enchant at a given level.
*
* The legacy enchant data has four contribution modes:
*
* - `stats` - flat per-stat per-level numbers (most enchants).
* - `computedStats(opt)` - full stat record from the player options
* (Dedication, which scales with milestone counts).
* - `computed[stat](opt)` - per-stat function of player options
* (Green Thumb scaling with `uniqueVisitors`).
* - `cropComputed[stat](crop, opt)` - per-stat function of the active crop
* (Sunset's Moonflower-zero pattern: `crop === Moonflower ? 0 : level`).
*
* Any contribution to `Stat.Overbloom` is converted to an `add-rare-pct` effect
* with a global overbloom scope and `relatedStats: [Stat.Overbloom]`, so the
* resolver both adds the contribution to the virtual `Stat.Overbloom` AND
* applies it as an additive percent to overbloom-tagged drops. All other stats
* become `add-stat` effects on the named stat (per-crop fortune stats like
* `CactusFortune` are already crop-gated by the consumer, so no scope is
* attached).
*
* Crop Fever (`ultimate_crop_fever`) emits no effects here - its mechanic is
* bespoke (Tiered RNG bonus during Harvest Feast) and stays in the legacy
* pipeline until it is migrated.
*/
export declare function enchantEffects(enchantId: string, level: number, env: EffectEnvironment, options: PlayerOptions, optimisticCropComputed?: boolean): Effect[];