Class Mood

Class representing a mood object. Add mood elements using the instance methods, which can be chained.

Constructors

  • Construct a new Mood instance.

    Parameters

    • options: Partial<MoodOptions> = {}

      Options for mood.

    Returns Mood

Properties

elements: MoodElement[] = []
options: MoodOptions
defaultOptions: MoodOptions = ...

Methods

  • Get the MP available for casting skills.

    Returns number

    Available MP

  • Add an Asdon Martin driving style to the mood.

    Parameters

    • effect: Effect

      Driving style to add to the mood.

    Returns Mood

    This mood to enable chaining

  • Add an effect to the mood, with casting based on {effect.default}.

    Parameters

    • effect: Effect

      Effect to add.

    • OptionalgainEffect: (() => void)

      How to gain the effect. Only runs if we don't have the effect.

        • (): void
        • Returns void

    Returns Mood

    This mood to enable chaining

  • Execute the mood, trying to ensure {ensureTurns} of each effect.

    Parameters

    • ensureTurns: number = 1

      Turns of each effect to try and achieve.

    Returns boolean

    Whether or not we successfully got this many turns of every effect in the mood.

  • Add an effect to acquire via pocket wishes to the mood.

    Parameters

    • effect: Effect

      Effect to wish for in the mood.

    Returns Mood

    This mood to enable chaining

  • Parameters

    • minimumTarget: number

    Returns void

  • Add a potion to the mood.

    Parameters

    • potion: Item

      Potion to add.

    • maxPricePerTurn: number

      Maximum price to pay per turn of the effect.

    Returns Mood

    This mood to enable chaining

  • Add a skill to the mood.

    Parameters

    • skill: Skill

      Skill to add.

    Returns Mood

    This mood to enable chaining

  • Set default options for new Mood instances.

    Parameters

    • options: Partial<MoodOptions>

      Default options for new Mood instances.

    Returns void