@rian8337/osu-rebalance-difficulty-calculator 4.0.0-beta.51 → 4.0.0-beta.53
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 +95 -28
- package/package.json +3 -3
- package/typings/index.d.ts +25 -13
package/dist/index.js
CHANGED
|
@@ -43,6 +43,15 @@ class DifficultyCalculator {
|
|
|
43
43
|
};
|
|
44
44
|
this.beatmap = beatmap;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Retains `Mod`s that adjust a beatmap's difficulty from the specified mods.
|
|
48
|
+
*
|
|
49
|
+
* @param mods The mods to retain the difficulty adjustment mods from.
|
|
50
|
+
* @returns The retained difficulty adjustment mods.
|
|
51
|
+
*/
|
|
52
|
+
static retainDifficultyAdjustmentMods(mods) {
|
|
53
|
+
return mods.filter((mod) => this.difficultyAdjustmentMods.has(mod.constructor));
|
|
54
|
+
}
|
|
46
55
|
/**
|
|
47
56
|
* Calculates the star rating of the specified beatmap.
|
|
48
57
|
*
|
|
@@ -144,6 +153,10 @@ class DifficultyCalculator {
|
|
|
144
153
|
return Math.pow(5 * Math.max(1, rating / 0.0675) - 4, 3) / 100000;
|
|
145
154
|
}
|
|
146
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* `Mod`s that adjust the difficulty of a beatmap.
|
|
158
|
+
*/
|
|
159
|
+
DifficultyCalculator.difficultyAdjustmentMods = new Set();
|
|
147
160
|
|
|
148
161
|
/**
|
|
149
162
|
* Represents a hit object with difficulty calculation values.
|
|
@@ -287,10 +300,10 @@ class DifficultyHitObject {
|
|
|
287
300
|
* Calculates the opacity of the hitobject at a given time.
|
|
288
301
|
*
|
|
289
302
|
* @param time The time to calculate the hitobject's opacity at.
|
|
290
|
-
* @param
|
|
303
|
+
* @param mods The mods used.
|
|
291
304
|
* @returns The opacity of the hitobject at the given time.
|
|
292
305
|
*/
|
|
293
|
-
opacityAt(time,
|
|
306
|
+
opacityAt(time, mods) {
|
|
294
307
|
if (time > this.object.startTime) {
|
|
295
308
|
// Consider a hitobject as being invisible when its start time is passed.
|
|
296
309
|
// In reality the hitobject will be visible beyond its start time up until its hittable window has passed,
|
|
@@ -299,7 +312,7 @@ class DifficultyHitObject {
|
|
|
299
312
|
}
|
|
300
313
|
const fadeInStartTime = this.object.startTime - this.object.timePreempt;
|
|
301
314
|
const fadeInDuration = this.object.timeFadeIn;
|
|
302
|
-
if (
|
|
315
|
+
if (mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
303
316
|
const fadeOutStartTime = fadeInStartTime + fadeInDuration;
|
|
304
317
|
const fadeOutDuration = this.object.timePreempt * osuBase.ModHidden.fadeOutDurationMultiplier;
|
|
305
318
|
return Math.min(osuBase.MathUtils.clamp((time - fadeInStartTime) / fadeInDuration, 0, 1), 1 -
|
|
@@ -582,6 +595,14 @@ class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
|
582
595
|
super.computeProperties(clockRate, hitObjects);
|
|
583
596
|
this.setVisuals(clockRate, hitObjects);
|
|
584
597
|
}
|
|
598
|
+
opacityAt(time, mods) {
|
|
599
|
+
// Traceable hides the primary piece of a hit circle (that is, its body), so consider it as fully invisible.
|
|
600
|
+
if (this.object instanceof osuBase.Circle &&
|
|
601
|
+
mods.some((m) => m instanceof osuBase.ModTraceable)) {
|
|
602
|
+
return 0;
|
|
603
|
+
}
|
|
604
|
+
return super.opacityAt(time, mods);
|
|
605
|
+
}
|
|
585
606
|
/**
|
|
586
607
|
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
587
608
|
*
|
|
@@ -1218,10 +1239,10 @@ class DroidFlashlightEvaluator {
|
|
|
1218
1239
|
* - and whether Hidden mod is enabled.
|
|
1219
1240
|
*
|
|
1220
1241
|
* @param current The current object.
|
|
1221
|
-
* @param
|
|
1242
|
+
* @param mods The mods used.
|
|
1222
1243
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1223
1244
|
*/
|
|
1224
|
-
static evaluateDifficultyOf(current,
|
|
1245
|
+
static evaluateDifficultyOf(current, mods, withSliders) {
|
|
1225
1246
|
if (current.object instanceof osuBase.Spinner ||
|
|
1226
1247
|
// Exclude overlapping objects that can be tapped at once.
|
|
1227
1248
|
current.isOverlapping(true)) {
|
|
@@ -1252,7 +1273,7 @@ class DroidFlashlightEvaluator {
|
|
|
1252
1273
|
const opacityBonus = 1 +
|
|
1253
1274
|
this.maxOpacityBonus *
|
|
1254
1275
|
(1 -
|
|
1255
|
-
current.opacityAt(currentObject.object.startTime,
|
|
1276
|
+
current.opacityAt(currentObject.object.startTime, mods));
|
|
1256
1277
|
result +=
|
|
1257
1278
|
(stackNerf * opacityBonus * scalingFactor * jumpDistance) /
|
|
1258
1279
|
cumulativeStrainTime;
|
|
@@ -1267,9 +1288,20 @@ class DroidFlashlightEvaluator {
|
|
|
1267
1288
|
}
|
|
1268
1289
|
result = Math.pow(smallDistNerf * result, 2);
|
|
1269
1290
|
// Additional bonus for Hidden due to there being no approach circles.
|
|
1270
|
-
if (
|
|
1291
|
+
if (mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
1271
1292
|
result *= 1 + this.hiddenBonus;
|
|
1272
1293
|
}
|
|
1294
|
+
else if (mods.some((m) => m instanceof osuBase.ModTraceable)) {
|
|
1295
|
+
// Additional bonus for Traceable due to there being no primary or secondary object pieces.
|
|
1296
|
+
if (current.object instanceof osuBase.Circle) {
|
|
1297
|
+
// Additional bonus for hit circles due to there being no circle piece, which is the primary piece.
|
|
1298
|
+
result *= 1 + this.traceableCircleBonus;
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
// The rest of the objects only hide secondary pieces.
|
|
1302
|
+
result *= 1 + this.traceableObjectBonus;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1273
1305
|
// Nerf patterns with repeated angles.
|
|
1274
1306
|
result *=
|
|
1275
1307
|
this.minAngleMultiplier +
|
|
@@ -1292,6 +1324,8 @@ class DroidFlashlightEvaluator {
|
|
|
1292
1324
|
}
|
|
1293
1325
|
DroidFlashlightEvaluator.maxOpacityBonus = 0.4;
|
|
1294
1326
|
DroidFlashlightEvaluator.hiddenBonus = 0.2;
|
|
1327
|
+
DroidFlashlightEvaluator.traceableCircleBonus = 0.15;
|
|
1328
|
+
DroidFlashlightEvaluator.traceableObjectBonus = 0.1;
|
|
1295
1329
|
DroidFlashlightEvaluator.minVelocity = 0.5;
|
|
1296
1330
|
DroidFlashlightEvaluator.sliderMultiplier = 1.3;
|
|
1297
1331
|
DroidFlashlightEvaluator.minAngleMultiplier = 0.2;
|
|
@@ -1308,13 +1342,12 @@ class DroidFlashlight extends DroidSkill {
|
|
|
1308
1342
|
this.starsPerDouble = 1.06;
|
|
1309
1343
|
this.skillMultiplier = 0.02;
|
|
1310
1344
|
this.currentFlashlightStrain = 0;
|
|
1311
|
-
this.isHidden = mods.some((m) => m instanceof osuBase.ModHidden);
|
|
1312
1345
|
this.withSliders = withSliders;
|
|
1313
1346
|
}
|
|
1314
1347
|
strainValueAt(current) {
|
|
1315
1348
|
this.currentFlashlightStrain *= this.strainDecay(current.deltaTime);
|
|
1316
1349
|
this.currentFlashlightStrain +=
|
|
1317
|
-
DroidFlashlightEvaluator.evaluateDifficultyOf(current, this.
|
|
1350
|
+
DroidFlashlightEvaluator.evaluateDifficultyOf(current, this.mods, this.withSliders) * this.skillMultiplier;
|
|
1318
1351
|
return this.currentFlashlightStrain;
|
|
1319
1352
|
}
|
|
1320
1353
|
calculateInitialStrain(time, current) {
|
|
@@ -1581,10 +1614,10 @@ class DroidVisualEvaluator {
|
|
|
1581
1614
|
* - and whether the Hidden mod is enabled.
|
|
1582
1615
|
*
|
|
1583
1616
|
* @param current The current object.
|
|
1584
|
-
* @param
|
|
1617
|
+
* @param mods The mods used.
|
|
1585
1618
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1586
1619
|
*/
|
|
1587
|
-
static evaluateDifficultyOf(current,
|
|
1620
|
+
static evaluateDifficultyOf(current, mods, withSliders) {
|
|
1588
1621
|
if (current.object instanceof osuBase.Spinner ||
|
|
1589
1622
|
// Exclude overlapping objects that can be tapped at once.
|
|
1590
1623
|
current.isOverlapping(true) ||
|
|
@@ -1594,9 +1627,18 @@ class DroidVisualEvaluator {
|
|
|
1594
1627
|
// Start with base density and give global bonus for Hidden.
|
|
1595
1628
|
// Add density caps for sanity.
|
|
1596
1629
|
let strain;
|
|
1597
|
-
if (
|
|
1630
|
+
if (mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
1598
1631
|
strain = Math.min(30, Math.pow(current.noteDensity, 3));
|
|
1599
1632
|
}
|
|
1633
|
+
else if (mods.some((m) => m instanceof osuBase.ModTraceable)) {
|
|
1634
|
+
// Give more bonus for hit circles due to there being no circle piece.
|
|
1635
|
+
if (current.object instanceof osuBase.Circle) {
|
|
1636
|
+
strain = Math.min(25, Math.pow(current.noteDensity, 2.5));
|
|
1637
|
+
}
|
|
1638
|
+
else {
|
|
1639
|
+
strain = Math.min(22.5, Math.pow(current.noteDensity, 2.25));
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1600
1642
|
else {
|
|
1601
1643
|
strain = Math.min(20, Math.pow(current.noteDensity, 2));
|
|
1602
1644
|
}
|
|
@@ -1614,9 +1656,7 @@ class DroidVisualEvaluator {
|
|
|
1614
1656
|
break;
|
|
1615
1657
|
}
|
|
1616
1658
|
strain +=
|
|
1617
|
-
(1 -
|
|
1618
|
-
current.opacityAt(previous.object.startTime, isHiddenMod)) /
|
|
1619
|
-
4;
|
|
1659
|
+
(1 - current.opacityAt(previous.object.startTime, mods)) / 4;
|
|
1620
1660
|
}
|
|
1621
1661
|
if (current.timePreempt < 400) {
|
|
1622
1662
|
// Give bonus for AR higher than 10.33.
|
|
@@ -1676,13 +1716,12 @@ class DroidVisual extends DroidSkill {
|
|
|
1676
1716
|
this.currentVisualStrain = 0;
|
|
1677
1717
|
this.currentRhythmMultiplier = 1;
|
|
1678
1718
|
this.skillMultiplier = 10;
|
|
1679
|
-
this.isHidden = mods.some((m) => m instanceof osuBase.ModHidden);
|
|
1680
1719
|
this.withSliders = withSliders;
|
|
1681
1720
|
}
|
|
1682
1721
|
strainValueAt(current) {
|
|
1683
1722
|
this.currentVisualStrain *= this.strainDecay(current.deltaTime);
|
|
1684
1723
|
this.currentVisualStrain +=
|
|
1685
|
-
DroidVisualEvaluator.evaluateDifficultyOf(current, this.
|
|
1724
|
+
DroidVisualEvaluator.evaluateDifficultyOf(current, this.mods, this.withSliders) * this.skillMultiplier;
|
|
1686
1725
|
this.currentRhythmMultiplier = current.rhythmMultiplier;
|
|
1687
1726
|
return this.currentVisualStrain * this.currentRhythmMultiplier;
|
|
1688
1727
|
}
|
|
@@ -2135,6 +2174,21 @@ class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
2135
2174
|
* Increasing this number will result in less sections being flagged.
|
|
2136
2175
|
*/
|
|
2137
2176
|
DroidDifficultyCalculator.threeFingerStrainThreshold = 175;
|
|
2177
|
+
DroidDifficultyCalculator.difficultyAdjustmentMods = new Set([
|
|
2178
|
+
osuBase.ModDoubleTime,
|
|
2179
|
+
osuBase.ModNightCore,
|
|
2180
|
+
osuBase.ModDifficultyAdjust,
|
|
2181
|
+
osuBase.ModHalfTime,
|
|
2182
|
+
osuBase.ModEasy,
|
|
2183
|
+
osuBase.ModHardRock,
|
|
2184
|
+
osuBase.ModFlashlight,
|
|
2185
|
+
osuBase.ModHidden,
|
|
2186
|
+
osuBase.ModRelax,
|
|
2187
|
+
osuBase.ModAutopilot,
|
|
2188
|
+
osuBase.ModPrecise,
|
|
2189
|
+
osuBase.ModScoreV2,
|
|
2190
|
+
osuBase.ModTraceable,
|
|
2191
|
+
]);
|
|
2138
2192
|
|
|
2139
2193
|
/**
|
|
2140
2194
|
* The base class of performance calculators.
|
|
@@ -3360,9 +3414,9 @@ class OsuFlashlightEvaluator {
|
|
|
3360
3414
|
* - and whether Hidden mod is enabled.
|
|
3361
3415
|
*
|
|
3362
3416
|
* @param current The current object.
|
|
3363
|
-
* @param
|
|
3417
|
+
* @param mods The mods used.
|
|
3364
3418
|
*/
|
|
3365
|
-
static evaluateDifficultyOf(current,
|
|
3419
|
+
static evaluateDifficultyOf(current, mods) {
|
|
3366
3420
|
if (current.object instanceof osuBase.Spinner) {
|
|
3367
3421
|
return 0;
|
|
3368
3422
|
}
|
|
@@ -3389,7 +3443,7 @@ class OsuFlashlightEvaluator {
|
|
|
3389
3443
|
const opacityBonus = 1 +
|
|
3390
3444
|
this.maxOpacityBonus *
|
|
3391
3445
|
(1 -
|
|
3392
|
-
current.opacityAt(currentObject.object.startTime,
|
|
3446
|
+
current.opacityAt(currentObject.object.startTime, mods));
|
|
3393
3447
|
result +=
|
|
3394
3448
|
(stackNerf * opacityBonus * scalingFactor * jumpDistance) /
|
|
3395
3449
|
cumulativeStrainTime;
|
|
@@ -3404,7 +3458,7 @@ class OsuFlashlightEvaluator {
|
|
|
3404
3458
|
}
|
|
3405
3459
|
result = Math.pow(smallDistNerf * result, 2);
|
|
3406
3460
|
// Additional bonus for Hidden due to there being no approach circles.
|
|
3407
|
-
if (
|
|
3461
|
+
if (mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
3408
3462
|
result *= 1 + this.hiddenBonus;
|
|
3409
3463
|
}
|
|
3410
3464
|
// Nerf patterns with repeated angles.
|
|
@@ -3437,15 +3491,14 @@ OsuFlashlightEvaluator.minAngleMultiplier = 0.2;
|
|
|
3437
3491
|
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
3438
3492
|
*/
|
|
3439
3493
|
class OsuFlashlight extends OsuSkill {
|
|
3440
|
-
constructor(
|
|
3441
|
-
super(
|
|
3494
|
+
constructor() {
|
|
3495
|
+
super(...arguments);
|
|
3442
3496
|
this.strainDecayBase = 0.15;
|
|
3443
3497
|
this.reducedSectionCount = 0;
|
|
3444
3498
|
this.reducedSectionBaseline = 1;
|
|
3445
3499
|
this.decayWeight = 1;
|
|
3446
3500
|
this.currentFlashlightStrain = 0;
|
|
3447
3501
|
this.skillMultiplier = 0.05512;
|
|
3448
|
-
this.isHidden = mods.some((m) => m instanceof osuBase.ModHidden);
|
|
3449
3502
|
}
|
|
3450
3503
|
difficultyValue() {
|
|
3451
3504
|
return this.strainPeaks.reduce((a, b) => a + b, 0);
|
|
@@ -3453,7 +3506,8 @@ class OsuFlashlight extends OsuSkill {
|
|
|
3453
3506
|
strainValueAt(current) {
|
|
3454
3507
|
this.currentFlashlightStrain *= this.strainDecay(current.deltaTime);
|
|
3455
3508
|
this.currentFlashlightStrain +=
|
|
3456
|
-
OsuFlashlightEvaluator.evaluateDifficultyOf(current, this.
|
|
3509
|
+
OsuFlashlightEvaluator.evaluateDifficultyOf(current, this.mods) *
|
|
3510
|
+
this.skillMultiplier;
|
|
3457
3511
|
return this.currentFlashlightStrain;
|
|
3458
3512
|
}
|
|
3459
3513
|
calculateInitialStrain(time, current) {
|
|
@@ -3702,6 +3756,19 @@ class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
3702
3756
|
}
|
|
3703
3757
|
}
|
|
3704
3758
|
}
|
|
3759
|
+
OsuDifficultyCalculator.difficultyAdjustmentMods = new Set([
|
|
3760
|
+
osuBase.ModTouchDevice,
|
|
3761
|
+
osuBase.ModDoubleTime,
|
|
3762
|
+
osuBase.ModNightCore,
|
|
3763
|
+
osuBase.ModDifficultyAdjust,
|
|
3764
|
+
osuBase.ModHalfTime,
|
|
3765
|
+
osuBase.ModEasy,
|
|
3766
|
+
osuBase.ModHardRock,
|
|
3767
|
+
osuBase.ModFlashlight,
|
|
3768
|
+
osuBase.ModHidden,
|
|
3769
|
+
osuBase.ModRelax,
|
|
3770
|
+
osuBase.ModAutopilot,
|
|
3771
|
+
]);
|
|
3705
3772
|
|
|
3706
3773
|
/**
|
|
3707
3774
|
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
@@ -3788,7 +3855,7 @@ class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
3788
3855
|
aimValue *= 1 + arFactor * lengthBonus;
|
|
3789
3856
|
}
|
|
3790
3857
|
// We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR.
|
|
3791
|
-
if (this.mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
3858
|
+
if (this.mods.some((m) => m instanceof osuBase.ModHidden || m instanceof osuBase.ModTraceable)) {
|
|
3792
3859
|
aimValue *= 1 + 0.04 * (12 - calculatedAR);
|
|
3793
3860
|
}
|
|
3794
3861
|
// Scale the aim value with slider factor to nerf very likely dropped sliderends.
|
|
@@ -3823,7 +3890,7 @@ class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
3823
3890
|
// Buff for longer maps with high AR.
|
|
3824
3891
|
speedValue *= 1 + 0.3 * (calculatedAR - 10.33) * lengthBonus;
|
|
3825
3892
|
}
|
|
3826
|
-
if (this.mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
3893
|
+
if (this.mods.some((m) => m instanceof osuBase.ModHidden || m instanceof osuBase.ModTraceable)) {
|
|
3827
3894
|
speedValue *= 1 + 0.04 * (12 - calculatedAR);
|
|
3828
3895
|
}
|
|
3829
3896
|
// Calculate accuracy assuming the worst case scenario.
|
|
@@ -3873,7 +3940,7 @@ class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
3873
3940
|
2.83;
|
|
3874
3941
|
// Bonus for many hitcircles - it's harder to keep good accuracy up for longer
|
|
3875
3942
|
accuracyValue *= Math.min(1.15, Math.pow(ncircles / 1000, 0.3));
|
|
3876
|
-
if (this.mods.some((m) => m instanceof osuBase.ModHidden)) {
|
|
3943
|
+
if (this.mods.some((m) => m instanceof osuBase.ModHidden || m instanceof osuBase.ModTraceable)) {
|
|
3877
3944
|
accuracyValue *= 1.08;
|
|
3878
3945
|
}
|
|
3879
3946
|
if (this.mods.some((m) => m instanceof osuBase.ModFlashlight)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-rebalance-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.53",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the latest osu!lazer difficulty and performance algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"url": "https://github.com/Rian8337/osu-droid-module/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@rian8337/osu-base": "^4.0.0-beta.
|
|
36
|
+
"@rian8337/osu-base": "^4.0.0-beta.52"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f35904075742e0f04b295c304bd7d81d11d2b99d"
|
|
42
42
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mod, PlaceableHitObject, Modes, Beatmap, Accuracy } from '@rian8337/osu-base';
|
|
1
|
+
import { Mod, PlaceableHitObject, Modes, Beatmap, ModHidden, ModPrecise, ModTraceable, ModScoreV2, ModDoubleTime, ModNightCore, ModDifficultyAdjust, ModHalfTime, ModEasy, ModHardRock, ModFlashlight, ModRelax, ModAutopilot, Accuracy, ModTouchDevice } from '@rian8337/osu-base';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Holds data that can be used to calculate performance points.
|
|
@@ -242,10 +242,10 @@ declare abstract class DifficultyHitObject {
|
|
|
242
242
|
* Calculates the opacity of the hitobject at a given time.
|
|
243
243
|
*
|
|
244
244
|
* @param time The time to calculate the hitobject's opacity at.
|
|
245
|
-
* @param
|
|
245
|
+
* @param mods The mods used.
|
|
246
246
|
* @returns The opacity of the hitobject at the given time.
|
|
247
247
|
*/
|
|
248
|
-
opacityAt(time: number,
|
|
248
|
+
opacityAt(time: number, mods: Mod[]): number;
|
|
249
249
|
/**
|
|
250
250
|
* How possible is it to doubletap this object together with the next one and get perfect
|
|
251
251
|
* judgement in range from 0 to 1.
|
|
@@ -339,6 +339,10 @@ declare abstract class DifficultyCalculator<THitObject extends DifficultyHitObje
|
|
|
339
339
|
* The difficulty attributes that can be cached. It can also be used to calculate performance points.
|
|
340
340
|
*/
|
|
341
341
|
abstract get cacheableAttributes(): CacheableDifficultyAttributes<TAttributes>;
|
|
342
|
+
/**
|
|
343
|
+
* `Mod`s that adjust the difficulty of a beatmap.
|
|
344
|
+
*/
|
|
345
|
+
protected static readonly difficultyAdjustmentMods: Set<typeof Mod>;
|
|
342
346
|
protected abstract readonly difficultyMultiplier: number;
|
|
343
347
|
protected abstract readonly mode: Modes;
|
|
344
348
|
/**
|
|
@@ -347,6 +351,13 @@ declare abstract class DifficultyCalculator<THitObject extends DifficultyHitObje
|
|
|
347
351
|
* @param beatmap The beatmap to calculate.
|
|
348
352
|
*/
|
|
349
353
|
constructor(beatmap: Beatmap);
|
|
354
|
+
/**
|
|
355
|
+
* Retains `Mod`s that adjust a beatmap's difficulty from the specified mods.
|
|
356
|
+
*
|
|
357
|
+
* @param mods The mods to retain the difficulty adjustment mods from.
|
|
358
|
+
* @returns The retained difficulty adjustment mods.
|
|
359
|
+
*/
|
|
360
|
+
static retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
350
361
|
/**
|
|
351
362
|
* Calculates the star rating of the specified beatmap.
|
|
352
363
|
*
|
|
@@ -609,6 +620,7 @@ declare class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
|
609
620
|
*/
|
|
610
621
|
constructor(object: PlaceableHitObject, lastObject: PlaceableHitObject | null, lastLastObject: PlaceableHitObject | null, difficultyHitObjects: readonly DifficultyHitObject[], clockRate: number);
|
|
611
622
|
computeProperties(clockRate: number, hitObjects: readonly PlaceableHitObject[]): void;
|
|
623
|
+
opacityAt(time: number, mods: Mod[]): number;
|
|
612
624
|
/**
|
|
613
625
|
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
614
626
|
*
|
|
@@ -830,6 +842,7 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidDiffic
|
|
|
830
842
|
static readonly threeFingerStrainThreshold = 175;
|
|
831
843
|
readonly attributes: ExtendedDroidDifficultyAttributes;
|
|
832
844
|
get cacheableAttributes(): CacheableDifficultyAttributes<DroidDifficultyAttributes>;
|
|
845
|
+
protected static readonly difficultyAdjustmentMods: Set<typeof ModHidden | typeof ModPrecise | typeof ModTraceable | typeof ModScoreV2 | typeof ModDoubleTime | typeof ModNightCore | typeof ModDifficultyAdjust | typeof ModHalfTime | typeof ModEasy | typeof ModHardRock | typeof ModFlashlight | typeof ModRelax | typeof ModAutopilot>;
|
|
833
846
|
protected readonly difficultyMultiplier = 0.18;
|
|
834
847
|
protected readonly mode = Modes.droid;
|
|
835
848
|
calculate(options?: DroidDifficultyCalculationOptions): this;
|
|
@@ -912,7 +925,6 @@ declare class DroidFlashlight extends DroidSkill {
|
|
|
912
925
|
protected readonly reducedSectionBaseline = 1;
|
|
913
926
|
protected readonly starsPerDouble = 1.06;
|
|
914
927
|
private readonly skillMultiplier;
|
|
915
|
-
private readonly isHidden;
|
|
916
928
|
private currentFlashlightStrain;
|
|
917
929
|
readonly withSliders: boolean;
|
|
918
930
|
constructor(mods: Mod[], withSliders: boolean);
|
|
@@ -929,6 +941,8 @@ declare class DroidFlashlight extends DroidSkill {
|
|
|
929
941
|
declare abstract class DroidFlashlightEvaluator {
|
|
930
942
|
private static readonly maxOpacityBonus;
|
|
931
943
|
private static readonly hiddenBonus;
|
|
944
|
+
private static readonly traceableCircleBonus;
|
|
945
|
+
private static readonly traceableObjectBonus;
|
|
932
946
|
private static readonly minVelocity;
|
|
933
947
|
private static readonly sliderMultiplier;
|
|
934
948
|
private static readonly minAngleMultiplier;
|
|
@@ -942,10 +956,10 @@ declare abstract class DroidFlashlightEvaluator {
|
|
|
942
956
|
* - and whether Hidden mod is enabled.
|
|
943
957
|
*
|
|
944
958
|
* @param current The current object.
|
|
945
|
-
* @param
|
|
959
|
+
* @param mods The mods used.
|
|
946
960
|
* @param withSliders Whether to take slider difficulty into account.
|
|
947
961
|
*/
|
|
948
|
-
static evaluateDifficultyOf(current: DroidDifficultyHitObject,
|
|
962
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: Mod[], withSliders: boolean): number;
|
|
949
963
|
}
|
|
950
964
|
|
|
951
965
|
/**
|
|
@@ -1345,7 +1359,6 @@ declare class DroidVisual extends DroidSkill {
|
|
|
1345
1359
|
protected readonly reducedSectionCount = 10;
|
|
1346
1360
|
protected readonly reducedSectionBaseline = 0.75;
|
|
1347
1361
|
protected readonly strainDecayBase = 0.1;
|
|
1348
|
-
private readonly isHidden;
|
|
1349
1362
|
private currentVisualStrain;
|
|
1350
1363
|
private currentRhythmMultiplier;
|
|
1351
1364
|
private readonly skillMultiplier;
|
|
@@ -1373,10 +1386,10 @@ declare abstract class DroidVisualEvaluator {
|
|
|
1373
1386
|
* - and whether the Hidden mod is enabled.
|
|
1374
1387
|
*
|
|
1375
1388
|
* @param current The current object.
|
|
1376
|
-
* @param
|
|
1389
|
+
* @param mods The mods used.
|
|
1377
1390
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1378
1391
|
*/
|
|
1379
|
-
static evaluateDifficultyOf(current: DroidDifficultyHitObject,
|
|
1392
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: Mod[], withSliders: boolean): number;
|
|
1380
1393
|
}
|
|
1381
1394
|
|
|
1382
1395
|
/**
|
|
@@ -1496,6 +1509,7 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuDifficulty
|
|
|
1496
1509
|
get flashlight(): number;
|
|
1497
1510
|
readonly attributes: OsuDifficultyAttributes;
|
|
1498
1511
|
get cacheableAttributes(): CacheableDifficultyAttributes<OsuDifficultyAttributes>;
|
|
1512
|
+
protected static readonly difficultyAdjustmentMods: Set<typeof ModHidden | typeof ModDoubleTime | typeof ModNightCore | typeof ModDifficultyAdjust | typeof ModHalfTime | typeof ModEasy | typeof ModHardRock | typeof ModFlashlight | typeof ModRelax | typeof ModAutopilot | typeof ModTouchDevice>;
|
|
1499
1513
|
protected readonly difficultyMultiplier = 0.0675;
|
|
1500
1514
|
protected readonly mode = Modes.osu;
|
|
1501
1515
|
/**
|
|
@@ -1547,8 +1561,6 @@ declare class OsuFlashlight extends OsuSkill {
|
|
|
1547
1561
|
protected readonly decayWeight = 1;
|
|
1548
1562
|
private currentFlashlightStrain;
|
|
1549
1563
|
private readonly skillMultiplier;
|
|
1550
|
-
private readonly isHidden;
|
|
1551
|
-
constructor(mods: Mod[]);
|
|
1552
1564
|
difficultyValue(): number;
|
|
1553
1565
|
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1554
1566
|
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
@@ -1574,9 +1586,9 @@ declare abstract class OsuFlashlightEvaluator {
|
|
|
1574
1586
|
* - and whether Hidden mod is enabled.
|
|
1575
1587
|
*
|
|
1576
1588
|
* @param current The current object.
|
|
1577
|
-
* @param
|
|
1589
|
+
* @param mods The mods used.
|
|
1578
1590
|
*/
|
|
1579
|
-
static evaluateDifficultyOf(current: OsuDifficultyHitObject,
|
|
1591
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, mods: Mod[]): number;
|
|
1580
1592
|
}
|
|
1581
1593
|
|
|
1582
1594
|
/**
|