@rian8337/osu-difficulty-calculator 4.0.0-beta.12 → 4.0.0-beta.14
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 +188 -116
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/typings/index.d.ts +178 -115
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.14",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the current 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.14"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e4383e419f26770d389d69848e1743618f5f6f5d"
|
|
42
42
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mod, MapStats, PlaceableHitObject, Beatmap, Modes, HitObject, Accuracy } from '@rian8337/osu-base';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* An evaluator for calculating aim skill.
|
|
@@ -20,16 +20,6 @@ declare abstract class AimEvaluator {
|
|
|
20
20
|
protected static calculateAcuteAngleBonus(angle: number): number;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* The base of calculation options.
|
|
25
|
-
*/
|
|
26
|
-
interface CalculationOptions {
|
|
27
|
-
/**
|
|
28
|
-
* Custom map statistics to apply custom speed multiplier as well as old statistics.
|
|
29
|
-
*/
|
|
30
|
-
stats?: MapStats;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
23
|
/**
|
|
34
24
|
* Holds data that can be used to calculate performance points.
|
|
35
25
|
*/
|
|
@@ -98,6 +88,26 @@ interface DifficultyAttributes {
|
|
|
98
88
|
spinnerCount: number;
|
|
99
89
|
}
|
|
100
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Represents difficulty attributes that can be cached.
|
|
93
|
+
*/
|
|
94
|
+
type CacheableDifficultyAttributes<T extends DifficultyAttributes> = Omit<T, "mods"> & {
|
|
95
|
+
/**
|
|
96
|
+
* The mods which were applied to the beatmap.
|
|
97
|
+
*/
|
|
98
|
+
mods: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The base of calculation options.
|
|
103
|
+
*/
|
|
104
|
+
interface CalculationOptions {
|
|
105
|
+
/**
|
|
106
|
+
* Custom map statistics to apply custom speed multiplier as well as old statistics.
|
|
107
|
+
*/
|
|
108
|
+
stats?: MapStats;
|
|
109
|
+
}
|
|
110
|
+
|
|
101
111
|
/**
|
|
102
112
|
* Represents options for difficulty calculation.
|
|
103
113
|
*/
|
|
@@ -109,9 +119,9 @@ interface DifficultyCalculationOptions extends CalculationOptions {
|
|
|
109
119
|
}
|
|
110
120
|
|
|
111
121
|
/**
|
|
112
|
-
* Represents
|
|
122
|
+
* Represents a hit object with difficulty calculation values.
|
|
113
123
|
*/
|
|
114
|
-
declare class DifficultyHitObject {
|
|
124
|
+
declare abstract class DifficultyHitObject {
|
|
115
125
|
/**
|
|
116
126
|
* The underlying hitobject.
|
|
117
127
|
*/
|
|
@@ -142,41 +152,10 @@ declare class DifficultyHitObject {
|
|
|
142
152
|
* The aim strain generated by the hitobject if sliders are not considered.
|
|
143
153
|
*/
|
|
144
154
|
aimStrainWithoutSliders: number;
|
|
145
|
-
/**
|
|
146
|
-
* The tap strain generated by the hitobject.
|
|
147
|
-
*
|
|
148
|
-
* This is also used for osu!standard as opposed to "speed strain".
|
|
149
|
-
*/
|
|
150
|
-
tapStrain: number;
|
|
151
|
-
/**
|
|
152
|
-
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
153
|
-
* OD. This is used in three-finger detection.
|
|
154
|
-
*/
|
|
155
|
-
originalTapStrain: number;
|
|
156
155
|
/**
|
|
157
156
|
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
158
157
|
*/
|
|
159
158
|
rhythmMultiplier: number;
|
|
160
|
-
/**
|
|
161
|
-
* The rhythm strain generated by the hitobject.
|
|
162
|
-
*/
|
|
163
|
-
rhythmStrain: number;
|
|
164
|
-
/**
|
|
165
|
-
* The flashlight strain generated by the hitobject if sliders are considered.
|
|
166
|
-
*/
|
|
167
|
-
flashlightStrainWithSliders: number;
|
|
168
|
-
/**
|
|
169
|
-
* The flashlight strain generated by the hitobject if sliders are not considered.
|
|
170
|
-
*/
|
|
171
|
-
flashlightStrainWithoutSliders: number;
|
|
172
|
-
/**
|
|
173
|
-
* The visual strain generated by the hitobject if sliders are considered.
|
|
174
|
-
*/
|
|
175
|
-
visualStrainWithSliders: number;
|
|
176
|
-
/**
|
|
177
|
-
* The visual strain generated by the hitobject if sliders are not considered.
|
|
178
|
-
*/
|
|
179
|
-
visualStrainWithoutSliders: number;
|
|
180
159
|
/**
|
|
181
160
|
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
182
161
|
*
|
|
@@ -230,29 +209,15 @@ declare class DifficultyHitObject {
|
|
|
230
209
|
* Adjusted end time of the hitobject, taking speed multiplier into account.
|
|
231
210
|
*/
|
|
232
211
|
endTime: number;
|
|
233
|
-
/**
|
|
234
|
-
* The note density of the hitobject.
|
|
235
|
-
*/
|
|
236
|
-
noteDensity: number;
|
|
237
|
-
/**
|
|
238
|
-
* The overlapping factor of the hitobject.
|
|
239
|
-
*
|
|
240
|
-
* This is used to scale visual skill.
|
|
241
|
-
*/
|
|
242
|
-
overlappingFactor: number;
|
|
243
|
-
/**
|
|
244
|
-
* Adjusted velocity of the hitobject, taking speed multiplier into account.
|
|
245
|
-
*/
|
|
246
|
-
velocity: number;
|
|
247
212
|
/**
|
|
248
213
|
* Other hitobjects in the beatmap, including this hitobject.
|
|
249
214
|
*/
|
|
250
|
-
|
|
215
|
+
protected readonly hitObjects: DifficultyHitObject[];
|
|
251
216
|
/**
|
|
252
217
|
* @param object The underlying hitobject.
|
|
253
218
|
* @param hitObjects All difficulty hitobjects in the processed beatmap.
|
|
254
219
|
*/
|
|
255
|
-
constructor(object: PlaceableHitObject, hitObjects: DifficultyHitObject[]);
|
|
220
|
+
protected constructor(object: PlaceableHitObject, hitObjects: DifficultyHitObject[]);
|
|
256
221
|
/**
|
|
257
222
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
258
223
|
* difficulty hitobject's index.
|
|
@@ -263,7 +228,7 @@ declare class DifficultyHitObject {
|
|
|
263
228
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
264
229
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
265
230
|
*/
|
|
266
|
-
previous(backwardsIndex: number):
|
|
231
|
+
previous(backwardsIndex: number): this | null;
|
|
267
232
|
/**
|
|
268
233
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
269
234
|
* difficulty hitobject's index.
|
|
@@ -274,7 +239,7 @@ declare class DifficultyHitObject {
|
|
|
274
239
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
275
240
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
276
241
|
*/
|
|
277
|
-
next(forwardsIndex: number):
|
|
242
|
+
next(forwardsIndex: number): this | null;
|
|
278
243
|
/**
|
|
279
244
|
* Calculates the opacity of the hitobject at a given time.
|
|
280
245
|
*
|
|
@@ -343,7 +308,7 @@ declare abstract class Skill {
|
|
|
343
308
|
/**
|
|
344
309
|
* The base of a difficulty calculator.
|
|
345
310
|
*/
|
|
346
|
-
declare abstract class DifficultyCalculator {
|
|
311
|
+
declare abstract class DifficultyCalculator<THitObject extends DifficultyHitObject, TAttributes extends DifficultyAttributes> {
|
|
347
312
|
/**
|
|
348
313
|
* The calculated beatmap.
|
|
349
314
|
*/
|
|
@@ -351,7 +316,7 @@ declare abstract class DifficultyCalculator {
|
|
|
351
316
|
/**
|
|
352
317
|
* The difficulty objects of the beatmap.
|
|
353
318
|
*/
|
|
354
|
-
readonly objects:
|
|
319
|
+
readonly objects: THitObject[];
|
|
355
320
|
/**
|
|
356
321
|
* The modifications applied.
|
|
357
322
|
*/
|
|
@@ -369,9 +334,13 @@ declare abstract class DifficultyCalculator {
|
|
|
369
334
|
*/
|
|
370
335
|
readonly strainPeaks: StrainPeaks;
|
|
371
336
|
/**
|
|
372
|
-
*
|
|
337
|
+
* The difficulty attributes that can be used to calculate performance points.
|
|
373
338
|
*/
|
|
374
|
-
abstract readonly attributes:
|
|
339
|
+
abstract readonly attributes: TAttributes;
|
|
340
|
+
/**
|
|
341
|
+
* The difficulty attributes that can be cached. It can also be used to calculate performance points.
|
|
342
|
+
*/
|
|
343
|
+
abstract get cacheableAttributes(): CacheableDifficultyAttributes<TAttributes>;
|
|
375
344
|
protected abstract readonly difficultyMultiplier: number;
|
|
376
345
|
protected abstract readonly mode: Modes;
|
|
377
346
|
/**
|
|
@@ -444,6 +413,75 @@ declare abstract class DifficultyCalculator {
|
|
|
444
413
|
protected basePerformanceValue(rating: number): number;
|
|
445
414
|
}
|
|
446
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Represents an osu!droid hit object with difficulty calculation values.
|
|
418
|
+
*/
|
|
419
|
+
declare class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
420
|
+
/**
|
|
421
|
+
* The tap strain generated by the hitobject.
|
|
422
|
+
*/
|
|
423
|
+
tapStrain: number;
|
|
424
|
+
/**
|
|
425
|
+
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
426
|
+
* OD. This is used in three-finger detection.
|
|
427
|
+
*/
|
|
428
|
+
originalTapStrain: number;
|
|
429
|
+
/**
|
|
430
|
+
* The rhythm strain generated by the hitobject.
|
|
431
|
+
*/
|
|
432
|
+
rhythmStrain: number;
|
|
433
|
+
/**
|
|
434
|
+
* The flashlight strain generated by the hitobject if sliders are considered.
|
|
435
|
+
*/
|
|
436
|
+
flashlightStrainWithSliders: number;
|
|
437
|
+
/**
|
|
438
|
+
* The flashlight strain generated by the hitobject if sliders are not considered.
|
|
439
|
+
*/
|
|
440
|
+
flashlightStrainWithoutSliders: number;
|
|
441
|
+
/**
|
|
442
|
+
* The visual strain generated by the hitobject if sliders are considered.
|
|
443
|
+
*/
|
|
444
|
+
visualStrainWithSliders: number;
|
|
445
|
+
/**
|
|
446
|
+
* The visual strain generated by the hitobject if sliders are not considered.
|
|
447
|
+
*/
|
|
448
|
+
visualStrainWithoutSliders: number;
|
|
449
|
+
/**
|
|
450
|
+
* The note density of the hitobject.
|
|
451
|
+
*/
|
|
452
|
+
noteDensity: number;
|
|
453
|
+
/**
|
|
454
|
+
* The overlapping factor of the hitobject.
|
|
455
|
+
*
|
|
456
|
+
* This is used to scale visual skill.
|
|
457
|
+
*/
|
|
458
|
+
overlappingFactor: number;
|
|
459
|
+
/**
|
|
460
|
+
* @param object The underlying hitobject.
|
|
461
|
+
* @param hitObjects All difficulty hitobjects in the processed beatmap.
|
|
462
|
+
*/
|
|
463
|
+
constructor(object: PlaceableHitObject, hitObjects: DroidDifficultyHitObject[]);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Represents an osu!standard hit object with difficulty calculation values.
|
|
468
|
+
*/
|
|
469
|
+
declare class OsuDifficultyHitObject extends DifficultyHitObject {
|
|
470
|
+
/**
|
|
471
|
+
* The speed strain generated by the hitobject.
|
|
472
|
+
*/
|
|
473
|
+
speedStrain: number;
|
|
474
|
+
/**
|
|
475
|
+
* The flashlight strain generated by this hitobject.
|
|
476
|
+
*/
|
|
477
|
+
flashlightStrain: number;
|
|
478
|
+
/**
|
|
479
|
+
* @param object The underlying hitobject.
|
|
480
|
+
* @param hitObjects All difficulty hitobjects in the processed beatmap.
|
|
481
|
+
*/
|
|
482
|
+
constructor(object: PlaceableHitObject, hitObjects: OsuDifficultyHitObject[]);
|
|
483
|
+
}
|
|
484
|
+
|
|
447
485
|
/**
|
|
448
486
|
* A converter used to convert normal hitobjects into difficulty hitobjects.
|
|
449
487
|
*/
|
|
@@ -467,6 +505,28 @@ declare class DifficultyHitObjectCreator {
|
|
|
467
505
|
private maximumSliderRadius;
|
|
468
506
|
private readonly assumedSliderRadius;
|
|
469
507
|
private readonly minDeltaTime;
|
|
508
|
+
/**
|
|
509
|
+
* Generates difficulty hitobjects for difficulty calculation.
|
|
510
|
+
*/
|
|
511
|
+
generateDifficultyObjects(params: {
|
|
512
|
+
objects: readonly HitObject[];
|
|
513
|
+
circleSize: number;
|
|
514
|
+
mods: Mod[];
|
|
515
|
+
speedMultiplier: number;
|
|
516
|
+
mode: Modes.droid;
|
|
517
|
+
preempt?: number;
|
|
518
|
+
}): DroidDifficultyHitObject[];
|
|
519
|
+
/**
|
|
520
|
+
* Generates difficulty hitobjects for difficulty calculation.
|
|
521
|
+
*/
|
|
522
|
+
generateDifficultyObjects(params: {
|
|
523
|
+
objects: readonly HitObject[];
|
|
524
|
+
circleSize: number;
|
|
525
|
+
mods: Mod[];
|
|
526
|
+
speedMultiplier: number;
|
|
527
|
+
mode: Modes.osu;
|
|
528
|
+
preempt?: number;
|
|
529
|
+
}): OsuDifficultyHitObject[];
|
|
470
530
|
/**
|
|
471
531
|
* Generates difficulty hitobjects for difficulty calculation.
|
|
472
532
|
*/
|
|
@@ -605,12 +665,12 @@ declare class DroidAim extends DroidSkill {
|
|
|
605
665
|
private readonly withSliders;
|
|
606
666
|
private currentAimStrain;
|
|
607
667
|
constructor(mods: Mod[], withSliders: boolean);
|
|
608
|
-
protected strainValueAt(current:
|
|
609
|
-
protected calculateInitialStrain(time: number, current:
|
|
668
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
669
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
610
670
|
/**
|
|
611
671
|
* @param current The hitobject to save to.
|
|
612
672
|
*/
|
|
613
|
-
protected saveToHitObject(current:
|
|
673
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
614
674
|
}
|
|
615
675
|
|
|
616
676
|
/**
|
|
@@ -633,7 +693,7 @@ declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
|
633
693
|
* @param current The current object.
|
|
634
694
|
* @param withSliders Whether to take slider difficulty into account.
|
|
635
695
|
*/
|
|
636
|
-
static evaluateDifficultyOf(current:
|
|
696
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
637
697
|
/**
|
|
638
698
|
* Calculates the snap aim strain of a hitobject.
|
|
639
699
|
*/
|
|
@@ -740,7 +800,7 @@ interface ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes {
|
|
|
740
800
|
/**
|
|
741
801
|
* A difficulty calculator for osu!droid gamemode.
|
|
742
802
|
*/
|
|
743
|
-
declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
803
|
+
declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidDifficultyHitObject, DroidDifficultyAttributes> {
|
|
744
804
|
/**
|
|
745
805
|
* The aim star rating of the beatmap.
|
|
746
806
|
*/
|
|
@@ -768,6 +828,7 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
768
828
|
*/
|
|
769
829
|
static readonly threeFingerStrainThreshold: number;
|
|
770
830
|
readonly attributes: ExtendedDroidDifficultyAttributes;
|
|
831
|
+
get cacheableAttributes(): CacheableDifficultyAttributes<DroidDifficultyAttributes>;
|
|
771
832
|
protected readonly difficultyMultiplier: number;
|
|
772
833
|
protected readonly mode: Modes;
|
|
773
834
|
/**
|
|
@@ -859,9 +920,9 @@ declare class DroidFlashlight extends DroidSkill {
|
|
|
859
920
|
private readonly withSliders;
|
|
860
921
|
private currentFlashlightStrain;
|
|
861
922
|
constructor(mods: Mod[], withSliders: boolean);
|
|
862
|
-
protected strainValueAt(current:
|
|
923
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
863
924
|
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
864
|
-
protected saveToHitObject(current:
|
|
925
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
865
926
|
difficultyValue(): number;
|
|
866
927
|
}
|
|
867
928
|
|
|
@@ -895,7 +956,7 @@ declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
895
956
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
896
957
|
* @param withSliders Whether to take slider difficulty into account.
|
|
897
958
|
*/
|
|
898
|
-
static evaluateDifficultyOf(current:
|
|
959
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, isHiddenMod: boolean, withSliders: boolean): number;
|
|
899
960
|
}
|
|
900
961
|
|
|
901
962
|
/**
|
|
@@ -935,7 +996,7 @@ interface PerformanceCalculationOptions {
|
|
|
935
996
|
/**
|
|
936
997
|
* The base class of performance calculators.
|
|
937
998
|
*/
|
|
938
|
-
declare abstract class PerformanceCalculator {
|
|
999
|
+
declare abstract class PerformanceCalculator<T extends DifficultyAttributes> {
|
|
939
1000
|
/**
|
|
940
1001
|
* The overall performance value.
|
|
941
1002
|
*/
|
|
@@ -947,7 +1008,7 @@ declare abstract class PerformanceCalculator {
|
|
|
947
1008
|
/**
|
|
948
1009
|
* The difficulty attributes that is being calculated.
|
|
949
1010
|
*/
|
|
950
|
-
|
|
1011
|
+
readonly difficultyAttributes: T;
|
|
951
1012
|
/**
|
|
952
1013
|
* Penalty for combo breaks.
|
|
953
1014
|
*/
|
|
@@ -970,6 +1031,10 @@ declare abstract class PerformanceCalculator {
|
|
|
970
1031
|
* Nerf factor used for nerfing beatmaps with very likely dropped sliderends.
|
|
971
1032
|
*/
|
|
972
1033
|
protected sliderNerfFactor: number;
|
|
1034
|
+
/**
|
|
1035
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1036
|
+
*/
|
|
1037
|
+
constructor(difficultyAttributes: T | CacheableDifficultyAttributes<T>);
|
|
973
1038
|
/**
|
|
974
1039
|
* Calculates the performance points of the beatmap.
|
|
975
1040
|
*
|
|
@@ -1012,12 +1077,19 @@ declare abstract class PerformanceCalculator {
|
|
|
1012
1077
|
* Calculates the amount of misses + sliderbreaks from combo.
|
|
1013
1078
|
*/
|
|
1014
1079
|
private calculateEffectiveMissCount;
|
|
1080
|
+
/**
|
|
1081
|
+
* Determines whether an attribute is a cacheable attribute.
|
|
1082
|
+
*
|
|
1083
|
+
* @param attributes The attributes to check.
|
|
1084
|
+
* @returns Whether the attributes are cacheable.
|
|
1085
|
+
*/
|
|
1086
|
+
private isCacheableAttribute;
|
|
1015
1087
|
}
|
|
1016
1088
|
|
|
1017
1089
|
/**
|
|
1018
1090
|
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
1019
1091
|
*/
|
|
1020
|
-
declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
1092
|
+
declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDifficultyAttributes> {
|
|
1021
1093
|
/**
|
|
1022
1094
|
* The aim performance value.
|
|
1023
1095
|
*/
|
|
@@ -1070,7 +1142,6 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1070
1142
|
* Can be properly obtained by analyzing the replay associated with the score.
|
|
1071
1143
|
*/
|
|
1072
1144
|
get visualSliderCheesePenalty(): number;
|
|
1073
|
-
readonly difficultyAttributes: DroidDifficultyAttributes;
|
|
1074
1145
|
protected finalMultiplier: number;
|
|
1075
1146
|
protected readonly mode: Modes;
|
|
1076
1147
|
private _aimSliderCheesePenalty;
|
|
@@ -1079,10 +1150,6 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1079
1150
|
private _tapPenalty;
|
|
1080
1151
|
private _deviation;
|
|
1081
1152
|
private _tapDeviation;
|
|
1082
|
-
/**
|
|
1083
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1084
|
-
*/
|
|
1085
|
-
constructor(difficultyAttributes: DroidDifficultyAttributes);
|
|
1086
1153
|
/**
|
|
1087
1154
|
* Applies a tap penalty value to this calculator.
|
|
1088
1155
|
*
|
|
@@ -1196,9 +1263,9 @@ declare class DroidRhythm extends DroidSkill {
|
|
|
1196
1263
|
private currentRhythmMultiplier;
|
|
1197
1264
|
private readonly hitWindow;
|
|
1198
1265
|
constructor(mods: Mod[], overallDifficulty: number);
|
|
1199
|
-
protected strainValueAt(current:
|
|
1200
|
-
protected calculateInitialStrain(time: number, current:
|
|
1201
|
-
protected saveToHitObject(current:
|
|
1266
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1267
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1268
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1202
1269
|
}
|
|
1203
1270
|
|
|
1204
1271
|
/**
|
|
@@ -1222,7 +1289,7 @@ declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
|
|
|
1222
1289
|
* @param current The current object.
|
|
1223
1290
|
* @param greatWindow The great hit window of the current object.
|
|
1224
1291
|
*/
|
|
1225
|
-
static evaluateDifficultyOf(current:
|
|
1292
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, greatWindow: number): number;
|
|
1226
1293
|
}
|
|
1227
1294
|
|
|
1228
1295
|
/**
|
|
@@ -1239,12 +1306,12 @@ declare class DroidTap extends DroidSkill {
|
|
|
1239
1306
|
private readonly greatWindow;
|
|
1240
1307
|
private readonly considerCheesability;
|
|
1241
1308
|
constructor(mods: Mod[], overallDifficulty: number, considerCheesability: boolean);
|
|
1242
|
-
protected strainValueAt(current:
|
|
1243
|
-
protected calculateInitialStrain(time: number, current:
|
|
1309
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1310
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1244
1311
|
/**
|
|
1245
1312
|
* @param current The hitobject to save to.
|
|
1246
1313
|
*/
|
|
1247
|
-
protected saveToHitObject(current:
|
|
1314
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1248
1315
|
}
|
|
1249
1316
|
|
|
1250
1317
|
/**
|
|
@@ -1271,7 +1338,7 @@ declare abstract class DroidTapEvaluator extends SpeedEvaluator {
|
|
|
1271
1338
|
* @param greatWindow The great hit window of the current object.
|
|
1272
1339
|
* @param considerCheesability Whether to consider cheesability.
|
|
1273
1340
|
*/
|
|
1274
|
-
static evaluateDifficultyOf(current:
|
|
1341
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, greatWindow: number, considerCheesability: boolean): number;
|
|
1275
1342
|
}
|
|
1276
1343
|
|
|
1277
1344
|
/**
|
|
@@ -1288,9 +1355,9 @@ declare class DroidVisual extends DroidSkill {
|
|
|
1288
1355
|
private currentRhythmMultiplier;
|
|
1289
1356
|
private readonly skillMultiplier;
|
|
1290
1357
|
constructor(mods: Mod[], withSliders: boolean);
|
|
1291
|
-
protected strainValueAt(current:
|
|
1292
|
-
protected calculateInitialStrain(time: number, current:
|
|
1293
|
-
protected saveToHitObject(current:
|
|
1358
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1359
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1360
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1294
1361
|
}
|
|
1295
1362
|
|
|
1296
1363
|
/**
|
|
@@ -1312,7 +1379,7 @@ declare abstract class DroidVisualEvaluator {
|
|
|
1312
1379
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1313
1380
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1314
1381
|
*/
|
|
1315
|
-
static evaluateDifficultyOf(current:
|
|
1382
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, isHiddenMod: boolean, withSliders: boolean): number;
|
|
1316
1383
|
}
|
|
1317
1384
|
|
|
1318
1385
|
/**
|
|
@@ -1350,7 +1417,7 @@ interface OsuDifficultyAttributes extends DifficultyAttributes {
|
|
|
1350
1417
|
/**
|
|
1351
1418
|
* A difficulty calculator for osu!standard gamemode.
|
|
1352
1419
|
*/
|
|
1353
|
-
declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
1420
|
+
declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuDifficultyHitObject, OsuDifficultyAttributes> {
|
|
1354
1421
|
/**
|
|
1355
1422
|
* The aim star rating of the beatmap.
|
|
1356
1423
|
*/
|
|
@@ -1364,6 +1431,7 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
1364
1431
|
*/
|
|
1365
1432
|
flashlight: number;
|
|
1366
1433
|
readonly attributes: OsuDifficultyAttributes;
|
|
1434
|
+
get cacheableAttributes(): CacheableDifficultyAttributes<OsuDifficultyAttributes>;
|
|
1367
1435
|
protected readonly difficultyMultiplier: number;
|
|
1368
1436
|
protected readonly mode: Modes;
|
|
1369
1437
|
/**
|
|
@@ -1445,12 +1513,12 @@ declare class OsuAim extends OsuSkill {
|
|
|
1445
1513
|
private readonly skillMultiplier;
|
|
1446
1514
|
private readonly withSliders;
|
|
1447
1515
|
constructor(mods: Mod[], withSliders: boolean);
|
|
1448
|
-
protected strainValueAt(current:
|
|
1449
|
-
protected calculateInitialStrain(time: number, current:
|
|
1516
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1517
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1450
1518
|
/**
|
|
1451
1519
|
* @param current The hitobject to save to.
|
|
1452
1520
|
*/
|
|
1453
|
-
protected saveToHitObject(current:
|
|
1521
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1454
1522
|
}
|
|
1455
1523
|
|
|
1456
1524
|
/**
|
|
@@ -1468,7 +1536,7 @@ declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
|
1468
1536
|
* @param current The current object.
|
|
1469
1537
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1470
1538
|
*/
|
|
1471
|
-
static evaluateDifficultyOf(current:
|
|
1539
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, withSliders: boolean): number;
|
|
1472
1540
|
}
|
|
1473
1541
|
|
|
1474
1542
|
/**
|
|
@@ -1483,9 +1551,9 @@ declare class OsuFlashlight extends OsuSkill {
|
|
|
1483
1551
|
private readonly skillMultiplier;
|
|
1484
1552
|
private readonly isHidden;
|
|
1485
1553
|
constructor(mods: Mod[]);
|
|
1486
|
-
protected strainValueAt(current:
|
|
1487
|
-
protected calculateInitialStrain(time: number, current:
|
|
1488
|
-
protected saveToHitObject(current:
|
|
1554
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1555
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1556
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1489
1557
|
}
|
|
1490
1558
|
|
|
1491
1559
|
/**
|
|
@@ -1504,13 +1572,13 @@ declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
1504
1572
|
* @param current The current object.
|
|
1505
1573
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1506
1574
|
*/
|
|
1507
|
-
static evaluateDifficultyOf(current:
|
|
1575
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, isHiddenMod: boolean): number;
|
|
1508
1576
|
}
|
|
1509
1577
|
|
|
1510
1578
|
/**
|
|
1511
1579
|
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1512
1580
|
*/
|
|
1513
|
-
declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
1581
|
+
declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficultyAttributes> {
|
|
1514
1582
|
/**
|
|
1515
1583
|
* The aim performance value.
|
|
1516
1584
|
*/
|
|
@@ -1527,15 +1595,10 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
1527
1595
|
* The flashlight performance value.
|
|
1528
1596
|
*/
|
|
1529
1597
|
flashlight: number;
|
|
1530
|
-
readonly difficultyAttributes: OsuDifficultyAttributes;
|
|
1531
1598
|
protected finalMultiplier: number;
|
|
1532
1599
|
protected readonly mode: Modes;
|
|
1533
1600
|
protected calculateValues(): void;
|
|
1534
1601
|
protected calculateTotalValue(): number;
|
|
1535
|
-
/**
|
|
1536
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1537
|
-
*/
|
|
1538
|
-
constructor(difficultyAttributes: OsuDifficultyAttributes);
|
|
1539
1602
|
/**
|
|
1540
1603
|
* Calculates the aim performance value of the beatmap.
|
|
1541
1604
|
*/
|
|
@@ -1566,7 +1629,7 @@ declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
|
|
|
1566
1629
|
* @param current The current object.
|
|
1567
1630
|
* @param greatWindow The great hit window of the current object.
|
|
1568
1631
|
*/
|
|
1569
|
-
static evaluateDifficultyOf(current:
|
|
1632
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, greatWindow: number): number;
|
|
1570
1633
|
}
|
|
1571
1634
|
|
|
1572
1635
|
/**
|
|
@@ -1586,12 +1649,12 @@ declare class OsuSpeed extends OsuSkill {
|
|
|
1586
1649
|
/**
|
|
1587
1650
|
* @param current The hitobject to calculate.
|
|
1588
1651
|
*/
|
|
1589
|
-
protected strainValueAt(current:
|
|
1590
|
-
protected calculateInitialStrain(time: number, current:
|
|
1652
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1653
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1591
1654
|
/**
|
|
1592
1655
|
* @param current The hitobject to save to.
|
|
1593
1656
|
*/
|
|
1594
|
-
protected saveToHitObject(current:
|
|
1657
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1595
1658
|
}
|
|
1596
1659
|
|
|
1597
1660
|
/**
|
|
@@ -1612,7 +1675,7 @@ declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
|
1612
1675
|
* @param current The current object.
|
|
1613
1676
|
* @param greatWindow The great hit window of the current object.
|
|
1614
1677
|
*/
|
|
1615
|
-
static evaluateDifficultyOf(current:
|
|
1678
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, greatWindow: number): number;
|
|
1616
1679
|
}
|
|
1617
1680
|
|
|
1618
|
-
export { AimEvaluator, type CalculationOptions, type DifficultSlider, type DifficultyAttributes, type DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidAimEvaluator, type DroidDifficultyAttributes, DroidDifficultyCalculator, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, type ExtendedDroidDifficultyAttributes, FlashlightEvaluator, type HighStrainSection, MapStars, OsuAim, OsuAimEvaluator, type OsuDifficultyAttributes, OsuDifficultyCalculator, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, type PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, type StrainPeaks };
|
|
1681
|
+
export { AimEvaluator, type CacheableDifficultyAttributes, type CalculationOptions, type DifficultSlider, type DifficultyAttributes, type DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidAimEvaluator, type DroidDifficultyAttributes, DroidDifficultyCalculator, DroidDifficultyHitObject, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, type ExtendedDroidDifficultyAttributes, FlashlightEvaluator, type HighStrainSection, MapStars, OsuAim, OsuAimEvaluator, type OsuDifficultyAttributes, OsuDifficultyCalculator, OsuDifficultyHitObject, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, type PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, type StrainPeaks };
|