libram
    Preparing search index...

    Function findOptimalOutfitPower

    Calculate the optimal power-sum at which to busk, given a weighted set of modifiers.

    Either a function that maps effect-duration pairs to values, or an object keyed by numeric modifiers with weights as values, or an array of desired effects

    An object containing the following optional keys:

    An array (defaults to empty) of effects not to consider for the purposes of busk valuation

    Whether or not we should consider purchasing items from NPC stores; defaults to true

    Whether or not to assume you have Hammertime--defaults to whether you currently have it

    How many busks should we assume we've cast? Defaults to the current number.

    The power-sum at which you'll find the optimal busk for this situation.

    • Calculate the optimal power-sum at which to busk, given a weighted set of modifiers.

      Parameters

      • wantedEffects: Effect[]

        An array of Effects we care about; maximizes the number of those effects we end up with

      • Optionaloptions: Partial<{ buyItems: boolean; hammerTime: boolean; uselessEffects: Effect[] }>

        An object containing the following optional keys:

        • uselessEffects

          An array (defaults to empty) of effects not to consider for the purposes of busk valuation

        • buyItems

          Whether or not we should consider purchasing items from NPC stores; defaults to true

        • hammerTime

          Whether or not to assume you have Hammertime--defaults to whether you currently have it

      • OptionalbuskUses: number

        How many busks should we assume we've cast? Defaults to the current number.

      Returns number

      The power-sum at which you'll find the optimal busk for this situation.

    • Calculate the optimal power-sum at which to busk, given a weighted set of modifiers.

      Parameters

      • weightedModifiers: Partial<Record<NumericModifier, number>>

        An object keyed by Numeric Modifiers, with their values representing weights

      • Optionaloptions: Partial<{ buyItems: boolean; hammerTime: boolean; uselessEffects: Effect[] }>

        An object containing the following optional keys:

        • uselessEffects

          An array (defaults to empty) of effects not to consider for the purposes of busk valuation

        • buyItems

          Whether or not we should consider purchasing items from NPC stores; defaults to true

        • hammerTime

          Whether or not to assume you have Hammertime--defaults to whether you currently have it

      • OptionalbuskUses: number

        How many busks should we assume we've cast? Defaults to the current number.

      Returns number

      The power-sum at which you'll find the optimal busk for this situation.

    • Calculate the optimal power-sum at which to busk, given a weighted set of modifiers.

      Parameters

      • valueFunction: (effect: Effect, duration: number) => number

        A function that maps effects to values

      • Optionaloptions: Partial<{ buyItems: boolean; hammerTime: boolean; uselessEffects: Effect[] }>

        An object containing the following optional keys:

        • uselessEffects

          An array (defaults to empty) of effects not to consider for the purposes of busk valuation

        • buyItems

          Whether or not we should consider purchasing items from NPC stores; defaults to true

        • hammerTime

          Whether or not to assume you have Hammertime--defaults to whether you currently have it

      • OptionalbuskUses: number

        How many busks should we assume we've cast? Defaults to the current number.

      Returns number

      The power-sum at which you'll find the optimal busk for this situation.

    • Calculate the optimal power-sum at which to busk, given a weighted set of modifiers.

      Parameters

      • effectValuer: EffectValuer

        Either a function that maps effect-duration pairs to values, or an object keyed by numeric modifiers with weights as values, or an array of desired effects

      • Optionaloptions: Partial<{ buyItems: boolean; hammerTime: boolean; uselessEffects: Effect[] }>

        An object containing the following optional keys:

        • uselessEffects

          An array (defaults to empty) of effects not to consider for the purposes of busk valuation

        • buyItems

          Whether or not we should consider purchasing items from NPC stores; defaults to true

        • hammerTime

          Whether or not to assume you have Hammertime--defaults to whether you currently have it

      • OptionalbuskUses: number

        How many busks should we assume we've cast? Defaults to the current number.

      Returns number

      The power-sum at which you'll find the optimal busk for this situation.