Class: BanchoMods

BanchoMods


new BanchoMods()

Static class with a property for each mods and methods to manipulate them.

Properties:
Name Type Description
None BanchoMod
NoFail BanchoMod
Easy BanchoMod
Hidden BanchoMod
HardRock BanchoMod
SuddenDeath BanchoMod
DoubleTime BanchoMod
Relax BanchoMod
HalfTime BanchoMod
Nightcore BanchoMod
Flashlight BanchoMod
Autoplay BanchoMod
SpunOut BanchoMod
Relax2 BanchoMod
Perfect BanchoMod
Key4 BanchoMod
Key5 BanchoMod
Key6 BanchoMod
Key7 BanchoMod
Key8 BanchoMod
FadeIn BanchoMod
Random BanchoMod
LastMod BanchoMod
Key9 BanchoMod
Key10 BanchoMod
Key1 BanchoMod
Key3 BanchoMod
Key2 BanchoMod
Source:

Methods


parseBitFlags(bits [, returnNone])

Parse mods in their bit flags form and returns them in an array of BanchoMods.

Parameters:
Name Type Argument Default Description
bits number

Mods combination in bit flags form

returnNone boolean <optional>
true

Returns [BanchoMods.None] if bits is equal to 0

Source:
Returns:
Type
Array.<BanchoMods>

parseLongMod(string)

Parse a mod in its long form (eg. Hidden). Case insensitive.

Parameters:
Name Type Description
string String
Source:
Returns:
Type
BanchoMod

parseLongMods(input)

Parse a long mods combination as a string or array of strings.
Accepted string formats: "Hidden, DoubleTime", "Hidden DoubleTime". The amount of spaces doesn't matter. Allowed seperators are comma and spaces.

Parameters:
Name Type Description
input string | Array.<string>
Source:

parseShortMod(string)

Parse a mod in its short form (eg. HD). Case insensitive.

Parameters:
Name Type Description
string String
Source:
Returns:
Type
BanchoMod

parseShortMods(input)

Parse a short mods combination as a string or array of strings.
Accepted string formats: "HDDT", "HD, DT", "HD DT". The amount of spaces doesn't matter. Allowed seperators are comma and spaces.

Parameters:
Name Type Description
input string | Array.<string>
Source:

returnBitFlags(mods)

Returns a bits flag integer representing the passed mods.

Parameters:
Name Type Description
mods Array.<BanchoMods>
Source:
Returns:
Type
number