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?: Mod[]; od?: number; oldStatistics?: boolean; speedMultiplier?: number }): MapStats
  • Parameters

    • values: { ar?: number; cs?: number; hp?: number; isForceAR?: boolean; mods?: 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?: 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 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: 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 = 1800
AR10_MS: number = 450
AR5_MS: number = 1200
AR_MS_STEP1: number = ...
AR_MS_STEP2: number = ...
OD0_MS: number = 80
OD10_MS: number = 20
OD_MS_STEP: number = ...

Methods

  • calculate(params?: { isForceAR?: boolean; mode?: modes; mods?: string; speedMultiplier?: number }): MapStats
  • Calculates map statistics.

    This can only be called once for an instance.

    Parameters

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

        Whether force AR is turned on.

      • Optional mode?: 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 MapStats

  • toString(): 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