Options
All
  • Public
  • Public/Protected
  • All
Menu

Holds general beatmap statistics for further modifications.

Hierarchy

  • MapStats

Index

Constructors

  • new MapStats(values?: { ar?: number; cs?: number; hp?: number; isForceAR?: boolean; mods?: <internal>.Mod[]; od?: number; oldStatistics?: boolean; speedMultiplier?: number }): <internal>.MapStats
  • Parameters

    • Optional values: { ar?: number; cs?: number; hp?: number; isForceAR?: boolean; mods?: <internal>.Mod[]; od?: number; oldStatistics?: boolean; speedMultiplier?: number }
      • Optional ar?: number

        The approach rate of the beatmap.

      • Optional cs?: number

        The circle size of the beatmap.

      • Optional hp?: number

        The health drain rate of the beatmap.

      • Optional isForceAR?: boolean

        Whether or not force AR is turned on.

      • Optional mods?: <internal>.Mod[]

        Applied modifications.

      • Optional od?: number

        The overall difficulty of the beatmap.

      • Optional oldStatistics?: boolean

        Whether to calculate for old statistics for osu!droid gamemode (1.6.7 or older).

      • Optional speedMultiplier?: number

        The speed multiplier to calculate for.

    Returns <internal>.MapStats

Properties

ar?: number

The approach rate of the beatmap.

cs?: number

The circle size of the beatmap.

hp?: number

The health drain rate of the beatmap.

isForceAR: boolean

Whether or not this map statistics uses forced AR.

mods: <internal>.Mod[]

The enabled modifications.

od?: number

The overall difficulty of the beatmap.

oldStatistics: boolean

Whether to calculate for old statistics for osu!droid gamemode (1.6.7 and older). Defaults to false.

speedMultiplier: number

The speed multiplier applied from all modifications.

AR0_MS: number
AR10_MS: number
AR5_MS: number
AR_MS_STEP1: number
AR_MS_STEP2: number
OD0_MS: number
OD10_MS: number
OD_MS_STEP: number

Methods

  • Calculates map statistics.

    This can only be called once for an instance.

    Parameters

    • Optional params: { isForceAR?: boolean; mode?: <internal>.modes; mods?: string; speedMultiplier?: number }
      • Optional isForceAR?: boolean

        Whether force AR is turned on.

      • Optional mode?: <internal>.modes

        The gamemode to calculate for. Defaults to modes.osu.

      • Optional mods?: string

        The applied modifications in osu!standard format.

      • Optional speedMultiplier?: number

        The speed multiplier to calculate for.

    Returns <internal>.MapStats

  • toString(): string
  • Returns a string representative of the class.

    Returns string

  • arToMS(ar: number): number
  • Converts an AR value to its milliseconds value.

    Parameters

    • ar: number

      The AR to convert.

    Returns number

    The milliseconds value represented by the AR.

  • modifyAR(baseAR: number, speedMultiplier: number, statisticsMultiplier: number): number
  • Utility function to apply speed and flat multipliers to stats where speed changes apply for AR.

    Parameters

    • baseAR: number

      The base AR value.

    • speedMultiplier: number

      The speed multiplier to calculate.

    • statisticsMultiplier: number

      The statistics multiplier to calculate from map-changing nonspeed-changing mods.

    Returns number

  • modifyOD(baseOD: number, speedMultiplier: number, statisticsMultiplier: number): number
  • Utility function to apply speed and flat multipliers to stats where speed changes apply for OD.

    Parameters

    • baseOD: number

      The base OD value.

    • speedMultiplier: number

      The speed multiplier to calculate.

    • statisticsMultiplier: number

      The statistics multiplier to calculate from map-changing nonspeed-changing mods.

    Returns number

Generated using TypeDoc