@rian8337/osu-difficulty-calculator 4.0.0-beta.90 → 4.0.0-beta.91
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 +3505 -2693
- package/package.json +3 -3
- package/typings/index.d.ts +1054 -835
package/typings/index.d.ts
CHANGED
|
@@ -1,115 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Holds data that can be used to calculate performance points.
|
|
5
|
-
*/
|
|
6
|
-
interface IDifficultyAttributes {
|
|
7
|
-
/**
|
|
8
|
-
* The mods which were applied to the beatmap.
|
|
9
|
-
*/
|
|
10
|
-
mods: ModMap;
|
|
11
|
-
/**
|
|
12
|
-
* The combined star rating of all skills.
|
|
13
|
-
*/
|
|
14
|
-
starRating: number;
|
|
15
|
-
/**
|
|
16
|
-
* The maximum achievable combo.
|
|
17
|
-
*/
|
|
18
|
-
maxCombo: number;
|
|
19
|
-
/**
|
|
20
|
-
* The difficulty corresponding to the aim skill.
|
|
21
|
-
*/
|
|
22
|
-
aimDifficulty: number;
|
|
23
|
-
/**
|
|
24
|
-
* The difficulty corresponding to the flashlight skill.
|
|
25
|
-
*/
|
|
26
|
-
flashlightDifficulty: number;
|
|
27
|
-
/**
|
|
28
|
-
* The number of clickable objects weighted by difficulty.
|
|
29
|
-
*
|
|
30
|
-
* Related to speed/tap difficulty.
|
|
31
|
-
*/
|
|
32
|
-
speedNoteCount: number;
|
|
33
|
-
/**
|
|
34
|
-
* Describes how much of aim difficulty is contributed to by hitcircles or sliders.
|
|
35
|
-
*
|
|
36
|
-
* A value closer to 1 indicates most of aim difficulty is contributed by hitcircles.
|
|
37
|
-
*
|
|
38
|
-
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
39
|
-
*/
|
|
40
|
-
sliderFactor: number;
|
|
41
|
-
/**
|
|
42
|
-
* The overall clock rate that was applied to the beatmap.
|
|
43
|
-
*/
|
|
44
|
-
clockRate: number;
|
|
45
|
-
/**
|
|
46
|
-
* The perceived overall difficulty **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
47
|
-
*
|
|
48
|
-
* Rate-adjusting mods don't directly affect the overall difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
49
|
-
*/
|
|
50
|
-
overallDifficulty: number;
|
|
51
|
-
/**
|
|
52
|
-
* The number of hitcircles in the beatmap.
|
|
53
|
-
*/
|
|
54
|
-
hitCircleCount: number;
|
|
55
|
-
/**
|
|
56
|
-
* The number of sliders in the beatmap.
|
|
57
|
-
*/
|
|
58
|
-
sliderCount: number;
|
|
59
|
-
/**
|
|
60
|
-
* The number of spinners in the beatmap.
|
|
61
|
-
*/
|
|
62
|
-
spinnerCount: number;
|
|
63
|
-
/**
|
|
64
|
-
* The number of sliders weighted by difficulty.
|
|
65
|
-
*/
|
|
66
|
-
aimDifficultSliderCount: number;
|
|
67
|
-
/**
|
|
68
|
-
* The amount of strains that are considered difficult with respect to the aim skill.
|
|
69
|
-
*/
|
|
70
|
-
aimDifficultStrainCount: number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Represents difficulty attributes that can be cached.
|
|
75
|
-
*/
|
|
76
|
-
type CacheableDifficultyAttributes<T extends IDifficultyAttributes> = Omit<T, "mods" | "toCacheableAttributes"> & {
|
|
77
|
-
/**
|
|
78
|
-
* The mods which were applied to the beatmap.
|
|
79
|
-
*/
|
|
80
|
-
mods: SerializedMod[];
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Holds data that can be used to calculate performance points.
|
|
85
|
-
*/
|
|
86
|
-
declare abstract class DifficultyAttributes implements IDifficultyAttributes {
|
|
87
|
-
mods: ModMap;
|
|
88
|
-
starRating: number;
|
|
89
|
-
maxCombo: number;
|
|
90
|
-
aimDifficulty: number;
|
|
91
|
-
flashlightDifficulty: number;
|
|
92
|
-
speedNoteCount: number;
|
|
93
|
-
sliderFactor: number;
|
|
94
|
-
clockRate: number;
|
|
95
|
-
overallDifficulty: number;
|
|
96
|
-
hitCircleCount: number;
|
|
97
|
-
sliderCount: number;
|
|
98
|
-
spinnerCount: number;
|
|
99
|
-
aimDifficultSliderCount: number;
|
|
100
|
-
aimDifficultStrainCount: number;
|
|
101
|
-
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IDifficultyAttributes>);
|
|
102
|
-
/**
|
|
103
|
-
* Converts this `DifficultyAttributes` instance to an attribute structure that can be cached.
|
|
104
|
-
*
|
|
105
|
-
* @returns The cacheable attributes.
|
|
106
|
-
*/
|
|
107
|
-
toCacheableAttributes(): CacheableDifficultyAttributes<this>;
|
|
108
|
-
/**
|
|
109
|
-
* Returns a string representation of the difficulty attributes.
|
|
110
|
-
*/
|
|
111
|
-
toString(): string;
|
|
112
|
-
}
|
|
1
|
+
import { PlaceableHitObject, Vector2, Modes, ModMap, HitResult, HitWindow, SerializedMod, PlayableBeatmap, Mod, Beatmap, Accuracy, DroidPlayableBeatmap, OsuPlayableBeatmap } from '@rian8337/osu-base';
|
|
113
2
|
|
|
114
3
|
/**
|
|
115
4
|
* Represents a hit object with difficulty calculation values.
|
|
@@ -133,10 +22,18 @@ declare abstract class DifficultyHitObject {
|
|
|
133
22
|
* The aim strain generated by the hitobject if sliders are not considered.
|
|
134
23
|
*/
|
|
135
24
|
aimStrainWithoutSliders: number;
|
|
25
|
+
/**
|
|
26
|
+
* The flashlight strain generated by the hitobject.
|
|
27
|
+
*/
|
|
28
|
+
flashlightStrain: number;
|
|
136
29
|
/**
|
|
137
30
|
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
138
31
|
*/
|
|
139
32
|
rhythmMultiplier: number;
|
|
33
|
+
/**
|
|
34
|
+
* The normalized distance from the start position of the previous hitobject to the start position of this hitobject.
|
|
35
|
+
*/
|
|
36
|
+
jumpDistance: number;
|
|
140
37
|
/**
|
|
141
38
|
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
142
39
|
*
|
|
@@ -188,7 +85,18 @@ declare abstract class DifficultyHitObject {
|
|
|
188
85
|
*
|
|
189
86
|
* Calculated as the angle between the circles (current-2, current-1, current).
|
|
190
87
|
*/
|
|
191
|
-
|
|
88
|
+
angleSigned: number | null;
|
|
89
|
+
/**
|
|
90
|
+
* Unsigned angle the player has to take to hit this hitobject.
|
|
91
|
+
*
|
|
92
|
+
* Calculated as the angle between the circles (current-2, current-1, current).
|
|
93
|
+
*/
|
|
94
|
+
get angle(): number | null;
|
|
95
|
+
/**
|
|
96
|
+
* Angle of the vector created between current and current-1 normalized to consider
|
|
97
|
+
* symmetrical vectors in any axis to be the same angle.
|
|
98
|
+
*/
|
|
99
|
+
normalizedVectorAngle: number | null;
|
|
192
100
|
/**
|
|
193
101
|
* The amount of milliseconds elapsed between this hitobject and the last hitobject.
|
|
194
102
|
*/
|
|
@@ -197,6 +105,11 @@ declare abstract class DifficultyHitObject {
|
|
|
197
105
|
* The amount of milliseconds elapsed since the start time of the previous hitobject, with a minimum of 25ms.
|
|
198
106
|
*/
|
|
199
107
|
readonly strainTime: number;
|
|
108
|
+
/**
|
|
109
|
+
* The amount of milliseconds elapsed between the last {@link DifficultyHitObject}'s {@link endTime} and
|
|
110
|
+
* this {@link DifficultyHitObject}'s {@link startTime} capped to a minimum of {@link minDeltaTime}ms.
|
|
111
|
+
*/
|
|
112
|
+
readonly lastObjectEndDeltaTime: number;
|
|
200
113
|
/**
|
|
201
114
|
* Adjusted start time of the hitobject, taking speed multiplier into account.
|
|
202
115
|
*/
|
|
@@ -206,13 +119,21 @@ declare abstract class DifficultyHitObject {
|
|
|
206
119
|
*/
|
|
207
120
|
readonly endTime: number;
|
|
208
121
|
/**
|
|
209
|
-
*
|
|
122
|
+
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
123
|
+
*/
|
|
124
|
+
readonly timePreempt: number;
|
|
125
|
+
/**
|
|
126
|
+
* The beatmap clock rate.
|
|
210
127
|
*/
|
|
211
|
-
readonly
|
|
128
|
+
readonly clockRate: number;
|
|
212
129
|
/**
|
|
213
130
|
* Selective bonus for beatmaps with higher circle size.
|
|
214
131
|
*/
|
|
215
132
|
abstract get smallCircleBonus(): number;
|
|
133
|
+
/**
|
|
134
|
+
* This {@link DifficultyHitObject}'s immediate overall difficulty value calculated from the raw hitwindow.
|
|
135
|
+
*/
|
|
136
|
+
get overallDifficulty(): number;
|
|
216
137
|
/**
|
|
217
138
|
* Other hitobjects in the beatmap, including this hitobject.
|
|
218
139
|
*/
|
|
@@ -220,14 +141,14 @@ declare abstract class DifficultyHitObject {
|
|
|
220
141
|
/**
|
|
221
142
|
* The normalized radius of the hitobject.
|
|
222
143
|
*/
|
|
223
|
-
|
|
144
|
+
abstract readonly normalizedRadius: number;
|
|
224
145
|
/**
|
|
225
146
|
* The normalized diameter of the hitobject.
|
|
226
147
|
*/
|
|
227
|
-
|
|
148
|
+
get normalizedDiameter(): number;
|
|
228
149
|
protected abstract readonly mode: Modes;
|
|
229
|
-
protected
|
|
230
|
-
protected
|
|
150
|
+
protected get maximumSliderRadius(): number;
|
|
151
|
+
protected get assumedSliderRadius(): number;
|
|
231
152
|
/**
|
|
232
153
|
* The lowest possible delta time value.
|
|
233
154
|
*/
|
|
@@ -278,10 +199,10 @@ declare abstract class DifficultyHitObject {
|
|
|
278
199
|
* Calculates the opacity of the hitobject at a given time.
|
|
279
200
|
*
|
|
280
201
|
* @param time The time to calculate the hitobject's opacity at.
|
|
281
|
-
* @param mods The mods used.
|
|
202
|
+
* @param mods The mods used. Defaults to No Mod.
|
|
282
203
|
* @returns The opacity of the hitobject at the given time.
|
|
283
204
|
*/
|
|
284
|
-
opacityAt(time: number, mods
|
|
205
|
+
opacityAt(time: number, mods?: ModMap): number;
|
|
285
206
|
/**
|
|
286
207
|
* How possible is it to doubletap this object together with the next one and get perfect
|
|
287
208
|
* judgement in range from 0 to 1.
|
|
@@ -289,154 +210,210 @@ declare abstract class DifficultyHitObject {
|
|
|
289
210
|
* A value closer to 1 indicates a higher possibility.
|
|
290
211
|
*/
|
|
291
212
|
getDoubletapness(nextObj: this | null): number;
|
|
292
|
-
protected setDistances(clockRate: number): void;
|
|
293
|
-
private calculateSliderCursorPosition;
|
|
294
|
-
private getEndCursorPosition;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* A bare minimal abstract skill for fully custom skill implementations.
|
|
299
|
-
*
|
|
300
|
-
* This class should be considered a "processing" class and not persisted.
|
|
301
|
-
*/
|
|
302
|
-
declare abstract class Skill {
|
|
303
|
-
/**
|
|
304
|
-
* The mods that this skill processes.
|
|
305
|
-
*/
|
|
306
|
-
protected readonly mods: ModMap;
|
|
307
|
-
constructor(mods: ModMap);
|
|
308
213
|
/**
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
* @param current The hitobject to process.
|
|
214
|
+
* Retrieves the full rate-adjusted hit window for a {@link HitResult}.
|
|
312
215
|
*/
|
|
313
|
-
|
|
216
|
+
hitWindowFor(result: HitResult): number;
|
|
314
217
|
/**
|
|
315
|
-
*
|
|
218
|
+
* The {@link HitWindow} for this {@link DifficultyHitObject}.
|
|
316
219
|
*/
|
|
317
|
-
|
|
220
|
+
protected get rawHitWindow(): HitWindow;
|
|
221
|
+
private setDistances;
|
|
222
|
+
private calculateAngle;
|
|
223
|
+
private calculateSliderAngle;
|
|
224
|
+
private calculateSliderCursorPosition;
|
|
225
|
+
private getEndCursorPosition;
|
|
318
226
|
}
|
|
319
227
|
|
|
320
228
|
/**
|
|
321
|
-
*
|
|
229
|
+
* Holds data that can be used to calculate performance points.
|
|
322
230
|
*/
|
|
323
|
-
interface
|
|
324
|
-
/**
|
|
325
|
-
* The strain peaks of aim difficulty if sliders are considered.
|
|
326
|
-
*/
|
|
327
|
-
aimWithSliders: readonly number[];
|
|
328
|
-
/**
|
|
329
|
-
* The strain peaks of aim difficulty if sliders are not considered.
|
|
330
|
-
*/
|
|
331
|
-
aimWithoutSliders: readonly number[];
|
|
231
|
+
interface IDifficultyAttributes {
|
|
332
232
|
/**
|
|
333
|
-
* The
|
|
233
|
+
* The mods which were applied to the beatmap.
|
|
334
234
|
*/
|
|
335
|
-
|
|
235
|
+
mods: ModMap;
|
|
336
236
|
/**
|
|
337
|
-
* The
|
|
237
|
+
* The combined star rating of all skills.
|
|
338
238
|
*/
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
344
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
345
|
-
*/
|
|
346
|
-
declare abstract class StrainSkill extends Skill {
|
|
239
|
+
starRating: number;
|
|
347
240
|
/**
|
|
348
|
-
*
|
|
241
|
+
* The maximum achievable combo.
|
|
349
242
|
*/
|
|
350
|
-
|
|
243
|
+
maxCombo: number;
|
|
351
244
|
/**
|
|
352
|
-
* The
|
|
353
|
-
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
245
|
+
* The difficulty corresponding to the aim skill.
|
|
354
246
|
*/
|
|
355
|
-
|
|
247
|
+
aimDifficulty: number;
|
|
356
248
|
/**
|
|
357
|
-
* The
|
|
249
|
+
* The difficulty corresponding to the flashlight skill.
|
|
358
250
|
*/
|
|
359
|
-
|
|
251
|
+
flashlightDifficulty: number;
|
|
360
252
|
/**
|
|
361
|
-
*
|
|
253
|
+
* The number of clickable objects weighted by difficulty.
|
|
362
254
|
*
|
|
363
|
-
*
|
|
364
|
-
*/
|
|
365
|
-
protected abstract readonly strainDecayBase: number;
|
|
366
|
-
protected readonly _objectStrains: number[];
|
|
367
|
-
protected difficulty: number;
|
|
368
|
-
/**
|
|
369
|
-
* The strains of hitobjects.
|
|
255
|
+
* Related to speed/tap difficulty.
|
|
370
256
|
*/
|
|
371
|
-
|
|
372
|
-
private readonly sectionLength;
|
|
373
|
-
private currentStrain;
|
|
374
|
-
private currentSectionPeak;
|
|
375
|
-
private currentSectionEnd;
|
|
257
|
+
speedNoteCount: number;
|
|
376
258
|
/**
|
|
377
|
-
*
|
|
259
|
+
* Describes how much of aim difficulty is contributed to by hitcircles or sliders.
|
|
378
260
|
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
|
|
382
|
-
static difficultyToPerformance(difficulty: number): number;
|
|
383
|
-
process(current: DifficultyHitObject): void;
|
|
384
|
-
/**
|
|
385
|
-
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
261
|
+
* A value closer to 1 indicates most of aim difficulty is contributed by hitcircles.
|
|
262
|
+
*
|
|
263
|
+
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
386
264
|
*/
|
|
387
|
-
|
|
265
|
+
sliderFactor: number;
|
|
388
266
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* The result is scaled by clock rate as it affects the total number of strains.
|
|
267
|
+
* The overall clock rate that was applied to the beatmap.
|
|
392
268
|
*/
|
|
393
|
-
|
|
269
|
+
clockRate: number;
|
|
394
270
|
/**
|
|
395
|
-
*
|
|
271
|
+
* The perceived overall difficulty **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
396
272
|
*
|
|
397
|
-
*
|
|
273
|
+
* Rate-adjusting mods don't directly affect the overall difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
398
274
|
*/
|
|
399
|
-
|
|
275
|
+
overallDifficulty: number;
|
|
400
276
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* @param current The object at which the strain section starts.
|
|
404
|
-
* @returns The start time of the strain section.
|
|
277
|
+
* The number of hitcircles in the beatmap.
|
|
405
278
|
*/
|
|
406
|
-
|
|
279
|
+
hitCircleCount: number;
|
|
407
280
|
/**
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* @param current The hitobject to calculate.
|
|
281
|
+
* The number of sliders in the beatmap.
|
|
411
282
|
*/
|
|
412
|
-
|
|
283
|
+
sliderCount: number;
|
|
413
284
|
/**
|
|
414
|
-
*
|
|
285
|
+
* The number of spinners in the beatmap.
|
|
415
286
|
*/
|
|
416
|
-
|
|
287
|
+
spinnerCount: number;
|
|
417
288
|
/**
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
* @param time The time to retrieve the peak strain at.
|
|
421
|
-
* @param current The current hit object.
|
|
422
|
-
* @returns The peak strain.
|
|
289
|
+
* The number of sliders weighted by difficulty.
|
|
423
290
|
*/
|
|
424
|
-
|
|
291
|
+
aimDifficultSliderCount: number;
|
|
425
292
|
/**
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
* @param time The beginning of the new section in milliseconds.
|
|
429
|
-
* @param current The current hitobject.
|
|
293
|
+
* The amount of strains that are considered difficult with respect to the aim skill.
|
|
430
294
|
*/
|
|
431
|
-
|
|
295
|
+
aimDifficultStrainCount: number;
|
|
432
296
|
}
|
|
433
297
|
|
|
434
298
|
/**
|
|
435
|
-
*
|
|
299
|
+
* Represents difficulty attributes that can be cached.
|
|
436
300
|
*/
|
|
437
|
-
|
|
301
|
+
type CacheableDifficultyAttributes<T extends IDifficultyAttributes> = Omit<T, "mods" | "toCacheableAttributes"> & {
|
|
438
302
|
/**
|
|
439
|
-
*
|
|
303
|
+
* The mods which were applied to the beatmap.
|
|
304
|
+
*/
|
|
305
|
+
mods: SerializedMod[];
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Holds data that can be used to calculate performance points.
|
|
310
|
+
*/
|
|
311
|
+
declare abstract class DifficultyAttributes implements IDifficultyAttributes {
|
|
312
|
+
mods: ModMap;
|
|
313
|
+
starRating: number;
|
|
314
|
+
maxCombo: number;
|
|
315
|
+
aimDifficulty: number;
|
|
316
|
+
flashlightDifficulty: number;
|
|
317
|
+
speedNoteCount: number;
|
|
318
|
+
sliderFactor: number;
|
|
319
|
+
clockRate: number;
|
|
320
|
+
overallDifficulty: number;
|
|
321
|
+
hitCircleCount: number;
|
|
322
|
+
sliderCount: number;
|
|
323
|
+
spinnerCount: number;
|
|
324
|
+
aimDifficultSliderCount: number;
|
|
325
|
+
aimDifficultStrainCount: number;
|
|
326
|
+
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IDifficultyAttributes>);
|
|
327
|
+
/**
|
|
328
|
+
* Converts this `DifficultyAttributes` instance to an attribute structure that can be cached.
|
|
329
|
+
*
|
|
330
|
+
* @returns The cacheable attributes.
|
|
331
|
+
*/
|
|
332
|
+
toCacheableAttributes(): CacheableDifficultyAttributes<this>;
|
|
333
|
+
/**
|
|
334
|
+
* Returns a string representation of the difficulty attributes.
|
|
335
|
+
*/
|
|
336
|
+
toString(): string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Represents the strain peaks of various calculated difficulties.
|
|
341
|
+
*/
|
|
342
|
+
interface StrainPeaks {
|
|
343
|
+
/**
|
|
344
|
+
* The strain peaks of aim difficulty if sliders are considered.
|
|
345
|
+
*/
|
|
346
|
+
aimWithSliders: readonly number[];
|
|
347
|
+
/**
|
|
348
|
+
* The strain peaks of aim difficulty if sliders are not considered.
|
|
349
|
+
*/
|
|
350
|
+
aimWithoutSliders: readonly number[];
|
|
351
|
+
/**
|
|
352
|
+
* The strain peaks of speed difficulty.
|
|
353
|
+
*/
|
|
354
|
+
speed: readonly number[];
|
|
355
|
+
/**
|
|
356
|
+
* The strain peaks of flashlight difficulty.
|
|
357
|
+
*/
|
|
358
|
+
flashlight: readonly number[];
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* An interface for `Skill`s that have peak difficulties.
|
|
363
|
+
*/
|
|
364
|
+
interface IHasPeakDifficulty {
|
|
365
|
+
/**
|
|
366
|
+
* The peak difficulties calculated by this `Skill`.
|
|
367
|
+
*/
|
|
368
|
+
get peaks(): readonly number[];
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* A bare minimal abstract skill for fully custom skill implementations.
|
|
373
|
+
*/
|
|
374
|
+
declare abstract class Skill {
|
|
375
|
+
/**
|
|
376
|
+
* The mods that this skill processes.
|
|
377
|
+
*/
|
|
378
|
+
protected readonly mods: ModMap;
|
|
379
|
+
private _objectDifficulties;
|
|
380
|
+
/**
|
|
381
|
+
* The difficulties of {@link DifficultyHitObject}s, populated by {@link Skill.process}.
|
|
382
|
+
*/
|
|
383
|
+
protected get objectDifficulties(): readonly number[];
|
|
384
|
+
constructor(mods: ModMap);
|
|
385
|
+
/**
|
|
386
|
+
* Calculates the strain value of a hitobject and stores the value in it.
|
|
387
|
+
* This value is affected by previously processed objects.
|
|
388
|
+
*
|
|
389
|
+
* @param current The hitobject to process.
|
|
390
|
+
*/
|
|
391
|
+
process(current: DifficultyHitObject): void;
|
|
392
|
+
/**
|
|
393
|
+
* Returns the calculated difficulty value representing all hitobjects that have been processed up to this point.
|
|
394
|
+
*/
|
|
395
|
+
abstract difficultyValue(): number;
|
|
396
|
+
/**
|
|
397
|
+
* Saves the calculated difficulty to a {@link DifficultyHitObject}.
|
|
398
|
+
*
|
|
399
|
+
* @param current The {@link DifficultyHitObject} to save the difficulty to.
|
|
400
|
+
* @param difficulty The difficulty to save.
|
|
401
|
+
*/
|
|
402
|
+
protected saveToHitObject(current: DifficultyHitObject, difficulty: number): void;
|
|
403
|
+
/**
|
|
404
|
+
* Calculates the difficulty value of a hitobject and stores the value in it.
|
|
405
|
+
*
|
|
406
|
+
* @param current The hitobject to process.
|
|
407
|
+
*/
|
|
408
|
+
protected abstract processInternal(current: DifficultyHitObject): number;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* The base of a difficulty calculator.
|
|
413
|
+
*/
|
|
414
|
+
declare abstract class DifficultyCalculator<TBeatmap extends PlayableBeatmap, THitObject extends DifficultyHitObject, TAttributes extends DifficultyAttributes> {
|
|
415
|
+
/**
|
|
416
|
+
* `Mod`s that adjust the difficulty of a beatmap.
|
|
440
417
|
*/
|
|
441
418
|
protected readonly difficultyAdjustmentMods: (typeof Mod)[];
|
|
442
419
|
/**
|
|
@@ -473,15 +450,16 @@ declare abstract class DifficultyCalculator<TBeatmap extends PlayableBeatmap, TH
|
|
|
473
450
|
* Creates the `Skill`s to calculate the difficulty of a `PlayableBeatmap`.
|
|
474
451
|
*
|
|
475
452
|
* @param beatmap The `PlayableBeatmap` whose difficulty will be calculated.
|
|
476
|
-
* @
|
|
453
|
+
* @returns The `Skill`s.
|
|
477
454
|
*/
|
|
478
455
|
protected abstract createSkills(beatmap: TBeatmap): Skill[];
|
|
479
456
|
/**
|
|
480
457
|
* Creates the `Skill`s to obtain the strain peaks of a `PlayableBeatmap`.
|
|
481
458
|
*
|
|
482
|
-
* @param beatmap
|
|
459
|
+
* @param beatmap The `PlayableBeatmap` whose strain peaks will be calculated.
|
|
460
|
+
* @returns The `Skill`s.
|
|
483
461
|
*/
|
|
484
|
-
protected abstract createStrainPeakSkills(beatmap: TBeatmap):
|
|
462
|
+
protected abstract createStrainPeakSkills(beatmap: TBeatmap): (Skill & IHasPeakDifficulty)[];
|
|
485
463
|
/**
|
|
486
464
|
* Creates difficulty hitobjects for this calculator.
|
|
487
465
|
*
|
|
@@ -492,12 +470,13 @@ declare abstract class DifficultyCalculator<TBeatmap extends PlayableBeatmap, TH
|
|
|
492
470
|
/**
|
|
493
471
|
* Creates a `DifficultyAttributes` object to describe a `PlayableBeatmap`'s difficulty.
|
|
494
472
|
*
|
|
495
|
-
* @param beatmap The `
|
|
473
|
+
* @param beatmap The `Beatmap` whose difficulty was calculated.
|
|
474
|
+
* @param playableBeatmap The `PlayableBeatmap` whose difficulty was calculated.
|
|
496
475
|
* @param skills The `Skill`s which processed the `PlayableBeatmap`.
|
|
497
476
|
* @param objects The `DifficultyHitObject`s which were processed.
|
|
498
477
|
* @returns The `DifficultyAttributes` object.
|
|
499
478
|
*/
|
|
500
|
-
protected abstract createDifficultyAttributes(beatmap: TBeatmap, skills: Skill[], objects: THitObject[]): TAttributes;
|
|
479
|
+
protected abstract createDifficultyAttributes(beatmap: Beatmap, playableBeatmap: TBeatmap, skills: Skill[], objects: THitObject[]): TAttributes;
|
|
501
480
|
/**
|
|
502
481
|
* Constructs a `PlayableBeatmap` from a `Beatmap` with specific `Mod`s.
|
|
503
482
|
*
|
|
@@ -509,83 +488,159 @@ declare abstract class DifficultyCalculator<TBeatmap extends PlayableBeatmap, TH
|
|
|
509
488
|
}
|
|
510
489
|
|
|
511
490
|
/**
|
|
512
|
-
* Represents
|
|
513
|
-
*
|
|
514
|
-
* This structure is a part of difficulty attributes and can be cached.
|
|
491
|
+
* Represents options for performance calculation.
|
|
515
492
|
*/
|
|
516
|
-
interface
|
|
493
|
+
interface PerformanceCalculationOptions {
|
|
517
494
|
/**
|
|
518
|
-
* The
|
|
495
|
+
* The maximum combo achieved in the score.
|
|
519
496
|
*/
|
|
520
|
-
|
|
497
|
+
combo?: number;
|
|
521
498
|
/**
|
|
522
|
-
* The
|
|
523
|
-
|
|
524
|
-
|
|
499
|
+
* The accuracy achieved in the score.
|
|
500
|
+
*/
|
|
501
|
+
accPercent?: Accuracy | number;
|
|
502
|
+
/**
|
|
503
|
+
* The amount of misses achieved in the score.
|
|
525
504
|
*
|
|
526
|
-
*
|
|
505
|
+
* If {@link accPercent} is provided as an {@link Accuracy} object, this value will be ignored.
|
|
527
506
|
*/
|
|
528
|
-
|
|
507
|
+
miss?: number;
|
|
508
|
+
/**
|
|
509
|
+
* The amount of slider ends dropped in the score.
|
|
510
|
+
*/
|
|
511
|
+
sliderEndsDropped?: number;
|
|
512
|
+
/**
|
|
513
|
+
* The amount of slider ticks missed in the score.
|
|
514
|
+
*/
|
|
515
|
+
sliderTicksMissed?: number;
|
|
516
|
+
/**
|
|
517
|
+
* The tap penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
518
|
+
*/
|
|
519
|
+
tapPenalty?: number;
|
|
520
|
+
/**
|
|
521
|
+
* The aim slider cheese penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
522
|
+
*/
|
|
523
|
+
aimSliderCheesePenalty?: number;
|
|
524
|
+
/**
|
|
525
|
+
* The total score achieved in the score.
|
|
526
|
+
*/
|
|
527
|
+
totalScore?: number;
|
|
529
528
|
}
|
|
530
529
|
|
|
531
530
|
/**
|
|
532
|
-
*
|
|
531
|
+
* The base class of performance calculators.
|
|
533
532
|
*/
|
|
534
|
-
declare class
|
|
533
|
+
declare abstract class PerformanceCalculator<T extends IDifficultyAttributes> {
|
|
535
534
|
/**
|
|
536
|
-
* The
|
|
535
|
+
* The overall performance value.
|
|
537
536
|
*/
|
|
538
|
-
|
|
537
|
+
total: number;
|
|
539
538
|
/**
|
|
540
|
-
* The
|
|
541
|
-
* OD. This is used in three-finger detection.
|
|
539
|
+
* The calculated accuracy.
|
|
542
540
|
*/
|
|
543
|
-
|
|
541
|
+
computedAccuracy: Accuracy;
|
|
544
542
|
/**
|
|
545
|
-
* The
|
|
543
|
+
* The calculated maximum combo.
|
|
546
544
|
*/
|
|
547
|
-
|
|
545
|
+
combo: number;
|
|
548
546
|
/**
|
|
549
|
-
* The
|
|
547
|
+
* The difficulty attributes that is being calculated.
|
|
550
548
|
*/
|
|
551
|
-
|
|
549
|
+
readonly difficultyAttributes: T | CacheableDifficultyAttributes<T>;
|
|
552
550
|
/**
|
|
553
|
-
* The
|
|
551
|
+
* The mods that were used.
|
|
554
552
|
*/
|
|
555
|
-
|
|
553
|
+
protected readonly mods: ModMap;
|
|
554
|
+
private _sliderEndsDropped;
|
|
556
555
|
/**
|
|
557
|
-
* The
|
|
556
|
+
* The amount of slider ends dropped in the score.
|
|
558
557
|
*/
|
|
559
|
-
|
|
558
|
+
protected get sliderEndsDropped(): number;
|
|
559
|
+
private _sliderTicksMissed;
|
|
560
|
+
/**
|
|
561
|
+
* The amount of slider ticks missed in the score.
|
|
562
|
+
*
|
|
563
|
+
* This is used to calculate the slider accuracy.
|
|
564
|
+
*/
|
|
565
|
+
protected get sliderTicksMissed(): number;
|
|
566
|
+
private _usingClassicSliderAccuracy;
|
|
567
|
+
/**
|
|
568
|
+
* Whether this score uses classic slider accuracy.
|
|
569
|
+
*/
|
|
570
|
+
protected get usingClassicSliderAccuracy(): boolean;
|
|
560
571
|
/**
|
|
561
|
-
* The
|
|
572
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
562
573
|
*/
|
|
563
|
-
|
|
574
|
+
constructor(difficultyAttributes: T | CacheableDifficultyAttributes<T>);
|
|
564
575
|
/**
|
|
565
|
-
*
|
|
576
|
+
* Calculates the performance points of the beatmap.
|
|
566
577
|
*
|
|
567
|
-
*
|
|
578
|
+
* @param options Options for performance calculation.
|
|
579
|
+
* @returns The current instance.
|
|
568
580
|
*/
|
|
569
|
-
|
|
581
|
+
calculate(options?: PerformanceCalculationOptions): this;
|
|
570
582
|
/**
|
|
571
|
-
*
|
|
583
|
+
* Returns a string representative of the class.
|
|
572
584
|
*/
|
|
573
|
-
|
|
574
|
-
private readonly radiusBuffThreshold;
|
|
575
|
-
protected readonly mode = Modes.droid;
|
|
576
|
-
protected readonly maximumSliderRadius: number;
|
|
577
|
-
get smallCircleBonus(): number;
|
|
585
|
+
abstract toString(): string;
|
|
578
586
|
/**
|
|
579
|
-
*
|
|
580
|
-
*
|
|
587
|
+
* Calculates all values that will be used for calculating the total
|
|
588
|
+
* performance value of the beatmap and stores them in this instance.
|
|
589
|
+
*/
|
|
590
|
+
protected abstract calculateValues(): void;
|
|
591
|
+
/**
|
|
592
|
+
* The total hits that can be done in the beatmap.
|
|
593
|
+
*/
|
|
594
|
+
protected get totalHits(): number;
|
|
595
|
+
/**
|
|
596
|
+
* The total hits that were successfully done.
|
|
597
|
+
*/
|
|
598
|
+
protected get totalSuccessfulHits(): number;
|
|
599
|
+
/**
|
|
600
|
+
* The total of imperfect hits (100s, 50s, misses).
|
|
601
|
+
*/
|
|
602
|
+
protected get totalImperfectHits(): number;
|
|
603
|
+
/**
|
|
604
|
+
* Processes given options for usage in performance calculation.
|
|
581
605
|
*
|
|
582
|
-
* @param
|
|
583
|
-
* @param lastObject The hitobject before this hitobject.
|
|
584
|
-
* @param difficultyHitObjects All difficulty hitobjects in the processed beatmap.
|
|
585
|
-
* @param clockRate The clock rate of the beatmap.
|
|
606
|
+
* @param options Options for performance calculation.
|
|
586
607
|
*/
|
|
587
|
-
|
|
588
|
-
|
|
608
|
+
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
609
|
+
/**
|
|
610
|
+
* Determines whether an attribute is a cacheable attribute.
|
|
611
|
+
*
|
|
612
|
+
* @param attributes The attributes to check.
|
|
613
|
+
* @returns Whether the attributes are cacheable.
|
|
614
|
+
*/
|
|
615
|
+
private isCacheableAttribute;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Represents an osu!droid hit object with difficulty calculation values.
|
|
620
|
+
*/
|
|
621
|
+
declare class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
622
|
+
/**
|
|
623
|
+
* The tap difficulty generated by the hitobject.
|
|
624
|
+
*/
|
|
625
|
+
tapDifficulty: number;
|
|
626
|
+
/**
|
|
627
|
+
* The tap difficulty generated by the hitobject if `strainTime` isn't modified by
|
|
628
|
+
* OD. This is used in three-finger detection.
|
|
629
|
+
*/
|
|
630
|
+
originalTapDifficulty: number;
|
|
631
|
+
/**
|
|
632
|
+
* The rhythm difficulty generated by the hitobject.
|
|
633
|
+
*/
|
|
634
|
+
rhythmDifficulty: number;
|
|
635
|
+
/**
|
|
636
|
+
* The reading difficulty generated by the hitobject.
|
|
637
|
+
*/
|
|
638
|
+
readingDifficulty: number;
|
|
639
|
+
readonly normalizedRadius = 50;
|
|
640
|
+
protected readonly mode = Modes.Droid;
|
|
641
|
+
protected get maximumSliderRadius(): number;
|
|
642
|
+
get smallCircleBonus(): number;
|
|
643
|
+
opacityAt(time: number, mods?: ModMap): number;
|
|
589
644
|
previous(backwardsIndex: number): this | null;
|
|
590
645
|
next(forwardsIndex: number): this | null;
|
|
591
646
|
/**
|
|
@@ -604,87 +659,23 @@ declare class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
|
604
659
|
}
|
|
605
660
|
|
|
606
661
|
/**
|
|
607
|
-
*
|
|
608
|
-
*
|
|
662
|
+
* Represents a slider that is considered difficult.
|
|
663
|
+
*
|
|
664
|
+
* This structure is a part of difficulty attributes and can be cached.
|
|
609
665
|
*/
|
|
610
|
-
|
|
666
|
+
interface DifficultSlider {
|
|
611
667
|
/**
|
|
612
|
-
* The
|
|
668
|
+
* The index of the slider in the beatmap.
|
|
613
669
|
*/
|
|
614
|
-
|
|
615
|
-
process(current: DifficultyHitObject): void;
|
|
616
|
-
difficultyValue(): number;
|
|
670
|
+
readonly index: number;
|
|
617
671
|
/**
|
|
618
|
-
*
|
|
672
|
+
* The difficulty rating of this slider compared to other sliders, based on the velocity of the slider.
|
|
619
673
|
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
674
|
+
* A value closer to 1 indicates that this slider is more difficult compared to most sliders.
|
|
675
|
+
*
|
|
676
|
+
* A value closer to 0 indicates that this slider is easier compared to most sliders.
|
|
622
677
|
*/
|
|
623
|
-
|
|
624
|
-
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
629
|
-
*/
|
|
630
|
-
declare class DroidAim extends DroidSkill {
|
|
631
|
-
protected readonly strainDecayBase = 0.15;
|
|
632
|
-
protected readonly reducedSectionCount = 10;
|
|
633
|
-
protected readonly reducedSectionBaseline = 0.75;
|
|
634
|
-
protected readonly starsPerDouble = 1.05;
|
|
635
|
-
private readonly skillMultiplier;
|
|
636
|
-
private currentAimStrain;
|
|
637
|
-
private readonly sliderStrains;
|
|
638
|
-
private maxSliderStrain;
|
|
639
|
-
readonly withSliders: boolean;
|
|
640
|
-
constructor(mods: ModMap, withSliders: boolean);
|
|
641
|
-
static difficultyToPerformance(difficulty: number): number;
|
|
642
|
-
/**
|
|
643
|
-
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
644
|
-
*/
|
|
645
|
-
countDifficultSliders(): number;
|
|
646
|
-
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
647
|
-
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
648
|
-
protected getObjectStrain(): number;
|
|
649
|
-
/**
|
|
650
|
-
* @param current The hitobject to save to.
|
|
651
|
-
*/
|
|
652
|
-
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* An evaluator for calculating osu!droid Aim skill.
|
|
657
|
-
*/
|
|
658
|
-
declare abstract class DroidAimEvaluator {
|
|
659
|
-
private static readonly wideAngleMultiplier;
|
|
660
|
-
private static readonly acuteAngleMultiplier;
|
|
661
|
-
private static readonly sliderMultiplier;
|
|
662
|
-
private static readonly velocityChangeMultiplier;
|
|
663
|
-
private static readonly wiggleMultiplier;
|
|
664
|
-
private static readonly singleSpacingThreshold;
|
|
665
|
-
private static readonly minSpeedBonus;
|
|
666
|
-
/**
|
|
667
|
-
* Evaluates the difficulty of aiming the current object, based on:
|
|
668
|
-
*
|
|
669
|
-
* - cursor velocity to the current object,
|
|
670
|
-
* - angle difficulty,
|
|
671
|
-
* - sharp velocity increases,
|
|
672
|
-
* - and slider difficulty.
|
|
673
|
-
*
|
|
674
|
-
* @param current The current object.
|
|
675
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
676
|
-
*/
|
|
677
|
-
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
678
|
-
/**
|
|
679
|
-
* Calculates the snap aim strain of a hitobject.
|
|
680
|
-
*/
|
|
681
|
-
private static snapAimStrainOf;
|
|
682
|
-
/**
|
|
683
|
-
* Calculates the flow aim strain of a hitobject.
|
|
684
|
-
*/
|
|
685
|
-
private static flowAimStrainOf;
|
|
686
|
-
private static calculateWideAngleBonus;
|
|
687
|
-
private static calculateAcuteAngleBonus;
|
|
678
|
+
readonly difficultyRating: number;
|
|
688
679
|
}
|
|
689
680
|
|
|
690
681
|
/**
|
|
@@ -707,26 +698,30 @@ interface IDroidDifficultyAttributes extends IDifficultyAttributes {
|
|
|
707
698
|
* The amount of strains that are considered difficult with respect to the tap skill.
|
|
708
699
|
*/
|
|
709
700
|
tapDifficultStrainCount: number;
|
|
710
|
-
/**
|
|
711
|
-
* The amount of strains that are considered difficult with respect to the flashlight skill.
|
|
712
|
-
*/
|
|
713
|
-
flashlightDifficultStrainCount: number;
|
|
714
701
|
/**
|
|
715
702
|
* The amount of notes that are considered difficult with respect to the reading skill.
|
|
716
703
|
*/
|
|
717
704
|
readingDifficultNoteCount: number;
|
|
718
705
|
/**
|
|
719
|
-
*
|
|
706
|
+
* Describes how much of {@link aimDifficultStrainCount} is contributed to by circles or sliders.
|
|
707
|
+
*
|
|
708
|
+
* A value closer to 0 indicates most of {@link aimDifficultStrainCount} is contributed by circles.
|
|
709
|
+
*
|
|
710
|
+
* A value closer to infinity indicates most of {@link aimDifficultStrainCount} is contributed by sliders.
|
|
720
711
|
*/
|
|
721
|
-
|
|
712
|
+
aimTopWeightedSliderFactor: number;
|
|
722
713
|
/**
|
|
723
|
-
* Describes how much of
|
|
714
|
+
* Describes how much of {@link tapDifficultStrainCount} is contributed to by circles or sliders.
|
|
724
715
|
*
|
|
725
|
-
* A value closer to
|
|
716
|
+
* A value closer to 0 indicates most of {@link tapDifficultStrainCount} is contributed by circles.
|
|
726
717
|
*
|
|
727
|
-
* A value closer to
|
|
718
|
+
* A value closer to infinity indicates most of {@link tapDifficultStrainCount} is contributed by sliders.
|
|
719
|
+
*/
|
|
720
|
+
tapTopWeightedSliderFactor: number;
|
|
721
|
+
/**
|
|
722
|
+
* The maximum score obtainable on the beatmap.
|
|
728
723
|
*/
|
|
729
|
-
|
|
724
|
+
maximumScore: number;
|
|
730
725
|
}
|
|
731
726
|
|
|
732
727
|
/**
|
|
@@ -734,13 +729,13 @@ interface IDroidDifficultyAttributes extends IDifficultyAttributes {
|
|
|
734
729
|
*/
|
|
735
730
|
declare class DroidDifficultyAttributes extends DifficultyAttributes implements IDroidDifficultyAttributes {
|
|
736
731
|
tapDifficulty: number;
|
|
737
|
-
rhythmDifficulty: number;
|
|
738
732
|
readingDifficulty: number;
|
|
739
|
-
|
|
740
|
-
|
|
733
|
+
aimTopWeightedSliderFactor: number;
|
|
734
|
+
tapTopWeightedSliderFactor: number;
|
|
741
735
|
readingDifficultNoteCount: number;
|
|
742
|
-
|
|
743
|
-
|
|
736
|
+
rhythmDifficulty: number;
|
|
737
|
+
tapDifficultStrainCount: number;
|
|
738
|
+
maximumScore: number;
|
|
744
739
|
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IDroidDifficultyAttributes>);
|
|
745
740
|
toString(): string;
|
|
746
741
|
}
|
|
@@ -806,209 +801,21 @@ declare class ExtendedDroidDifficultyAttributes extends DroidDifficultyAttribute
|
|
|
806
801
|
* A difficulty calculator for osu!droid gamemode.
|
|
807
802
|
*/
|
|
808
803
|
declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidPlayableBeatmap, DroidDifficultyHitObject, ExtendedDroidDifficultyAttributes> {
|
|
809
|
-
/**
|
|
810
|
-
* The strain threshold to start detecting for possible three-fingered section.
|
|
811
|
-
*
|
|
812
|
-
* Increasing this number will result in less sections being flagged.
|
|
813
|
-
*/
|
|
814
|
-
static readonly threeFingerStrainThreshold = 175;
|
|
815
|
-
private readonly difficultyMultiplier;
|
|
816
804
|
constructor();
|
|
817
805
|
retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
818
|
-
protected createDifficultyAttributes(beatmap: DroidPlayableBeatmap, skills: Skill[], objects: DroidDifficultyHitObject[]): ExtendedDroidDifficultyAttributes;
|
|
806
|
+
protected createDifficultyAttributes(beatmap: Beatmap, playableBeatmap: DroidPlayableBeatmap, skills: Skill[], objects: DroidDifficultyHitObject[]): ExtendedDroidDifficultyAttributes;
|
|
819
807
|
protected createPlayableBeatmap(beatmap: Beatmap, mods?: ModMap): DroidPlayableBeatmap;
|
|
820
808
|
protected createDifficultyHitObjects(beatmap: DroidPlayableBeatmap): DroidDifficultyHitObject[];
|
|
821
809
|
protected createSkills(beatmap: DroidPlayableBeatmap): Skill[];
|
|
822
|
-
protected createStrainPeakSkills(beatmap: DroidPlayableBeatmap):
|
|
810
|
+
protected createStrainPeakSkills(beatmap: DroidPlayableBeatmap): (Skill & IHasPeakDifficulty)[];
|
|
823
811
|
private populateAimAttributes;
|
|
824
812
|
private populateTapAttributes;
|
|
825
813
|
private populateRhythmAttributes;
|
|
826
814
|
private populateFlashlightAttributes;
|
|
827
815
|
private populateReadingAttributes;
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
* @param skill The `Skill` to calculate the rating of.
|
|
832
|
-
* @returns The rating of the `Skill`.
|
|
833
|
-
*/
|
|
834
|
-
private calculateRating;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
839
|
-
*/
|
|
840
|
-
declare class DroidFlashlight extends DroidSkill {
|
|
841
|
-
protected readonly strainDecayBase = 0.15;
|
|
842
|
-
protected readonly reducedSectionCount = 0;
|
|
843
|
-
protected readonly reducedSectionBaseline = 1;
|
|
844
|
-
protected readonly starsPerDouble = 1.06;
|
|
845
|
-
private readonly skillMultiplier;
|
|
846
|
-
private currentFlashlightStrain;
|
|
847
|
-
readonly withSliders: boolean;
|
|
848
|
-
constructor(mods: ModMap, withSliders: boolean);
|
|
849
|
-
static difficultyToPerformance(difficulty: number): number;
|
|
850
|
-
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
851
|
-
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
852
|
-
protected getObjectStrain(): number;
|
|
853
|
-
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
854
|
-
difficultyValue(): number;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* An evaluator for calculating osu!droid Flashlight skill.
|
|
859
|
-
*/
|
|
860
|
-
declare abstract class DroidFlashlightEvaluator {
|
|
861
|
-
private static readonly maxOpacityBonus;
|
|
862
|
-
private static readonly hiddenBonus;
|
|
863
|
-
private static readonly traceableCircleBonus;
|
|
864
|
-
private static readonly traceableObjectBonus;
|
|
865
|
-
private static readonly minVelocity;
|
|
866
|
-
private static readonly sliderMultiplier;
|
|
867
|
-
private static readonly minAngleMultiplier;
|
|
868
|
-
/**
|
|
869
|
-
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
870
|
-
*
|
|
871
|
-
* - distance between a number of previous objects and the current object,
|
|
872
|
-
* - the visual opacity of the current object,
|
|
873
|
-
* - the angle made by the current object,
|
|
874
|
-
* - length and speed of the current object (for sliders),
|
|
875
|
-
* - and whether Hidden mod is enabled.
|
|
876
|
-
*
|
|
877
|
-
* @param current The current object.
|
|
878
|
-
* @param mods The mods used.
|
|
879
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
880
|
-
*/
|
|
881
|
-
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: ModMap, withSliders: boolean): number;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Represents options for performance calculation.
|
|
886
|
-
*/
|
|
887
|
-
interface PerformanceCalculationOptions {
|
|
888
|
-
/**
|
|
889
|
-
* The maximum combo achieved in the score.
|
|
890
|
-
*/
|
|
891
|
-
combo?: number;
|
|
892
|
-
/**
|
|
893
|
-
* The accuracy achieved in the score.
|
|
894
|
-
*/
|
|
895
|
-
accPercent?: Accuracy | number;
|
|
896
|
-
/**
|
|
897
|
-
* The amount of misses achieved in the score.
|
|
898
|
-
*/
|
|
899
|
-
miss?: number;
|
|
900
|
-
/**
|
|
901
|
-
* The amount of slider ends dropped in the score.
|
|
902
|
-
*/
|
|
903
|
-
sliderEndsDropped?: number;
|
|
904
|
-
/**
|
|
905
|
-
* The amount of slider ticks missed in the score.
|
|
906
|
-
*/
|
|
907
|
-
sliderTicksMissed?: number;
|
|
908
|
-
/**
|
|
909
|
-
* The tap penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
910
|
-
*/
|
|
911
|
-
tapPenalty?: number;
|
|
912
|
-
/**
|
|
913
|
-
* The aim slider cheese penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
914
|
-
*/
|
|
915
|
-
aimSliderCheesePenalty?: number;
|
|
916
|
-
/**
|
|
917
|
-
* The flashlight slider cheese penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
918
|
-
*/
|
|
919
|
-
flashlightSliderCheesePenalty?: number;
|
|
920
|
-
/**
|
|
921
|
-
* The visual slider cheese penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
922
|
-
*/
|
|
923
|
-
visualSliderCheesePenalty?: number;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* The base class of performance calculators.
|
|
928
|
-
*/
|
|
929
|
-
declare abstract class PerformanceCalculator<T extends IDifficultyAttributes> {
|
|
930
|
-
/**
|
|
931
|
-
* The overall performance value.
|
|
932
|
-
*/
|
|
933
|
-
total: number;
|
|
934
|
-
/**
|
|
935
|
-
* The calculated accuracy.
|
|
936
|
-
*/
|
|
937
|
-
computedAccuracy: Accuracy;
|
|
938
|
-
/**
|
|
939
|
-
* The calculated maximum combo.
|
|
940
|
-
*/
|
|
941
|
-
combo: number;
|
|
942
|
-
/**
|
|
943
|
-
* The difficulty attributes that is being calculated.
|
|
944
|
-
*/
|
|
945
|
-
readonly difficultyAttributes: T | CacheableDifficultyAttributes<T>;
|
|
946
|
-
/**
|
|
947
|
-
* The mods that were used.
|
|
948
|
-
*/
|
|
949
|
-
protected readonly mods: ModMap;
|
|
950
|
-
private _sliderEndsDropped;
|
|
951
|
-
/**
|
|
952
|
-
* The amount of slider ends dropped in the score.
|
|
953
|
-
*/
|
|
954
|
-
protected get sliderEndsDropped(): number;
|
|
955
|
-
private _sliderTicksMissed;
|
|
956
|
-
/**
|
|
957
|
-
* The amount of slider ticks missed in the score.
|
|
958
|
-
*
|
|
959
|
-
* This is used to calculate the slider accuracy.
|
|
960
|
-
*/
|
|
961
|
-
protected get sliderTicksMissed(): number;
|
|
962
|
-
private _usingClassicSliderAccuracy;
|
|
963
|
-
/**
|
|
964
|
-
* Whether this score uses classic slider accuracy.
|
|
965
|
-
*/
|
|
966
|
-
protected get usingClassicSliderAccuracy(): boolean;
|
|
967
|
-
/**
|
|
968
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
969
|
-
*/
|
|
970
|
-
constructor(difficultyAttributes: T | CacheableDifficultyAttributes<T>);
|
|
971
|
-
/**
|
|
972
|
-
* Calculates the performance points of the beatmap.
|
|
973
|
-
*
|
|
974
|
-
* @param options Options for performance calculation.
|
|
975
|
-
* @returns The current instance.
|
|
976
|
-
*/
|
|
977
|
-
calculate(options?: PerformanceCalculationOptions): this;
|
|
978
|
-
/**
|
|
979
|
-
* Returns a string representative of the class.
|
|
980
|
-
*/
|
|
981
|
-
abstract toString(): string;
|
|
982
|
-
/**
|
|
983
|
-
* Calculates all values that will be used for calculating the total
|
|
984
|
-
* performance value of the beatmap and stores them in this instance.
|
|
985
|
-
*/
|
|
986
|
-
protected abstract calculateValues(): void;
|
|
987
|
-
/**
|
|
988
|
-
* The total hits that can be done in the beatmap.
|
|
989
|
-
*/
|
|
990
|
-
protected get totalHits(): number;
|
|
991
|
-
/**
|
|
992
|
-
* The total hits that were successfully done.
|
|
993
|
-
*/
|
|
994
|
-
protected get totalSuccessfulHits(): number;
|
|
995
|
-
/**
|
|
996
|
-
* The total of imperfect hits (100s, 50s, misses).
|
|
997
|
-
*/
|
|
998
|
-
protected get totalImperfectHits(): number;
|
|
999
|
-
/**
|
|
1000
|
-
* Processes given options for usage in performance calculation.
|
|
1001
|
-
*
|
|
1002
|
-
* @param options Options for performance calculation.
|
|
1003
|
-
*/
|
|
1004
|
-
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
1005
|
-
/**
|
|
1006
|
-
* Determines whether an attribute is a cacheable attribute.
|
|
1007
|
-
*
|
|
1008
|
-
* @param attributes The attributes to check.
|
|
1009
|
-
* @returns Whether the attributes are cacheable.
|
|
1010
|
-
*/
|
|
1011
|
-
private isCacheableAttribute;
|
|
816
|
+
private calculateAimDifficultyRating;
|
|
817
|
+
private calculateDifficultyRating;
|
|
818
|
+
static sumCognitionDifficulty(reading: number, flashlight: number): number;
|
|
1012
819
|
}
|
|
1013
820
|
|
|
1014
821
|
/**
|
|
@@ -1056,22 +863,21 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator<IDroidDif
|
|
|
1056
863
|
*/
|
|
1057
864
|
get aimSliderCheesePenalty(): number;
|
|
1058
865
|
/**
|
|
1059
|
-
* The
|
|
1060
|
-
*
|
|
1061
|
-
* Can be properly obtained by analyzing the replay associated with the score.
|
|
866
|
+
* The total score achieved in the score.
|
|
1062
867
|
*/
|
|
1063
|
-
get
|
|
868
|
+
get totalScore(): number | null;
|
|
1064
869
|
/**
|
|
1065
870
|
* The amount of misses, including slider breaks.
|
|
1066
871
|
*/
|
|
1067
872
|
get effectiveMissCount(): number;
|
|
1068
873
|
static readonly finalMultiplier = 1.24;
|
|
874
|
+
static readonly normExponent = 1.1;
|
|
1069
875
|
private _aimSliderCheesePenalty;
|
|
1070
|
-
private _flashlightSliderCheesePenalty;
|
|
1071
876
|
private _tapPenalty;
|
|
1072
877
|
private _effectiveMissCount;
|
|
1073
878
|
private _deviation;
|
|
1074
879
|
private _tapDeviation;
|
|
880
|
+
private _totalScore;
|
|
1075
881
|
protected calculateValues(): void;
|
|
1076
882
|
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
1077
883
|
/**
|
|
@@ -1129,111 +935,154 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator<IDroidDif
|
|
|
1129
935
|
*
|
|
1130
936
|
* Inaccuracies are capped to the number of circles in the map.
|
|
1131
937
|
*/
|
|
1132
|
-
private
|
|
938
|
+
private calculateAimDeviation;
|
|
1133
939
|
/**
|
|
1134
|
-
* Does the same as {@link
|
|
940
|
+
* Does the same as {@link calculateAimDeviation}, but only for notes and inaccuracies that are relevant to tap difficulty.
|
|
1135
941
|
*
|
|
1136
|
-
* Treats all difficult speed notes as circles, so this method can sometimes return a lower deviation than {@link
|
|
942
|
+
* Treats all difficult speed notes as circles, so this method can sometimes return a lower deviation than {@link calculateAimDeviation}.
|
|
1137
943
|
* This is fine though, since this method is only used to scale tap pp.
|
|
1138
944
|
*/
|
|
1139
945
|
private calculateTapDeviation;
|
|
1140
946
|
/**
|
|
1141
|
-
*
|
|
947
|
+
* Estimates the player's tap deviation based on the OD, given number of greats, oks, mehs and misses,
|
|
948
|
+
* assuming the player's mean hit error is 0. The estimation is consistent in that two SS scores on the
|
|
949
|
+
* same map with the same settings will always return the same deviation.
|
|
1142
950
|
*
|
|
1143
|
-
*
|
|
1144
|
-
|
|
1145
|
-
|
|
951
|
+
* Misses are ignored because they are usually due to misaiming.
|
|
952
|
+
*
|
|
953
|
+
* Greats and oks are assumed to follow a normal distribution, whereas mehs are assumed to follow a uniform distribution.
|
|
954
|
+
*/
|
|
955
|
+
private calculateDeviation;
|
|
956
|
+
/**
|
|
957
|
+
* Calculates a multiplier for tap to account for improper tapping based on the deviation and tap difficulty.
|
|
958
|
+
*
|
|
959
|
+
* [Graph](https://www.desmos.com/calculator/z5l9ebrwpi)
|
|
960
|
+
*/
|
|
961
|
+
private calculateTapHighDeviationNerf;
|
|
1146
962
|
private getHitWindow;
|
|
963
|
+
private calculateEstimatedSliderBreaks;
|
|
964
|
+
private calculateMaximumComboBasedMissCount;
|
|
965
|
+
/**
|
|
966
|
+
* Calculates the amount of misses + sliderbreaks from combo.
|
|
967
|
+
*/
|
|
968
|
+
private calculateComboBasedEstimatedMissCount;
|
|
1147
969
|
toString(): string;
|
|
1148
970
|
}
|
|
1149
971
|
|
|
1150
972
|
/**
|
|
1151
|
-
*
|
|
973
|
+
* An evaluator for calculating osu!droid agility aim difficulty.
|
|
1152
974
|
*/
|
|
1153
|
-
declare class
|
|
1154
|
-
private readonly clockRate;
|
|
1155
|
-
private readonly hitObjects;
|
|
1156
|
-
private readonly noteDifficulties;
|
|
1157
|
-
private readonly strainDecayBase;
|
|
1158
|
-
private readonly skillMultiplier;
|
|
1159
|
-
private currentNoteDifficulty;
|
|
1160
|
-
private difficulty;
|
|
1161
|
-
private noteWeightSum;
|
|
1162
|
-
constructor(mods: ModMap, clockRate: number, hitObjects: readonly PlaceableHitObject[]);
|
|
975
|
+
declare abstract class DroidAgilityEvaluator {
|
|
1163
976
|
/**
|
|
1164
|
-
*
|
|
977
|
+
* Evaluates the difficulty of fast aiming the current object.
|
|
1165
978
|
*
|
|
1166
|
-
* @param
|
|
1167
|
-
* @returns The performance value.
|
|
979
|
+
* @param current The current object.
|
|
1168
980
|
*/
|
|
1169
|
-
static
|
|
1170
|
-
|
|
1171
|
-
|
|
981
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
982
|
+
private static highBpmBonus;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* An evaluator for calculating osu!droid Flashlight skill.
|
|
987
|
+
*/
|
|
988
|
+
declare abstract class DroidFlashlightEvaluator {
|
|
989
|
+
private static readonly maxOpacityBonus;
|
|
990
|
+
private static readonly hiddenBonus;
|
|
991
|
+
private static readonly traceableCircleBonus;
|
|
992
|
+
private static readonly traceableObjectBonus;
|
|
993
|
+
private static readonly minVelocity;
|
|
994
|
+
private static readonly sliderMultiplier;
|
|
995
|
+
private static readonly minAngleMultiplier;
|
|
1172
996
|
/**
|
|
1173
|
-
*
|
|
997
|
+
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
998
|
+
*
|
|
999
|
+
* - distance between a number of previous objects and the current object,
|
|
1000
|
+
* - the visual opacity of the current object,
|
|
1001
|
+
* - the angle made by the current object,
|
|
1002
|
+
* - length and speed of the current object (for sliders),
|
|
1003
|
+
* - and whether Hidden mod is enabled.
|
|
1004
|
+
*
|
|
1005
|
+
* @param current The current object.
|
|
1006
|
+
* @param mods The mods used.
|
|
1174
1007
|
*/
|
|
1175
|
-
|
|
1176
|
-
|
|
1008
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: ModMap): number;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* An evaluator for calculating osu!droid flow aim difficulty.
|
|
1013
|
+
*/
|
|
1014
|
+
declare abstract class DroidFlowAimEvaluator {
|
|
1015
|
+
private static readonly velocityChangeMultiplier;
|
|
1016
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
1017
|
+
private static calculateOverlapFactor;
|
|
1177
1018
|
}
|
|
1178
1019
|
|
|
1179
1020
|
/**
|
|
1180
|
-
*
|
|
1021
|
+
* Evaluator for reading difficulty in osu!droid.
|
|
1181
1022
|
*/
|
|
1182
1023
|
declare abstract class DroidReadingEvaluator {
|
|
1183
|
-
private static readonly emptyModMap;
|
|
1184
1024
|
private static readonly readingWindowSize;
|
|
1185
|
-
private static readonly distanceInfluenceThreshold;
|
|
1186
1025
|
private static readonly hiddenMultiplier;
|
|
1026
|
+
private static readonly traceableMultiplier;
|
|
1187
1027
|
private static readonly densityMultiplier;
|
|
1188
1028
|
private static readonly densityDifficultyBase;
|
|
1189
1029
|
private static readonly preemptBalancingFactor;
|
|
1190
1030
|
private static readonly preemptStartingPoint;
|
|
1191
|
-
static
|
|
1031
|
+
private static readonly minimumAngleRelevancyTime;
|
|
1032
|
+
private static readonly maximumAngleRelevancyTime;
|
|
1192
1033
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1195
|
-
* @param current The current object.
|
|
1034
|
+
* Evaluates the difficulty of reading the object.
|
|
1196
1035
|
*/
|
|
1197
|
-
|
|
1036
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: ModMap): number;
|
|
1198
1037
|
/**
|
|
1199
|
-
* Calculates the density of
|
|
1038
|
+
* Calculates the density difficulty of the current object and how hard it is to aim it because of it based on:
|
|
1200
1039
|
*
|
|
1201
|
-
*
|
|
1040
|
+
* - cursor velocity to the current object,
|
|
1041
|
+
* - how many times the current object's angle was repeated,
|
|
1042
|
+
* - density of objects visible when the current object appears, and
|
|
1043
|
+
* - density of objects visible when the current object needs to be clicked.
|
|
1202
1044
|
*/
|
|
1203
|
-
private static
|
|
1045
|
+
private static calculateDensityDifficulty;
|
|
1204
1046
|
/**
|
|
1205
|
-
*
|
|
1047
|
+
* Calculates the difficulty of aiming the current object when the approach rate is very high based on:
|
|
1206
1048
|
*
|
|
1207
|
-
*
|
|
1049
|
+
* - cursor velocity to the current object,
|
|
1050
|
+
* - how many times the current object's angle was repeated, and
|
|
1051
|
+
* - how many milliseconds elapse between the approach circle appearing and touching the inner circle.
|
|
1208
1052
|
*/
|
|
1209
|
-
private static
|
|
1053
|
+
private static calculatePreemptDifficulty;
|
|
1210
1054
|
/**
|
|
1211
|
-
* Calculates
|
|
1212
|
-
* It does this by checking the difference in angle between current and past objects and sums them up
|
|
1213
|
-
* based on a range of similarity.
|
|
1055
|
+
* Calculates the difficulty of aiming the current object when the Hidden mod is active based on:
|
|
1214
1056
|
*
|
|
1215
|
-
*
|
|
1057
|
+
* - cursor velocity to the current object,
|
|
1058
|
+
* - time the current object spends invisible,
|
|
1059
|
+
* - density of objects visible when the current object appears,
|
|
1060
|
+
* - density of objects visible when the current object needs to be clicked,
|
|
1061
|
+
* - how many times the current object's angle was repeated, and
|
|
1062
|
+
* - if the current object is perfectly stacked to the previous one.
|
|
1063
|
+
*/
|
|
1064
|
+
private static calculateHiddenDifficulty;
|
|
1065
|
+
private static calculateTraceableDifficulty;
|
|
1066
|
+
private static getPastObjectDifficultyInfluence;
|
|
1067
|
+
/**
|
|
1068
|
+
* Returns a list of objects that are visible on screen at the point in time the current object becomes visible.
|
|
1069
|
+
*/
|
|
1070
|
+
private static retrievePastVisibleObjects;
|
|
1071
|
+
/**
|
|
1072
|
+
* Returns the density of objects visible at the point in time the current object needs to be clicked capped by the reading window.
|
|
1073
|
+
*/
|
|
1074
|
+
private static retrieveCurrentVisibleObjectDensity;
|
|
1075
|
+
/**
|
|
1076
|
+
* Returns a factor of how often the current object's angle has been repeated in a certain time frame.
|
|
1077
|
+
* It does this by checking the difference in angle between current and past objects and sums them based on a range of similarity.
|
|
1078
|
+
* https://www.desmos.com/calculator/eb057a4822
|
|
1216
1079
|
*/
|
|
1217
1080
|
private static getConstantAngleNerfFactor;
|
|
1081
|
+
/**
|
|
1082
|
+
* Returns a nerfing factor for when objects are very distant in time, affecting reading less.
|
|
1083
|
+
*/
|
|
1218
1084
|
private static getTimeNerfFactor;
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
1223
|
-
*/
|
|
1224
|
-
declare class DroidRhythm extends DroidSkill {
|
|
1225
|
-
protected readonly reducedSectionCount = 5;
|
|
1226
|
-
protected readonly reducedSectionBaseline = 0.75;
|
|
1227
|
-
protected readonly strainDecayBase = 0.3;
|
|
1228
|
-
protected readonly starsPerDouble = 1.75;
|
|
1229
|
-
private readonly useSliderAccuracy;
|
|
1230
|
-
private currentRhythmStrain;
|
|
1231
|
-
private currentRhythmMultiplier;
|
|
1232
|
-
constructor(mods: ModMap);
|
|
1233
|
-
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1234
|
-
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1235
|
-
protected getObjectStrain(): number;
|
|
1236
|
-
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1085
|
+
private static highBpmBonus;
|
|
1237
1086
|
}
|
|
1238
1087
|
|
|
1239
1088
|
/**
|
|
@@ -1252,43 +1101,37 @@ declare abstract class DroidRhythmEvaluator {
|
|
|
1252
1101
|
* @param useSliderAccuracy Whether to use slider accuracy.
|
|
1253
1102
|
*/
|
|
1254
1103
|
static evaluateDifficultyOf(current: DroidDifficultyHitObject, useSliderAccuracy: boolean): number;
|
|
1104
|
+
private static getEffectiveRatio;
|
|
1255
1105
|
}
|
|
1256
1106
|
|
|
1257
1107
|
/**
|
|
1258
|
-
*
|
|
1108
|
+
* An evaluator for calculating osu!droid snap aim difficulty.
|
|
1259
1109
|
*/
|
|
1260
|
-
declare class
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
private
|
|
1266
|
-
private
|
|
1267
|
-
private readonly
|
|
1268
|
-
private readonly
|
|
1269
|
-
private maxStrain;
|
|
1270
|
-
/**
|
|
1271
|
-
* The delta time of hitobjects.
|
|
1272
|
-
*/
|
|
1273
|
-
get objectDeltaTimes(): readonly number[];
|
|
1274
|
-
readonly considerCheesability: boolean;
|
|
1275
|
-
readonly strainTimeCap?: number;
|
|
1276
|
-
constructor(mods: ModMap, considerCheesability: boolean, strainTimeCap?: number);
|
|
1277
|
-
/**
|
|
1278
|
-
* The amount of notes that are relevant to the difficulty.
|
|
1279
|
-
*/
|
|
1280
|
-
relevantNoteCount(): number;
|
|
1281
|
-
/**
|
|
1282
|
-
* The delta time relevant to the difficulty.
|
|
1283
|
-
*/
|
|
1284
|
-
relevantDeltaTime(): number;
|
|
1285
|
-
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1286
|
-
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1287
|
-
protected getObjectStrain(): number;
|
|
1110
|
+
declare abstract class DroidSnapAimEvaluator {
|
|
1111
|
+
private static readonly wideAngleMultiplier;
|
|
1112
|
+
private static readonly acuteAngleMultiplier;
|
|
1113
|
+
private static readonly sliderMultiplier;
|
|
1114
|
+
private static readonly velocityChangeMultiplier;
|
|
1115
|
+
private static readonly wiggleMultiplier;
|
|
1116
|
+
private static readonly angleRepetitionNoteLimit;
|
|
1117
|
+
private static readonly maximumRepetitionNerf;
|
|
1118
|
+
private static readonly maximumVectorInfluence;
|
|
1288
1119
|
/**
|
|
1289
|
-
*
|
|
1120
|
+
* Evaluates the difficulty of aiming the current object, based on:
|
|
1121
|
+
*
|
|
1122
|
+
* - cursor velocity to the current object,
|
|
1123
|
+
* - angle difficulty,
|
|
1124
|
+
* - sharp velocity increases,
|
|
1125
|
+
* - and slider difficulty.
|
|
1126
|
+
*
|
|
1127
|
+
* @param current The current object.
|
|
1128
|
+
* @param withSliders Whether to take slider difficulty into account.
|
|
1290
1129
|
*/
|
|
1291
|
-
|
|
1130
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
1131
|
+
private static calculateWideAngleAcuteness;
|
|
1132
|
+
static calculateAcuteAngleAcuteness(angle: number): number;
|
|
1133
|
+
private static highBpmBonus;
|
|
1134
|
+
private static calculateVectorAngleRepetition;
|
|
1292
1135
|
}
|
|
1293
1136
|
|
|
1294
1137
|
/**
|
|
@@ -1306,49 +1149,9 @@ declare abstract class DroidTapEvaluator {
|
|
|
1306
1149
|
*
|
|
1307
1150
|
* @param current The current object.
|
|
1308
1151
|
* @param considerCheesability Whether to consider cheesability.
|
|
1309
|
-
* @param strainTimeCap The strain time to cap the object's strain time to.
|
|
1310
|
-
*/
|
|
1311
|
-
static evaluateDifficultyOf(current: DroidDifficultyHitObject, considerCheesability: boolean, strainTimeCap?: number): number;
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
/**
|
|
1315
|
-
* Holds data that can be used to calculate osu!standard performance points.
|
|
1316
|
-
*/
|
|
1317
|
-
interface IOsuDifficultyAttributes extends IDifficultyAttributes {
|
|
1318
|
-
/**
|
|
1319
|
-
* The perceived approach rate **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
1320
|
-
*
|
|
1321
|
-
* Rate-adjusting mods don't directly affect the approach rate difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
1322
|
-
*/
|
|
1323
|
-
approachRate: number;
|
|
1324
|
-
/**
|
|
1325
|
-
* The health drain rate of the beatmap.
|
|
1326
|
-
*/
|
|
1327
|
-
drainRate: number;
|
|
1328
|
-
/**
|
|
1329
|
-
* The difficulty corresponding to the speed skill.
|
|
1330
|
-
*/
|
|
1331
|
-
speedDifficulty: number;
|
|
1332
|
-
/**
|
|
1333
|
-
* The amount of strains that are considered difficult with respect to the speed skill.
|
|
1334
|
-
*/
|
|
1335
|
-
speedDifficultStrainCount: number;
|
|
1336
|
-
/**
|
|
1337
|
-
* Describes how much of {@link aimDifficultStrainCount} is contributed to by circles or sliders.
|
|
1338
|
-
*
|
|
1339
|
-
* A value closer to 0 indicates most of {@link aimDifficultStrainCount} is contributed by circles.
|
|
1340
|
-
*
|
|
1341
|
-
* A value closer to infinity indicates most of {@link aimDifficultStrainCount} is contributed by sliders.
|
|
1342
|
-
*/
|
|
1343
|
-
aimTopWeightedSliderFactor: number;
|
|
1344
|
-
/**
|
|
1345
|
-
* Describes how much of {@link speedDifficultStrainCount} is contributed to by circles or sliders.
|
|
1346
|
-
*
|
|
1347
|
-
* A value closer to 0 indicates most of {@link speedDifficultStrainCount} is contributed by circles.
|
|
1348
|
-
*
|
|
1349
|
-
* A value closer to infinity indicates most of {@link speedDifficultStrainCount} is contributed by sliders.
|
|
1350
1152
|
*/
|
|
1351
|
-
|
|
1153
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, considerCheesability: boolean): number;
|
|
1154
|
+
private static highBpmBonus;
|
|
1352
1155
|
}
|
|
1353
1156
|
|
|
1354
1157
|
/**
|
|
@@ -1359,53 +1162,9 @@ declare class OsuDifficultyHitObject extends DifficultyHitObject {
|
|
|
1359
1162
|
* The speed strain generated by the hitobject.
|
|
1360
1163
|
*/
|
|
1361
1164
|
speedStrain: number;
|
|
1362
|
-
|
|
1363
|
-
* The flashlight strain generated by this hitobject.
|
|
1364
|
-
*/
|
|
1365
|
-
flashlightStrain: number;
|
|
1165
|
+
readonly normalizedRadius = 50;
|
|
1366
1166
|
get smallCircleBonus(): number;
|
|
1367
|
-
protected readonly mode = Modes.
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
1372
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
1373
|
-
*/
|
|
1374
|
-
declare abstract class OsuSkill extends StrainSkill {
|
|
1375
|
-
/**
|
|
1376
|
-
* The weight by which each strain value decays.
|
|
1377
|
-
*/
|
|
1378
|
-
protected abstract readonly decayWeight: number;
|
|
1379
|
-
difficultyValue(): number;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
/**
|
|
1383
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1384
|
-
*/
|
|
1385
|
-
declare class OsuAim extends OsuSkill {
|
|
1386
|
-
protected readonly strainDecayBase = 0.15;
|
|
1387
|
-
protected readonly reducedSectionCount = 10;
|
|
1388
|
-
protected readonly reducedSectionBaseline = 0.75;
|
|
1389
|
-
protected readonly decayWeight = 0.9;
|
|
1390
|
-
private currentAimStrain;
|
|
1391
|
-
private readonly skillMultiplier;
|
|
1392
|
-
private readonly sliderStrains;
|
|
1393
|
-
readonly withSliders: boolean;
|
|
1394
|
-
constructor(mods: ModMap, withSliders: boolean);
|
|
1395
|
-
/**
|
|
1396
|
-
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
1397
|
-
*/
|
|
1398
|
-
countDifficultSliders(): number;
|
|
1399
|
-
/**
|
|
1400
|
-
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1401
|
-
*/
|
|
1402
|
-
countTopWeightedSliders(): number;
|
|
1403
|
-
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1404
|
-
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1405
|
-
/**
|
|
1406
|
-
* @param current The hitobject to save to.
|
|
1407
|
-
*/
|
|
1408
|
-
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1167
|
+
protected readonly mode = Modes.Osu;
|
|
1409
1168
|
}
|
|
1410
1169
|
|
|
1411
1170
|
/**
|
|
@@ -1433,55 +1192,6 @@ declare abstract class OsuAimEvaluator {
|
|
|
1433
1192
|
private static calculateAcuteAngleBonus;
|
|
1434
1193
|
}
|
|
1435
1194
|
|
|
1436
|
-
/**
|
|
1437
|
-
* Holds data that can be used to calculate osu!standard performance points.
|
|
1438
|
-
*/
|
|
1439
|
-
declare class OsuDifficultyAttributes extends DifficultyAttributes implements IOsuDifficultyAttributes {
|
|
1440
|
-
approachRate: number;
|
|
1441
|
-
drainRate: number;
|
|
1442
|
-
speedDifficulty: number;
|
|
1443
|
-
speedDifficultStrainCount: number;
|
|
1444
|
-
aimTopWeightedSliderFactor: number;
|
|
1445
|
-
speedTopWeightedSliderFactor: number;
|
|
1446
|
-
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IOsuDifficultyAttributes>);
|
|
1447
|
-
toString(): string;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
/**
|
|
1451
|
-
* A difficulty calculator for osu!standard gamemode.
|
|
1452
|
-
*/
|
|
1453
|
-
declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuPlayableBeatmap, OsuDifficultyHitObject, OsuDifficultyAttributes> {
|
|
1454
|
-
private readonly starRatingMultiplier;
|
|
1455
|
-
constructor();
|
|
1456
|
-
retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
1457
|
-
protected createDifficultyAttributes(beatmap: OsuPlayableBeatmap, skills: Skill[]): OsuDifficultyAttributes;
|
|
1458
|
-
protected createPlayableBeatmap(beatmap: Beatmap, mods?: ModMap): OsuPlayableBeatmap;
|
|
1459
|
-
protected createDifficultyHitObjects(beatmap: OsuPlayableBeatmap): OsuDifficultyHitObject[];
|
|
1460
|
-
protected createSkills(beatmap: OsuPlayableBeatmap): OsuSkill[];
|
|
1461
|
-
protected createStrainPeakSkills(beatmap: OsuPlayableBeatmap): StrainSkill[];
|
|
1462
|
-
private calculateMechanicalDifficultyRating;
|
|
1463
|
-
private calculateStarRating;
|
|
1464
|
-
static calculateRateAdjustedApproachRate(approachRate: number, clockRate: number): number;
|
|
1465
|
-
static calculateRateAdjustedOverallDifficulty(overallDifficulty: number, clockRate: number): number;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1470
|
-
*/
|
|
1471
|
-
declare class OsuFlashlight extends OsuSkill {
|
|
1472
|
-
protected readonly strainDecayBase = 0.15;
|
|
1473
|
-
protected readonly reducedSectionCount = 0;
|
|
1474
|
-
protected readonly reducedSectionBaseline = 1;
|
|
1475
|
-
protected readonly decayWeight = 1;
|
|
1476
|
-
private currentFlashlightStrain;
|
|
1477
|
-
private readonly skillMultiplier;
|
|
1478
|
-
static difficultyToPerformance(difficulty: number): number;
|
|
1479
|
-
difficultyValue(): number;
|
|
1480
|
-
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1481
|
-
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1482
|
-
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
1195
|
/**
|
|
1486
1196
|
* An evaluator for calculating osu!standard Flashlight skill.
|
|
1487
1197
|
*/
|
|
@@ -1507,10 +1217,210 @@ declare abstract class OsuFlashlightEvaluator {
|
|
|
1507
1217
|
}
|
|
1508
1218
|
|
|
1509
1219
|
/**
|
|
1510
|
-
*
|
|
1220
|
+
* An evaluator for calculating osu!standard Rhythm skill.
|
|
1511
1221
|
*/
|
|
1512
|
-
declare class
|
|
1513
|
-
|
|
1222
|
+
declare abstract class OsuRhythmEvaluator {
|
|
1223
|
+
private static readonly historyTimeMax;
|
|
1224
|
+
private static readonly historyObjectsMax;
|
|
1225
|
+
private static readonly rhythmOverallMultiplier;
|
|
1226
|
+
private static readonly rhythmRatioMultiplier;
|
|
1227
|
+
/**
|
|
1228
|
+
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
1229
|
+
* with historic data of the current object.
|
|
1230
|
+
*
|
|
1231
|
+
* @param current The current object.
|
|
1232
|
+
*/
|
|
1233
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject): number;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* An evaluator for calculating osu!standard speed skill.
|
|
1238
|
+
*/
|
|
1239
|
+
declare abstract class OsuSpeedEvaluator {
|
|
1240
|
+
private static readonly minSpeedBonus;
|
|
1241
|
+
private static readonly DISTANCE_MULTIPLIER;
|
|
1242
|
+
/**
|
|
1243
|
+
* Evaluates the difficulty of tapping the current object, based on:
|
|
1244
|
+
*
|
|
1245
|
+
* - time between pressing the previous and current object,
|
|
1246
|
+
* - distance between those objects,
|
|
1247
|
+
* - and how easily they can be cheesed.
|
|
1248
|
+
*
|
|
1249
|
+
* @param current The current object.
|
|
1250
|
+
* @param mods The mods applied.
|
|
1251
|
+
*/
|
|
1252
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, mods: ModMap): number;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
1257
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
1258
|
+
*/
|
|
1259
|
+
declare abstract class StrainSkill extends Skill implements IHasPeakDifficulty {
|
|
1260
|
+
/**
|
|
1261
|
+
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
1262
|
+
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
1263
|
+
*/
|
|
1264
|
+
protected readonly reducedSectionCount: number;
|
|
1265
|
+
/**
|
|
1266
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
1267
|
+
*/
|
|
1268
|
+
protected readonly reducedSectionBaseline: number;
|
|
1269
|
+
protected readonly _objectStrains: number[];
|
|
1270
|
+
/**
|
|
1271
|
+
* The strains of hitobjects.
|
|
1272
|
+
*/
|
|
1273
|
+
get objectStrains(): readonly number[];
|
|
1274
|
+
protected readonly strainPeaks: number[];
|
|
1275
|
+
get peaks(): readonly number[];
|
|
1276
|
+
private readonly sectionLength;
|
|
1277
|
+
private currentStrain;
|
|
1278
|
+
private currentSectionPeak;
|
|
1279
|
+
private currentSectionEnd;
|
|
1280
|
+
/**
|
|
1281
|
+
* Converts a difficulty value to a performance value.
|
|
1282
|
+
*
|
|
1283
|
+
* @param difficulty The difficulty value to convert.
|
|
1284
|
+
* @returns The performance value.
|
|
1285
|
+
*/
|
|
1286
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1287
|
+
/**
|
|
1288
|
+
* Obtains the live strain peaks for each {@link sectionLength} of the beatmap, including the peak of the current section.
|
|
1289
|
+
*/
|
|
1290
|
+
get currentStrainPeaks(): number[];
|
|
1291
|
+
/**
|
|
1292
|
+
* Returns the number of strains weighed against the top strain.
|
|
1293
|
+
*
|
|
1294
|
+
* The result is scaled by clock rate as it affects the total number of strains.
|
|
1295
|
+
*
|
|
1296
|
+
* @param difficultyValue The final difficulty value.
|
|
1297
|
+
*/
|
|
1298
|
+
countTopWeightedStrains(difficultyValue: number): number;
|
|
1299
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1300
|
+
/**
|
|
1301
|
+
* Calculates the starting time of a strain section at an object.
|
|
1302
|
+
*
|
|
1303
|
+
* @param current The object at which the strain section starts.
|
|
1304
|
+
* @returns The start time of the strain section.
|
|
1305
|
+
*/
|
|
1306
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
1307
|
+
/**
|
|
1308
|
+
* Calculates the strain value at a hitobject.
|
|
1309
|
+
*
|
|
1310
|
+
* @param current The hitobject to calculate.
|
|
1311
|
+
*/
|
|
1312
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
1313
|
+
/**
|
|
1314
|
+
* Retrieves the peak strain at a point in time.
|
|
1315
|
+
*
|
|
1316
|
+
* @param time The time to retrieve the peak strain at.
|
|
1317
|
+
* @param current The current hit object.
|
|
1318
|
+
* @returns The peak strain.
|
|
1319
|
+
*/
|
|
1320
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1321
|
+
/**
|
|
1322
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
1323
|
+
*/
|
|
1324
|
+
private saveCurrentPeak;
|
|
1325
|
+
/**
|
|
1326
|
+
* Sets the initial strain level for a new section.
|
|
1327
|
+
*
|
|
1328
|
+
* @param time The beginning of the new section in milliseconds.
|
|
1329
|
+
* @param current The current hitobject.
|
|
1330
|
+
*/
|
|
1331
|
+
private startNewSectionFrom;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
1336
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
1337
|
+
*/
|
|
1338
|
+
declare abstract class OsuSkill extends StrainSkill {
|
|
1339
|
+
/**
|
|
1340
|
+
* The weight by which each strain value decays.
|
|
1341
|
+
*/
|
|
1342
|
+
protected abstract readonly decayWeight: number;
|
|
1343
|
+
protected difficulty: number;
|
|
1344
|
+
difficultyValue(): number;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Holds data that can be used to calculate osu!standard performance points.
|
|
1349
|
+
*/
|
|
1350
|
+
interface IOsuDifficultyAttributes extends IDifficultyAttributes {
|
|
1351
|
+
/**
|
|
1352
|
+
* The perceived approach rate **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
1353
|
+
*
|
|
1354
|
+
* Rate-adjusting mods don't directly affect the approach rate difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
1355
|
+
*/
|
|
1356
|
+
approachRate: number;
|
|
1357
|
+
/**
|
|
1358
|
+
* The health drain rate of the beatmap.
|
|
1359
|
+
*/
|
|
1360
|
+
drainRate: number;
|
|
1361
|
+
/**
|
|
1362
|
+
* The difficulty corresponding to the speed skill.
|
|
1363
|
+
*/
|
|
1364
|
+
speedDifficulty: number;
|
|
1365
|
+
/**
|
|
1366
|
+
* The amount of strains that are considered difficult with respect to the speed skill.
|
|
1367
|
+
*/
|
|
1368
|
+
speedDifficultStrainCount: number;
|
|
1369
|
+
/**
|
|
1370
|
+
* Describes how much of {@link aimDifficultStrainCount} is contributed to by circles or sliders.
|
|
1371
|
+
*
|
|
1372
|
+
* A value closer to 0 indicates most of {@link aimDifficultStrainCount} is contributed by circles.
|
|
1373
|
+
*
|
|
1374
|
+
* A value closer to infinity indicates most of {@link aimDifficultStrainCount} is contributed by sliders.
|
|
1375
|
+
*/
|
|
1376
|
+
aimTopWeightedSliderFactor: number;
|
|
1377
|
+
/**
|
|
1378
|
+
* Describes how much of {@link speedDifficultStrainCount} is contributed to by circles or sliders.
|
|
1379
|
+
*
|
|
1380
|
+
* A value closer to 0 indicates most of {@link speedDifficultStrainCount} is contributed by circles.
|
|
1381
|
+
*
|
|
1382
|
+
* A value closer to infinity indicates most of {@link speedDifficultStrainCount} is contributed by sliders.
|
|
1383
|
+
*/
|
|
1384
|
+
speedTopWeightedSliderFactor: number;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Holds data that can be used to calculate osu!standard performance points.
|
|
1389
|
+
*/
|
|
1390
|
+
declare class OsuDifficultyAttributes extends DifficultyAttributes implements IOsuDifficultyAttributes {
|
|
1391
|
+
approachRate: number;
|
|
1392
|
+
drainRate: number;
|
|
1393
|
+
speedDifficulty: number;
|
|
1394
|
+
speedDifficultStrainCount: number;
|
|
1395
|
+
aimTopWeightedSliderFactor: number;
|
|
1396
|
+
speedTopWeightedSliderFactor: number;
|
|
1397
|
+
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IOsuDifficultyAttributes>);
|
|
1398
|
+
toString(): string;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* A difficulty calculator for osu!standard gamemode.
|
|
1403
|
+
*/
|
|
1404
|
+
declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuPlayableBeatmap, OsuDifficultyHitObject, OsuDifficultyAttributes> {
|
|
1405
|
+
private readonly starRatingMultiplier;
|
|
1406
|
+
constructor();
|
|
1407
|
+
retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
1408
|
+
protected createDifficultyAttributes(_beatmap: Beatmap, playableBeatmap: OsuPlayableBeatmap, skills: Skill[]): OsuDifficultyAttributes;
|
|
1409
|
+
protected createPlayableBeatmap(beatmap: Beatmap, mods?: ModMap): OsuPlayableBeatmap;
|
|
1410
|
+
protected createDifficultyHitObjects(beatmap: OsuPlayableBeatmap): OsuDifficultyHitObject[];
|
|
1411
|
+
protected createSkills(beatmap: OsuPlayableBeatmap): OsuSkill[];
|
|
1412
|
+
protected createStrainPeakSkills(beatmap: OsuPlayableBeatmap): StrainSkill[];
|
|
1413
|
+
private calculateMechanicalDifficultyRating;
|
|
1414
|
+
private calculateStarRating;
|
|
1415
|
+
static calculateRateAdjustedApproachRate(approachRate: number, clockRate: number): number;
|
|
1416
|
+
static calculateRateAdjustedOverallDifficulty(overallDifficulty: number, clockRate: number): number;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1421
|
+
*/
|
|
1422
|
+
declare class OsuPerformanceCalculator extends PerformanceCalculator<IOsuDifficultyAttributes> {
|
|
1423
|
+
/**
|
|
1514
1424
|
* The aim performance value.
|
|
1515
1425
|
*/
|
|
1516
1426
|
aim: number;
|
|
@@ -1594,27 +1504,360 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator<IOsuDifficu
|
|
|
1594
1504
|
}
|
|
1595
1505
|
|
|
1596
1506
|
/**
|
|
1597
|
-
*
|
|
1507
|
+
* Data class for variable length strain.
|
|
1598
1508
|
*/
|
|
1599
|
-
declare
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1509
|
+
declare class StrainPeak {
|
|
1510
|
+
readonly value: number;
|
|
1511
|
+
readonly sectionLength: number;
|
|
1512
|
+
constructor(value: number, sectionLength: number);
|
|
1513
|
+
compareTo(other: StrainPeak): number;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* A skill that evaluates strain over a variable length of time. A new strain peak is created for every
|
|
1518
|
+
* {@link DifficultyHitObject}.
|
|
1519
|
+
*/
|
|
1520
|
+
declare abstract class VariableLengthStrainSkill extends Skill implements IHasPeakDifficulty {
|
|
1604
1521
|
/**
|
|
1605
|
-
*
|
|
1606
|
-
|
|
1522
|
+
* The weight by which each strain value decays.
|
|
1523
|
+
*/
|
|
1524
|
+
protected readonly decayWeight: number;
|
|
1525
|
+
/**
|
|
1526
|
+
* The maximum length of a strain section, in milliseconds.
|
|
1527
|
+
*/
|
|
1528
|
+
protected readonly maxSectionLength: number;
|
|
1529
|
+
/**
|
|
1530
|
+
* The number of {@link maxSectionLength} sections calculated such that enough of the difficulty value is preserved.
|
|
1607
1531
|
*
|
|
1608
|
-
* @
|
|
1532
|
+
* This should be overridden if strains are ever used outside of {@link difficultyValue}, or if {@link difficultyValue}
|
|
1533
|
+
* is overridden to not use the default geometric sum.
|
|
1534
|
+
*
|
|
1535
|
+
* This should be removed in the future when a better memory-saving technique is implemented.
|
|
1609
1536
|
*/
|
|
1610
|
-
|
|
1537
|
+
protected get maxStoredSections(): number;
|
|
1538
|
+
private currentSectionPeak;
|
|
1539
|
+
private currentSectionBegin;
|
|
1540
|
+
private currentSectionEnd;
|
|
1541
|
+
private totalLength;
|
|
1542
|
+
private readonly strainPeaks;
|
|
1543
|
+
get peaks(): readonly number[];
|
|
1544
|
+
/**
|
|
1545
|
+
* Stores previous strains so that, if a difficult {@link DifficultyHitObject} is followed by an easier
|
|
1546
|
+
* {@link DifficultyHitObject}, the difficult one gets a full strain instead of being cut short.
|
|
1547
|
+
*/
|
|
1548
|
+
private readonly queuedStrains;
|
|
1549
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1550
|
+
/**
|
|
1551
|
+
* Obtains the live strain peaks for each {@link maxSectionLength} of the beatmap, including the
|
|
1552
|
+
* peak of the current section.
|
|
1553
|
+
*/
|
|
1554
|
+
get currentStrainPeaks(): StrainPeak[];
|
|
1555
|
+
difficultyValue(): number;
|
|
1556
|
+
/**
|
|
1557
|
+
* Returns the number of strains weighed against the top strain.
|
|
1558
|
+
*
|
|
1559
|
+
* The result is scaled by clock rate as it affects the total number of strains.
|
|
1560
|
+
*/
|
|
1561
|
+
countTopWeightedStrains(difficultyValue: number): number;
|
|
1562
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1563
|
+
/**
|
|
1564
|
+
* Calculates the strain value at the {@link DifficultyHitObject}. This value is calculated with or without respect to
|
|
1565
|
+
* previous {@link DifficultyHitObject}s.
|
|
1566
|
+
*
|
|
1567
|
+
* @param current The {@link DifficultyHitObject} for which the strain value should be calculated.
|
|
1568
|
+
*/
|
|
1569
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
1570
|
+
/**
|
|
1571
|
+
* Retrieves the peak strain at a point in time.
|
|
1572
|
+
*
|
|
1573
|
+
* @param time The time to retrieve the peak strain at.
|
|
1574
|
+
* @param current The current hit object.
|
|
1575
|
+
* @returns The peak strain.
|
|
1576
|
+
*/
|
|
1577
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1578
|
+
/**
|
|
1579
|
+
* Fills the space between the end of the current section and the current {@link DifficultyHitObject}, if any.
|
|
1580
|
+
*
|
|
1581
|
+
* @param current The current {@link DifficultyHitObject}.
|
|
1582
|
+
*/
|
|
1583
|
+
private backfillPeaks;
|
|
1584
|
+
/**
|
|
1585
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
1586
|
+
*/
|
|
1587
|
+
private saveCurrentPeak;
|
|
1588
|
+
private startNewSectionFrom;
|
|
1589
|
+
private addStrainPeakInPlace;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1594
|
+
*/
|
|
1595
|
+
declare class DroidAim extends VariableLengthStrainSkill {
|
|
1596
|
+
private currentStrain;
|
|
1597
|
+
private readonly skillMultiplierSnap;
|
|
1598
|
+
private readonly skillMultiplierAgility;
|
|
1599
|
+
private readonly skillMultiplierFlow;
|
|
1600
|
+
private readonly skillMultiplierTotal;
|
|
1601
|
+
private readonly combinedSnapNormExponent;
|
|
1602
|
+
/**
|
|
1603
|
+
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
1604
|
+
* This is done in order to decrease their impact on the overall difficulty of the beatmap.
|
|
1605
|
+
*/
|
|
1606
|
+
private readonly reducedSectionTime;
|
|
1607
|
+
/**
|
|
1608
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
1609
|
+
*/
|
|
1610
|
+
private readonly reducedStrainBaseline;
|
|
1611
|
+
private readonly sliderStrains;
|
|
1612
|
+
private maxSliderStrain;
|
|
1613
|
+
readonly withSliders: boolean;
|
|
1614
|
+
constructor(mods: ModMap, withSliders: boolean);
|
|
1615
|
+
/**
|
|
1616
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
1617
|
+
*/
|
|
1618
|
+
countDifficultSliders(): number;
|
|
1619
|
+
/**
|
|
1620
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1621
|
+
*
|
|
1622
|
+
* @param difficultyValue The final difficulty value.
|
|
1623
|
+
*/
|
|
1624
|
+
countTopWeightedSliders(difficultyValue: number): number;
|
|
1625
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1626
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1627
|
+
protected saveToHitObject(current: DroidDifficultyHitObject, difficulty: number): void;
|
|
1628
|
+
private calculateAdjustedDifficulty;
|
|
1629
|
+
private calculateTotalValue;
|
|
1630
|
+
/**
|
|
1631
|
+
* Converts the ratio of snap to flow into the probability of snapping or flowing.
|
|
1632
|
+
*
|
|
1633
|
+
* Constraints:
|
|
1634
|
+
* - `P(snap) + P(flow) = 1` (the object is always either snapped or flowed)
|
|
1635
|
+
* - `P(snap) = f(snap / flow)` and `P(flow) = f(flow/snap)` (i.e., snap and flow are symmetric and
|
|
1636
|
+
* reversible). This means `f(x) + f(1/x) = 1`
|
|
1637
|
+
* - `0 <= f(x) <= 1` (cannot have negative or greater than 100% probability of snapping or flowing)
|
|
1638
|
+
*
|
|
1639
|
+
* This logistic function is a solution, which fits nicely with the general idea of interpolation and
|
|
1640
|
+
* provides a tuneable constant.
|
|
1641
|
+
*
|
|
1642
|
+
* @param ratio The ratio.
|
|
1643
|
+
* @returns The probability.
|
|
1644
|
+
*/
|
|
1645
|
+
private calculateSnapFlowProbability;
|
|
1646
|
+
difficultyValue(): number;
|
|
1647
|
+
private getReducedStrainPeaks;
|
|
1648
|
+
private strainDecay;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
1653
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
1654
|
+
*/
|
|
1655
|
+
declare abstract class DroidSkill extends StrainSkill {
|
|
1656
|
+
/**
|
|
1657
|
+
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
1658
|
+
*/
|
|
1659
|
+
protected abstract readonly starsPerDouble: number;
|
|
1660
|
+
protected difficulty: number;
|
|
1661
|
+
process(current: DifficultyHitObject): void;
|
|
1662
|
+
difficultyValue(): number;
|
|
1663
|
+
/**
|
|
1664
|
+
* Gets the strain of a hitobject.
|
|
1665
|
+
*
|
|
1666
|
+
* @param current The hitobject to get the strain from.
|
|
1667
|
+
* @returns The strain of the hitobject.
|
|
1668
|
+
*/
|
|
1669
|
+
protected abstract getObjectStrain(current: DifficultyHitObject): number;
|
|
1670
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1675
|
+
*/
|
|
1676
|
+
declare class DroidFlashlight extends DroidSkill {
|
|
1677
|
+
private readonly totalObjects;
|
|
1678
|
+
protected readonly reducedSectionCount = 0;
|
|
1679
|
+
protected readonly reducedSectionBaseline = 1;
|
|
1680
|
+
protected readonly starsPerDouble = 1.06;
|
|
1681
|
+
private readonly skillMultiplier;
|
|
1682
|
+
private currentFlashlightStrain;
|
|
1683
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1684
|
+
constructor(mods: ModMap, totalObjects: number);
|
|
1685
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1686
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1687
|
+
protected getObjectStrain(): number;
|
|
1688
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1689
|
+
difficultyValue(): number;
|
|
1690
|
+
private calculateAdjustedDifficulty;
|
|
1691
|
+
private strainDecay;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* A skill that calculates the difficulty of {@link DifficultyHitObject}s using harmonic summation.
|
|
1696
|
+
*/
|
|
1697
|
+
declare abstract class HarmonicSkill extends Skill implements IHasPeakDifficulty {
|
|
1698
|
+
private _noteWeightSum;
|
|
1699
|
+
/**
|
|
1700
|
+
* The sum of note weights, calculated during summation.
|
|
1701
|
+
*
|
|
1702
|
+
* Required for any calculations that normalizes the difficulty value.
|
|
1703
|
+
*/
|
|
1704
|
+
protected get noteWeightSum(): number;
|
|
1705
|
+
/**
|
|
1706
|
+
* Scaling factor applied as `x / (i + 1)`, where `x` is the skill's {@link harmonicScale} and `i`
|
|
1707
|
+
* is the index of the {@link DifficultyHitObject} being processed.
|
|
1708
|
+
*
|
|
1709
|
+
* A higher value increases the influence of the hardest {@link DifficultyHitObject}s during summation.
|
|
1710
|
+
*/
|
|
1711
|
+
protected readonly harmonicScale: number;
|
|
1712
|
+
/**
|
|
1713
|
+
* An exponent that controls the rate of which decay increases as the index increases.
|
|
1714
|
+
*
|
|
1715
|
+
* Values closer to 1 decay faster, whilst lower values give more weight to easier {@link DifficultyHitObject}s.
|
|
1716
|
+
*/
|
|
1717
|
+
protected readonly decayExponent: number;
|
|
1718
|
+
get peaks(): readonly number[];
|
|
1719
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1720
|
+
difficultyValue(): number;
|
|
1721
|
+
/**
|
|
1722
|
+
* Calculates the amount of object difficulties weighed against the top object difficulty.
|
|
1723
|
+
*
|
|
1724
|
+
* @param difficultyValue The final difficulty value.
|
|
1725
|
+
*/
|
|
1726
|
+
countTopWeightedObjectDifficulties(difficultyValue: number): number;
|
|
1727
|
+
/**
|
|
1728
|
+
* Transforms the difficulties of {@link DifficultyHitObject}s before they are summed together.
|
|
1729
|
+
*
|
|
1730
|
+
* This can be used to decrease weight of certain {@link DifficultyHitObject}s based on a skill-specific criteria.
|
|
1731
|
+
*
|
|
1732
|
+
* @param difficulties The difficulties of {@link DifficultyHitObject}s to transform.
|
|
1733
|
+
*/
|
|
1734
|
+
protected applyDifficultyTransformation(difficulties: number[]): void;
|
|
1735
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1736
|
+
/**
|
|
1737
|
+
* Calculates the difficulty value of a {@link DifficultyHitObject}. This value is calculated with or without respect to previous objects.
|
|
1738
|
+
*
|
|
1739
|
+
* @param current The {@link DifficultyHitObject} for which the difficulty value should be calculated.
|
|
1740
|
+
*/
|
|
1741
|
+
protected abstract objectDifficultyOf(current: DifficultyHitObject): number;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Represents the skill required to read every object in the beatmap.
|
|
1746
|
+
*/
|
|
1747
|
+
declare class DroidReading extends HarmonicSkill {
|
|
1748
|
+
private readonly clockRate;
|
|
1749
|
+
private readonly hitObjects;
|
|
1750
|
+
private currentDifficulty;
|
|
1751
|
+
private readonly skillMultiplier;
|
|
1752
|
+
private readonly difficultyDecayBase;
|
|
1753
|
+
constructor(mods: ModMap, clockRate: number, hitObjects: readonly PlaceableHitObject[]);
|
|
1754
|
+
countTopWeightedObjectDifficulties(difficultyValue: number): number;
|
|
1755
|
+
protected objectDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
1756
|
+
protected applyDifficultyTransformation(difficulties: number[]): void;
|
|
1757
|
+
protected saveToHitObject(current: DroidDifficultyHitObject, difficulty: number): void;
|
|
1758
|
+
private calculateAdjustedDifficulty;
|
|
1759
|
+
private calculateReducedNoteCount;
|
|
1760
|
+
private difficultyDecay;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
1765
|
+
*/
|
|
1766
|
+
declare class DroidRhythm extends HarmonicSkill {
|
|
1767
|
+
protected readonly harmonicScale = 25;
|
|
1768
|
+
protected readonly decayExponent = 0.8;
|
|
1769
|
+
private readonly skillMultiplier;
|
|
1770
|
+
private readonly strainDecayBase;
|
|
1771
|
+
private currentRhythmDifficulty;
|
|
1772
|
+
private currentRhythmMultiplier;
|
|
1773
|
+
private readonly useSliderAccuracy;
|
|
1774
|
+
constructor(mods: ModMap);
|
|
1775
|
+
protected objectDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
1776
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1777
|
+
private strainDecay;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1782
|
+
*/
|
|
1783
|
+
declare class DroidTap extends HarmonicSkill {
|
|
1784
|
+
protected readonly harmonicScale = 20;
|
|
1785
|
+
private readonly skillMultiplier;
|
|
1786
|
+
private readonly strainDecayBase;
|
|
1787
|
+
private currentTapDifficulty;
|
|
1788
|
+
private currentRhythmMultiplier;
|
|
1789
|
+
private readonly sliderDifficulties;
|
|
1790
|
+
private maxDifficulty;
|
|
1791
|
+
readonly considerCheesability: boolean;
|
|
1792
|
+
constructor(mods: ModMap, considerCheesability: boolean);
|
|
1793
|
+
/**
|
|
1794
|
+
* The amount of notes that are relevant to the difficulty.
|
|
1795
|
+
*/
|
|
1796
|
+
relevantNoteCount(): number;
|
|
1797
|
+
/**
|
|
1798
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative difficulty, weighted by consistency.
|
|
1799
|
+
*
|
|
1800
|
+
* @param difficultyValue The final difficulty value.
|
|
1801
|
+
*/
|
|
1802
|
+
countTopWeightedSliders(difficultyValue: number): number;
|
|
1803
|
+
protected objectDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
1804
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1805
|
+
private strainDecay;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1810
|
+
*/
|
|
1811
|
+
declare class OsuAim extends OsuSkill {
|
|
1812
|
+
private readonly strainDecayBase;
|
|
1813
|
+
protected readonly reducedSectionCount = 10;
|
|
1814
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1815
|
+
protected readonly decayWeight = 0.9;
|
|
1816
|
+
private currentAimStrain;
|
|
1817
|
+
private readonly skillMultiplier;
|
|
1818
|
+
private readonly sliderStrains;
|
|
1819
|
+
readonly withSliders: boolean;
|
|
1820
|
+
constructor(mods: ModMap, withSliders: boolean);
|
|
1821
|
+
/**
|
|
1822
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
1823
|
+
*/
|
|
1824
|
+
countDifficultSliders(): number;
|
|
1825
|
+
/**
|
|
1826
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1827
|
+
*/
|
|
1828
|
+
countTopWeightedSliders(): number;
|
|
1829
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1830
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1831
|
+
/**
|
|
1832
|
+
* @param current The hitobject to save to.
|
|
1833
|
+
*/
|
|
1834
|
+
protected saveToHitObject(current: OsuDifficultyHitObject, difficulty: number): void;
|
|
1835
|
+
private strainDecay;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1840
|
+
*/
|
|
1841
|
+
declare class OsuFlashlight extends OsuSkill {
|
|
1842
|
+
private readonly strainDecayBase;
|
|
1843
|
+
protected readonly reducedSectionCount = 0;
|
|
1844
|
+
protected readonly reducedSectionBaseline = 1;
|
|
1845
|
+
protected readonly decayWeight = 1;
|
|
1846
|
+
private currentFlashlightStrain;
|
|
1847
|
+
private readonly skillMultiplier;
|
|
1848
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1849
|
+
difficultyValue(): number;
|
|
1850
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1851
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1852
|
+
protected saveToHitObject(current: OsuDifficultyHitObject, difficulty: number): void;
|
|
1853
|
+
private strainDecay;
|
|
1611
1854
|
}
|
|
1612
1855
|
|
|
1613
1856
|
/**
|
|
1614
1857
|
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1615
1858
|
*/
|
|
1616
1859
|
declare class OsuSpeed extends OsuSkill {
|
|
1617
|
-
|
|
1860
|
+
private readonly strainDecayBase;
|
|
1618
1861
|
protected readonly reducedSectionCount = 5;
|
|
1619
1862
|
protected readonly reducedSectionBaseline = 0.75;
|
|
1620
1863
|
protected readonly decayWeight = 0.9;
|
|
@@ -1639,33 +1882,9 @@ declare class OsuSpeed extends OsuSkill {
|
|
|
1639
1882
|
/**
|
|
1640
1883
|
* @param current The hitobject to save to.
|
|
1641
1884
|
*/
|
|
1642
|
-
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
/**
|
|
1646
|
-
* An evaluator for calculating osu!standard speed skill.
|
|
1647
|
-
*/
|
|
1648
|
-
declare abstract class OsuSpeedEvaluator {
|
|
1649
|
-
/**
|
|
1650
|
-
* Spacing threshold for a single hitobject spacing.
|
|
1651
|
-
*
|
|
1652
|
-
* About 1.25 circles distance between hitobject centers.
|
|
1653
|
-
*/
|
|
1654
|
-
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
1655
|
-
private static readonly minSpeedBonus;
|
|
1656
|
-
private static readonly DISTANCE_MULTIPLIER;
|
|
1657
|
-
/**
|
|
1658
|
-
* Evaluates the difficulty of tapping the current object, based on:
|
|
1659
|
-
*
|
|
1660
|
-
* - time between pressing the previous and current object,
|
|
1661
|
-
* - distance between those objects,
|
|
1662
|
-
* - and how easily they can be cheesed.
|
|
1663
|
-
*
|
|
1664
|
-
* @param current The current object.
|
|
1665
|
-
* @param mods The mods applied.
|
|
1666
|
-
*/
|
|
1667
|
-
static evaluateDifficultyOf(current: OsuDifficultyHitObject, mods: ModMap): number;
|
|
1885
|
+
protected saveToHitObject(current: OsuDifficultyHitObject, difficulty: number): void;
|
|
1886
|
+
private strainDecay;
|
|
1668
1887
|
}
|
|
1669
1888
|
|
|
1670
|
-
export { DifficultyAttributes, DifficultyCalculator, DifficultyHitObject,
|
|
1889
|
+
export { DifficultyAttributes, DifficultyCalculator, DifficultyHitObject, DroidAgilityEvaluator, DroidAim, DroidDifficultyAttributes, DroidDifficultyCalculator, DroidDifficultyHitObject, DroidFlashlight, DroidFlashlightEvaluator, DroidFlowAimEvaluator, DroidPerformanceCalculator, DroidReading, DroidReadingEvaluator, DroidRhythm, DroidRhythmEvaluator, DroidSnapAimEvaluator, DroidTap, DroidTapEvaluator, ExtendedDroidDifficultyAttributes, OsuAim, OsuAimEvaluator, OsuDifficultyAttributes, OsuDifficultyCalculator, OsuDifficultyHitObject, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, PerformanceCalculator };
|
|
1671
1890
|
export type { CacheableDifficultyAttributes, DifficultSlider, HighStrainSection, IDifficultyAttributes, IDroidDifficultyAttributes, IExtendedDroidDifficultyAttributes, IOsuDifficultyAttributes, PerformanceCalculationOptions, StrainPeaks };
|