@rian8337/osu-difficulty-calculator 4.0.0-beta.9 → 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 +4448 -2817
- package/package.json +11 -8
- package/typings/index.d.ts +1260 -957
- package/dist/index.js.map +0 -1
package/typings/index.d.ts
CHANGED
|
@@ -1,117 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlaceableHitObject, Vector2, Modes, ModMap, HitResult, HitWindow, SerializedMod, PlayableBeatmap, Mod, Beatmap, Accuracy, DroidPlayableBeatmap, OsuPlayableBeatmap } from '@rian8337/osu-base';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
7
|
-
*/
|
|
8
|
-
declare abstract class AimEvaluator {
|
|
9
|
-
protected static readonly wideAngleMultiplier: number;
|
|
10
|
-
protected static readonly acuteAngleMultiplier: number;
|
|
11
|
-
protected static readonly sliderMultiplier: number;
|
|
12
|
-
protected static readonly velocityChangeMultiplier: number;
|
|
13
|
-
/**
|
|
14
|
-
* Calculates the bonus of wide angles.
|
|
15
|
-
*/
|
|
16
|
-
protected static calculateWideAngleBonus(angle: number): number;
|
|
17
|
-
/**
|
|
18
|
-
* Calculates the bonus of acute angles.
|
|
19
|
-
*/
|
|
20
|
-
protected static calculateAcuteAngleBonus(angle: number): number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The base of calculation options.
|
|
25
|
-
*/
|
|
26
|
-
interface CalculationOptions {
|
|
27
|
-
/**
|
|
28
|
-
* Custom map statistics to apply custom speed multiplier as well as old statistics.
|
|
29
|
-
*/
|
|
30
|
-
stats?: MapStats;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Holds data that can be used to calculate performance points.
|
|
35
|
-
*/
|
|
36
|
-
interface DifficultyAttributes {
|
|
37
|
-
/**
|
|
38
|
-
* The mods which were applied to the beatmap.
|
|
39
|
-
*/
|
|
40
|
-
mods: Mod[];
|
|
41
|
-
/**
|
|
42
|
-
* The combined star rating of all skills.
|
|
43
|
-
*/
|
|
44
|
-
starRating: number;
|
|
45
|
-
/**
|
|
46
|
-
* The maximum achievable combo.
|
|
47
|
-
*/
|
|
48
|
-
maxCombo: number;
|
|
49
|
-
/**
|
|
50
|
-
* The difficulty corresponding to the aim skill.
|
|
51
|
-
*/
|
|
52
|
-
aimDifficulty: number;
|
|
53
|
-
/**
|
|
54
|
-
* The difficulty corresponding to the flashlight skill.
|
|
55
|
-
*/
|
|
56
|
-
flashlightDifficulty: number;
|
|
57
|
-
/**
|
|
58
|
-
* The number of clickable objects weighted by difficulty.
|
|
59
|
-
*
|
|
60
|
-
* Related to speed/tap difficulty.
|
|
61
|
-
*/
|
|
62
|
-
speedNoteCount: number;
|
|
63
|
-
/**
|
|
64
|
-
* Describes how much of aim difficulty is contributed to by hitcircles or sliders.
|
|
65
|
-
*
|
|
66
|
-
* A value closer to 1 indicates most of aim difficulty is contributed by hitcircles.
|
|
67
|
-
*
|
|
68
|
-
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
69
|
-
*/
|
|
70
|
-
sliderFactor: number;
|
|
71
|
-
/**
|
|
72
|
-
* The overall clock rate that was applied to the beatmap.
|
|
73
|
-
*/
|
|
74
|
-
clockRate: number;
|
|
75
|
-
/**
|
|
76
|
-
* The perceived approach rate inclusive of rate-adjusting mods (DT/HT/etc).
|
|
77
|
-
*
|
|
78
|
-
* Rate-adjusting mods don't directly affect the approach rate difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
79
|
-
*/
|
|
80
|
-
approachRate: number;
|
|
81
|
-
/**
|
|
82
|
-
* The perceived overall difficulty inclusive of rate-adjusting mods (DT/HT/etc), based on osu!standard judgement.
|
|
83
|
-
*
|
|
84
|
-
* Rate-adjusting mods don't directly affect the overall difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
85
|
-
*/
|
|
86
|
-
overallDifficulty: number;
|
|
87
|
-
/**
|
|
88
|
-
* The number of hitcircles in the beatmap.
|
|
89
|
-
*/
|
|
90
|
-
hitCircleCount: number;
|
|
91
|
-
/**
|
|
92
|
-
* The number of sliders in the beatmap.
|
|
93
|
-
*/
|
|
94
|
-
sliderCount: number;
|
|
95
|
-
/**
|
|
96
|
-
* The number of spinners in the beatmap.
|
|
97
|
-
*/
|
|
98
|
-
spinnerCount: number;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Represents options for difficulty calculation.
|
|
103
|
-
*/
|
|
104
|
-
interface DifficultyCalculationOptions extends CalculationOptions {
|
|
105
|
-
/**
|
|
106
|
-
* The modifications to apply.
|
|
107
|
-
*/
|
|
108
|
-
mods?: Mod[];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Represents an osu!standard hit object with difficulty calculation values.
|
|
4
|
+
* Represents a hit object with difficulty calculation values.
|
|
113
5
|
*/
|
|
114
|
-
declare class DifficultyHitObject {
|
|
6
|
+
declare abstract class DifficultyHitObject {
|
|
115
7
|
/**
|
|
116
8
|
* The underlying hitobject.
|
|
117
9
|
*/
|
|
@@ -121,19 +13,7 @@ declare class DifficultyHitObject {
|
|
|
121
13
|
*
|
|
122
14
|
* This is one less than the actual index of the hitobject in the beatmap.
|
|
123
15
|
*/
|
|
124
|
-
index: number;
|
|
125
|
-
/**
|
|
126
|
-
* The preempt time of the hitobject.
|
|
127
|
-
*/
|
|
128
|
-
baseTimePreempt: number;
|
|
129
|
-
/**
|
|
130
|
-
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
131
|
-
*/
|
|
132
|
-
timePreempt: number;
|
|
133
|
-
/**
|
|
134
|
-
* The fade in time of the hitobject.
|
|
135
|
-
*/
|
|
136
|
-
timeFadeIn: number;
|
|
16
|
+
readonly index: number;
|
|
137
17
|
/**
|
|
138
18
|
* The aim strain generated by the hitobject if sliders are considered.
|
|
139
19
|
*/
|
|
@@ -143,40 +23,17 @@ declare class DifficultyHitObject {
|
|
|
143
23
|
*/
|
|
144
24
|
aimStrainWithoutSliders: number;
|
|
145
25
|
/**
|
|
146
|
-
* The
|
|
147
|
-
*
|
|
148
|
-
* This is also used for osu!standard as opposed to "speed strain".
|
|
149
|
-
*/
|
|
150
|
-
tapStrain: number;
|
|
151
|
-
/**
|
|
152
|
-
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
153
|
-
* OD. This is used in three-finger detection.
|
|
26
|
+
* The flashlight strain generated by the hitobject.
|
|
154
27
|
*/
|
|
155
|
-
|
|
28
|
+
flashlightStrain: number;
|
|
156
29
|
/**
|
|
157
30
|
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
158
31
|
*/
|
|
159
32
|
rhythmMultiplier: number;
|
|
160
33
|
/**
|
|
161
|
-
* The
|
|
162
|
-
*/
|
|
163
|
-
rhythmStrain: number;
|
|
164
|
-
/**
|
|
165
|
-
* The flashlight strain generated by the hitobject if sliders are considered.
|
|
166
|
-
*/
|
|
167
|
-
flashlightStrainWithSliders: number;
|
|
168
|
-
/**
|
|
169
|
-
* The flashlight strain generated by the hitobject if sliders are not considered.
|
|
170
|
-
*/
|
|
171
|
-
flashlightStrainWithoutSliders: number;
|
|
172
|
-
/**
|
|
173
|
-
* The visual strain generated by the hitobject if sliders are considered.
|
|
34
|
+
* The normalized distance from the start position of the previous hitobject to the start position of this hitobject.
|
|
174
35
|
*/
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* The visual strain generated by the hitobject if sliders are not considered.
|
|
178
|
-
*/
|
|
179
|
-
visualStrainWithoutSliders: number;
|
|
36
|
+
jumpDistance: number;
|
|
180
37
|
/**
|
|
181
38
|
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
182
39
|
*
|
|
@@ -208,51 +65,114 @@ declare class DifficultyHitObject {
|
|
|
208
65
|
* The time taken to travel through `travelDistance`, with a minimum value of 25ms for sliders.
|
|
209
66
|
*/
|
|
210
67
|
travelTime: number;
|
|
68
|
+
/**
|
|
69
|
+
* The position of the cursor at the point of completion of this hitobject if it was hit
|
|
70
|
+
* with as few movements as possible.
|
|
71
|
+
*/
|
|
72
|
+
lazyEndPosition?: Vector2;
|
|
73
|
+
/**
|
|
74
|
+
* The distance travelled by the cursor upon completion of this hitobject if it was hit
|
|
75
|
+
* with as few movements as possible.
|
|
76
|
+
*/
|
|
77
|
+
lazyTravelDistance: number;
|
|
78
|
+
/**
|
|
79
|
+
* The time taken by the cursor upon completion of this hitobject if it was hit with
|
|
80
|
+
* as few movements as possible.
|
|
81
|
+
*/
|
|
82
|
+
lazyTravelTime: number;
|
|
211
83
|
/**
|
|
212
84
|
* Angle the player has to take to hit this hitobject.
|
|
213
85
|
*
|
|
214
86
|
* Calculated as the angle between the circles (current-2, current-1, current).
|
|
215
87
|
*/
|
|
216
|
-
|
|
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;
|
|
217
100
|
/**
|
|
218
101
|
* The amount of milliseconds elapsed between this hitobject and the last hitobject.
|
|
219
102
|
*/
|
|
220
|
-
deltaTime: number;
|
|
103
|
+
readonly deltaTime: number;
|
|
221
104
|
/**
|
|
222
105
|
* The amount of milliseconds elapsed since the start time of the previous hitobject, with a minimum of 25ms.
|
|
223
106
|
*/
|
|
224
|
-
strainTime: number;
|
|
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;
|
|
225
113
|
/**
|
|
226
114
|
* Adjusted start time of the hitobject, taking speed multiplier into account.
|
|
227
115
|
*/
|
|
228
|
-
startTime: number;
|
|
116
|
+
readonly startTime: number;
|
|
229
117
|
/**
|
|
230
118
|
* Adjusted end time of the hitobject, taking speed multiplier into account.
|
|
231
119
|
*/
|
|
232
|
-
endTime: number;
|
|
120
|
+
readonly endTime: number;
|
|
233
121
|
/**
|
|
234
|
-
*
|
|
122
|
+
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
235
123
|
*/
|
|
236
|
-
|
|
124
|
+
readonly timePreempt: number;
|
|
237
125
|
/**
|
|
238
|
-
* The
|
|
239
|
-
|
|
240
|
-
|
|
126
|
+
* The beatmap clock rate.
|
|
127
|
+
*/
|
|
128
|
+
readonly clockRate: number;
|
|
129
|
+
/**
|
|
130
|
+
* Selective bonus for beatmaps with higher circle size.
|
|
241
131
|
*/
|
|
242
|
-
|
|
132
|
+
abstract get smallCircleBonus(): number;
|
|
243
133
|
/**
|
|
244
|
-
*
|
|
134
|
+
* This {@link DifficultyHitObject}'s immediate overall difficulty value calculated from the raw hitwindow.
|
|
245
135
|
*/
|
|
246
|
-
|
|
136
|
+
get overallDifficulty(): number;
|
|
247
137
|
/**
|
|
248
138
|
* Other hitobjects in the beatmap, including this hitobject.
|
|
249
139
|
*/
|
|
250
|
-
|
|
140
|
+
protected readonly hitObjects: readonly DifficultyHitObject[];
|
|
141
|
+
/**
|
|
142
|
+
* The normalized radius of the hitobject.
|
|
143
|
+
*/
|
|
144
|
+
abstract readonly normalizedRadius: number;
|
|
145
|
+
/**
|
|
146
|
+
* The normalized diameter of the hitobject.
|
|
147
|
+
*/
|
|
148
|
+
get normalizedDiameter(): number;
|
|
149
|
+
protected abstract readonly mode: Modes;
|
|
150
|
+
protected get maximumSliderRadius(): number;
|
|
151
|
+
protected get assumedSliderRadius(): number;
|
|
152
|
+
/**
|
|
153
|
+
* The lowest possible delta time value.
|
|
154
|
+
*/
|
|
155
|
+
static readonly minDeltaTime = 25;
|
|
156
|
+
private readonly lastObject;
|
|
157
|
+
private readonly lastDifficultyObject;
|
|
158
|
+
private readonly lastLastDifficultyObject;
|
|
251
159
|
/**
|
|
160
|
+
* Note: You **must** call `computeProperties` at some point due to how TypeScript handles
|
|
161
|
+
* overridden properties (see [this](https://github.com/microsoft/TypeScript/issues/1617) GitHub issue).
|
|
162
|
+
*
|
|
252
163
|
* @param object The underlying hitobject.
|
|
253
|
-
* @param
|
|
164
|
+
* @param lastObject The hitobject before this hitobject.
|
|
165
|
+
* @param difficultyHitObjects All difficulty hitobjects in the processed beatmap.
|
|
166
|
+
* @param clockRate The clock rate of the beatmap.
|
|
167
|
+
* @param index The index of this hitobject in the list of all hitobjects.
|
|
168
|
+
*/
|
|
169
|
+
constructor(object: PlaceableHitObject, lastObject: PlaceableHitObject | null, difficultyHitObjects: readonly DifficultyHitObject[], clockRate: number, index: number);
|
|
170
|
+
/**
|
|
171
|
+
* Computes the properties of this hitobject.
|
|
172
|
+
*
|
|
173
|
+
* @param clockRate The clock rate of the beatmap.
|
|
254
174
|
*/
|
|
255
|
-
|
|
175
|
+
computeProperties(clockRate: number): void;
|
|
256
176
|
/**
|
|
257
177
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
258
178
|
* difficulty hitobject's index.
|
|
@@ -263,7 +183,7 @@ declare class DifficultyHitObject {
|
|
|
263
183
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
264
184
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
265
185
|
*/
|
|
266
|
-
previous(backwardsIndex: number):
|
|
186
|
+
previous(backwardsIndex: number): this | null;
|
|
267
187
|
/**
|
|
268
188
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
269
189
|
* difficulty hitobject's index.
|
|
@@ -274,121 +194,146 @@ declare class DifficultyHitObject {
|
|
|
274
194
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
275
195
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
276
196
|
*/
|
|
277
|
-
next(forwardsIndex: number):
|
|
197
|
+
next(forwardsIndex: number): this | null;
|
|
278
198
|
/**
|
|
279
199
|
* Calculates the opacity of the hitobject at a given time.
|
|
280
200
|
*
|
|
281
201
|
* @param time The time to calculate the hitobject's opacity at.
|
|
282
|
-
* @param
|
|
283
|
-
* @param mode The gamemode to calculate the opacity for.
|
|
202
|
+
* @param mods The mods used. Defaults to No Mod.
|
|
284
203
|
* @returns The opacity of the hitobject at the given time.
|
|
285
204
|
*/
|
|
286
|
-
opacityAt(time: number,
|
|
205
|
+
opacityAt(time: number, mods?: ModMap): number;
|
|
287
206
|
/**
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
291
|
-
* can be hit with just a single tap in osu!droid.
|
|
207
|
+
* How possible is it to doubletap this object together with the next one and get perfect
|
|
208
|
+
* judgement in range from 0 to 1.
|
|
292
209
|
*
|
|
293
|
-
*
|
|
294
|
-
* @returns Whether the hitobject is considered overlapping.
|
|
295
|
-
*/
|
|
296
|
-
isOverlapping(considerDistance: boolean): boolean;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* A bare minimal abstract skill for fully custom skill implementations.
|
|
301
|
-
*
|
|
302
|
-
* This class should be considered a "processing" class and not persisted.
|
|
303
|
-
*/
|
|
304
|
-
declare abstract class Skill {
|
|
305
|
-
/**
|
|
306
|
-
* The mods that this skill processes.
|
|
210
|
+
* A value closer to 1 indicates a higher possibility.
|
|
307
211
|
*/
|
|
308
|
-
|
|
309
|
-
constructor(mods: Mod[]);
|
|
212
|
+
getDoubletapness(nextObj: this | null): number;
|
|
310
213
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
* @param current The hitobject to process.
|
|
214
|
+
* Retrieves the full rate-adjusted hit window for a {@link HitResult}.
|
|
314
215
|
*/
|
|
315
|
-
|
|
216
|
+
hitWindowFor(result: HitResult): number;
|
|
316
217
|
/**
|
|
317
|
-
*
|
|
218
|
+
* The {@link HitWindow} for this {@link DifficultyHitObject}.
|
|
318
219
|
*/
|
|
319
|
-
|
|
220
|
+
protected get rawHitWindow(): HitWindow;
|
|
221
|
+
private setDistances;
|
|
222
|
+
private calculateAngle;
|
|
223
|
+
private calculateSliderAngle;
|
|
224
|
+
private calculateSliderCursorPosition;
|
|
225
|
+
private getEndCursorPosition;
|
|
320
226
|
}
|
|
321
227
|
|
|
322
228
|
/**
|
|
323
|
-
*
|
|
324
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
229
|
+
* Holds data that can be used to calculate performance points.
|
|
325
230
|
*/
|
|
326
|
-
|
|
231
|
+
interface IDifficultyAttributes {
|
|
327
232
|
/**
|
|
328
|
-
* The
|
|
233
|
+
* The mods which were applied to the beatmap.
|
|
329
234
|
*/
|
|
330
|
-
|
|
235
|
+
mods: ModMap;
|
|
331
236
|
/**
|
|
332
|
-
* The
|
|
237
|
+
* The combined star rating of all skills.
|
|
333
238
|
*/
|
|
334
|
-
|
|
239
|
+
starRating: number;
|
|
335
240
|
/**
|
|
336
|
-
*
|
|
241
|
+
* The maximum achievable combo.
|
|
337
242
|
*/
|
|
338
|
-
|
|
243
|
+
maxCombo: number;
|
|
339
244
|
/**
|
|
340
|
-
* The
|
|
341
|
-
* 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.
|
|
342
246
|
*/
|
|
343
|
-
|
|
247
|
+
aimDifficulty: number;
|
|
344
248
|
/**
|
|
345
|
-
* The
|
|
249
|
+
* The difficulty corresponding to the flashlight skill.
|
|
346
250
|
*/
|
|
347
|
-
|
|
251
|
+
flashlightDifficulty: number;
|
|
348
252
|
/**
|
|
349
|
-
*
|
|
253
|
+
* The number of clickable objects weighted by difficulty.
|
|
254
|
+
*
|
|
255
|
+
* Related to speed/tap difficulty.
|
|
350
256
|
*/
|
|
351
|
-
|
|
257
|
+
speedNoteCount: number;
|
|
352
258
|
/**
|
|
353
|
-
*
|
|
259
|
+
* Describes how much of aim difficulty is contributed to by hitcircles or sliders.
|
|
260
|
+
*
|
|
261
|
+
* A value closer to 1 indicates most of aim difficulty is contributed by hitcircles.
|
|
354
262
|
*
|
|
355
|
-
*
|
|
263
|
+
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
356
264
|
*/
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
265
|
+
sliderFactor: number;
|
|
266
|
+
/**
|
|
267
|
+
* The overall clock rate that was applied to the beatmap.
|
|
268
|
+
*/
|
|
269
|
+
clockRate: number;
|
|
361
270
|
/**
|
|
362
|
-
*
|
|
271
|
+
* The perceived overall difficulty **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
363
272
|
*
|
|
364
|
-
*
|
|
273
|
+
* Rate-adjusting mods don't directly affect the overall difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
365
274
|
*/
|
|
366
|
-
|
|
275
|
+
overallDifficulty: number;
|
|
367
276
|
/**
|
|
368
|
-
*
|
|
277
|
+
* The number of hitcircles in the beatmap.
|
|
369
278
|
*/
|
|
370
|
-
|
|
279
|
+
hitCircleCount: number;
|
|
371
280
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* @param ms The time frame to calculate.
|
|
281
|
+
* The number of sliders in the beatmap.
|
|
375
282
|
*/
|
|
376
|
-
|
|
283
|
+
sliderCount: number;
|
|
377
284
|
/**
|
|
378
|
-
*
|
|
285
|
+
* The number of spinners in the beatmap.
|
|
379
286
|
*/
|
|
380
|
-
|
|
287
|
+
spinnerCount: number;
|
|
381
288
|
/**
|
|
382
|
-
*
|
|
289
|
+
* The number of sliders weighted by difficulty.
|
|
383
290
|
*/
|
|
384
|
-
|
|
291
|
+
aimDifficultSliderCount: number;
|
|
385
292
|
/**
|
|
386
|
-
*
|
|
293
|
+
* The amount of strains that are considered difficult with respect to the aim skill.
|
|
294
|
+
*/
|
|
295
|
+
aimDifficultStrainCount: number;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Represents difficulty attributes that can be cached.
|
|
300
|
+
*/
|
|
301
|
+
type CacheableDifficultyAttributes<T extends IDifficultyAttributes> = Omit<T, "mods" | "toCacheableAttributes"> & {
|
|
302
|
+
/**
|
|
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.
|
|
387
329
|
*
|
|
388
|
-
* @
|
|
389
|
-
* @param current The current hitobject.
|
|
330
|
+
* @returns The cacheable attributes.
|
|
390
331
|
*/
|
|
391
|
-
|
|
332
|
+
toCacheableAttributes(): CacheableDifficultyAttributes<this>;
|
|
333
|
+
/**
|
|
334
|
+
* Returns a string representation of the difficulty attributes.
|
|
335
|
+
*/
|
|
336
|
+
toString(): string;
|
|
392
337
|
}
|
|
393
338
|
|
|
394
339
|
/**
|
|
@@ -398,174 +343,319 @@ interface StrainPeaks {
|
|
|
398
343
|
/**
|
|
399
344
|
* The strain peaks of aim difficulty if sliders are considered.
|
|
400
345
|
*/
|
|
401
|
-
aimWithSliders: number[];
|
|
346
|
+
aimWithSliders: readonly number[];
|
|
402
347
|
/**
|
|
403
348
|
* The strain peaks of aim difficulty if sliders are not considered.
|
|
404
349
|
*/
|
|
405
|
-
aimWithoutSliders: number[];
|
|
350
|
+
aimWithoutSliders: readonly number[];
|
|
406
351
|
/**
|
|
407
352
|
* The strain peaks of speed difficulty.
|
|
408
353
|
*/
|
|
409
|
-
speed: number[];
|
|
354
|
+
speed: readonly number[];
|
|
410
355
|
/**
|
|
411
356
|
* The strain peaks of flashlight difficulty.
|
|
412
357
|
*/
|
|
413
|
-
flashlight: number[];
|
|
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[];
|
|
414
369
|
}
|
|
415
370
|
|
|
416
371
|
/**
|
|
417
|
-
*
|
|
372
|
+
* A bare minimal abstract skill for fully custom skill implementations.
|
|
418
373
|
*/
|
|
419
|
-
declare abstract class
|
|
374
|
+
declare abstract class Skill {
|
|
420
375
|
/**
|
|
421
|
-
* The
|
|
376
|
+
* The mods that this skill processes.
|
|
422
377
|
*/
|
|
423
|
-
readonly
|
|
378
|
+
protected readonly mods: ModMap;
|
|
379
|
+
private _objectDifficulties;
|
|
424
380
|
/**
|
|
425
|
-
* The
|
|
381
|
+
* The difficulties of {@link DifficultyHitObject}s, populated by {@link Skill.process}.
|
|
426
382
|
*/
|
|
427
|
-
|
|
383
|
+
protected get objectDifficulties(): readonly number[];
|
|
384
|
+
constructor(mods: ModMap);
|
|
428
385
|
/**
|
|
429
|
-
*
|
|
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.
|
|
430
390
|
*/
|
|
431
|
-
|
|
391
|
+
process(current: DifficultyHitObject): void;
|
|
432
392
|
/**
|
|
433
|
-
*
|
|
393
|
+
* Returns the calculated difficulty value representing all hitobjects that have been processed up to this point.
|
|
434
394
|
*/
|
|
435
|
-
|
|
395
|
+
abstract difficultyValue(): number;
|
|
436
396
|
/**
|
|
437
|
-
*
|
|
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.
|
|
438
401
|
*/
|
|
439
|
-
|
|
402
|
+
protected saveToHitObject(current: DifficultyHitObject, difficulty: number): void;
|
|
440
403
|
/**
|
|
441
|
-
*
|
|
404
|
+
* Calculates the difficulty value of a hitobject and stores the value in it.
|
|
405
|
+
*
|
|
406
|
+
* @param current The hitobject to process.
|
|
442
407
|
*/
|
|
443
|
-
|
|
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> {
|
|
444
415
|
/**
|
|
445
|
-
*
|
|
416
|
+
* `Mod`s that adjust the difficulty of a beatmap.
|
|
446
417
|
*/
|
|
447
|
-
|
|
448
|
-
protected abstract readonly difficultyMultiplier: number;
|
|
449
|
-
protected abstract readonly mode: Modes;
|
|
418
|
+
protected readonly difficultyAdjustmentMods: (typeof Mod)[];
|
|
450
419
|
/**
|
|
451
|
-
*
|
|
420
|
+
* Retains `Mod`s that adjust a beatmap's difficulty from the specified mods.
|
|
452
421
|
*
|
|
453
|
-
* @param
|
|
422
|
+
* @param mods The mods to retain the difficulty adjustment mods from.
|
|
423
|
+
* @returns The retained difficulty adjustment mods.
|
|
454
424
|
*/
|
|
455
|
-
|
|
425
|
+
abstract retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
456
426
|
/**
|
|
457
|
-
* Calculates the
|
|
427
|
+
* Calculates the difficulty of a `Beatmap` with specific `Mod`s.
|
|
458
428
|
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
*
|
|
466
|
-
* beginning of the new chunk.
|
|
429
|
+
* @param beatmap The `Beatmap` whose difficulty is to be calculated.
|
|
430
|
+
* @param mods The `Mod`s to apply to the beatmap. Defaults to No Mod.
|
|
431
|
+
* @returns A `DifficultyAttributes` object describing the difficulty of the `Beatmap`.
|
|
432
|
+
*/
|
|
433
|
+
calculate(beatmap: Beatmap, mods?: ModMap): TAttributes;
|
|
434
|
+
/**
|
|
435
|
+
* Obtains the strain peaks of a `PlayableBeatmap`.
|
|
467
436
|
*
|
|
468
|
-
* @param
|
|
469
|
-
* @returns The
|
|
437
|
+
* @param beatmap The `PlayableBeatmap` whose strain peaks are to be calculated.
|
|
438
|
+
* @returns The strain peaks of the `PlayableBeatmap`.
|
|
470
439
|
*/
|
|
471
|
-
|
|
440
|
+
calculateStrainPeaks(beatmap: TBeatmap): StrainPeaks;
|
|
472
441
|
/**
|
|
473
|
-
*
|
|
442
|
+
* Obtains the strain peaks of a `Beatmap` with specific `Mod`s.
|
|
443
|
+
*
|
|
444
|
+
* @param beatmap The `Beatmap` whose strain peaks are to be calculated.
|
|
445
|
+
* @param mods The `Mod`s to apply to the beatmap. Defaults to No Mod.
|
|
446
|
+
* @returns The strain peaks of the `Beatmap`.
|
|
474
447
|
*/
|
|
475
|
-
|
|
448
|
+
calculateStrainPeaks(beatmap: Beatmap, mods?: ModMap): StrainPeaks;
|
|
476
449
|
/**
|
|
477
|
-
*
|
|
450
|
+
* Creates the `Skill`s to calculate the difficulty of a `PlayableBeatmap`.
|
|
451
|
+
*
|
|
452
|
+
* @param beatmap The `PlayableBeatmap` whose difficulty will be calculated.
|
|
453
|
+
* @returns The `Skill`s.
|
|
478
454
|
*/
|
|
479
|
-
protected
|
|
455
|
+
protected abstract createSkills(beatmap: TBeatmap): Skill[];
|
|
480
456
|
/**
|
|
481
|
-
*
|
|
457
|
+
* Creates the `Skill`s to obtain the strain peaks of a `PlayableBeatmap`.
|
|
482
458
|
*
|
|
483
|
-
* @param
|
|
459
|
+
* @param beatmap The `PlayableBeatmap` whose strain peaks will be calculated.
|
|
460
|
+
* @returns The `Skill`s.
|
|
484
461
|
*/
|
|
485
|
-
protected
|
|
462
|
+
protected abstract createStrainPeakSkills(beatmap: TBeatmap): (Skill & IHasPeakDifficulty)[];
|
|
486
463
|
/**
|
|
487
|
-
*
|
|
464
|
+
* Creates difficulty hitobjects for this calculator.
|
|
465
|
+
*
|
|
466
|
+
* @param beatmap The beatmap to generate difficulty hitobjects from.
|
|
467
|
+
* @returns The generated difficulty hitobjects.
|
|
488
468
|
*/
|
|
489
|
-
abstract
|
|
469
|
+
protected abstract createDifficultyHitObjects(beatmap: TBeatmap): THitObject[];
|
|
490
470
|
/**
|
|
491
|
-
*
|
|
471
|
+
* Creates a `DifficultyAttributes` object to describe a `PlayableBeatmap`'s difficulty.
|
|
472
|
+
*
|
|
473
|
+
* @param beatmap The `Beatmap` whose difficulty was calculated.
|
|
474
|
+
* @param playableBeatmap The `PlayableBeatmap` whose difficulty was calculated.
|
|
475
|
+
* @param skills The `Skill`s which processed the `PlayableBeatmap`.
|
|
476
|
+
* @param objects The `DifficultyHitObject`s which were processed.
|
|
477
|
+
* @returns The `DifficultyAttributes` object.
|
|
492
478
|
*/
|
|
493
|
-
abstract
|
|
479
|
+
protected abstract createDifficultyAttributes(beatmap: Beatmap, playableBeatmap: TBeatmap, skills: Skill[], objects: THitObject[]): TAttributes;
|
|
494
480
|
/**
|
|
495
|
-
*
|
|
481
|
+
* Constructs a `PlayableBeatmap` from a `Beatmap` with specific `Mod`s.
|
|
482
|
+
*
|
|
483
|
+
* @param beatmap The `Beatmap` to create a `PlayableBeatmap` from.
|
|
484
|
+
* @param mods The `Mod`s to apply to the `Beatmap`.
|
|
485
|
+
* @returns The `PlayableBeatmap`.
|
|
496
486
|
*/
|
|
497
|
-
abstract
|
|
487
|
+
protected abstract createPlayableBeatmap(beatmap: Beatmap, mods?: ModMap): TBeatmap;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Represents options for performance calculation.
|
|
492
|
+
*/
|
|
493
|
+
interface PerformanceCalculationOptions {
|
|
498
494
|
/**
|
|
499
|
-
*
|
|
495
|
+
* The maximum combo achieved in the score.
|
|
500
496
|
*/
|
|
501
|
-
|
|
497
|
+
combo?: number;
|
|
502
498
|
/**
|
|
503
|
-
*
|
|
499
|
+
* The accuracy achieved in the score.
|
|
504
500
|
*/
|
|
505
|
-
|
|
501
|
+
accPercent?: Accuracy | number;
|
|
506
502
|
/**
|
|
507
|
-
*
|
|
503
|
+
* The amount of misses achieved in the score.
|
|
508
504
|
*
|
|
509
|
-
* @
|
|
505
|
+
* If {@link accPercent} is provided as an {@link Accuracy} object, this value will be ignored.
|
|
510
506
|
*/
|
|
511
|
-
|
|
507
|
+
miss?: number;
|
|
512
508
|
/**
|
|
513
|
-
*
|
|
514
|
-
|
|
515
|
-
|
|
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.
|
|
516
526
|
*/
|
|
517
|
-
|
|
527
|
+
totalScore?: number;
|
|
518
528
|
}
|
|
519
529
|
|
|
520
530
|
/**
|
|
521
|
-
*
|
|
531
|
+
* The base class of performance calculators.
|
|
522
532
|
*/
|
|
523
|
-
declare class
|
|
533
|
+
declare abstract class PerformanceCalculator<T extends IDifficultyAttributes> {
|
|
524
534
|
/**
|
|
525
|
-
* The
|
|
535
|
+
* The overall performance value.
|
|
526
536
|
*/
|
|
527
|
-
|
|
537
|
+
total: number;
|
|
528
538
|
/**
|
|
529
|
-
* The
|
|
539
|
+
* The calculated accuracy.
|
|
530
540
|
*/
|
|
531
|
-
|
|
541
|
+
computedAccuracy: Accuracy;
|
|
532
542
|
/**
|
|
533
|
-
* The
|
|
543
|
+
* The calculated maximum combo.
|
|
534
544
|
*/
|
|
535
|
-
|
|
545
|
+
combo: number;
|
|
536
546
|
/**
|
|
537
|
-
* The
|
|
547
|
+
* The difficulty attributes that is being calculated.
|
|
538
548
|
*/
|
|
539
|
-
|
|
540
|
-
private maximumSliderRadius;
|
|
541
|
-
private readonly assumedSliderRadius;
|
|
542
|
-
private readonly minDeltaTime;
|
|
549
|
+
readonly difficultyAttributes: T | CacheableDifficultyAttributes<T>;
|
|
543
550
|
/**
|
|
544
|
-
*
|
|
551
|
+
* The mods that were used.
|
|
545
552
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
circleSize: number;
|
|
549
|
-
mods: Mod[];
|
|
550
|
-
speedMultiplier: number;
|
|
551
|
-
mode: Modes;
|
|
552
|
-
preempt?: number;
|
|
553
|
-
}): DifficultyHitObject[];
|
|
553
|
+
protected readonly mods: ModMap;
|
|
554
|
+
private _sliderEndsDropped;
|
|
554
555
|
/**
|
|
555
|
-
*
|
|
556
|
+
* The amount of slider ends dropped in the score.
|
|
556
557
|
*/
|
|
557
|
-
|
|
558
|
+
protected get sliderEndsDropped(): number;
|
|
559
|
+
private _sliderTicksMissed;
|
|
558
560
|
/**
|
|
559
|
-
*
|
|
561
|
+
* The amount of slider ticks missed in the score.
|
|
560
562
|
*
|
|
561
|
-
*
|
|
563
|
+
* This is used to calculate the slider accuracy.
|
|
562
564
|
*/
|
|
563
|
-
|
|
565
|
+
protected get sliderTicksMissed(): number;
|
|
566
|
+
private _usingClassicSliderAccuracy;
|
|
564
567
|
/**
|
|
565
|
-
*
|
|
568
|
+
* Whether this score uses classic slider accuracy.
|
|
566
569
|
*/
|
|
567
|
-
|
|
568
|
-
|
|
570
|
+
protected get usingClassicSliderAccuracy(): boolean;
|
|
571
|
+
/**
|
|
572
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
573
|
+
*/
|
|
574
|
+
constructor(difficultyAttributes: T | CacheableDifficultyAttributes<T>);
|
|
575
|
+
/**
|
|
576
|
+
* Calculates the performance points of the beatmap.
|
|
577
|
+
*
|
|
578
|
+
* @param options Options for performance calculation.
|
|
579
|
+
* @returns The current instance.
|
|
580
|
+
*/
|
|
581
|
+
calculate(options?: PerformanceCalculationOptions): this;
|
|
582
|
+
/**
|
|
583
|
+
* Returns a string representative of the class.
|
|
584
|
+
*/
|
|
585
|
+
abstract toString(): string;
|
|
586
|
+
/**
|
|
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.
|
|
605
|
+
*
|
|
606
|
+
* @param options Options for performance calculation.
|
|
607
|
+
*/
|
|
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;
|
|
644
|
+
previous(backwardsIndex: number): this | null;
|
|
645
|
+
next(forwardsIndex: number): this | null;
|
|
646
|
+
/**
|
|
647
|
+
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
648
|
+
*
|
|
649
|
+
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
650
|
+
* can be hit with just a single tap in osu!droid.
|
|
651
|
+
*
|
|
652
|
+
* In the case of sliders, it is considered overlapping if all nested hitobjects can be hit with
|
|
653
|
+
* one aim motion.
|
|
654
|
+
*
|
|
655
|
+
* @param considerDistance Whether to consider the distance between both hitobjects.
|
|
656
|
+
* @returns Whether the hitobject is considered overlapping.
|
|
657
|
+
*/
|
|
658
|
+
isOverlapping(considerDistance: boolean): boolean;
|
|
569
659
|
}
|
|
570
660
|
|
|
571
661
|
/**
|
|
@@ -589,88 +679,65 @@ interface DifficultSlider {
|
|
|
589
679
|
}
|
|
590
680
|
|
|
591
681
|
/**
|
|
592
|
-
*
|
|
593
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
682
|
+
* Holds data that can be used to calculate osu!droid performance points.
|
|
594
683
|
*/
|
|
595
|
-
|
|
684
|
+
interface IDroidDifficultyAttributes extends IDifficultyAttributes {
|
|
596
685
|
/**
|
|
597
|
-
* The
|
|
686
|
+
* The difficulty corresponding to the tap skill.
|
|
598
687
|
*/
|
|
599
|
-
|
|
600
|
-
difficultyValue(): number;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
605
|
-
*/
|
|
606
|
-
declare class DroidAim extends DroidSkill {
|
|
607
|
-
protected readonly skillMultiplier: number;
|
|
608
|
-
protected readonly strainDecayBase: number;
|
|
609
|
-
protected readonly reducedSectionCount: number;
|
|
610
|
-
protected readonly reducedSectionBaseline: number;
|
|
611
|
-
protected readonly starsPerDouble: number;
|
|
612
|
-
private readonly withSliders;
|
|
613
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
688
|
+
tapDifficulty: number;
|
|
614
689
|
/**
|
|
615
|
-
*
|
|
690
|
+
* The difficulty corresponding to the rhythm skill.
|
|
616
691
|
*/
|
|
617
|
-
|
|
692
|
+
rhythmDifficulty: number;
|
|
618
693
|
/**
|
|
619
|
-
*
|
|
694
|
+
* The difficulty corresponding to the reading skill.
|
|
620
695
|
*/
|
|
621
|
-
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* An evaluator for calculating osu!droid Aim skill.
|
|
626
|
-
*/
|
|
627
|
-
declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
628
|
-
protected static readonly wideAngleMultiplier: number;
|
|
629
|
-
protected static readonly sliderMultiplier: number;
|
|
630
|
-
protected static readonly velocityChangeMultiplier: number;
|
|
696
|
+
readingDifficulty: number;
|
|
631
697
|
/**
|
|
632
|
-
*
|
|
698
|
+
* The amount of strains that are considered difficult with respect to the tap skill.
|
|
633
699
|
*/
|
|
634
|
-
|
|
635
|
-
private static readonly minSpeedBonus;
|
|
700
|
+
tapDifficultStrainCount: number;
|
|
636
701
|
/**
|
|
637
|
-
*
|
|
702
|
+
* The amount of notes that are considered difficult with respect to the reading skill.
|
|
703
|
+
*/
|
|
704
|
+
readingDifficultNoteCount: number;
|
|
705
|
+
/**
|
|
706
|
+
* Describes how much of {@link aimDifficultStrainCount} is contributed to by circles or sliders.
|
|
638
707
|
*
|
|
639
|
-
*
|
|
640
|
-
* - angle difficulty,
|
|
641
|
-
* - sharp velocity increases,
|
|
642
|
-
* - and slider difficulty.
|
|
708
|
+
* A value closer to 0 indicates most of {@link aimDifficultStrainCount} is contributed by circles.
|
|
643
709
|
*
|
|
644
|
-
* @
|
|
645
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
710
|
+
* A value closer to infinity indicates most of {@link aimDifficultStrainCount} is contributed by sliders.
|
|
646
711
|
*/
|
|
647
|
-
|
|
712
|
+
aimTopWeightedSliderFactor: number;
|
|
648
713
|
/**
|
|
649
|
-
*
|
|
714
|
+
* Describes how much of {@link tapDifficultStrainCount} is contributed to by circles or sliders.
|
|
715
|
+
*
|
|
716
|
+
* A value closer to 0 indicates most of {@link tapDifficultStrainCount} is contributed by circles.
|
|
717
|
+
*
|
|
718
|
+
* A value closer to infinity indicates most of {@link tapDifficultStrainCount} is contributed by sliders.
|
|
650
719
|
*/
|
|
651
|
-
|
|
720
|
+
tapTopWeightedSliderFactor: number;
|
|
652
721
|
/**
|
|
653
|
-
*
|
|
722
|
+
* The maximum score obtainable on the beatmap.
|
|
654
723
|
*/
|
|
655
|
-
|
|
724
|
+
maximumScore: number;
|
|
656
725
|
}
|
|
657
726
|
|
|
658
727
|
/**
|
|
659
728
|
* Holds data that can be used to calculate osu!droid performance points.
|
|
660
729
|
*/
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* The difficulty corresponding to the tap skill.
|
|
664
|
-
*/
|
|
730
|
+
declare class DroidDifficultyAttributes extends DifficultyAttributes implements IDroidDifficultyAttributes {
|
|
665
731
|
tapDifficulty: number;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
732
|
+
readingDifficulty: number;
|
|
733
|
+
aimTopWeightedSliderFactor: number;
|
|
734
|
+
tapTopWeightedSliderFactor: number;
|
|
735
|
+
readingDifficultNoteCount: number;
|
|
669
736
|
rhythmDifficulty: number;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
737
|
+
tapDifficultStrainCount: number;
|
|
738
|
+
maximumScore: number;
|
|
739
|
+
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IDroidDifficultyAttributes>);
|
|
740
|
+
toString(): string;
|
|
674
741
|
}
|
|
675
742
|
|
|
676
743
|
/**
|
|
@@ -695,7 +762,11 @@ interface HighStrainSection {
|
|
|
695
762
|
* Holds data that can be used to calculate osu!droid performance points as well
|
|
696
763
|
* as doing some analysis using the replay of a score.
|
|
697
764
|
*/
|
|
698
|
-
interface
|
|
765
|
+
interface IExtendedDroidDifficultyAttributes extends IDroidDifficultyAttributes {
|
|
766
|
+
/**
|
|
767
|
+
* The mode of the difficulty calculation.
|
|
768
|
+
*/
|
|
769
|
+
mode: "live";
|
|
699
770
|
/**
|
|
700
771
|
* Possible sections at which the player can use three fingers on.
|
|
701
772
|
*/
|
|
@@ -704,12 +775,6 @@ interface ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes {
|
|
|
704
775
|
* Sliders that are considered difficult.
|
|
705
776
|
*/
|
|
706
777
|
difficultSliders: DifficultSlider[];
|
|
707
|
-
/**
|
|
708
|
-
* The number of clickable objects weighted by difficulty.
|
|
709
|
-
*
|
|
710
|
-
* Related to aim difficulty.
|
|
711
|
-
*/
|
|
712
|
-
aimNoteCount: number;
|
|
713
778
|
/**
|
|
714
779
|
* Describes how much of flashlight difficulty is contributed to by hitcircles or sliders.
|
|
715
780
|
*
|
|
@@ -718,161 +783,216 @@ interface ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes {
|
|
|
718
783
|
* A value closer to 0 indicates most of flashlight difficulty is contributed by sliders.
|
|
719
784
|
*/
|
|
720
785
|
flashlightSliderFactor: number;
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Holds data that can be used to calculate osu!droid performance points as well
|
|
790
|
+
* as doing some analysis using the replay of a score.
|
|
791
|
+
*/
|
|
792
|
+
declare class ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes implements IExtendedDroidDifficultyAttributes {
|
|
793
|
+
mode: "live";
|
|
794
|
+
possibleThreeFingeredSections: HighStrainSection[];
|
|
795
|
+
difficultSliders: DifficultSlider[];
|
|
796
|
+
flashlightSliderFactor: number;
|
|
797
|
+
constructor(cacheableAttributes?: CacheableDifficultyAttributes<IExtendedDroidDifficultyAttributes>);
|
|
729
798
|
}
|
|
730
799
|
|
|
731
800
|
/**
|
|
732
801
|
* A difficulty calculator for osu!droid gamemode.
|
|
733
802
|
*/
|
|
734
|
-
declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
803
|
+
declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidPlayableBeatmap, DroidDifficultyHitObject, ExtendedDroidDifficultyAttributes> {
|
|
804
|
+
constructor();
|
|
805
|
+
retainDifficultyAdjustmentMods(mods: Mod[]): Mod[];
|
|
806
|
+
protected createDifficultyAttributes(beatmap: Beatmap, playableBeatmap: DroidPlayableBeatmap, skills: Skill[], objects: DroidDifficultyHitObject[]): ExtendedDroidDifficultyAttributes;
|
|
807
|
+
protected createPlayableBeatmap(beatmap: Beatmap, mods?: ModMap): DroidPlayableBeatmap;
|
|
808
|
+
protected createDifficultyHitObjects(beatmap: DroidPlayableBeatmap): DroidDifficultyHitObject[];
|
|
809
|
+
protected createSkills(beatmap: DroidPlayableBeatmap): Skill[];
|
|
810
|
+
protected createStrainPeakSkills(beatmap: DroidPlayableBeatmap): (Skill & IHasPeakDifficulty)[];
|
|
811
|
+
private populateAimAttributes;
|
|
812
|
+
private populateTapAttributes;
|
|
813
|
+
private populateRhythmAttributes;
|
|
814
|
+
private populateFlashlightAttributes;
|
|
815
|
+
private populateReadingAttributes;
|
|
816
|
+
private calculateAimDifficultyRating;
|
|
817
|
+
private calculateDifficultyRating;
|
|
818
|
+
static sumCognitionDifficulty(reading: number, flashlight: number): number;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
823
|
+
*/
|
|
824
|
+
declare class DroidPerformanceCalculator extends PerformanceCalculator<IDroidDifficultyAttributes> {
|
|
735
825
|
/**
|
|
736
|
-
* The aim
|
|
826
|
+
* The aim performance value.
|
|
737
827
|
*/
|
|
738
828
|
aim: number;
|
|
739
829
|
/**
|
|
740
|
-
* The tap
|
|
830
|
+
* The tap performance value.
|
|
741
831
|
*/
|
|
742
832
|
tap: number;
|
|
743
833
|
/**
|
|
744
|
-
* The
|
|
834
|
+
* The accuracy performance value.
|
|
745
835
|
*/
|
|
746
|
-
|
|
836
|
+
accuracy: number;
|
|
747
837
|
/**
|
|
748
|
-
* The flashlight
|
|
838
|
+
* The flashlight performance value.
|
|
749
839
|
*/
|
|
750
840
|
flashlight: number;
|
|
751
841
|
/**
|
|
752
|
-
* The
|
|
842
|
+
* The reading performance value.
|
|
843
|
+
*/
|
|
844
|
+
reading: number;
|
|
845
|
+
/**
|
|
846
|
+
* The penalty used to penalize the tap performance value.
|
|
847
|
+
*
|
|
848
|
+
* Can be properly obtained by analyzing the replay associated with the score.
|
|
849
|
+
*/
|
|
850
|
+
get tapPenalty(): number;
|
|
851
|
+
/**
|
|
852
|
+
* The estimated deviation of the score.
|
|
853
|
+
*/
|
|
854
|
+
get deviation(): number;
|
|
855
|
+
/**
|
|
856
|
+
* The estimated tap deviation of the score.
|
|
753
857
|
*/
|
|
754
|
-
|
|
858
|
+
get tapDeviation(): number;
|
|
755
859
|
/**
|
|
756
|
-
* The
|
|
860
|
+
* The penalty used to penalize the aim performance value.
|
|
757
861
|
*
|
|
758
|
-
*
|
|
862
|
+
* Can be properly obtained by analyzing the replay associated with the score.
|
|
759
863
|
*/
|
|
760
|
-
|
|
761
|
-
readonly attributes: ExtendedDroidDifficultyAttributes;
|
|
762
|
-
protected readonly difficultyMultiplier: number;
|
|
763
|
-
protected readonly mode: Modes;
|
|
864
|
+
get aimSliderCheesePenalty(): number;
|
|
764
865
|
/**
|
|
765
|
-
*
|
|
866
|
+
* The total score achieved in the score.
|
|
766
867
|
*/
|
|
767
|
-
|
|
868
|
+
get totalScore(): number | null;
|
|
768
869
|
/**
|
|
769
|
-
*
|
|
870
|
+
* The amount of misses, including slider breaks.
|
|
770
871
|
*/
|
|
771
|
-
|
|
872
|
+
get effectiveMissCount(): number;
|
|
873
|
+
static readonly finalMultiplier = 1.24;
|
|
874
|
+
static readonly normExponent = 1.1;
|
|
875
|
+
private _aimSliderCheesePenalty;
|
|
876
|
+
private _tapPenalty;
|
|
877
|
+
private _effectiveMissCount;
|
|
878
|
+
private _deviation;
|
|
879
|
+
private _tapDeviation;
|
|
880
|
+
private _totalScore;
|
|
881
|
+
protected calculateValues(): void;
|
|
882
|
+
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
772
883
|
/**
|
|
773
|
-
* Calculates the
|
|
884
|
+
* Calculates the aim performance value of the beatmap.
|
|
774
885
|
*/
|
|
775
|
-
|
|
886
|
+
private calculateAimValue;
|
|
776
887
|
/**
|
|
777
|
-
* Calculates the
|
|
888
|
+
* Calculates the tap performance value of the beatmap.
|
|
778
889
|
*/
|
|
779
|
-
|
|
890
|
+
private calculateTapValue;
|
|
780
891
|
/**
|
|
781
|
-
* Calculates the
|
|
892
|
+
* Calculates the accuracy performance value of the beatmap.
|
|
782
893
|
*/
|
|
783
|
-
|
|
784
|
-
calculateTotal(): void;
|
|
785
|
-
calculateAll(): void;
|
|
786
|
-
toString(): string;
|
|
787
|
-
protected preProcess(): void;
|
|
788
|
-
protected createSkills(): DroidSkill[];
|
|
894
|
+
private calculateAccuracyValue;
|
|
789
895
|
/**
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* @param aimSkill The aim skill that considers sliders.
|
|
793
|
-
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
896
|
+
* Calculates the flashlight performance value of the beatmap.
|
|
794
897
|
*/
|
|
795
|
-
private
|
|
898
|
+
private calculateFlashlightValue;
|
|
796
899
|
/**
|
|
797
|
-
* Calculates
|
|
900
|
+
* Calculates the reading performance value of the beatmap.
|
|
798
901
|
*/
|
|
799
|
-
private
|
|
902
|
+
private calculateReadingValue;
|
|
800
903
|
/**
|
|
801
|
-
*
|
|
904
|
+
* Calculates a strain-based miss penalty.
|
|
802
905
|
*
|
|
803
|
-
*
|
|
906
|
+
* Strain-based miss penalty assumes that a player will miss on the hardest parts of a map,
|
|
907
|
+
* so we use the amount of relatively difficult sections to adjust miss penalty
|
|
908
|
+
* to make it more punishing on maps with lower amount of hard sections.
|
|
909
|
+
*/
|
|
910
|
+
private calculateStrainBasedMissPenalty;
|
|
911
|
+
/**
|
|
912
|
+
* The object-based proportional miss penalty.
|
|
804
913
|
*/
|
|
805
|
-
private
|
|
914
|
+
private get proportionalMissPenalty();
|
|
806
915
|
/**
|
|
807
|
-
* Calculates
|
|
916
|
+
* Calculates the object-based length scaling based on the deviation of a player for a full
|
|
917
|
+
* combo in this beatmap, taking retries into account.
|
|
918
|
+
*
|
|
919
|
+
* @param objectCount The amount of objects to be considered. Defaults to the amount of
|
|
920
|
+
* objects in this beatmap.
|
|
921
|
+
* @param punishForMemorization Whether to punish the deviation for memorization. Defaults to `false`.
|
|
808
922
|
*/
|
|
809
|
-
private
|
|
923
|
+
private calculateDeviationBasedLengthScaling;
|
|
810
924
|
/**
|
|
811
|
-
*
|
|
925
|
+
* Estimates the player's deviation based on the OD, number of circles and sliders,
|
|
926
|
+
* and number of 300s, 100s, 50s, and misses, assuming the player's mean hit error is 0.
|
|
927
|
+
*
|
|
928
|
+
* The estimation is consistent in that two SS scores on the same map
|
|
929
|
+
* with the same settings will always return the same deviation.
|
|
930
|
+
*
|
|
931
|
+
* Sliders are treated as circles with a 50 hit window.
|
|
812
932
|
*
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
*
|
|
933
|
+
* Misses are ignored because they are usually due to misaiming, and 50s
|
|
934
|
+
* are grouped with 100s since they are usually due to misreading.
|
|
935
|
+
*
|
|
936
|
+
* Inaccuracies are capped to the number of circles in the map.
|
|
816
937
|
*/
|
|
817
|
-
private
|
|
938
|
+
private calculateAimDeviation;
|
|
818
939
|
/**
|
|
819
|
-
*
|
|
940
|
+
* Does the same as {@link calculateAimDeviation}, but only for notes and inaccuracies that are relevant to tap difficulty.
|
|
820
941
|
*
|
|
821
|
-
*
|
|
942
|
+
* Treats all difficult speed notes as circles, so this method can sometimes return a lower deviation than {@link calculateAimDeviation}.
|
|
943
|
+
* This is fine though, since this method is only used to scale tap pp.
|
|
822
944
|
*/
|
|
823
|
-
private
|
|
945
|
+
private calculateTapDeviation;
|
|
824
946
|
/**
|
|
825
|
-
*
|
|
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.
|
|
826
950
|
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
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.
|
|
829
954
|
*/
|
|
830
|
-
private
|
|
955
|
+
private calculateDeviation;
|
|
831
956
|
/**
|
|
832
|
-
*
|
|
957
|
+
* Calculates a multiplier for tap to account for improper tapping based on the deviation and tap difficulty.
|
|
833
958
|
*
|
|
834
|
-
*
|
|
835
|
-
* @param visualSkillWithoutSliders The visual skill that doesn't consider sliders.
|
|
959
|
+
* [Graph](https://www.desmos.com/calculator/z5l9ebrwpi)
|
|
836
960
|
*/
|
|
837
|
-
private
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
842
|
-
*/
|
|
843
|
-
declare class DroidFlashlight extends DroidSkill {
|
|
844
|
-
protected readonly skillMultiplier: number;
|
|
845
|
-
protected readonly strainDecayBase: number;
|
|
846
|
-
protected readonly reducedSectionCount: number;
|
|
847
|
-
protected readonly reducedSectionBaseline: number;
|
|
848
|
-
protected readonly starsPerDouble: number;
|
|
849
|
-
private readonly isHidden;
|
|
850
|
-
private readonly withSliders;
|
|
851
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
961
|
+
private calculateTapHighDeviationNerf;
|
|
962
|
+
private getHitWindow;
|
|
963
|
+
private calculateEstimatedSliderBreaks;
|
|
964
|
+
private calculateMaximumComboBasedMissCount;
|
|
852
965
|
/**
|
|
853
|
-
*
|
|
966
|
+
* Calculates the amount of misses + sliderbreaks from combo.
|
|
854
967
|
*/
|
|
855
|
-
|
|
856
|
-
|
|
968
|
+
private calculateComboBasedEstimatedMissCount;
|
|
969
|
+
toString(): string;
|
|
857
970
|
}
|
|
858
971
|
|
|
859
972
|
/**
|
|
860
|
-
* An evaluator for calculating
|
|
861
|
-
*
|
|
862
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
973
|
+
* An evaluator for calculating osu!droid agility aim difficulty.
|
|
863
974
|
*/
|
|
864
|
-
declare abstract class
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
975
|
+
declare abstract class DroidAgilityEvaluator {
|
|
976
|
+
/**
|
|
977
|
+
* Evaluates the difficulty of fast aiming the current object.
|
|
978
|
+
*
|
|
979
|
+
* @param current The current object.
|
|
980
|
+
*/
|
|
981
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
982
|
+
private static highBpmBonus;
|
|
870
983
|
}
|
|
871
984
|
|
|
872
985
|
/**
|
|
873
986
|
* An evaluator for calculating osu!droid Flashlight skill.
|
|
874
987
|
*/
|
|
875
|
-
declare abstract class DroidFlashlightEvaluator
|
|
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;
|
|
876
996
|
/**
|
|
877
997
|
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
878
998
|
*
|
|
@@ -883,240 +1003,460 @@ declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
883
1003
|
* - and whether Hidden mod is enabled.
|
|
884
1004
|
*
|
|
885
1005
|
* @param current The current object.
|
|
886
|
-
* @param
|
|
887
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
1006
|
+
* @param mods The mods used.
|
|
888
1007
|
*/
|
|
889
|
-
static evaluateDifficultyOf(current:
|
|
1008
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: ModMap): number;
|
|
890
1009
|
}
|
|
891
1010
|
|
|
892
1011
|
/**
|
|
893
|
-
*
|
|
1012
|
+
* An evaluator for calculating osu!droid flow aim difficulty.
|
|
894
1013
|
*/
|
|
895
|
-
|
|
1014
|
+
declare abstract class DroidFlowAimEvaluator {
|
|
1015
|
+
private static readonly velocityChangeMultiplier;
|
|
1016
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
1017
|
+
private static calculateOverlapFactor;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Evaluator for reading difficulty in osu!droid.
|
|
1022
|
+
*/
|
|
1023
|
+
declare abstract class DroidReadingEvaluator {
|
|
1024
|
+
private static readonly readingWindowSize;
|
|
1025
|
+
private static readonly hiddenMultiplier;
|
|
1026
|
+
private static readonly traceableMultiplier;
|
|
1027
|
+
private static readonly densityMultiplier;
|
|
1028
|
+
private static readonly densityDifficultyBase;
|
|
1029
|
+
private static readonly preemptBalancingFactor;
|
|
1030
|
+
private static readonly preemptStartingPoint;
|
|
1031
|
+
private static readonly minimumAngleRelevancyTime;
|
|
1032
|
+
private static readonly maximumAngleRelevancyTime;
|
|
896
1033
|
/**
|
|
897
|
-
*
|
|
1034
|
+
* Evaluates the difficulty of reading the object.
|
|
898
1035
|
*/
|
|
899
|
-
|
|
1036
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, mods: ModMap): number;
|
|
900
1037
|
/**
|
|
901
|
-
*
|
|
1038
|
+
* Calculates the density difficulty of the current object and how hard it is to aim it because of it based on:
|
|
1039
|
+
*
|
|
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.
|
|
902
1044
|
*/
|
|
903
|
-
|
|
1045
|
+
private static calculateDensityDifficulty;
|
|
904
1046
|
/**
|
|
905
|
-
*
|
|
1047
|
+
* Calculates the difficulty of aiming the current object when the approach rate is very high based on:
|
|
1048
|
+
*
|
|
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.
|
|
906
1052
|
*/
|
|
907
|
-
|
|
1053
|
+
private static calculatePreemptDifficulty;
|
|
908
1054
|
/**
|
|
909
|
-
*
|
|
1055
|
+
* Calculates the difficulty of aiming the current object when the Hidden mod is active based on:
|
|
1056
|
+
*
|
|
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.
|
|
910
1063
|
*/
|
|
911
|
-
|
|
1064
|
+
private static calculateHiddenDifficulty;
|
|
1065
|
+
private static calculateTraceableDifficulty;
|
|
1066
|
+
private static getPastObjectDifficultyInfluence;
|
|
912
1067
|
/**
|
|
913
|
-
*
|
|
1068
|
+
* Returns a list of objects that are visible on screen at the point in time the current object becomes visible.
|
|
914
1069
|
*/
|
|
915
|
-
|
|
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;
|
|
916
1075
|
/**
|
|
917
|
-
*
|
|
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
|
|
918
1079
|
*/
|
|
919
|
-
|
|
1080
|
+
private static getConstantAngleNerfFactor;
|
|
920
1081
|
/**
|
|
921
|
-
*
|
|
1082
|
+
* Returns a nerfing factor for when objects are very distant in time, affecting reading less.
|
|
922
1083
|
*/
|
|
923
|
-
|
|
1084
|
+
private static getTimeNerfFactor;
|
|
1085
|
+
private static highBpmBonus;
|
|
924
1086
|
}
|
|
925
1087
|
|
|
926
1088
|
/**
|
|
927
|
-
*
|
|
1089
|
+
* An evaluator for calculating osu!droid Rhythm skill.
|
|
928
1090
|
*/
|
|
929
|
-
declare abstract class
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* The calculated accuracy.
|
|
936
|
-
*/
|
|
937
|
-
computedAccuracy: Accuracy;
|
|
1091
|
+
declare abstract class DroidRhythmEvaluator {
|
|
1092
|
+
private static readonly historyTimeMax;
|
|
1093
|
+
private static readonly historyObjectsMax;
|
|
1094
|
+
private static readonly rhythmOverallMultiplier;
|
|
1095
|
+
private static readonly rhythmRatioMultiplier;
|
|
938
1096
|
/**
|
|
939
|
-
*
|
|
1097
|
+
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
1098
|
+
* with historic data of the current object.
|
|
1099
|
+
*
|
|
1100
|
+
* @param current The current object.
|
|
1101
|
+
* @param useSliderAccuracy Whether to use slider accuracy.
|
|
940
1102
|
*/
|
|
941
|
-
|
|
1103
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, useSliderAccuracy: boolean): number;
|
|
1104
|
+
private static getEffectiveRatio;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* An evaluator for calculating osu!droid snap aim difficulty.
|
|
1109
|
+
*/
|
|
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;
|
|
942
1119
|
/**
|
|
943
|
-
*
|
|
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.
|
|
944
1129
|
*/
|
|
945
|
-
|
|
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;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* An evaluator for calculating osu!droid tap skill.
|
|
1139
|
+
*/
|
|
1140
|
+
declare abstract class DroidTapEvaluator {
|
|
1141
|
+
private static readonly minSpeedBonus;
|
|
946
1142
|
/**
|
|
947
|
-
*
|
|
1143
|
+
* Evaluates the difficulty of tapping the current object, based on:
|
|
948
1144
|
*
|
|
949
|
-
*
|
|
1145
|
+
* - time between pressing the previous and current object,
|
|
1146
|
+
* - distance between those objects,
|
|
1147
|
+
* - how easily they can be cheesed,
|
|
1148
|
+
* - and the strain time cap.
|
|
1149
|
+
*
|
|
1150
|
+
* @param current The current object.
|
|
1151
|
+
* @param considerCheesability Whether to consider cheesability.
|
|
950
1152
|
*/
|
|
951
|
-
|
|
1153
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, considerCheesability: boolean): number;
|
|
1154
|
+
private static highBpmBonus;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Represents an osu!standard hit object with difficulty calculation values.
|
|
1159
|
+
*/
|
|
1160
|
+
declare class OsuDifficultyHitObject extends DifficultyHitObject {
|
|
952
1161
|
/**
|
|
953
|
-
* The
|
|
1162
|
+
* The speed strain generated by the hitobject.
|
|
954
1163
|
*/
|
|
955
|
-
|
|
1164
|
+
speedStrain: number;
|
|
1165
|
+
readonly normalizedRadius = 50;
|
|
1166
|
+
get smallCircleBonus(): number;
|
|
1167
|
+
protected readonly mode = Modes.Osu;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* An evaluator for calculating osu!standard Aim skill.
|
|
1172
|
+
*/
|
|
1173
|
+
declare abstract class OsuAimEvaluator {
|
|
1174
|
+
private static readonly wideAngleMultiplier;
|
|
1175
|
+
private static readonly acuteAngleMultiplier;
|
|
1176
|
+
private static readonly sliderMultiplier;
|
|
1177
|
+
private static readonly velocityChangeMultiplier;
|
|
1178
|
+
private static readonly wiggleMultiplier;
|
|
956
1179
|
/**
|
|
957
|
-
*
|
|
1180
|
+
* Evaluates the difficulty of aiming the current object, based on:
|
|
1181
|
+
*
|
|
1182
|
+
* - cursor velocity to the current object,
|
|
1183
|
+
* - angle difficulty,
|
|
1184
|
+
* - sharp velocity increases,
|
|
1185
|
+
* - and slider difficulty.
|
|
1186
|
+
*
|
|
1187
|
+
* @param current The current object.
|
|
1188
|
+
* @param withSliders Whether to take slider difficulty into account.
|
|
958
1189
|
*/
|
|
959
|
-
|
|
1190
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, withSliders: boolean): number;
|
|
1191
|
+
private static calculateWideAngleBonus;
|
|
1192
|
+
private static calculateAcuteAngleBonus;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* An evaluator for calculating osu!standard Flashlight skill.
|
|
1197
|
+
*/
|
|
1198
|
+
declare abstract class OsuFlashlightEvaluator {
|
|
1199
|
+
private static readonly maxOpacityBonus;
|
|
1200
|
+
private static readonly hiddenBonus;
|
|
1201
|
+
private static readonly minVelocity;
|
|
1202
|
+
private static readonly sliderMultiplier;
|
|
1203
|
+
private static readonly minAngleMultiplier;
|
|
960
1204
|
/**
|
|
961
|
-
*
|
|
1205
|
+
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
1206
|
+
*
|
|
1207
|
+
* - distance between a number of previous objects and the current object,
|
|
1208
|
+
* - the visual opacity of the current object,
|
|
1209
|
+
* - the angle made by the current object,
|
|
1210
|
+
* - length and speed of the current object (for sliders),
|
|
1211
|
+
* - and whether Hidden mod is enabled.
|
|
1212
|
+
*
|
|
1213
|
+
* @param current The current object.
|
|
1214
|
+
* @param mods The mods used.
|
|
962
1215
|
*/
|
|
963
|
-
|
|
1216
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, mods: ModMap): number;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* An evaluator for calculating osu!standard Rhythm skill.
|
|
1221
|
+
*/
|
|
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;
|
|
964
1227
|
/**
|
|
965
|
-
* Calculates the
|
|
1228
|
+
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
1229
|
+
* with historic data of the current object.
|
|
966
1230
|
*
|
|
967
|
-
* @param
|
|
968
|
-
* @returns The current instance.
|
|
1231
|
+
* @param current The current object.
|
|
969
1232
|
*/
|
|
970
|
-
|
|
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;
|
|
971
1242
|
/**
|
|
972
|
-
*
|
|
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.
|
|
973
1251
|
*/
|
|
974
|
-
|
|
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 {
|
|
975
1260
|
/**
|
|
976
|
-
*
|
|
977
|
-
*
|
|
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.
|
|
978
1263
|
*/
|
|
979
|
-
protected
|
|
1264
|
+
protected readonly reducedSectionCount: number;
|
|
980
1265
|
/**
|
|
981
|
-
*
|
|
1266
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
982
1267
|
*/
|
|
983
|
-
protected
|
|
1268
|
+
protected readonly reducedSectionBaseline: number;
|
|
1269
|
+
protected readonly _objectStrains: number[];
|
|
984
1270
|
/**
|
|
985
|
-
* The
|
|
1271
|
+
* The strains of hitobjects.
|
|
986
1272
|
*/
|
|
987
|
-
|
|
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;
|
|
988
1280
|
/**
|
|
989
|
-
*
|
|
1281
|
+
* Converts a difficulty value to a performance value.
|
|
1282
|
+
*
|
|
1283
|
+
* @param difficulty The difficulty value to convert.
|
|
1284
|
+
* @returns The performance value.
|
|
990
1285
|
*/
|
|
991
|
-
|
|
1286
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
992
1287
|
/**
|
|
993
|
-
*
|
|
1288
|
+
* Obtains the live strain peaks for each {@link sectionLength} of the beatmap, including the peak of the current section.
|
|
994
1289
|
*/
|
|
995
|
-
|
|
1290
|
+
get currentStrainPeaks(): number[];
|
|
996
1291
|
/**
|
|
997
|
-
*
|
|
1292
|
+
* Returns the number of strains weighed against the top strain.
|
|
998
1293
|
*
|
|
999
|
-
*
|
|
1294
|
+
* The result is scaled by clock rate as it affects the total number of strains.
|
|
1295
|
+
*
|
|
1296
|
+
* @param difficultyValue The final difficulty value.
|
|
1000
1297
|
*/
|
|
1001
|
-
|
|
1298
|
+
countTopWeightedStrains(difficultyValue: number): number;
|
|
1299
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1002
1300
|
/**
|
|
1003
|
-
* Calculates the
|
|
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.
|
|
1004
1305
|
*/
|
|
1005
|
-
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
1010
|
-
*/
|
|
1011
|
-
declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
1306
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
1012
1307
|
/**
|
|
1013
|
-
*
|
|
1308
|
+
* Calculates the strain value at a hitobject.
|
|
1309
|
+
*
|
|
1310
|
+
* @param current The hitobject to calculate.
|
|
1014
1311
|
*/
|
|
1015
|
-
|
|
1312
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
1016
1313
|
/**
|
|
1017
|
-
*
|
|
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.
|
|
1018
1319
|
*/
|
|
1019
|
-
|
|
1320
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1020
1321
|
/**
|
|
1021
|
-
*
|
|
1322
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
1022
1323
|
*/
|
|
1023
|
-
|
|
1324
|
+
private saveCurrentPeak;
|
|
1024
1325
|
/**
|
|
1025
|
-
*
|
|
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.
|
|
1026
1330
|
*/
|
|
1027
|
-
|
|
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 {
|
|
1028
1339
|
/**
|
|
1029
|
-
* The
|
|
1340
|
+
* The weight by which each strain value decays.
|
|
1030
1341
|
*/
|
|
1031
|
-
|
|
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 {
|
|
1032
1351
|
/**
|
|
1033
|
-
* The
|
|
1352
|
+
* The perceived approach rate **exclusive** of rate-adjusting mods (DT/HT/etc).
|
|
1034
1353
|
*
|
|
1035
|
-
*
|
|
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.
|
|
1036
1355
|
*/
|
|
1037
|
-
|
|
1356
|
+
approachRate: number;
|
|
1038
1357
|
/**
|
|
1039
|
-
* The
|
|
1358
|
+
* The health drain rate of the beatmap.
|
|
1040
1359
|
*/
|
|
1041
|
-
|
|
1360
|
+
drainRate: number;
|
|
1042
1361
|
/**
|
|
1043
|
-
* The
|
|
1362
|
+
* The difficulty corresponding to the speed skill.
|
|
1044
1363
|
*/
|
|
1045
|
-
|
|
1364
|
+
speedDifficulty: number;
|
|
1046
1365
|
/**
|
|
1047
|
-
* The
|
|
1048
|
-
*
|
|
1049
|
-
* Can be properly obtained by analyzing the replay associated with the score.
|
|
1366
|
+
* The amount of strains that are considered difficult with respect to the speed skill.
|
|
1050
1367
|
*/
|
|
1051
|
-
|
|
1368
|
+
speedDifficultStrainCount: number;
|
|
1052
1369
|
/**
|
|
1053
|
-
*
|
|
1370
|
+
* Describes how much of {@link aimDifficultStrainCount} is contributed to by circles or sliders.
|
|
1054
1371
|
*
|
|
1055
|
-
*
|
|
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.
|
|
1056
1375
|
*/
|
|
1057
|
-
|
|
1376
|
+
aimTopWeightedSliderFactor: number;
|
|
1058
1377
|
/**
|
|
1059
|
-
*
|
|
1378
|
+
* Describes how much of {@link speedDifficultStrainCount} is contributed to by circles or sliders.
|
|
1060
1379
|
*
|
|
1061
|
-
*
|
|
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.
|
|
1062
1383
|
*/
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
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> {
|
|
1073
1423
|
/**
|
|
1074
|
-
*
|
|
1424
|
+
* The aim performance value.
|
|
1075
1425
|
*/
|
|
1076
|
-
|
|
1426
|
+
aim: number;
|
|
1077
1427
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1080
|
-
* The tap and total performance value will be recalculated afterwards.
|
|
1081
|
-
*
|
|
1082
|
-
* @param value The tap penalty value. Must be greater than or equal to 1.
|
|
1428
|
+
* The speed performance value.
|
|
1083
1429
|
*/
|
|
1084
|
-
|
|
1430
|
+
speed: number;
|
|
1085
1431
|
/**
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
1088
|
-
* The aim and total performance value will be recalculated afterwards.
|
|
1089
|
-
*
|
|
1090
|
-
* @param value The slider cheese penalty value. Must be between than 0 and 1.
|
|
1432
|
+
* The accuracy performance value.
|
|
1091
1433
|
*/
|
|
1092
|
-
|
|
1434
|
+
accuracy: number;
|
|
1093
1435
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
* The flashlight and total performance value will be recalculated afterwards.
|
|
1097
|
-
*
|
|
1098
|
-
* @param value The slider cheese penalty value. Must be between 0 and 1.
|
|
1436
|
+
* The flashlight performance value.
|
|
1099
1437
|
*/
|
|
1100
|
-
|
|
1438
|
+
flashlight: number;
|
|
1101
1439
|
/**
|
|
1102
|
-
*
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1440
|
+
* The amount of misses, including slider breaks.
|
|
1441
|
+
*/
|
|
1442
|
+
get effectiveMissCount(): number;
|
|
1443
|
+
static readonly finalMultiplier = 1.14;
|
|
1444
|
+
private greatWindow;
|
|
1445
|
+
private okWindow;
|
|
1446
|
+
private mehWindow;
|
|
1447
|
+
private approachRate;
|
|
1448
|
+
private overallDifficulty;
|
|
1449
|
+
private _effectiveMissCount;
|
|
1450
|
+
private speedDeviation;
|
|
1109
1451
|
protected calculateValues(): void;
|
|
1110
|
-
protected calculateTotalValue(): void;
|
|
1111
|
-
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
1112
1452
|
/**
|
|
1113
1453
|
* Calculates the aim performance value of the beatmap.
|
|
1114
1454
|
*/
|
|
1115
1455
|
private calculateAimValue;
|
|
1116
1456
|
/**
|
|
1117
|
-
* Calculates the
|
|
1457
|
+
* Calculates the speed performance value of the beatmap.
|
|
1118
1458
|
*/
|
|
1119
|
-
private
|
|
1459
|
+
private calculateSpeedValue;
|
|
1120
1460
|
/**
|
|
1121
1461
|
* Calculates the accuracy performance value of the beatmap.
|
|
1122
1462
|
*/
|
|
@@ -1126,462 +1466,425 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1126
1466
|
*/
|
|
1127
1467
|
private calculateFlashlightValue;
|
|
1128
1468
|
/**
|
|
1129
|
-
* Calculates
|
|
1469
|
+
* Calculates a strain-based miss penalty.
|
|
1470
|
+
*
|
|
1471
|
+
* Strain-based miss penalty assumes that a player will miss on the hardest parts of a map,
|
|
1472
|
+
* so we use the amount of relatively difficult sections to adjust miss penalty
|
|
1473
|
+
* to make it more punishing on maps with lower amount of hard sections.
|
|
1130
1474
|
*/
|
|
1131
|
-
private
|
|
1475
|
+
private calculateMissPenalty;
|
|
1132
1476
|
/**
|
|
1133
|
-
* Estimates
|
|
1134
|
-
* and number of 300s, 100s, 50s, and misses, assuming the player's mean hit error is 0.
|
|
1477
|
+
* Estimates a player's deviation on speed notes using {@link calculateDeviation}, assuming worst-case.
|
|
1135
1478
|
*
|
|
1136
|
-
*
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1479
|
+
* Treats all speed notes as hit circles.
|
|
1480
|
+
*/
|
|
1481
|
+
private calculateSpeedDeviation;
|
|
1482
|
+
/**
|
|
1483
|
+
* Estimates the player's tap deviation based on the OD, given number of greats, oks, mehs and misses,
|
|
1484
|
+
* assuming the player's mean hit error is 0. The estimation is consistent in that two SS scores on the
|
|
1485
|
+
* same map with the same settings will always return the same deviation.
|
|
1140
1486
|
*
|
|
1141
|
-
* Misses are ignored because they are usually due to misaiming
|
|
1142
|
-
* are grouped with 100s since they are usually due to misreading.
|
|
1487
|
+
* Misses are ignored because they are usually due to misaiming.
|
|
1143
1488
|
*
|
|
1144
|
-
*
|
|
1489
|
+
* Greats and oks are assumed to follow a normal distribution, whereas mehs are assumed to follow a uniform distribution.
|
|
1145
1490
|
*/
|
|
1146
1491
|
private calculateDeviation;
|
|
1147
1492
|
/**
|
|
1148
|
-
*
|
|
1493
|
+
* Calculates multiplier for speed to account for improper tapping based on the deviation and speed difficulty.
|
|
1149
1494
|
*
|
|
1150
|
-
*
|
|
1151
|
-
* This is fine though, since this method is only used to scale tap pp.
|
|
1495
|
+
* [Graph](https://www.desmos.com/calculator/dmogdhzofn)
|
|
1152
1496
|
*/
|
|
1153
|
-
private
|
|
1497
|
+
private calculateSpeedHighDeviationNerf;
|
|
1498
|
+
private calculateEstimatedSliderBreaks;
|
|
1499
|
+
/**
|
|
1500
|
+
* Calculates the amount of misses + sliderbreaks from combo.
|
|
1501
|
+
*/
|
|
1502
|
+
private calculateComboBasedEstimatedMissCount;
|
|
1154
1503
|
toString(): string;
|
|
1155
1504
|
}
|
|
1156
1505
|
|
|
1157
1506
|
/**
|
|
1158
|
-
*
|
|
1159
|
-
*/
|
|
1160
|
-
declare class DroidRhythm extends DroidSkill {
|
|
1161
|
-
protected readonly skillMultiplier: number;
|
|
1162
|
-
protected readonly reducedSectionCount: number;
|
|
1163
|
-
protected readonly reducedSectionBaseline: number;
|
|
1164
|
-
protected readonly strainDecayBase: number;
|
|
1165
|
-
protected readonly starsPerDouble: number;
|
|
1166
|
-
private currentRhythm;
|
|
1167
|
-
private readonly hitWindow;
|
|
1168
|
-
constructor(mods: Mod[], overallDifficulty: number);
|
|
1169
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1170
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* An evaluator for calculating rhythm skill.
|
|
1175
|
-
*
|
|
1176
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
1507
|
+
* Data class for variable length strain.
|
|
1177
1508
|
*/
|
|
1178
|
-
declare
|
|
1179
|
-
|
|
1180
|
-
|
|
1509
|
+
declare class StrainPeak {
|
|
1510
|
+
readonly value: number;
|
|
1511
|
+
readonly sectionLength: number;
|
|
1512
|
+
constructor(value: number, sectionLength: number);
|
|
1513
|
+
compareTo(other: StrainPeak): number;
|
|
1181
1514
|
}
|
|
1182
1515
|
|
|
1183
1516
|
/**
|
|
1184
|
-
*
|
|
1517
|
+
* A skill that evaluates strain over a variable length of time. A new strain peak is created for every
|
|
1518
|
+
* {@link DifficultyHitObject}.
|
|
1185
1519
|
*/
|
|
1186
|
-
declare abstract class
|
|
1520
|
+
declare abstract class VariableLengthStrainSkill extends Skill implements IHasPeakDifficulty {
|
|
1187
1521
|
/**
|
|
1188
|
-
*
|
|
1189
|
-
* with historic data of the current object.
|
|
1190
|
-
*
|
|
1191
|
-
* @param current The current object.
|
|
1192
|
-
* @param greatWindow The great hit window of the current object.
|
|
1193
|
-
*/
|
|
1194
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1199
|
-
*/
|
|
1200
|
-
declare class DroidTap extends DroidSkill {
|
|
1201
|
-
protected readonly skillMultiplier: number;
|
|
1202
|
-
protected readonly reducedSectionCount: number;
|
|
1203
|
-
protected readonly reducedSectionBaseline: number;
|
|
1204
|
-
protected readonly strainDecayBase: number;
|
|
1205
|
-
protected readonly starsPerDouble: number;
|
|
1206
|
-
private currentTapStrain;
|
|
1207
|
-
private currentOriginalTapStrain;
|
|
1208
|
-
private readonly greatWindow;
|
|
1209
|
-
constructor(mods: Mod[], overallDifficulty: number);
|
|
1210
|
-
/**
|
|
1211
|
-
* @param current The hitobject to calculate.
|
|
1522
|
+
* The weight by which each strain value decays.
|
|
1212
1523
|
*/
|
|
1213
|
-
protected
|
|
1524
|
+
protected readonly decayWeight: number;
|
|
1214
1525
|
/**
|
|
1215
|
-
*
|
|
1526
|
+
* The maximum length of a strain section, in milliseconds.
|
|
1216
1527
|
*/
|
|
1217
|
-
protected
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
/**
|
|
1221
|
-
* An evaluator for calculating speed or tap skill.
|
|
1222
|
-
*
|
|
1223
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
1224
|
-
*/
|
|
1225
|
-
declare abstract class SpeedEvaluator {
|
|
1226
|
-
protected static readonly minSpeedBonus: number;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* An evaluator for calculating osu!droid tap skill.
|
|
1231
|
-
*/
|
|
1232
|
-
declare abstract class DroidTapEvaluator extends SpeedEvaluator {
|
|
1528
|
+
protected readonly maxSectionLength: number;
|
|
1233
1529
|
/**
|
|
1234
|
-
*
|
|
1530
|
+
* The number of {@link maxSectionLength} sections calculated such that enough of the difficulty value is preserved.
|
|
1235
1531
|
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
* - and how easily they can be cheesed.
|
|
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.
|
|
1239
1534
|
*
|
|
1240
|
-
*
|
|
1241
|
-
* @param greatWindow The great hit window of the current object.
|
|
1242
|
-
* @param considerCheesability Whether to consider cheesability.
|
|
1535
|
+
* This should be removed in the future when a better memory-saving technique is implemented.
|
|
1243
1536
|
*/
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
protected readonly starsPerDouble: number;
|
|
1252
|
-
protected readonly reducedSectionCount: number;
|
|
1253
|
-
protected readonly reducedSectionBaseline: number;
|
|
1254
|
-
protected readonly skillMultiplier: number;
|
|
1255
|
-
protected readonly strainDecayBase: number;
|
|
1256
|
-
private readonly isHidden;
|
|
1257
|
-
private readonly withSliders;
|
|
1258
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
1259
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1260
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* An evaluator for calculating osu!droid Visual skill.
|
|
1265
|
-
*/
|
|
1266
|
-
declare abstract class DroidVisualEvaluator {
|
|
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[];
|
|
1267
1544
|
/**
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
|
|
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.
|
|
1277
1558
|
*
|
|
1278
|
-
*
|
|
1279
|
-
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1280
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
1559
|
+
* The result is scaled by clock rate as it affects the total number of strains.
|
|
1281
1560
|
*/
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
/**
|
|
1286
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
1287
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
1288
|
-
*/
|
|
1289
|
-
declare abstract class OsuSkill extends StrainSkill {
|
|
1561
|
+
countTopWeightedStrains(difficultyValue: number): number;
|
|
1562
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1290
1563
|
/**
|
|
1291
|
-
*
|
|
1564
|
+
* Calculates the strain value at the {@link DifficultyHitObject}. This value is calculated with or without respect to
|
|
1565
|
+
* previous {@link DifficultyHitObject}s.
|
|
1292
1566
|
*
|
|
1293
|
-
*
|
|
1567
|
+
* @param current The {@link DifficultyHitObject} for which the strain value should be calculated.
|
|
1294
1568
|
*/
|
|
1295
|
-
|
|
1569
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
1296
1570
|
/**
|
|
1297
|
-
*
|
|
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.
|
|
1298
1576
|
*/
|
|
1299
|
-
protected
|
|
1577
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1300
1578
|
/**
|
|
1301
|
-
*
|
|
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}.
|
|
1302
1582
|
*/
|
|
1303
|
-
|
|
1304
|
-
difficultyValue(): number;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* Holds data that can be used to calculate osu!standard performance points.
|
|
1309
|
-
*/
|
|
1310
|
-
interface OsuDifficultyAttributes extends DifficultyAttributes {
|
|
1583
|
+
private backfillPeaks;
|
|
1311
1584
|
/**
|
|
1312
|
-
*
|
|
1585
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
1313
1586
|
*/
|
|
1314
|
-
|
|
1587
|
+
private saveCurrentPeak;
|
|
1588
|
+
private startNewSectionFrom;
|
|
1589
|
+
private addStrainPeakInPlace;
|
|
1315
1590
|
}
|
|
1316
1591
|
|
|
1317
1592
|
/**
|
|
1318
|
-
*
|
|
1593
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1319
1594
|
*/
|
|
1320
|
-
declare class
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
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;
|
|
1325
1602
|
/**
|
|
1326
|
-
* The
|
|
1327
|
-
|
|
1328
|
-
speed: number;
|
|
1329
|
-
/**
|
|
1330
|
-
* The flashlight star rating of the beatmap.
|
|
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.
|
|
1331
1605
|
*/
|
|
1332
|
-
|
|
1333
|
-
readonly attributes: OsuDifficultyAttributes;
|
|
1334
|
-
protected readonly difficultyMultiplier: number;
|
|
1335
|
-
protected readonly mode: Modes;
|
|
1606
|
+
private readonly reducedSectionTime;
|
|
1336
1607
|
/**
|
|
1337
|
-
*
|
|
1608
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
1338
1609
|
*/
|
|
1339
|
-
|
|
1610
|
+
private readonly reducedStrainBaseline;
|
|
1611
|
+
private readonly sliderStrains;
|
|
1612
|
+
private maxSliderStrain;
|
|
1613
|
+
readonly withSliders: boolean;
|
|
1614
|
+
constructor(mods: ModMap, withSliders: boolean);
|
|
1340
1615
|
/**
|
|
1341
|
-
*
|
|
1616
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
1342
1617
|
*/
|
|
1343
|
-
|
|
1618
|
+
countDifficultSliders(): number;
|
|
1344
1619
|
/**
|
|
1345
|
-
*
|
|
1346
|
-
*/
|
|
1347
|
-
calculateFlashlight(): void;
|
|
1348
|
-
calculateTotal(): void;
|
|
1349
|
-
calculateAll(): void;
|
|
1350
|
-
toString(): string;
|
|
1351
|
-
protected preProcess(): void;
|
|
1352
|
-
protected createSkills(): OsuSkill[];
|
|
1353
|
-
/**
|
|
1354
|
-
* Called after aim skill calculation.
|
|
1620
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1355
1621
|
*
|
|
1356
|
-
* @param
|
|
1357
|
-
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
1622
|
+
* @param difficultyValue The final difficulty value.
|
|
1358
1623
|
*/
|
|
1359
|
-
|
|
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;
|
|
1360
1630
|
/**
|
|
1361
|
-
*
|
|
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)
|
|
1362
1638
|
*
|
|
1363
|
-
*
|
|
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.
|
|
1364
1644
|
*/
|
|
1365
|
-
private
|
|
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 {
|
|
1366
1656
|
/**
|
|
1367
|
-
*
|
|
1657
|
+
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
1368
1658
|
*/
|
|
1369
|
-
|
|
1659
|
+
protected abstract readonly starsPerDouble: number;
|
|
1660
|
+
protected difficulty: number;
|
|
1661
|
+
process(current: DifficultyHitObject): void;
|
|
1662
|
+
difficultyValue(): number;
|
|
1370
1663
|
/**
|
|
1371
|
-
*
|
|
1664
|
+
* Gets the strain of a hitobject.
|
|
1372
1665
|
*
|
|
1373
|
-
* @param
|
|
1666
|
+
* @param current The hitobject to get the strain from.
|
|
1667
|
+
* @returns The strain of the hitobject.
|
|
1374
1668
|
*/
|
|
1375
|
-
|
|
1669
|
+
protected abstract getObjectStrain(current: DifficultyHitObject): number;
|
|
1670
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
1376
1671
|
}
|
|
1377
1672
|
|
|
1378
1673
|
/**
|
|
1379
|
-
*
|
|
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.
|
|
1380
1696
|
*/
|
|
1381
|
-
declare class
|
|
1697
|
+
declare abstract class HarmonicSkill extends Skill implements IHasPeakDifficulty {
|
|
1698
|
+
private _noteWeightSum;
|
|
1382
1699
|
/**
|
|
1383
|
-
* The
|
|
1700
|
+
* The sum of note weights, calculated during summation.
|
|
1701
|
+
*
|
|
1702
|
+
* Required for any calculations that normalizes the difficulty value.
|
|
1384
1703
|
*/
|
|
1385
|
-
|
|
1704
|
+
protected get noteWeightSum(): number;
|
|
1386
1705
|
/**
|
|
1387
|
-
*
|
|
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.
|
|
1388
1710
|
*/
|
|
1389
|
-
readonly
|
|
1711
|
+
protected readonly harmonicScale: number;
|
|
1390
1712
|
/**
|
|
1391
|
-
*
|
|
1713
|
+
* An exponent that controls the rate of which decay increases as the index increases.
|
|
1392
1714
|
*
|
|
1393
|
-
*
|
|
1394
|
-
* @param options Options for the difficulty calculation.
|
|
1715
|
+
* Values closer to 1 decay faster, whilst lower values give more weight to easier {@link DifficultyHitObject}s.
|
|
1395
1716
|
*/
|
|
1396
|
-
|
|
1717
|
+
protected readonly decayExponent: number;
|
|
1718
|
+
get peaks(): readonly number[];
|
|
1719
|
+
static difficultyToPerformance(difficulty: number): number;
|
|
1720
|
+
difficultyValue(): number;
|
|
1397
1721
|
/**
|
|
1398
|
-
*
|
|
1722
|
+
* Calculates the amount of object difficulties weighed against the top object difficulty.
|
|
1723
|
+
*
|
|
1724
|
+
* @param difficultyValue The final difficulty value.
|
|
1399
1725
|
*/
|
|
1400
|
-
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
/**
|
|
1404
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1405
|
-
*/
|
|
1406
|
-
declare class OsuAim extends OsuSkill {
|
|
1407
|
-
protected readonly skillMultiplier: number;
|
|
1408
|
-
protected readonly strainDecayBase: number;
|
|
1409
|
-
protected readonly reducedSectionCount: number;
|
|
1410
|
-
protected readonly reducedSectionBaseline: number;
|
|
1411
|
-
protected readonly difficultyMultiplier: number;
|
|
1412
|
-
protected readonly decayWeight: number;
|
|
1413
|
-
private readonly withSliders;
|
|
1414
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
1726
|
+
countTopWeightedObjectDifficulties(difficultyValue: number): number;
|
|
1415
1727
|
/**
|
|
1416
|
-
* @
|
|
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.
|
|
1417
1733
|
*/
|
|
1418
|
-
protected
|
|
1734
|
+
protected applyDifficultyTransformation(difficulties: number[]): void;
|
|
1735
|
+
protected processInternal(current: DifficultyHitObject): number;
|
|
1419
1736
|
/**
|
|
1420
|
-
* @
|
|
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.
|
|
1421
1740
|
*/
|
|
1422
|
-
protected
|
|
1741
|
+
protected abstract objectDifficultyOf(current: DifficultyHitObject): number;
|
|
1423
1742
|
}
|
|
1424
1743
|
|
|
1425
1744
|
/**
|
|
1426
|
-
*
|
|
1745
|
+
* Represents the skill required to read every object in the beatmap.
|
|
1427
1746
|
*/
|
|
1428
|
-
declare
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
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;
|
|
1441
1761
|
}
|
|
1442
1762
|
|
|
1443
1763
|
/**
|
|
1444
|
-
* Represents the skill required to
|
|
1764
|
+
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
1445
1765
|
*/
|
|
1446
|
-
declare class
|
|
1447
|
-
protected readonly
|
|
1448
|
-
protected readonly
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
private
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
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;
|
|
1459
1778
|
}
|
|
1460
1779
|
|
|
1461
1780
|
/**
|
|
1462
|
-
*
|
|
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.
|
|
1463
1782
|
*/
|
|
1464
|
-
declare
|
|
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);
|
|
1465
1793
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
*
|
|
1471
|
-
* - length and speed of the current object (for sliders),
|
|
1472
|
-
* - and whether Hidden mod is enabled.
|
|
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.
|
|
1473
1799
|
*
|
|
1474
|
-
* @param
|
|
1475
|
-
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1800
|
+
* @param difficultyValue The final difficulty value.
|
|
1476
1801
|
*/
|
|
1477
|
-
|
|
1802
|
+
countTopWeightedSliders(difficultyValue: number): number;
|
|
1803
|
+
protected objectDifficultyOf(current: DroidDifficultyHitObject): number;
|
|
1804
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1805
|
+
private strainDecay;
|
|
1478
1806
|
}
|
|
1479
1807
|
|
|
1480
1808
|
/**
|
|
1481
|
-
*
|
|
1809
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1482
1810
|
*/
|
|
1483
|
-
declare class
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
* The accuracy performance value.
|
|
1494
|
-
*/
|
|
1495
|
-
accuracy: number;
|
|
1496
|
-
/**
|
|
1497
|
-
* The flashlight performance value.
|
|
1498
|
-
*/
|
|
1499
|
-
flashlight: number;
|
|
1500
|
-
readonly difficultyAttributes: OsuDifficultyAttributes;
|
|
1501
|
-
protected finalMultiplier: number;
|
|
1502
|
-
protected readonly mode: Modes;
|
|
1503
|
-
/**
|
|
1504
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1505
|
-
*/
|
|
1506
|
-
constructor(difficultyAttributes: OsuDifficultyAttributes);
|
|
1507
|
-
protected calculateValues(): void;
|
|
1508
|
-
protected calculateTotalValue(): void;
|
|
1509
|
-
/**
|
|
1510
|
-
* Calculates the aim performance value of the beatmap.
|
|
1511
|
-
*/
|
|
1512
|
-
private calculateAimValue;
|
|
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);
|
|
1513
1821
|
/**
|
|
1514
|
-
*
|
|
1822
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain.
|
|
1515
1823
|
*/
|
|
1516
|
-
|
|
1824
|
+
countDifficultSliders(): number;
|
|
1517
1825
|
/**
|
|
1518
|
-
*
|
|
1826
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1519
1827
|
*/
|
|
1520
|
-
|
|
1828
|
+
countTopWeightedSliders(): number;
|
|
1829
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1830
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1521
1831
|
/**
|
|
1522
|
-
*
|
|
1832
|
+
* @param current The hitobject to save to.
|
|
1523
1833
|
*/
|
|
1524
|
-
|
|
1525
|
-
|
|
1834
|
+
protected saveToHitObject(current: OsuDifficultyHitObject, difficulty: number): void;
|
|
1835
|
+
private strainDecay;
|
|
1526
1836
|
}
|
|
1527
1837
|
|
|
1528
1838
|
/**
|
|
1529
|
-
*
|
|
1839
|
+
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1530
1840
|
*/
|
|
1531
|
-
declare
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
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;
|
|
1540
1854
|
}
|
|
1541
1855
|
|
|
1542
1856
|
/**
|
|
1543
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.
|
|
1544
1858
|
*/
|
|
1545
1859
|
declare class OsuSpeed extends OsuSkill {
|
|
1546
|
-
|
|
1547
|
-
protected readonly
|
|
1548
|
-
protected readonly
|
|
1549
|
-
protected readonly
|
|
1550
|
-
protected readonly difficultyMultiplier: number;
|
|
1551
|
-
protected readonly decayWeight: number;
|
|
1860
|
+
private readonly strainDecayBase;
|
|
1861
|
+
protected readonly reducedSectionCount = 5;
|
|
1862
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1863
|
+
protected readonly decayWeight = 0.9;
|
|
1552
1864
|
private currentSpeedStrain;
|
|
1553
1865
|
private currentRhythm;
|
|
1554
|
-
private readonly
|
|
1555
|
-
|
|
1866
|
+
private readonly skillMultiplier;
|
|
1867
|
+
private readonly sliderStrains;
|
|
1868
|
+
private maxStrain;
|
|
1556
1869
|
/**
|
|
1557
|
-
*
|
|
1870
|
+
* The amount of notes that are relevant to the difficulty.
|
|
1558
1871
|
*/
|
|
1559
|
-
|
|
1872
|
+
relevantNoteCount(): number;
|
|
1560
1873
|
/**
|
|
1561
|
-
*
|
|
1874
|
+
* Obtains the amount of sliders that are considered difficult in terms of relative strain, weighted by consistency.
|
|
1562
1875
|
*/
|
|
1563
|
-
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
/**
|
|
1567
|
-
* An evaluator for calculating osu!standard speed skill.
|
|
1568
|
-
*/
|
|
1569
|
-
declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
1876
|
+
countTopWeightedSliders(): number;
|
|
1570
1877
|
/**
|
|
1571
|
-
*
|
|
1878
|
+
* @param current The hitobject to calculate.
|
|
1572
1879
|
*/
|
|
1573
|
-
|
|
1880
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1881
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1574
1882
|
/**
|
|
1575
|
-
*
|
|
1576
|
-
*
|
|
1577
|
-
* - time between pressing the previous and current object,
|
|
1578
|
-
* - distance between those objects,
|
|
1579
|
-
* - and how easily they can be cheesed.
|
|
1580
|
-
*
|
|
1581
|
-
* @param current The current object.
|
|
1582
|
-
* @param greatWindow The great hit window of the current object.
|
|
1883
|
+
* @param current The hitobject to save to.
|
|
1583
1884
|
*/
|
|
1584
|
-
|
|
1885
|
+
protected saveToHitObject(current: OsuDifficultyHitObject, difficulty: number): void;
|
|
1886
|
+
private strainDecay;
|
|
1585
1887
|
}
|
|
1586
1888
|
|
|
1587
|
-
export {
|
|
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 };
|
|
1890
|
+
export type { CacheableDifficultyAttributes, DifficultSlider, HighStrainSection, IDifficultyAttributes, IDroidDifficultyAttributes, IExtendedDroidDifficultyAttributes, IOsuDifficultyAttributes, PerformanceCalculationOptions, StrainPeaks };
|