@rian8337/osu-base 4.0.0-beta.51 → 4.0.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +175 -166
- package/package.json +2 -2
- package/typings/index.d.ts +65 -42
package/dist/index.js
CHANGED
|
@@ -2960,6 +2960,12 @@ class BeatmapConverter {
|
|
|
2960
2960
|
* Represents a mod.
|
|
2961
2961
|
*/
|
|
2962
2962
|
class Mod {
|
|
2963
|
+
constructor() {
|
|
2964
|
+
/**
|
|
2965
|
+
* `Mod`s that are incompatible with this `Mod`.
|
|
2966
|
+
*/
|
|
2967
|
+
this.incompatibleMods = new Set();
|
|
2968
|
+
}
|
|
2963
2969
|
/**
|
|
2964
2970
|
* Whether this `Mod` can be applied to osu!droid.
|
|
2965
2971
|
*/
|
|
@@ -2972,6 +2978,12 @@ class Mod {
|
|
|
2972
2978
|
isApplicableToOsu() {
|
|
2973
2979
|
return "pcRanked" in this;
|
|
2974
2980
|
}
|
|
2981
|
+
/**
|
|
2982
|
+
* Whether this `Mod` can be applied to osu!standard, specifically the osu!stable client.
|
|
2983
|
+
*/
|
|
2984
|
+
isApplicableToOsuStable() {
|
|
2985
|
+
return "bitwise" in this;
|
|
2986
|
+
}
|
|
2975
2987
|
/**
|
|
2976
2988
|
* Whether this `Mod` can be applied to a `Beatmap`.
|
|
2977
2989
|
*/
|
|
@@ -8292,20 +8304,21 @@ class MapInfo {
|
|
|
8292
8304
|
}
|
|
8293
8305
|
|
|
8294
8306
|
/**
|
|
8295
|
-
* Represents the
|
|
8307
|
+
* Represents the Relax mod.
|
|
8296
8308
|
*/
|
|
8297
|
-
class
|
|
8309
|
+
class ModRelax extends Mod {
|
|
8298
8310
|
constructor() {
|
|
8299
|
-
super(
|
|
8300
|
-
this.acronym = "
|
|
8301
|
-
this.name = "
|
|
8311
|
+
super();
|
|
8312
|
+
this.acronym = "RX";
|
|
8313
|
+
this.name = "Relax";
|
|
8302
8314
|
this.droidRanked = false;
|
|
8303
|
-
this.droidScoreMultiplier =
|
|
8304
|
-
this.droidString = "
|
|
8315
|
+
this.droidScoreMultiplier = 0.001;
|
|
8316
|
+
this.droidString = "x";
|
|
8305
8317
|
this.isDroidLegacyMod = false;
|
|
8306
8318
|
this.pcRanked = false;
|
|
8307
|
-
this.pcScoreMultiplier =
|
|
8308
|
-
this.bitwise = 1 <<
|
|
8319
|
+
this.pcScoreMultiplier = 0;
|
|
8320
|
+
this.bitwise = 1 << 7;
|
|
8321
|
+
this.incompatibleMods.add(ModAuto).add(ModAutopilot);
|
|
8309
8322
|
}
|
|
8310
8323
|
}
|
|
8311
8324
|
|
|
@@ -8314,7 +8327,7 @@ class ModAuto extends Mod {
|
|
|
8314
8327
|
*/
|
|
8315
8328
|
class ModAutopilot extends Mod {
|
|
8316
8329
|
constructor() {
|
|
8317
|
-
super(
|
|
8330
|
+
super();
|
|
8318
8331
|
this.acronym = "AP";
|
|
8319
8332
|
this.name = "Autopilot";
|
|
8320
8333
|
this.droidRanked = false;
|
|
@@ -8324,13 +8337,43 @@ class ModAutopilot extends Mod {
|
|
|
8324
8337
|
this.pcRanked = false;
|
|
8325
8338
|
this.pcScoreMultiplier = 0;
|
|
8326
8339
|
this.bitwise = 1 << 13;
|
|
8340
|
+
this.incompatibleMods.add(ModRelax).add(ModAuto);
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
|
|
8344
|
+
/**
|
|
8345
|
+
* Represents the Auto mod.
|
|
8346
|
+
*/
|
|
8347
|
+
class ModAuto extends Mod {
|
|
8348
|
+
constructor() {
|
|
8349
|
+
super();
|
|
8350
|
+
this.acronym = "AT";
|
|
8351
|
+
this.name = "Autoplay";
|
|
8352
|
+
this.droidRanked = false;
|
|
8353
|
+
this.droidScoreMultiplier = 1;
|
|
8354
|
+
this.droidString = "a";
|
|
8355
|
+
this.isDroidLegacyMod = false;
|
|
8356
|
+
this.pcRanked = false;
|
|
8357
|
+
this.pcScoreMultiplier = 1;
|
|
8358
|
+
this.bitwise = 1 << 11;
|
|
8359
|
+
this.incompatibleMods.add(ModAutopilot).add(ModRelax);
|
|
8360
|
+
}
|
|
8361
|
+
}
|
|
8362
|
+
|
|
8363
|
+
/**
|
|
8364
|
+
* Represents a `Mod` that adjusts the playback rate of a track.
|
|
8365
|
+
*/
|
|
8366
|
+
class ModRateAdjust extends Mod {
|
|
8367
|
+
constructor() {
|
|
8368
|
+
super();
|
|
8369
|
+
this.incompatibleMods.add(ModRateAdjust);
|
|
8327
8370
|
}
|
|
8328
8371
|
}
|
|
8329
8372
|
|
|
8330
8373
|
/**
|
|
8331
8374
|
* Represents the DoubleTime mod.
|
|
8332
8375
|
*/
|
|
8333
|
-
class ModDoubleTime extends
|
|
8376
|
+
class ModDoubleTime extends ModRateAdjust {
|
|
8334
8377
|
constructor() {
|
|
8335
8378
|
super(...arguments);
|
|
8336
8379
|
this.acronym = "DT";
|
|
@@ -8348,12 +8391,73 @@ class ModDoubleTime extends Mod {
|
|
|
8348
8391
|
}
|
|
8349
8392
|
}
|
|
8350
8393
|
|
|
8394
|
+
/**
|
|
8395
|
+
* Represents the HardRock mod.
|
|
8396
|
+
*/
|
|
8397
|
+
class ModHardRock extends Mod {
|
|
8398
|
+
constructor() {
|
|
8399
|
+
super();
|
|
8400
|
+
this.acronym = "HR";
|
|
8401
|
+
this.name = "HardRock";
|
|
8402
|
+
this.droidRanked = true;
|
|
8403
|
+
this.droidScoreMultiplier = 1.06;
|
|
8404
|
+
this.droidString = "r";
|
|
8405
|
+
this.isDroidLegacyMod = false;
|
|
8406
|
+
this.pcRanked = true;
|
|
8407
|
+
this.pcScoreMultiplier = 1.06;
|
|
8408
|
+
this.bitwise = 1 << 4;
|
|
8409
|
+
this.incompatibleMods.add(ModEasy);
|
|
8410
|
+
}
|
|
8411
|
+
applyToDifficulty(mode, difficulty) {
|
|
8412
|
+
switch (mode) {
|
|
8413
|
+
case exports.Modes.droid: {
|
|
8414
|
+
const scale = CircleSizeCalculator.droidCSToDroidScale(difficulty.cs);
|
|
8415
|
+
difficulty.cs = CircleSizeCalculator.droidScaleToDroidCS(scale - 0.125);
|
|
8416
|
+
break;
|
|
8417
|
+
}
|
|
8418
|
+
case exports.Modes.osu:
|
|
8419
|
+
// CS uses a custom 1.3 ratio.
|
|
8420
|
+
difficulty.cs = this.applySetting(difficulty.cs, 1.3);
|
|
8421
|
+
break;
|
|
8422
|
+
}
|
|
8423
|
+
difficulty.ar = this.applySetting(difficulty.ar);
|
|
8424
|
+
difficulty.od = this.applySetting(difficulty.od);
|
|
8425
|
+
difficulty.hp = this.applySetting(difficulty.hp);
|
|
8426
|
+
}
|
|
8427
|
+
applyToHitObject(_, hitObject) {
|
|
8428
|
+
// Reflect the position of the hit object.
|
|
8429
|
+
hitObject.position = this.reflectVector(hitObject.position);
|
|
8430
|
+
if (!(hitObject instanceof Slider)) {
|
|
8431
|
+
return;
|
|
8432
|
+
}
|
|
8433
|
+
// Reflect the control points of the slider. This will reflect the positions of head and tail circles.
|
|
8434
|
+
hitObject.path = new SliderPath({
|
|
8435
|
+
pathType: hitObject.path.pathType,
|
|
8436
|
+
controlPoints: hitObject.path.controlPoints.map((v) => this.reflectControlPoint(v)),
|
|
8437
|
+
expectedDistance: hitObject.path.expectedDistance,
|
|
8438
|
+
});
|
|
8439
|
+
// Reflect the position of slider ticks and repeats.
|
|
8440
|
+
hitObject.nestedHitObjects.slice(1, -1).forEach((obj) => {
|
|
8441
|
+
obj.position = this.reflectVector(obj.position);
|
|
8442
|
+
});
|
|
8443
|
+
}
|
|
8444
|
+
reflectVector(vector) {
|
|
8445
|
+
return new Vector2(vector.x, Playfield.baseSize.y - vector.y);
|
|
8446
|
+
}
|
|
8447
|
+
reflectControlPoint(vector) {
|
|
8448
|
+
return new Vector2(vector.x, -vector.y);
|
|
8449
|
+
}
|
|
8450
|
+
applySetting(value, ratio = 1.4) {
|
|
8451
|
+
return Math.min(value * ratio, 10);
|
|
8452
|
+
}
|
|
8453
|
+
}
|
|
8454
|
+
|
|
8351
8455
|
/**
|
|
8352
8456
|
* Represents the Easy mod.
|
|
8353
8457
|
*/
|
|
8354
8458
|
class ModEasy extends Mod {
|
|
8355
8459
|
constructor() {
|
|
8356
|
-
super(
|
|
8460
|
+
super();
|
|
8357
8461
|
this.acronym = "EZ";
|
|
8358
8462
|
this.name = "Easy";
|
|
8359
8463
|
this.droidRanked = true;
|
|
@@ -8363,6 +8467,7 @@ class ModEasy extends Mod {
|
|
|
8363
8467
|
this.pcRanked = true;
|
|
8364
8468
|
this.pcScoreMultiplier = 0.5;
|
|
8365
8469
|
this.bitwise = 1 << 1;
|
|
8470
|
+
this.incompatibleMods.add(ModHardRock);
|
|
8366
8471
|
}
|
|
8367
8472
|
applyToDifficulty(mode, difficulty) {
|
|
8368
8473
|
switch (mode) {
|
|
@@ -8401,7 +8506,7 @@ class ModFlashlight extends Mod {
|
|
|
8401
8506
|
/**
|
|
8402
8507
|
* Represents the HalfTime mod.
|
|
8403
8508
|
*/
|
|
8404
|
-
class ModHalfTime extends
|
|
8509
|
+
class ModHalfTime extends ModRateAdjust {
|
|
8405
8510
|
constructor() {
|
|
8406
8511
|
super(...arguments);
|
|
8407
8512
|
this.acronym = "HT";
|
|
@@ -8420,62 +8525,20 @@ class ModHalfTime extends Mod {
|
|
|
8420
8525
|
}
|
|
8421
8526
|
|
|
8422
8527
|
/**
|
|
8423
|
-
* Represents the
|
|
8528
|
+
* Represents the Traceable mod.
|
|
8424
8529
|
*/
|
|
8425
|
-
class
|
|
8530
|
+
class ModTraceable extends Mod {
|
|
8426
8531
|
constructor() {
|
|
8427
|
-
super(
|
|
8428
|
-
this.acronym = "
|
|
8429
|
-
this.name = "
|
|
8430
|
-
this.droidRanked =
|
|
8532
|
+
super();
|
|
8533
|
+
this.acronym = "TC";
|
|
8534
|
+
this.name = "Traceable";
|
|
8535
|
+
this.droidRanked = false;
|
|
8431
8536
|
this.droidScoreMultiplier = 1.06;
|
|
8432
|
-
this.droidString = "
|
|
8537
|
+
this.droidString = "b";
|
|
8433
8538
|
this.isDroidLegacyMod = false;
|
|
8434
|
-
this.pcRanked =
|
|
8435
|
-
this.pcScoreMultiplier = 1
|
|
8436
|
-
this.
|
|
8437
|
-
}
|
|
8438
|
-
applyToDifficulty(mode, difficulty) {
|
|
8439
|
-
switch (mode) {
|
|
8440
|
-
case exports.Modes.droid: {
|
|
8441
|
-
const scale = CircleSizeCalculator.droidCSToDroidScale(difficulty.cs);
|
|
8442
|
-
difficulty.cs = CircleSizeCalculator.droidScaleToDroidCS(scale - 0.125);
|
|
8443
|
-
break;
|
|
8444
|
-
}
|
|
8445
|
-
case exports.Modes.osu:
|
|
8446
|
-
// CS uses a custom 1.3 ratio.
|
|
8447
|
-
difficulty.cs = this.applySetting(difficulty.cs, 1.3);
|
|
8448
|
-
break;
|
|
8449
|
-
}
|
|
8450
|
-
difficulty.ar = this.applySetting(difficulty.ar);
|
|
8451
|
-
difficulty.od = this.applySetting(difficulty.od);
|
|
8452
|
-
difficulty.hp = this.applySetting(difficulty.hp);
|
|
8453
|
-
}
|
|
8454
|
-
applyToHitObject(_, hitObject) {
|
|
8455
|
-
// Reflect the position of the hit object.
|
|
8456
|
-
hitObject.position = this.reflectVector(hitObject.position);
|
|
8457
|
-
if (!(hitObject instanceof Slider)) {
|
|
8458
|
-
return;
|
|
8459
|
-
}
|
|
8460
|
-
// Reflect the control points of the slider. This will reflect the positions of head and tail circles.
|
|
8461
|
-
hitObject.path = new SliderPath({
|
|
8462
|
-
pathType: hitObject.path.pathType,
|
|
8463
|
-
controlPoints: hitObject.path.controlPoints.map((v) => this.reflectControlPoint(v)),
|
|
8464
|
-
expectedDistance: hitObject.path.expectedDistance,
|
|
8465
|
-
});
|
|
8466
|
-
// Reflect the position of slider ticks and repeats.
|
|
8467
|
-
hitObject.nestedHitObjects.slice(1, -1).forEach((obj) => {
|
|
8468
|
-
obj.position = this.reflectVector(obj.position);
|
|
8469
|
-
});
|
|
8470
|
-
}
|
|
8471
|
-
reflectVector(vector) {
|
|
8472
|
-
return new Vector2(vector.x, Playfield.baseSize.y - vector.y);
|
|
8473
|
-
}
|
|
8474
|
-
reflectControlPoint(vector) {
|
|
8475
|
-
return new Vector2(vector.x, -vector.y);
|
|
8476
|
-
}
|
|
8477
|
-
applySetting(value, ratio = 1.4) {
|
|
8478
|
-
return Math.min(value * ratio, 10);
|
|
8539
|
+
this.pcRanked = false;
|
|
8540
|
+
this.pcScoreMultiplier = 1;
|
|
8541
|
+
this.incompatibleMods.add(ModHidden);
|
|
8479
8542
|
}
|
|
8480
8543
|
}
|
|
8481
8544
|
|
|
@@ -8484,7 +8547,7 @@ class ModHardRock extends Mod {
|
|
|
8484
8547
|
*/
|
|
8485
8548
|
class ModHidden extends Mod {
|
|
8486
8549
|
constructor() {
|
|
8487
|
-
super(
|
|
8550
|
+
super();
|
|
8488
8551
|
this.acronym = "HD";
|
|
8489
8552
|
this.name = "Hidden";
|
|
8490
8553
|
this.droidRanked = true;
|
|
@@ -8494,6 +8557,7 @@ class ModHidden extends Mod {
|
|
|
8494
8557
|
this.pcRanked = true;
|
|
8495
8558
|
this.pcScoreMultiplier = 1.06;
|
|
8496
8559
|
this.bitwise = 1 << 3;
|
|
8560
|
+
this.incompatibleMods.add(ModTraceable);
|
|
8497
8561
|
}
|
|
8498
8562
|
applyToBeatmap(beatmap) {
|
|
8499
8563
|
const applyFadeInAdjustment = (hitObject) => {
|
|
@@ -8512,7 +8576,7 @@ ModHidden.fadeOutDurationMultiplier = 0.3;
|
|
|
8512
8576
|
/**
|
|
8513
8577
|
* Represents the NightCore mod.
|
|
8514
8578
|
*/
|
|
8515
|
-
class ModNightCore extends
|
|
8579
|
+
class ModNightCore extends ModRateAdjust {
|
|
8516
8580
|
constructor() {
|
|
8517
8581
|
super(...arguments);
|
|
8518
8582
|
this.acronym = "NC";
|
|
@@ -8531,20 +8595,21 @@ class ModNightCore extends Mod {
|
|
|
8531
8595
|
}
|
|
8532
8596
|
|
|
8533
8597
|
/**
|
|
8534
|
-
* Represents the
|
|
8598
|
+
* Represents the SuddenDeath mod.
|
|
8535
8599
|
*/
|
|
8536
|
-
class
|
|
8600
|
+
class ModSuddenDeath extends Mod {
|
|
8537
8601
|
constructor() {
|
|
8538
|
-
super(
|
|
8539
|
-
this.acronym = "
|
|
8540
|
-
this.name = "
|
|
8602
|
+
super();
|
|
8603
|
+
this.acronym = "SD";
|
|
8604
|
+
this.name = "Sudden Death";
|
|
8541
8605
|
this.droidRanked = true;
|
|
8542
|
-
this.droidScoreMultiplier =
|
|
8543
|
-
this.droidString = "
|
|
8606
|
+
this.droidScoreMultiplier = 1;
|
|
8607
|
+
this.droidString = "u";
|
|
8544
8608
|
this.isDroidLegacyMod = false;
|
|
8545
8609
|
this.pcRanked = true;
|
|
8546
|
-
this.pcScoreMultiplier =
|
|
8547
|
-
this.bitwise = 1 <<
|
|
8610
|
+
this.pcScoreMultiplier = 1;
|
|
8611
|
+
this.bitwise = 1 << 5;
|
|
8612
|
+
this.incompatibleMods.add(ModNoFail).add(ModPerfect);
|
|
8548
8613
|
}
|
|
8549
8614
|
}
|
|
8550
8615
|
|
|
@@ -8553,7 +8618,7 @@ class ModNoFail extends Mod {
|
|
|
8553
8618
|
*/
|
|
8554
8619
|
class ModPerfect extends Mod {
|
|
8555
8620
|
constructor() {
|
|
8556
|
-
super(
|
|
8621
|
+
super();
|
|
8557
8622
|
this.acronym = "PF";
|
|
8558
8623
|
this.name = "Perfect";
|
|
8559
8624
|
this.droidRanked = true;
|
|
@@ -8563,6 +8628,26 @@ class ModPerfect extends Mod {
|
|
|
8563
8628
|
this.pcRanked = true;
|
|
8564
8629
|
this.pcScoreMultiplier = 1;
|
|
8565
8630
|
this.bitwise = 1 << 14;
|
|
8631
|
+
this.incompatibleMods.add(ModNoFail).add(ModSuddenDeath);
|
|
8632
|
+
}
|
|
8633
|
+
}
|
|
8634
|
+
|
|
8635
|
+
/**
|
|
8636
|
+
* Represents the NoFail mod.
|
|
8637
|
+
*/
|
|
8638
|
+
class ModNoFail extends Mod {
|
|
8639
|
+
constructor() {
|
|
8640
|
+
super();
|
|
8641
|
+
this.acronym = "NF";
|
|
8642
|
+
this.name = "NoFail";
|
|
8643
|
+
this.droidRanked = true;
|
|
8644
|
+
this.droidScoreMultiplier = 0.5;
|
|
8645
|
+
this.droidString = "n";
|
|
8646
|
+
this.isDroidLegacyMod = false;
|
|
8647
|
+
this.pcRanked = true;
|
|
8648
|
+
this.pcScoreMultiplier = 0.5;
|
|
8649
|
+
this.bitwise = 1 << 0;
|
|
8650
|
+
this.incompatibleMods.add(ModPerfect).add(ModSuddenDeath);
|
|
8566
8651
|
}
|
|
8567
8652
|
}
|
|
8568
8653
|
|
|
@@ -8675,24 +8760,6 @@ class ModReallyEasy extends Mod {
|
|
|
8675
8760
|
}
|
|
8676
8761
|
}
|
|
8677
8762
|
|
|
8678
|
-
/**
|
|
8679
|
-
* Represents the Relax mod.
|
|
8680
|
-
*/
|
|
8681
|
-
class ModRelax extends Mod {
|
|
8682
|
-
constructor() {
|
|
8683
|
-
super(...arguments);
|
|
8684
|
-
this.acronym = "RX";
|
|
8685
|
-
this.name = "Relax";
|
|
8686
|
-
this.droidRanked = false;
|
|
8687
|
-
this.droidScoreMultiplier = 0.001;
|
|
8688
|
-
this.droidString = "x";
|
|
8689
|
-
this.isDroidLegacyMod = false;
|
|
8690
|
-
this.pcRanked = false;
|
|
8691
|
-
this.pcScoreMultiplier = 0;
|
|
8692
|
-
this.bitwise = 1 << 7;
|
|
8693
|
-
}
|
|
8694
|
-
}
|
|
8695
|
-
|
|
8696
8763
|
/**
|
|
8697
8764
|
* Represents the SmallCircle mod.
|
|
8698
8765
|
*
|
|
@@ -8725,25 +8792,6 @@ class ModSmallCircle extends Mod {
|
|
|
8725
8792
|
}
|
|
8726
8793
|
}
|
|
8727
8794
|
|
|
8728
|
-
/**
|
|
8729
|
-
* Represents the SpeedUp mod.
|
|
8730
|
-
*/
|
|
8731
|
-
class ModSpeedUp extends Mod {
|
|
8732
|
-
constructor() {
|
|
8733
|
-
super(...arguments);
|
|
8734
|
-
this.acronym = "SU";
|
|
8735
|
-
this.name = "Speed Up";
|
|
8736
|
-
this.droidRanked = false;
|
|
8737
|
-
this.droidScoreMultiplier = 1.06;
|
|
8738
|
-
this.droidString = "b";
|
|
8739
|
-
this.isDroidLegacyMod = true;
|
|
8740
|
-
this.trackRateMultiplier = 1.25;
|
|
8741
|
-
}
|
|
8742
|
-
applyToRate(rate) {
|
|
8743
|
-
return rate * 1.25;
|
|
8744
|
-
}
|
|
8745
|
-
}
|
|
8746
|
-
|
|
8747
8795
|
/**
|
|
8748
8796
|
* Represents the SpunOut mod.
|
|
8749
8797
|
*/
|
|
@@ -8758,24 +8806,6 @@ class ModSpunOut extends Mod {
|
|
|
8758
8806
|
}
|
|
8759
8807
|
}
|
|
8760
8808
|
|
|
8761
|
-
/**
|
|
8762
|
-
* Represents the SuddenDeath mod.
|
|
8763
|
-
*/
|
|
8764
|
-
class ModSuddenDeath extends Mod {
|
|
8765
|
-
constructor() {
|
|
8766
|
-
super(...arguments);
|
|
8767
|
-
this.acronym = "SD";
|
|
8768
|
-
this.name = "Sudden Death";
|
|
8769
|
-
this.droidRanked = true;
|
|
8770
|
-
this.droidScoreMultiplier = 1;
|
|
8771
|
-
this.droidString = "u";
|
|
8772
|
-
this.isDroidLegacyMod = false;
|
|
8773
|
-
this.pcRanked = true;
|
|
8774
|
-
this.pcScoreMultiplier = 1;
|
|
8775
|
-
this.bitwise = 1 << 5;
|
|
8776
|
-
}
|
|
8777
|
-
}
|
|
8778
|
-
|
|
8779
8809
|
/**
|
|
8780
8810
|
* Represents the TouchDevice mod.
|
|
8781
8811
|
*/
|
|
@@ -8790,7 +8820,6 @@ class ModTouchDevice extends Mod {
|
|
|
8790
8820
|
}
|
|
8791
8821
|
}
|
|
8792
8822
|
|
|
8793
|
-
var _a;
|
|
8794
8823
|
/**
|
|
8795
8824
|
* Utilities for mods.
|
|
8796
8825
|
*/
|
|
@@ -8812,7 +8841,7 @@ class ModUtil {
|
|
|
8812
8841
|
* @param options Options for parsing behavior.
|
|
8813
8842
|
*/
|
|
8814
8843
|
static pcModbitsToMods(modbits, options) {
|
|
8815
|
-
return this.processParsingOptions(this.allMods.filter((m) => m.
|
|
8844
|
+
return this.processParsingOptions(this.allMods.filter((m) => m.isApplicableToOsuStable() && (m.bitwise & modbits) > 0), options);
|
|
8816
8845
|
}
|
|
8817
8846
|
/**
|
|
8818
8847
|
* Gets a list of mods from a PC mod string, such as "HDHR".
|
|
@@ -8875,12 +8904,14 @@ class ModUtil {
|
|
|
8875
8904
|
* @returns Mods that have been filtered.
|
|
8876
8905
|
*/
|
|
8877
8906
|
static checkIncompatibleMods(mods) {
|
|
8878
|
-
for (
|
|
8879
|
-
const
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8907
|
+
for (let i = 0; i < mods.length; ++i) {
|
|
8908
|
+
const mod = mods[i];
|
|
8909
|
+
for (const incompatibleMod of mod.incompatibleMods) {
|
|
8910
|
+
if (mods.some((m) => m !== mod && m instanceof incompatibleMod)) {
|
|
8911
|
+
mods = mods.filter((m) =>
|
|
8912
|
+
// Keep the mod itself.
|
|
8913
|
+
m === mod || !(m instanceof incompatibleMod));
|
|
8914
|
+
}
|
|
8884
8915
|
}
|
|
8885
8916
|
}
|
|
8886
8917
|
return mods;
|
|
@@ -8892,9 +8923,7 @@ class ModUtil {
|
|
|
8892
8923
|
* @returns A new array with speed changing mods filtered out.
|
|
8893
8924
|
*/
|
|
8894
8925
|
static removeSpeedChangingMods(mods) {
|
|
8895
|
-
return mods
|
|
8896
|
-
.slice()
|
|
8897
|
-
.filter((m) => !this.speedChangingMods.some((v) => m.acronym === v.acronym));
|
|
8926
|
+
return mods.filter((m) => !this.speedChangingMods.some((v) => m.acronym === v.acronym));
|
|
8898
8927
|
}
|
|
8899
8928
|
/**
|
|
8900
8929
|
* Applies the selected `Mod`s to a `BeatmapDifficulty`.
|
|
@@ -8978,21 +9007,6 @@ class ModUtil {
|
|
|
8978
9007
|
return mods;
|
|
8979
9008
|
}
|
|
8980
9009
|
}
|
|
8981
|
-
_a = ModUtil;
|
|
8982
|
-
/**
|
|
8983
|
-
* Mods that are incompatible with each other.
|
|
8984
|
-
*/
|
|
8985
|
-
ModUtil.incompatibleMods = [
|
|
8986
|
-
[
|
|
8987
|
-
new ModDoubleTime(),
|
|
8988
|
-
new ModNightCore(),
|
|
8989
|
-
new ModHalfTime(),
|
|
8990
|
-
new ModSpeedUp(),
|
|
8991
|
-
],
|
|
8992
|
-
[new ModNoFail(), new ModSuddenDeath(), new ModPerfect()],
|
|
8993
|
-
[new ModHardRock(), new ModEasy()],
|
|
8994
|
-
[new ModAuto(), new ModRelax(), new ModAutopilot()],
|
|
8995
|
-
];
|
|
8996
9010
|
/**
|
|
8997
9011
|
* All mods that exists.
|
|
8998
9012
|
*/
|
|
@@ -9004,11 +9018,11 @@ ModUtil.allMods = [
|
|
|
9004
9018
|
new ModEasy(),
|
|
9005
9019
|
new ModNoFail(),
|
|
9006
9020
|
new ModHidden(),
|
|
9021
|
+
new ModTraceable(),
|
|
9007
9022
|
new ModHardRock(),
|
|
9008
9023
|
new ModDoubleTime(),
|
|
9009
9024
|
new ModNightCore(),
|
|
9010
9025
|
new ModHalfTime(),
|
|
9011
|
-
new ModSpeedUp(),
|
|
9012
9026
|
new ModFlashlight(),
|
|
9013
9027
|
new ModSuddenDeath(),
|
|
9014
9028
|
new ModPerfect(),
|
|
@@ -9026,12 +9040,7 @@ ModUtil.speedChangingMods = [
|
|
|
9026
9040
|
new ModDoubleTime(),
|
|
9027
9041
|
new ModNightCore(),
|
|
9028
9042
|
new ModHalfTime(),
|
|
9029
|
-
new ModSpeedUp(),
|
|
9030
9043
|
];
|
|
9031
|
-
/**
|
|
9032
|
-
* Mods that change the way the map looks.
|
|
9033
|
-
*/
|
|
9034
|
-
ModUtil.mapChangingMods = _a.speedChangingMods.concat(new ModEasy(), new ModHardRock(), new ModReallyEasy(), new ModSmallCircle());
|
|
9035
9044
|
|
|
9036
9045
|
/**
|
|
9037
9046
|
* Represents the difficulty adjust (DA) mod.
|
|
@@ -9049,7 +9058,6 @@ class ModDifficultyAdjust extends Mod {
|
|
|
9049
9058
|
this.isDroidLegacyMod = false;
|
|
9050
9059
|
this.pcRanked = false;
|
|
9051
9060
|
this.pcScoreMultiplier = 1;
|
|
9052
|
-
this.bitwise = 0;
|
|
9053
9061
|
this.cs = values === null || values === void 0 ? void 0 : values.cs;
|
|
9054
9062
|
this.ar = values === null || values === void 0 ? void 0 : values.ar;
|
|
9055
9063
|
this.od = values === null || values === void 0 ? void 0 : values.od;
|
|
@@ -9203,14 +9211,15 @@ exports.ModNightCore = ModNightCore;
|
|
|
9203
9211
|
exports.ModNoFail = ModNoFail;
|
|
9204
9212
|
exports.ModPerfect = ModPerfect;
|
|
9205
9213
|
exports.ModPrecise = ModPrecise;
|
|
9214
|
+
exports.ModRateAdjust = ModRateAdjust;
|
|
9206
9215
|
exports.ModReallyEasy = ModReallyEasy;
|
|
9207
9216
|
exports.ModRelax = ModRelax;
|
|
9208
9217
|
exports.ModScoreV2 = ModScoreV2;
|
|
9209
9218
|
exports.ModSmallCircle = ModSmallCircle;
|
|
9210
|
-
exports.ModSpeedUp = ModSpeedUp;
|
|
9211
9219
|
exports.ModSpunOut = ModSpunOut;
|
|
9212
9220
|
exports.ModSuddenDeath = ModSuddenDeath;
|
|
9213
9221
|
exports.ModTouchDevice = ModTouchDevice;
|
|
9222
|
+
exports.ModTraceable = ModTraceable;
|
|
9214
9223
|
exports.ModUtil = ModUtil;
|
|
9215
9224
|
exports.NormalDistribution = NormalDistribution;
|
|
9216
9225
|
exports.OsuAPIRequestBuilder = OsuAPIRequestBuilder;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-base",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.52",
|
|
4
4
|
"description": "Base module for all osu! related modules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c7cd2019227c891e7897245ee61d1e24d7a5fb9c"
|
|
39
39
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -998,6 +998,12 @@ interface IModApplicableToOsu {
|
|
|
998
998
|
* The osu!standard score multiplier of this `Mod`.
|
|
999
999
|
*/
|
|
1000
1000
|
readonly pcScoreMultiplier: number;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* An interface denoting that a `Mod` can be applied to osu!standard, specifically the osu!stable client.
|
|
1005
|
+
*/
|
|
1006
|
+
interface IModApplicableToOsuStable extends IModApplicableToOsu {
|
|
1001
1007
|
/**
|
|
1002
1008
|
* The bitwise enum of this `Mod`.
|
|
1003
1009
|
*/
|
|
@@ -1030,6 +1036,10 @@ declare abstract class Mod {
|
|
|
1030
1036
|
* The name of this `Mod`.
|
|
1031
1037
|
*/
|
|
1032
1038
|
abstract readonly name: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* `Mod`s that are incompatible with this `Mod`.
|
|
1041
|
+
*/
|
|
1042
|
+
readonly incompatibleMods: Set<typeof Mod>;
|
|
1033
1043
|
/**
|
|
1034
1044
|
* Whether this `Mod` can be applied to osu!droid.
|
|
1035
1045
|
*/
|
|
@@ -1038,6 +1048,10 @@ declare abstract class Mod {
|
|
|
1038
1048
|
* Whether this `Mod` can be applied to osu!standard.
|
|
1039
1049
|
*/
|
|
1040
1050
|
isApplicableToOsu(): this is this & IModApplicableToOsu;
|
|
1051
|
+
/**
|
|
1052
|
+
* Whether this `Mod` can be applied to osu!standard, specifically the osu!stable client.
|
|
1053
|
+
*/
|
|
1054
|
+
isApplicableToOsuStable(): this is this & IModApplicableToOsuStable;
|
|
1041
1055
|
/**
|
|
1042
1056
|
* Whether this `Mod` can be applied to a `Beatmap`.
|
|
1043
1057
|
*/
|
|
@@ -3921,7 +3935,7 @@ declare abstract class MathUtils {
|
|
|
3921
3935
|
/**
|
|
3922
3936
|
* Represents the Auto mod.
|
|
3923
3937
|
*/
|
|
3924
|
-
declare class ModAuto extends Mod implements IModApplicableToDroid,
|
|
3938
|
+
declare class ModAuto extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
3925
3939
|
readonly acronym = "AT";
|
|
3926
3940
|
readonly name = "Autoplay";
|
|
3927
3941
|
readonly droidRanked = false;
|
|
@@ -3931,12 +3945,13 @@ declare class ModAuto extends Mod implements IModApplicableToDroid, IModApplicab
|
|
|
3931
3945
|
readonly pcRanked = false;
|
|
3932
3946
|
readonly pcScoreMultiplier = 1;
|
|
3933
3947
|
readonly bitwise: number;
|
|
3948
|
+
constructor();
|
|
3934
3949
|
}
|
|
3935
3950
|
|
|
3936
3951
|
/**
|
|
3937
3952
|
* Represents the Autopilot mod.
|
|
3938
3953
|
*/
|
|
3939
|
-
declare class ModAutopilot extends Mod implements IModApplicableToDroid,
|
|
3954
|
+
declare class ModAutopilot extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
3940
3955
|
readonly acronym = "AP";
|
|
3941
3956
|
readonly name = "Autopilot";
|
|
3942
3957
|
readonly droidRanked = false;
|
|
@@ -3946,6 +3961,7 @@ declare class ModAutopilot extends Mod implements IModApplicableToDroid, IModApp
|
|
|
3946
3961
|
readonly pcRanked = false;
|
|
3947
3962
|
readonly pcScoreMultiplier = 0;
|
|
3948
3963
|
readonly bitwise: number;
|
|
3964
|
+
constructor();
|
|
3949
3965
|
}
|
|
3950
3966
|
|
|
3951
3967
|
/**
|
|
@@ -3962,7 +3978,6 @@ declare class ModDifficultyAdjust extends Mod implements IModApplicableToDroid,
|
|
|
3962
3978
|
readonly isDroidLegacyMod = false;
|
|
3963
3979
|
readonly pcRanked = false;
|
|
3964
3980
|
readonly pcScoreMultiplier = 1;
|
|
3965
|
-
readonly bitwise = 0;
|
|
3966
3981
|
/**
|
|
3967
3982
|
* The circle size to enforce.
|
|
3968
3983
|
*/
|
|
@@ -3990,10 +4005,18 @@ declare class ModDifficultyAdjust extends Mod implements IModApplicableToDroid,
|
|
|
3990
4005
|
private calculateTrackRate;
|
|
3991
4006
|
}
|
|
3992
4007
|
|
|
4008
|
+
/**
|
|
4009
|
+
* Represents a `Mod` that adjusts the playback rate of a track.
|
|
4010
|
+
*/
|
|
4011
|
+
declare abstract class ModRateAdjust extends Mod implements IModApplicableToTrackRate {
|
|
4012
|
+
constructor();
|
|
4013
|
+
abstract applyToRate(rate: number, oldStatistics?: boolean): number;
|
|
4014
|
+
}
|
|
4015
|
+
|
|
3993
4016
|
/**
|
|
3994
4017
|
* Represents the DoubleTime mod.
|
|
3995
4018
|
*/
|
|
3996
|
-
declare class ModDoubleTime extends
|
|
4019
|
+
declare class ModDoubleTime extends ModRateAdjust implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
3997
4020
|
readonly acronym = "DT";
|
|
3998
4021
|
readonly name = "DoubleTime";
|
|
3999
4022
|
readonly droidRanked = true;
|
|
@@ -4009,7 +4032,7 @@ declare class ModDoubleTime extends Mod implements IModApplicableToDroid, IModAp
|
|
|
4009
4032
|
/**
|
|
4010
4033
|
* Represents the Easy mod.
|
|
4011
4034
|
*/
|
|
4012
|
-
declare class ModEasy extends Mod implements IModApplicableToDroid,
|
|
4035
|
+
declare class ModEasy extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable, IModApplicableToDifficulty {
|
|
4013
4036
|
readonly acronym = "EZ";
|
|
4014
4037
|
readonly name = "Easy";
|
|
4015
4038
|
readonly droidRanked = true;
|
|
@@ -4019,13 +4042,14 @@ declare class ModEasy extends Mod implements IModApplicableToDroid, IModApplicab
|
|
|
4019
4042
|
readonly pcRanked = true;
|
|
4020
4043
|
readonly pcScoreMultiplier = 0.5;
|
|
4021
4044
|
readonly bitwise: number;
|
|
4045
|
+
constructor();
|
|
4022
4046
|
applyToDifficulty(mode: Modes, difficulty: BeatmapDifficulty): void;
|
|
4023
4047
|
}
|
|
4024
4048
|
|
|
4025
4049
|
/**
|
|
4026
4050
|
* Represents the Flashlight mod.
|
|
4027
4051
|
*/
|
|
4028
|
-
declare class ModFlashlight extends Mod implements IModApplicableToDroid,
|
|
4052
|
+
declare class ModFlashlight extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4029
4053
|
readonly acronym = "FL";
|
|
4030
4054
|
readonly name = "Flashlight";
|
|
4031
4055
|
readonly droidRanked = true;
|
|
@@ -4040,7 +4064,7 @@ declare class ModFlashlight extends Mod implements IModApplicableToDroid, IModAp
|
|
|
4040
4064
|
/**
|
|
4041
4065
|
* Represents the HalfTime mod.
|
|
4042
4066
|
*/
|
|
4043
|
-
declare class ModHalfTime extends
|
|
4067
|
+
declare class ModHalfTime extends ModRateAdjust implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4044
4068
|
readonly acronym = "HT";
|
|
4045
4069
|
readonly name = "HalfTime";
|
|
4046
4070
|
readonly droidRanked = true;
|
|
@@ -4056,7 +4080,7 @@ declare class ModHalfTime extends Mod implements IModApplicableToDroid, IModAppl
|
|
|
4056
4080
|
/**
|
|
4057
4081
|
* Represents the HardRock mod.
|
|
4058
4082
|
*/
|
|
4059
|
-
declare class ModHardRock extends Mod implements IModApplicableToDroid,
|
|
4083
|
+
declare class ModHardRock extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable, IModApplicableToDifficulty, IModApplicableToHitObject {
|
|
4060
4084
|
readonly acronym = "HR";
|
|
4061
4085
|
readonly name = "HardRock";
|
|
4062
4086
|
readonly droidRanked = true;
|
|
@@ -4066,6 +4090,7 @@ declare class ModHardRock extends Mod implements IModApplicableToDroid, IModAppl
|
|
|
4066
4090
|
readonly pcRanked = true;
|
|
4067
4091
|
readonly pcScoreMultiplier = 1.06;
|
|
4068
4092
|
readonly bitwise: number;
|
|
4093
|
+
constructor();
|
|
4069
4094
|
applyToDifficulty(mode: Modes, difficulty: BeatmapDifficulty): void;
|
|
4070
4095
|
applyToHitObject(_: Modes, hitObject: HitObject): void;
|
|
4071
4096
|
private reflectVector;
|
|
@@ -4076,7 +4101,7 @@ declare class ModHardRock extends Mod implements IModApplicableToDroid, IModAppl
|
|
|
4076
4101
|
/**
|
|
4077
4102
|
* Represents the Hidden mod.
|
|
4078
4103
|
*/
|
|
4079
|
-
declare class ModHidden extends Mod implements IModApplicableToDroid,
|
|
4104
|
+
declare class ModHidden extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable, IModApplicableToBeatmap {
|
|
4080
4105
|
static readonly fadeInDurationMultiplier = 0.4;
|
|
4081
4106
|
static readonly fadeOutDurationMultiplier = 0.3;
|
|
4082
4107
|
readonly acronym = "HD";
|
|
@@ -4088,13 +4113,14 @@ declare class ModHidden extends Mod implements IModApplicableToDroid, IModApplic
|
|
|
4088
4113
|
readonly pcRanked = true;
|
|
4089
4114
|
readonly pcScoreMultiplier = 1.06;
|
|
4090
4115
|
readonly bitwise: number;
|
|
4116
|
+
constructor();
|
|
4091
4117
|
applyToBeatmap(beatmap: Beatmap): void;
|
|
4092
4118
|
}
|
|
4093
4119
|
|
|
4094
4120
|
/**
|
|
4095
4121
|
* Represents the NightCore mod.
|
|
4096
4122
|
*/
|
|
4097
|
-
declare class ModNightCore extends
|
|
4123
|
+
declare class ModNightCore extends ModRateAdjust implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4098
4124
|
readonly acronym = "NC";
|
|
4099
4125
|
readonly name = "NightCore";
|
|
4100
4126
|
readonly droidRanked = true;
|
|
@@ -4110,7 +4136,7 @@ declare class ModNightCore extends Mod implements IModApplicableToDroid, IModApp
|
|
|
4110
4136
|
/**
|
|
4111
4137
|
* Represents the NoFail mod.
|
|
4112
4138
|
*/
|
|
4113
|
-
declare class ModNoFail extends Mod implements IModApplicableToDroid,
|
|
4139
|
+
declare class ModNoFail extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4114
4140
|
readonly acronym = "NF";
|
|
4115
4141
|
readonly name = "NoFail";
|
|
4116
4142
|
readonly droidRanked = true;
|
|
@@ -4120,12 +4146,13 @@ declare class ModNoFail extends Mod implements IModApplicableToDroid, IModApplic
|
|
|
4120
4146
|
readonly pcRanked = true;
|
|
4121
4147
|
readonly pcScoreMultiplier = 0.5;
|
|
4122
4148
|
readonly bitwise: number;
|
|
4149
|
+
constructor();
|
|
4123
4150
|
}
|
|
4124
4151
|
|
|
4125
4152
|
/**
|
|
4126
4153
|
* Represents the Perfect mod.
|
|
4127
4154
|
*/
|
|
4128
|
-
declare class ModPerfect extends Mod implements IModApplicableToDroid,
|
|
4155
|
+
declare class ModPerfect extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4129
4156
|
readonly acronym = "PF";
|
|
4130
4157
|
readonly name = "Perfect";
|
|
4131
4158
|
readonly droidRanked = true;
|
|
@@ -4135,6 +4162,7 @@ declare class ModPerfect extends Mod implements IModApplicableToDroid, IModAppli
|
|
|
4135
4162
|
readonly pcRanked = true;
|
|
4136
4163
|
readonly pcScoreMultiplier = 1;
|
|
4137
4164
|
readonly bitwise: number;
|
|
4165
|
+
constructor();
|
|
4138
4166
|
}
|
|
4139
4167
|
|
|
4140
4168
|
/**
|
|
@@ -4166,7 +4194,7 @@ declare class ModReallyEasy extends Mod implements IModApplicableToDroid, IModAp
|
|
|
4166
4194
|
/**
|
|
4167
4195
|
* Represents the Relax mod.
|
|
4168
4196
|
*/
|
|
4169
|
-
declare class ModRelax extends Mod implements IModApplicableToDroid,
|
|
4197
|
+
declare class ModRelax extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4170
4198
|
readonly acronym = "RX";
|
|
4171
4199
|
readonly name = "Relax";
|
|
4172
4200
|
readonly droidRanked = false;
|
|
@@ -4176,12 +4204,13 @@ declare class ModRelax extends Mod implements IModApplicableToDroid, IModApplica
|
|
|
4176
4204
|
readonly pcRanked = false;
|
|
4177
4205
|
readonly pcScoreMultiplier = 0;
|
|
4178
4206
|
readonly bitwise: number;
|
|
4207
|
+
constructor();
|
|
4179
4208
|
}
|
|
4180
4209
|
|
|
4181
4210
|
/**
|
|
4182
4211
|
* Represents the ScoreV2 mod.
|
|
4183
4212
|
*/
|
|
4184
|
-
declare class ModScoreV2 extends Mod implements IModApplicableToDroid,
|
|
4213
|
+
declare class ModScoreV2 extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4185
4214
|
readonly acronym = "V2";
|
|
4186
4215
|
readonly name = "ScoreV2";
|
|
4187
4216
|
readonly droidRanked = false;
|
|
@@ -4208,24 +4237,10 @@ declare class ModSmallCircle extends Mod implements IModApplicableToDroid, IModA
|
|
|
4208
4237
|
applyToDifficulty(mode: Modes, difficulty: BeatmapDifficulty): void;
|
|
4209
4238
|
}
|
|
4210
4239
|
|
|
4211
|
-
/**
|
|
4212
|
-
* Represents the SpeedUp mod.
|
|
4213
|
-
*/
|
|
4214
|
-
declare class ModSpeedUp extends Mod implements IModApplicableToDroid, IModApplicableToTrackRate {
|
|
4215
|
-
readonly acronym = "SU";
|
|
4216
|
-
readonly name = "Speed Up";
|
|
4217
|
-
readonly droidRanked = false;
|
|
4218
|
-
readonly droidScoreMultiplier = 1.06;
|
|
4219
|
-
readonly droidString = "b";
|
|
4220
|
-
readonly isDroidLegacyMod = true;
|
|
4221
|
-
readonly trackRateMultiplier = 1.25;
|
|
4222
|
-
applyToRate(rate: number): number;
|
|
4223
|
-
}
|
|
4224
|
-
|
|
4225
4240
|
/**
|
|
4226
4241
|
* Represents the SpunOut mod.
|
|
4227
4242
|
*/
|
|
4228
|
-
declare class ModSpunOut extends Mod implements
|
|
4243
|
+
declare class ModSpunOut extends Mod implements IModApplicableToOsuStable {
|
|
4229
4244
|
readonly acronym = "SO";
|
|
4230
4245
|
readonly name = "SpunOut";
|
|
4231
4246
|
readonly pcRanked = true;
|
|
@@ -4236,7 +4251,7 @@ declare class ModSpunOut extends Mod implements IModApplicableToOsu {
|
|
|
4236
4251
|
/**
|
|
4237
4252
|
* Represents the SuddenDeath mod.
|
|
4238
4253
|
*/
|
|
4239
|
-
declare class ModSuddenDeath extends Mod implements IModApplicableToDroid,
|
|
4254
|
+
declare class ModSuddenDeath extends Mod implements IModApplicableToDroid, IModApplicableToOsuStable {
|
|
4240
4255
|
readonly acronym = "SD";
|
|
4241
4256
|
readonly name = "Sudden Death";
|
|
4242
4257
|
readonly droidRanked = true;
|
|
@@ -4246,12 +4261,13 @@ declare class ModSuddenDeath extends Mod implements IModApplicableToDroid, IModA
|
|
|
4246
4261
|
readonly pcRanked = true;
|
|
4247
4262
|
readonly pcScoreMultiplier = 1;
|
|
4248
4263
|
readonly bitwise: number;
|
|
4264
|
+
constructor();
|
|
4249
4265
|
}
|
|
4250
4266
|
|
|
4251
4267
|
/**
|
|
4252
4268
|
* Represents the TouchDevice mod.
|
|
4253
4269
|
*/
|
|
4254
|
-
declare class ModTouchDevice extends Mod implements
|
|
4270
|
+
declare class ModTouchDevice extends Mod implements IModApplicableToOsuStable {
|
|
4255
4271
|
readonly acronym = "TD";
|
|
4256
4272
|
readonly name = "TouchDevice";
|
|
4257
4273
|
readonly pcRanked = true;
|
|
@@ -4259,6 +4275,21 @@ declare class ModTouchDevice extends Mod implements IModApplicableToOsu {
|
|
|
4259
4275
|
readonly bitwise: number;
|
|
4260
4276
|
}
|
|
4261
4277
|
|
|
4278
|
+
/**
|
|
4279
|
+
* Represents the Traceable mod.
|
|
4280
|
+
*/
|
|
4281
|
+
declare class ModTraceable extends Mod implements IModApplicableToDroid, IModApplicableToOsu {
|
|
4282
|
+
readonly acronym = "TC";
|
|
4283
|
+
readonly name = "Traceable";
|
|
4284
|
+
readonly droidRanked = false;
|
|
4285
|
+
readonly droidScoreMultiplier = 1.06;
|
|
4286
|
+
readonly droidString = "b";
|
|
4287
|
+
readonly isDroidLegacyMod = false;
|
|
4288
|
+
readonly pcRanked = false;
|
|
4289
|
+
readonly pcScoreMultiplier = 1;
|
|
4290
|
+
constructor();
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4262
4293
|
/**
|
|
4263
4294
|
* Options for parsing mods.
|
|
4264
4295
|
*/
|
|
@@ -4276,10 +4307,6 @@ interface ModParseOptions {
|
|
|
4276
4307
|
* Utilities for mods.
|
|
4277
4308
|
*/
|
|
4278
4309
|
declare abstract class ModUtil {
|
|
4279
|
-
/**
|
|
4280
|
-
* Mods that are incompatible with each other.
|
|
4281
|
-
*/
|
|
4282
|
-
static readonly incompatibleMods: Mod[][];
|
|
4283
4310
|
/**
|
|
4284
4311
|
* All mods that exists.
|
|
4285
4312
|
*/
|
|
@@ -4287,11 +4314,7 @@ declare abstract class ModUtil {
|
|
|
4287
4314
|
/**
|
|
4288
4315
|
* Mods that change the playback speed of a beatmap.
|
|
4289
4316
|
*/
|
|
4290
|
-
static readonly speedChangingMods:
|
|
4291
|
-
/**
|
|
4292
|
-
* Mods that change the way the map looks.
|
|
4293
|
-
*/
|
|
4294
|
-
static readonly mapChangingMods: Mod[];
|
|
4317
|
+
static readonly speedChangingMods: ModRateAdjust[];
|
|
4295
4318
|
/**
|
|
4296
4319
|
* Gets a list of mods from a droid mod string, such as "hd".
|
|
4297
4320
|
*
|
|
@@ -4305,7 +4328,7 @@ declare abstract class ModUtil {
|
|
|
4305
4328
|
* @param modbits The modbits.
|
|
4306
4329
|
* @param options Options for parsing behavior.
|
|
4307
4330
|
*/
|
|
4308
|
-
static pcModbitsToMods(modbits: number, options?: ModParseOptions): (Mod &
|
|
4331
|
+
static pcModbitsToMods(modbits: number, options?: ModParseOptions): (Mod & IModApplicableToOsuStable)[];
|
|
4309
4332
|
/**
|
|
4310
4333
|
* Gets a list of mods from a PC mod string, such as "HDHR".
|
|
4311
4334
|
*
|
|
@@ -4875,4 +4898,4 @@ declare abstract class ZeroCrossingBracketing {
|
|
|
4875
4898
|
static expandReduce(f: (x: number) => number, bounds: RootBounds, expansionFactor?: number, expansionMaxIterations?: number, reduceSubdivisions?: number): boolean;
|
|
4876
4899
|
}
|
|
4877
4900
|
|
|
4878
|
-
export { Accuracy, Anchor, AnimationLoopType, BankHitSampleInfo, Beatmap, BeatmapBackground, BeatmapColor, BeatmapControlPoints, BeatmapConverter, BeatmapCountdown, BeatmapDecoder, BeatmapDifficulty, BeatmapEditor, BeatmapEncoder, BeatmapEvents, BeatmapGeneral, BeatmapGenre, BeatmapHitObjects, BeatmapLanguage, BeatmapMetadata, BeatmapOverlayPosition, BeatmapProcessor, BeatmapVideo, BlendingEquation, BlendingParameters, BlendingType, BreakPoint, Brent, Circle, CircleSizeCalculator, Command, CommandLoop, CommandTimeline, CommandTimelineGroup, type CommandTimelineSelector, CommandTrigger, ControlPointManager, DifficultyControlPoint, DifficultyControlPointManager, type DroidAPIEndpoint, DroidAPIRequestBuilder, DroidHitWindow, Easing, EditorGridSize, EffectControlPoint, EffectControlPointManager, EmptyHitWindow, ErrorFunction, FileHitSampleInfo, GameMode, HitObject, HitSampleInfo, HitSoundType, HitWindow, type ICommandTimeline, type IModApplicableToBeatmap, type IModApplicableToDifficulty, type IModApplicableToDifficultyWithSettings, type IModApplicableToDroid, type IModApplicableToHitObject, type IModApplicableToOsu, type If, Interpolation, MapInfo, MathUtils, Mod, ModAuto, ModAutopilot, ModDifficultyAdjust, ModDoubleTime, ModEasy, ModFlashlight, ModHalfTime, ModHardRock, ModHidden, ModNightCore, ModNoFail, type ModParseOptions, ModPerfect, ModPrecise, ModReallyEasy, ModRelax, ModScoreV2, ModSmallCircle,
|
|
4901
|
+
export { Accuracy, Anchor, AnimationLoopType, BankHitSampleInfo, Beatmap, BeatmapBackground, BeatmapColor, BeatmapControlPoints, BeatmapConverter, BeatmapCountdown, BeatmapDecoder, BeatmapDifficulty, BeatmapEditor, BeatmapEncoder, BeatmapEvents, BeatmapGeneral, BeatmapGenre, BeatmapHitObjects, BeatmapLanguage, BeatmapMetadata, BeatmapOverlayPosition, BeatmapProcessor, BeatmapVideo, BlendingEquation, BlendingParameters, BlendingType, BreakPoint, Brent, Circle, CircleSizeCalculator, Command, CommandLoop, CommandTimeline, CommandTimelineGroup, type CommandTimelineSelector, CommandTrigger, ControlPointManager, DifficultyControlPoint, DifficultyControlPointManager, type DroidAPIEndpoint, DroidAPIRequestBuilder, DroidHitWindow, Easing, EditorGridSize, EffectControlPoint, EffectControlPointManager, EmptyHitWindow, ErrorFunction, FileHitSampleInfo, GameMode, HitObject, HitSampleInfo, HitSoundType, HitWindow, type ICommandTimeline, type IModApplicableToBeatmap, type IModApplicableToDifficulty, type IModApplicableToDifficultyWithSettings, type IModApplicableToDroid, type IModApplicableToHitObject, type IModApplicableToOsu, type If, Interpolation, MapInfo, MathUtils, Mod, ModAuto, ModAutopilot, ModDifficultyAdjust, ModDoubleTime, ModEasy, ModFlashlight, ModHalfTime, ModHardRock, ModHidden, ModNightCore, ModNoFail, type ModParseOptions, ModPerfect, ModPrecise, ModRateAdjust, ModReallyEasy, ModRelax, ModScoreV2, ModSmallCircle, ModSpunOut, ModSuddenDeath, ModTouchDevice, ModTraceable, ModUtil, Modes, NormalDistribution, ObjectTypes, type OmitType, type OsuAPIEndpoint, OsuAPIRequestBuilder, type OsuAPIResponse, OsuHitWindow, PathApproximator, PathType, type PlaceableHitObject, type PlayableBeatmapOptions, Playfield, Polynomial, PreciseDroidHitWindow, Precision, RGBColor, RankedStatus, type RequestResponse, type RootBounds, SampleBank, SampleBankInfo, SampleControlPoint, SampleControlPointManager, type ScoreRank, SequenceHitSampleInfo, Slider, SliderHead, SliderNestedHitObject, SliderPath, SliderRepeat, SliderTail, SliderTick, Spinner, Storyboard, StoryboardAnimation, StoryboardCommandType, StoryboardDecoder, StoryboardElement, StoryboardEncoder, StoryboardEventType, StoryboardLayer, StoryboardLayerType, StoryboardParameterCommandType, StoryboardSample, StoryboardSprite, TimedHitSampleInfo, TimingControlPoint, TimingControlPointManager, Utils, Vector2, ZeroCrossingBracketing };
|