@rian8337/osu-rebalance-difficulty-calculator 4.0.0-beta.2 → 4.0.0-beta.21
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 +1578 -1438
- package/package.json +9 -6
- package/typings/index.d.ts +552 -454
- package/dist/index.js.map +0 -1
package/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mod, PlaceableHitObject, Modes, Beatmap, DifficultyStatisticsCalculatorResult, Accuracy } from '@rian8337/osu-base';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* An evaluator for calculating aim skill.
|
|
@@ -20,16 +20,6 @@ declare abstract class AimEvaluator {
|
|
|
20
20
|
protected static calculateAcuteAngleBonus(angle: number): number;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* The base of calculation options.
|
|
25
|
-
*/
|
|
26
|
-
interface CalculationOptions {
|
|
27
|
-
/**
|
|
28
|
-
* Custom map statistics to apply custom speed multiplier as well as old statistics.
|
|
29
|
-
*/
|
|
30
|
-
stats?: MapStats;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
23
|
/**
|
|
34
24
|
* Holds data that can be used to calculate performance points.
|
|
35
25
|
*/
|
|
@@ -68,6 +58,10 @@ interface DifficultyAttributes {
|
|
|
68
58
|
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
69
59
|
*/
|
|
70
60
|
sliderFactor: number;
|
|
61
|
+
/**
|
|
62
|
+
* The overall clock rate that was applied to the beatmap.
|
|
63
|
+
*/
|
|
64
|
+
clockRate: number;
|
|
71
65
|
/**
|
|
72
66
|
* The perceived approach rate inclusive of rate-adjusting mods (DT/HT/etc).
|
|
73
67
|
*
|
|
@@ -94,20 +88,34 @@ interface DifficultyAttributes {
|
|
|
94
88
|
spinnerCount: number;
|
|
95
89
|
}
|
|
96
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Represents difficulty attributes that can be cached.
|
|
93
|
+
*/
|
|
94
|
+
type CacheableDifficultyAttributes<T extends DifficultyAttributes> = Omit<T, "mods"> & {
|
|
95
|
+
/**
|
|
96
|
+
* The mods which were applied to the beatmap.
|
|
97
|
+
*/
|
|
98
|
+
mods: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
97
101
|
/**
|
|
98
102
|
* Represents options for difficulty calculation.
|
|
99
103
|
*/
|
|
100
|
-
interface DifficultyCalculationOptions
|
|
104
|
+
interface DifficultyCalculationOptions {
|
|
101
105
|
/**
|
|
102
106
|
* The modifications to apply.
|
|
103
107
|
*/
|
|
104
|
-
mods?: Mod[];
|
|
108
|
+
readonly mods?: Mod[];
|
|
109
|
+
/**
|
|
110
|
+
* The custom speed multiplier to apply. Defaults to 1.
|
|
111
|
+
*/
|
|
112
|
+
readonly customSpeedMultiplier?: number;
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
/**
|
|
108
|
-
* Represents
|
|
116
|
+
* Represents a hit object with difficulty calculation values.
|
|
109
117
|
*/
|
|
110
|
-
declare class DifficultyHitObject {
|
|
118
|
+
declare abstract class DifficultyHitObject {
|
|
111
119
|
/**
|
|
112
120
|
* The underlying hitobject.
|
|
113
121
|
*/
|
|
@@ -117,19 +125,7 @@ declare class DifficultyHitObject {
|
|
|
117
125
|
*
|
|
118
126
|
* This is one less than the actual index of the hitobject in the beatmap.
|
|
119
127
|
*/
|
|
120
|
-
index: number;
|
|
121
|
-
/**
|
|
122
|
-
* The preempt time of the hitobject.
|
|
123
|
-
*/
|
|
124
|
-
baseTimePreempt: number;
|
|
125
|
-
/**
|
|
126
|
-
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
127
|
-
*/
|
|
128
|
-
timePreempt: number;
|
|
129
|
-
/**
|
|
130
|
-
* The fade in time of the hitobject.
|
|
131
|
-
*/
|
|
132
|
-
timeFadeIn: number;
|
|
128
|
+
readonly index: number;
|
|
133
129
|
/**
|
|
134
130
|
* The aim strain generated by the hitobject if sliders are considered.
|
|
135
131
|
*/
|
|
@@ -138,41 +134,10 @@ declare class DifficultyHitObject {
|
|
|
138
134
|
* The aim strain generated by the hitobject if sliders are not considered.
|
|
139
135
|
*/
|
|
140
136
|
aimStrainWithoutSliders: number;
|
|
141
|
-
/**
|
|
142
|
-
* The tap strain generated by the hitobject.
|
|
143
|
-
*
|
|
144
|
-
* This is also used for osu!standard as opposed to "speed strain".
|
|
145
|
-
*/
|
|
146
|
-
tapStrain: number;
|
|
147
|
-
/**
|
|
148
|
-
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
149
|
-
* OD. This is used in three-finger detection.
|
|
150
|
-
*/
|
|
151
|
-
originalTapStrain: number;
|
|
152
137
|
/**
|
|
153
138
|
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
154
139
|
*/
|
|
155
140
|
rhythmMultiplier: number;
|
|
156
|
-
/**
|
|
157
|
-
* The rhythm strain generated by the hitobject.
|
|
158
|
-
*/
|
|
159
|
-
rhythmStrain: number;
|
|
160
|
-
/**
|
|
161
|
-
* The flashlight strain generated by the hitobject if sliders are considered.
|
|
162
|
-
*/
|
|
163
|
-
flashlightStrainWithSliders: number;
|
|
164
|
-
/**
|
|
165
|
-
* The flashlight strain generated by the hitobject if sliders are not considered.
|
|
166
|
-
*/
|
|
167
|
-
flashlightStrainWithoutSliders: number;
|
|
168
|
-
/**
|
|
169
|
-
* The visual strain generated by the hitobject if sliders are considered.
|
|
170
|
-
*/
|
|
171
|
-
visualStrainWithSliders: number;
|
|
172
|
-
/**
|
|
173
|
-
* The visual strain generated by the hitobject if sliders are not considered.
|
|
174
|
-
*/
|
|
175
|
-
visualStrainWithoutSliders: number;
|
|
176
141
|
/**
|
|
177
142
|
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
178
143
|
*
|
|
@@ -213,42 +178,48 @@ declare class DifficultyHitObject {
|
|
|
213
178
|
/**
|
|
214
179
|
* The amount of milliseconds elapsed between this hitobject and the last hitobject.
|
|
215
180
|
*/
|
|
216
|
-
deltaTime: number;
|
|
181
|
+
readonly deltaTime: number;
|
|
217
182
|
/**
|
|
218
183
|
* The amount of milliseconds elapsed since the start time of the previous hitobject, with a minimum of 25ms.
|
|
219
184
|
*/
|
|
220
|
-
strainTime: number;
|
|
185
|
+
readonly strainTime: number;
|
|
221
186
|
/**
|
|
222
187
|
* Adjusted start time of the hitobject, taking speed multiplier into account.
|
|
223
188
|
*/
|
|
224
|
-
startTime: number;
|
|
189
|
+
readonly startTime: number;
|
|
225
190
|
/**
|
|
226
191
|
* Adjusted end time of the hitobject, taking speed multiplier into account.
|
|
227
192
|
*/
|
|
228
|
-
endTime: number;
|
|
193
|
+
readonly endTime: number;
|
|
229
194
|
/**
|
|
230
|
-
*
|
|
195
|
+
* Other hitobjects in the beatmap, including this hitobject.
|
|
231
196
|
*/
|
|
232
|
-
|
|
197
|
+
protected readonly hitObjects: readonly DifficultyHitObject[];
|
|
198
|
+
protected abstract readonly mode: Modes;
|
|
199
|
+
protected readonly normalizedRadius = 50;
|
|
200
|
+
protected readonly maximumSliderRadius: number;
|
|
201
|
+
protected readonly assumedSliderRadius: number;
|
|
202
|
+
protected readonly minDeltaTime = 25;
|
|
203
|
+
private readonly lastObject;
|
|
204
|
+
private readonly lastLastObject;
|
|
233
205
|
/**
|
|
234
|
-
*
|
|
206
|
+
* Note: You **must** call `computeProperties` at some point due to how TypeScript handles
|
|
207
|
+
* overridden properties (see [this](https://github.com/microsoft/TypeScript/issues/1617) GitHub issue).
|
|
235
208
|
*
|
|
236
|
-
*
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
242
|
-
velocity: number;
|
|
243
|
-
/**
|
|
244
|
-
* Other hitobjects in the beatmap, including this hitobject.
|
|
209
|
+
* @param object The underlying hitobject.
|
|
210
|
+
* @param lastObject The hitobject before this hitobject.
|
|
211
|
+
* @param lastLastObject The hitobject before the last hitobject.
|
|
212
|
+
* @param difficultyHitObjects All difficulty hitobjects in the processed beatmap.
|
|
213
|
+
* @param clockRate The clock rate of the beatmap.
|
|
245
214
|
*/
|
|
246
|
-
|
|
215
|
+
protected constructor(object: PlaceableHitObject, lastObject: PlaceableHitObject | null, lastLastObject: PlaceableHitObject | null, difficultyHitObjects: readonly DifficultyHitObject[], clockRate: number);
|
|
247
216
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
217
|
+
* Computes the properties of this hitobject.
|
|
218
|
+
*
|
|
219
|
+
* @param clockRate The clock rate of the beatmap.
|
|
220
|
+
* @param hitObjects The hitobjects in the beatmap.
|
|
250
221
|
*/
|
|
251
|
-
|
|
222
|
+
computeProperties(clockRate: number, hitObjects: readonly PlaceableHitObject[]): void;
|
|
252
223
|
/**
|
|
253
224
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
254
225
|
* difficulty hitobject's index.
|
|
@@ -259,7 +230,7 @@ declare class DifficultyHitObject {
|
|
|
259
230
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
260
231
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
261
232
|
*/
|
|
262
|
-
previous(backwardsIndex: number):
|
|
233
|
+
previous(backwardsIndex: number): this | null;
|
|
263
234
|
/**
|
|
264
235
|
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
265
236
|
* difficulty hitobject's index.
|
|
@@ -270,26 +241,41 @@ declare class DifficultyHitObject {
|
|
|
270
241
|
* @returns The difficulty hitobject at the index with respect to the current
|
|
271
242
|
* difficulty hitobject's index, `null` if the index is out of range.
|
|
272
243
|
*/
|
|
273
|
-
next(forwardsIndex: number):
|
|
244
|
+
next(forwardsIndex: number): this | null;
|
|
274
245
|
/**
|
|
275
246
|
* Calculates the opacity of the hitobject at a given time.
|
|
276
247
|
*
|
|
277
248
|
* @param time The time to calculate the hitobject's opacity at.
|
|
278
249
|
* @param isHidden Whether Hidden mod is used.
|
|
279
|
-
* @param mode The gamemode to calculate the opacity for.
|
|
280
250
|
* @returns The opacity of the hitobject at the given time.
|
|
281
251
|
*/
|
|
282
|
-
opacityAt(time: number, isHidden: boolean
|
|
252
|
+
opacityAt(time: number, isHidden: boolean): number;
|
|
253
|
+
protected abstract get scalingFactor(): number;
|
|
254
|
+
protected setDistances(clockRate: number): void;
|
|
255
|
+
private calculateSliderCursorPosition;
|
|
256
|
+
private getEndCursorPosition;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Represents the strain peaks of various calculated difficulties.
|
|
261
|
+
*/
|
|
262
|
+
interface StrainPeaks {
|
|
283
263
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
287
|
-
* can be hit with just a single tap in osu!droid.
|
|
288
|
-
*
|
|
289
|
-
* @param considerDistance Whether to consider the distance between both hitobjects.
|
|
290
|
-
* @returns Whether the hitobject is considered overlapping.
|
|
264
|
+
* The strain peaks of aim difficulty if sliders are considered.
|
|
291
265
|
*/
|
|
292
|
-
|
|
266
|
+
aimWithSliders: number[];
|
|
267
|
+
/**
|
|
268
|
+
* The strain peaks of aim difficulty if sliders are not considered.
|
|
269
|
+
*/
|
|
270
|
+
aimWithoutSliders: number[];
|
|
271
|
+
/**
|
|
272
|
+
* The strain peaks of speed difficulty.
|
|
273
|
+
*/
|
|
274
|
+
speed: number[];
|
|
275
|
+
/**
|
|
276
|
+
* The strain peaks of flashlight difficulty.
|
|
277
|
+
*/
|
|
278
|
+
flashlight: number[];
|
|
293
279
|
}
|
|
294
280
|
|
|
295
281
|
/**
|
|
@@ -314,104 +300,10 @@ declare abstract class Skill {
|
|
|
314
300
|
abstract difficultyValue(): number;
|
|
315
301
|
}
|
|
316
302
|
|
|
317
|
-
/**
|
|
318
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
319
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
320
|
-
*/
|
|
321
|
-
declare abstract class StrainSkill extends Skill {
|
|
322
|
-
/**
|
|
323
|
-
* The strain of currently calculated hitobject.
|
|
324
|
-
*/
|
|
325
|
-
protected currentStrain: number;
|
|
326
|
-
/**
|
|
327
|
-
* The current section's strain peak.
|
|
328
|
-
*/
|
|
329
|
-
protected currentSectionPeak: number;
|
|
330
|
-
/**
|
|
331
|
-
* Strain peaks are stored here.
|
|
332
|
-
*/
|
|
333
|
-
readonly strainPeaks: number[];
|
|
334
|
-
/**
|
|
335
|
-
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
336
|
-
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
337
|
-
*/
|
|
338
|
-
protected abstract readonly reducedSectionCount: number;
|
|
339
|
-
/**
|
|
340
|
-
* The baseline multiplier applied to the section with the biggest strain.
|
|
341
|
-
*/
|
|
342
|
-
protected abstract readonly reducedSectionBaseline: number;
|
|
343
|
-
/**
|
|
344
|
-
* Strain values are multiplied by this number for the given skill. Used to balance the value of different skills between each other.
|
|
345
|
-
*/
|
|
346
|
-
protected abstract readonly skillMultiplier: number;
|
|
347
|
-
/**
|
|
348
|
-
* Determines how quickly strain decays for the given skill.
|
|
349
|
-
*
|
|
350
|
-
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
351
|
-
*/
|
|
352
|
-
protected abstract readonly strainDecayBase: number;
|
|
353
|
-
private readonly sectionLength;
|
|
354
|
-
private currentSectionEnd;
|
|
355
|
-
private isFirstObject;
|
|
356
|
-
/**
|
|
357
|
-
* Calculates the strain value of a hitobject and stores the value in it. This value is affected by previously processed objects.
|
|
358
|
-
*
|
|
359
|
-
* @param current The hitobject to process.
|
|
360
|
-
*/
|
|
361
|
-
process(current: DifficultyHitObject): void;
|
|
362
|
-
/**
|
|
363
|
-
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
364
|
-
*/
|
|
365
|
-
saveCurrentPeak(): void;
|
|
366
|
-
/**
|
|
367
|
-
* Calculates strain decay for a specified time frame.
|
|
368
|
-
*
|
|
369
|
-
* @param ms The time frame to calculate.
|
|
370
|
-
*/
|
|
371
|
-
protected strainDecay(ms: number): number;
|
|
372
|
-
/**
|
|
373
|
-
* Calculates the strain value at a hitobject.
|
|
374
|
-
*/
|
|
375
|
-
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
376
|
-
/**
|
|
377
|
-
* Saves the current strain to a hitobject.
|
|
378
|
-
*/
|
|
379
|
-
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
380
|
-
/**
|
|
381
|
-
* Sets the initial strain level for a new section.
|
|
382
|
-
*
|
|
383
|
-
* @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
|
|
384
|
-
* @param current The current hitobject.
|
|
385
|
-
*/
|
|
386
|
-
private startNewSectionFrom;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Represents the strain peaks of various calculated difficulties.
|
|
391
|
-
*/
|
|
392
|
-
interface StrainPeaks {
|
|
393
|
-
/**
|
|
394
|
-
* The strain peaks of aim difficulty if sliders are considered.
|
|
395
|
-
*/
|
|
396
|
-
aimWithSliders: number[];
|
|
397
|
-
/**
|
|
398
|
-
* The strain peaks of aim difficulty if sliders are not considered.
|
|
399
|
-
*/
|
|
400
|
-
aimWithoutSliders: number[];
|
|
401
|
-
/**
|
|
402
|
-
* The strain peaks of speed difficulty.
|
|
403
|
-
*/
|
|
404
|
-
speed: number[];
|
|
405
|
-
/**
|
|
406
|
-
* The strain peaks of flashlight difficulty.
|
|
407
|
-
*/
|
|
408
|
-
flashlight: number[];
|
|
409
|
-
}
|
|
410
|
-
|
|
411
303
|
/**
|
|
412
304
|
* The base of a difficulty calculator.
|
|
413
305
|
*/
|
|
414
|
-
declare abstract class DifficultyCalculator {
|
|
306
|
+
declare abstract class DifficultyCalculator<THitObject extends DifficultyHitObject, TAttributes extends DifficultyAttributes> {
|
|
415
307
|
/**
|
|
416
308
|
* The calculated beatmap.
|
|
417
309
|
*/
|
|
@@ -419,7 +311,7 @@ declare abstract class DifficultyCalculator {
|
|
|
419
311
|
/**
|
|
420
312
|
* The difficulty objects of the beatmap.
|
|
421
313
|
*/
|
|
422
|
-
readonly objects:
|
|
314
|
+
readonly objects: THitObject[];
|
|
423
315
|
/**
|
|
424
316
|
* The modifications applied.
|
|
425
317
|
*/
|
|
@@ -427,20 +319,23 @@ declare abstract class DifficultyCalculator {
|
|
|
427
319
|
/**
|
|
428
320
|
* The total star rating of the beatmap.
|
|
429
321
|
*/
|
|
430
|
-
total: number;
|
|
322
|
+
get total(): number;
|
|
431
323
|
/**
|
|
432
|
-
* The
|
|
324
|
+
* The difficulty statistics of the beatmap after modifications are applied.
|
|
433
325
|
*/
|
|
434
|
-
|
|
326
|
+
difficultyStatistics: DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
435
327
|
/**
|
|
436
328
|
* The strain peaks of various calculated difficulties.
|
|
437
329
|
*/
|
|
438
330
|
readonly strainPeaks: StrainPeaks;
|
|
439
331
|
/**
|
|
440
|
-
*
|
|
332
|
+
* The difficulty attributes that can be used to calculate performance points.
|
|
333
|
+
*/
|
|
334
|
+
abstract readonly attributes: TAttributes;
|
|
335
|
+
/**
|
|
336
|
+
* The difficulty attributes that can be cached. It can also be used to calculate performance points.
|
|
441
337
|
*/
|
|
442
|
-
abstract
|
|
443
|
-
protected readonly sectionLength: number;
|
|
338
|
+
abstract get cacheableAttributes(): CacheableDifficultyAttributes<TAttributes>;
|
|
444
339
|
protected abstract readonly difficultyMultiplier: number;
|
|
445
340
|
protected abstract readonly mode: Modes;
|
|
446
341
|
/**
|
|
@@ -462,18 +357,28 @@ declare abstract class DifficultyCalculator {
|
|
|
462
357
|
* beginning of the new chunk.
|
|
463
358
|
*
|
|
464
359
|
* @param options Options for the difficulty calculation.
|
|
360
|
+
* @returns The current instance.
|
|
465
361
|
*/
|
|
466
362
|
calculate(options?: DifficultyCalculationOptions): this;
|
|
467
363
|
/**
|
|
468
364
|
* Generates difficulty hitobjects for this calculator.
|
|
365
|
+
*
|
|
366
|
+
* @param convertedBeatmap The beatmap to generate difficulty hitobjects from.
|
|
367
|
+
*/
|
|
368
|
+
protected abstract generateDifficultyHitObjects(convertedBeatmap: Beatmap): THitObject[];
|
|
369
|
+
/**
|
|
370
|
+
* Computes the difficulty statistics of the original beatmap with respect to the used options.
|
|
371
|
+
*
|
|
372
|
+
* @param options The options to use for the difficulty statistics calculation.
|
|
373
|
+
* @returns The computed difficulty statistics.
|
|
469
374
|
*/
|
|
470
|
-
|
|
375
|
+
protected abstract computeDifficultyStatistics(options?: DifficultyCalculationOptions): DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
471
376
|
/**
|
|
472
377
|
* Calculates the skills provided.
|
|
473
378
|
*
|
|
474
379
|
* @param skills The skills to calculate.
|
|
475
380
|
*/
|
|
476
|
-
protected calculateSkills(...skills:
|
|
381
|
+
protected calculateSkills(...skills: Skill[]): void;
|
|
477
382
|
/**
|
|
478
383
|
* Calculates the total star rating of the beatmap and stores it in this instance.
|
|
479
384
|
*/
|
|
@@ -489,7 +394,7 @@ declare abstract class DifficultyCalculator {
|
|
|
489
394
|
/**
|
|
490
395
|
* Creates skills to be calculated.
|
|
491
396
|
*/
|
|
492
|
-
protected abstract createSkills():
|
|
397
|
+
protected abstract createSkills(): Skill[];
|
|
493
398
|
/**
|
|
494
399
|
* Populates the stored difficulty attributes with necessary data.
|
|
495
400
|
*/
|
|
@@ -509,100 +414,237 @@ declare abstract class DifficultyCalculator {
|
|
|
509
414
|
}
|
|
510
415
|
|
|
511
416
|
/**
|
|
512
|
-
*
|
|
417
|
+
* Represents a slider that is considered difficult.
|
|
418
|
+
*
|
|
419
|
+
* This structure is a part of difficulty attributes and can be cached.
|
|
513
420
|
*/
|
|
514
|
-
|
|
421
|
+
interface DifficultSlider {
|
|
515
422
|
/**
|
|
516
|
-
* The
|
|
423
|
+
* The index of the slider in the beatmap.
|
|
424
|
+
*/
|
|
425
|
+
readonly index: number;
|
|
426
|
+
/**
|
|
427
|
+
* The difficulty rating of this slider compared to other sliders, based on the velocity of the slider.
|
|
428
|
+
*
|
|
429
|
+
* A value closer to 1 indicates that this slider is more difficult compared to most sliders.
|
|
430
|
+
*
|
|
431
|
+
* A value closer to 0 indicates that this slider is easier compared to most sliders.
|
|
432
|
+
*/
|
|
433
|
+
readonly difficultyRating: number;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
438
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
439
|
+
*/
|
|
440
|
+
declare abstract class StrainSkill extends Skill {
|
|
441
|
+
/**
|
|
442
|
+
* Strain peaks are stored here.
|
|
517
443
|
*/
|
|
518
|
-
|
|
444
|
+
readonly strainPeaks: number[];
|
|
445
|
+
/**
|
|
446
|
+
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
447
|
+
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
448
|
+
*/
|
|
449
|
+
protected abstract readonly reducedSectionCount: number;
|
|
450
|
+
/**
|
|
451
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
452
|
+
*/
|
|
453
|
+
protected abstract readonly reducedSectionBaseline: number;
|
|
454
|
+
/**
|
|
455
|
+
* Determines how quickly strain decays for the given skill.
|
|
456
|
+
*
|
|
457
|
+
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
458
|
+
*/
|
|
459
|
+
protected abstract readonly strainDecayBase: number;
|
|
460
|
+
private readonly sectionLength;
|
|
461
|
+
private currentStrain;
|
|
462
|
+
private currentSectionPeak;
|
|
463
|
+
private currentSectionEnd;
|
|
464
|
+
process(current: DifficultyHitObject): void;
|
|
465
|
+
/**
|
|
466
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
467
|
+
*/
|
|
468
|
+
saveCurrentPeak(): void;
|
|
469
|
+
/**
|
|
470
|
+
* Calculates strain decay for a specified time frame.
|
|
471
|
+
*
|
|
472
|
+
* @param ms The time frame to calculate.
|
|
473
|
+
*/
|
|
474
|
+
protected strainDecay(ms: number): number;
|
|
475
|
+
/**
|
|
476
|
+
* Calculates the starting time of a strain section at an object.
|
|
477
|
+
*
|
|
478
|
+
* @param current The object at which the strain section starts.
|
|
479
|
+
* @returns The start time of the strain section.
|
|
480
|
+
*/
|
|
481
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
482
|
+
/**
|
|
483
|
+
* Calculates the strain value at a hitobject.
|
|
484
|
+
*
|
|
485
|
+
* @param current The hitobject to calculate.
|
|
486
|
+
*/
|
|
487
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
488
|
+
/**
|
|
489
|
+
* Saves the current strain to a hitobject.
|
|
490
|
+
*/
|
|
491
|
+
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
492
|
+
/**
|
|
493
|
+
* Retrieves the peak strain at a point in time.
|
|
494
|
+
*
|
|
495
|
+
* @param time The time to retrieve the peak strain at.
|
|
496
|
+
* @param current The current hit object.
|
|
497
|
+
* @returns The peak strain.
|
|
498
|
+
*/
|
|
499
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
500
|
+
/**
|
|
501
|
+
* Sets the initial strain level for a new section.
|
|
502
|
+
*
|
|
503
|
+
* @param time The beginning of the new section in milliseconds.
|
|
504
|
+
* @param current The current hitobject.
|
|
505
|
+
*/
|
|
506
|
+
private startNewSectionFrom;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
511
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
512
|
+
*/
|
|
513
|
+
declare abstract class DroidSkill extends StrainSkill {
|
|
514
|
+
/**
|
|
515
|
+
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
516
|
+
*/
|
|
517
|
+
protected abstract readonly starsPerDouble: number;
|
|
518
|
+
protected readonly _objectStrains: number[];
|
|
519
|
+
/**
|
|
520
|
+
* The strains of hitobjects.
|
|
521
|
+
*/
|
|
522
|
+
get objectStrains(): readonly number[];
|
|
523
|
+
/**
|
|
524
|
+
* Returns the number of strains weighed against the top strain.
|
|
525
|
+
*
|
|
526
|
+
* The result is scaled by clock rate as it affects the total number of strains.
|
|
527
|
+
*/
|
|
528
|
+
countDifficultStrains(): number;
|
|
529
|
+
process(current: DifficultyHitObject): void;
|
|
530
|
+
difficultyValue(): number;
|
|
531
|
+
/**
|
|
532
|
+
* Gets the strain of a hitobject.
|
|
533
|
+
*
|
|
534
|
+
* @param current The hitobject to get the strain from.
|
|
535
|
+
* @returns The strain of the hitobject.
|
|
536
|
+
*/
|
|
537
|
+
protected abstract getObjectStrain(current: DifficultyHitObject): number;
|
|
538
|
+
protected calculateCurrentSectionStart(current: DifficultyHitObject): number;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Represents an osu!droid hit object with difficulty calculation values.
|
|
543
|
+
*/
|
|
544
|
+
declare class DroidDifficultyHitObject extends DifficultyHitObject {
|
|
545
|
+
/**
|
|
546
|
+
* The tap strain generated by the hitobject.
|
|
547
|
+
*/
|
|
548
|
+
tapStrain: number;
|
|
549
|
+
/**
|
|
550
|
+
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
551
|
+
* OD. This is used in three-finger detection.
|
|
552
|
+
*/
|
|
553
|
+
originalTapStrain: number;
|
|
554
|
+
/**
|
|
555
|
+
* The rhythm strain generated by the hitobject.
|
|
556
|
+
*/
|
|
557
|
+
rhythmStrain: number;
|
|
558
|
+
/**
|
|
559
|
+
* The flashlight strain generated by the hitobject if sliders are considered.
|
|
560
|
+
*/
|
|
561
|
+
flashlightStrainWithSliders: number;
|
|
562
|
+
/**
|
|
563
|
+
* The flashlight strain generated by the hitobject if sliders are not considered.
|
|
564
|
+
*/
|
|
565
|
+
flashlightStrainWithoutSliders: number;
|
|
519
566
|
/**
|
|
520
|
-
* The
|
|
567
|
+
* The visual strain generated by the hitobject if sliders are considered.
|
|
521
568
|
*/
|
|
522
|
-
|
|
569
|
+
visualStrainWithSliders: number;
|
|
523
570
|
/**
|
|
524
|
-
* The
|
|
571
|
+
* The visual strain generated by the hitobject if sliders are not considered.
|
|
525
572
|
*/
|
|
526
|
-
|
|
573
|
+
visualStrainWithoutSliders: number;
|
|
527
574
|
/**
|
|
528
|
-
* The
|
|
575
|
+
* The note density of the hitobject.
|
|
529
576
|
*/
|
|
530
|
-
|
|
531
|
-
private maximumSliderRadius;
|
|
532
|
-
private readonly assumedSliderRadius;
|
|
533
|
-
private readonly minDeltaTime;
|
|
577
|
+
noteDensity: number;
|
|
534
578
|
/**
|
|
535
|
-
*
|
|
579
|
+
* The overlapping factor of the hitobject.
|
|
580
|
+
*
|
|
581
|
+
* This is used to scale visual skill.
|
|
536
582
|
*/
|
|
537
|
-
|
|
538
|
-
objects: readonly HitObject[];
|
|
539
|
-
circleSize: number;
|
|
540
|
-
mods: Mod[];
|
|
541
|
-
speedMultiplier: number;
|
|
542
|
-
mode: Modes;
|
|
543
|
-
preempt?: number;
|
|
544
|
-
}): DifficultyHitObject[];
|
|
583
|
+
overlappingFactor: number;
|
|
545
584
|
/**
|
|
546
|
-
*
|
|
585
|
+
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
547
586
|
*/
|
|
548
|
-
|
|
587
|
+
readonly timePreempt: number;
|
|
588
|
+
private readonly radiusBuffThreshold;
|
|
589
|
+
protected readonly mode = Modes.droid;
|
|
590
|
+
protected readonly maximumSliderRadius: number;
|
|
591
|
+
protected get scalingFactor(): number;
|
|
549
592
|
/**
|
|
550
|
-
*
|
|
593
|
+
* Note: You **must** call `computeProperties` at some point due to how TypeScript handles
|
|
594
|
+
* overridden properties (see [this](https://github.com/microsoft/TypeScript/issues/1617) GitHub issue).
|
|
551
595
|
*
|
|
552
|
-
* @param
|
|
596
|
+
* @param object The underlying hitobject.
|
|
597
|
+
* @param lastObject The hitobject before this hitobject.
|
|
598
|
+
* @param lastLastObject The hitobject before the last hitobject.
|
|
599
|
+
* @param difficultyHitObjects All difficulty hitobjects in the processed beatmap.
|
|
600
|
+
* @param clockRate The clock rate of the beatmap.
|
|
601
|
+
* @param isForceAR Whether force AR is enabled.
|
|
553
602
|
*/
|
|
554
|
-
|
|
603
|
+
constructor(object: PlaceableHitObject, lastObject: PlaceableHitObject | null, lastLastObject: PlaceableHitObject | null, difficultyHitObjects: readonly DifficultyHitObject[], clockRate: number, isForceAR: boolean);
|
|
604
|
+
computeProperties(clockRate: number, hitObjects: readonly PlaceableHitObject[]): void;
|
|
555
605
|
/**
|
|
556
|
-
*
|
|
606
|
+
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
607
|
+
*
|
|
608
|
+
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
609
|
+
* can be hit with just a single tap in osu!droid.
|
|
610
|
+
*
|
|
611
|
+
* @param considerDistance Whether to consider the distance between both hitobjects.
|
|
612
|
+
* @returns Whether the hitobject is considered overlapping.
|
|
557
613
|
*/
|
|
558
|
-
|
|
614
|
+
isOverlapping(considerDistance: boolean): boolean;
|
|
615
|
+
private setVisuals;
|
|
559
616
|
private applyToOverlappingFactor;
|
|
560
617
|
}
|
|
561
618
|
|
|
562
|
-
/**
|
|
563
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
564
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
565
|
-
*/
|
|
566
|
-
declare abstract class DroidSkill extends StrainSkill {
|
|
567
|
-
/**
|
|
568
|
-
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
569
|
-
*/
|
|
570
|
-
protected abstract readonly starsPerDouble: number;
|
|
571
|
-
difficultyValue(): number;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
619
|
/**
|
|
575
620
|
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
576
621
|
*/
|
|
577
622
|
declare class DroidAim extends DroidSkill {
|
|
578
|
-
protected readonly
|
|
579
|
-
protected readonly
|
|
580
|
-
protected readonly
|
|
581
|
-
protected readonly
|
|
582
|
-
|
|
623
|
+
protected readonly strainDecayBase = 0.15;
|
|
624
|
+
protected readonly reducedSectionCount = 10;
|
|
625
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
626
|
+
protected readonly starsPerDouble = 1.05;
|
|
627
|
+
private readonly skillMultiplier;
|
|
583
628
|
private readonly withSliders;
|
|
629
|
+
private currentAimStrain;
|
|
584
630
|
constructor(mods: Mod[], withSliders: boolean);
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
631
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
632
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
633
|
+
protected getObjectStrain(): number;
|
|
589
634
|
/**
|
|
590
635
|
* @param current The hitobject to save to.
|
|
591
636
|
*/
|
|
592
|
-
protected saveToHitObject(current:
|
|
637
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
593
638
|
}
|
|
594
639
|
|
|
595
640
|
/**
|
|
596
641
|
* An evaluator for calculating osu!droid Aim skill.
|
|
597
642
|
*/
|
|
598
643
|
declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
599
|
-
protected static readonly wideAngleMultiplier
|
|
600
|
-
protected static readonly sliderMultiplier
|
|
601
|
-
protected static readonly velocityChangeMultiplier
|
|
602
|
-
|
|
603
|
-
* Spacing threshold for a single hitobject spacing.
|
|
604
|
-
*/
|
|
605
|
-
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
644
|
+
protected static readonly wideAngleMultiplier = 1.65;
|
|
645
|
+
protected static readonly sliderMultiplier = 1.5;
|
|
646
|
+
protected static readonly velocityChangeMultiplier = 0.85;
|
|
647
|
+
private static readonly singleSpacingThreshold;
|
|
606
648
|
private static readonly minSpeedBonus;
|
|
607
649
|
/**
|
|
608
650
|
* Evaluates the difficulty of aiming the current object, based on:
|
|
@@ -615,15 +657,15 @@ declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
|
615
657
|
* @param current The current object.
|
|
616
658
|
* @param withSliders Whether to take slider difficulty into account.
|
|
617
659
|
*/
|
|
618
|
-
static evaluateDifficultyOf(current:
|
|
660
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, withSliders: boolean): number;
|
|
619
661
|
/**
|
|
620
|
-
* Calculates the aim strain of a hitobject.
|
|
662
|
+
* Calculates the snap aim strain of a hitobject.
|
|
621
663
|
*/
|
|
622
|
-
private static
|
|
664
|
+
private static snapAimStrainOf;
|
|
623
665
|
/**
|
|
624
|
-
* Calculates the
|
|
666
|
+
* Calculates the flow aim strain of a hitobject.
|
|
625
667
|
*/
|
|
626
|
-
private static
|
|
668
|
+
private static flowAimStrainOf;
|
|
627
669
|
}
|
|
628
670
|
|
|
629
671
|
/**
|
|
@@ -642,26 +684,44 @@ interface DroidDifficultyAttributes extends DifficultyAttributes {
|
|
|
642
684
|
* The difficulty corresponding to the visual skill.
|
|
643
685
|
*/
|
|
644
686
|
visualDifficulty: number;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* Represents a slider that is considered difficult.
|
|
649
|
-
*
|
|
650
|
-
* This structure is a part of difficulty attributes and can be cached.
|
|
651
|
-
*/
|
|
652
|
-
interface DifficultSlider {
|
|
653
687
|
/**
|
|
654
|
-
* The
|
|
688
|
+
* The amount of strains that are considered difficult with respect to the aim skill.
|
|
655
689
|
*/
|
|
656
|
-
|
|
690
|
+
aimDifficultStrainCount: number;
|
|
657
691
|
/**
|
|
658
|
-
* The
|
|
692
|
+
* The amount of strains that are considered difficult with respect to the tap skill.
|
|
693
|
+
*/
|
|
694
|
+
tapDifficultStrainCount: number;
|
|
695
|
+
/**
|
|
696
|
+
* The amount of strains that are considered difficult with respect to the flashlight skill.
|
|
697
|
+
*/
|
|
698
|
+
flashlightDifficultStrainCount: number;
|
|
699
|
+
/**
|
|
700
|
+
* The amount of strains that are considered difficult with respect to the visual skill.
|
|
701
|
+
*/
|
|
702
|
+
visualDifficultStrainCount: number;
|
|
703
|
+
/**
|
|
704
|
+
* The average delta time of speed objects.
|
|
705
|
+
*/
|
|
706
|
+
averageSpeedDeltaTime: number;
|
|
707
|
+
/**
|
|
708
|
+
* Describes how much of tap difficulty is contributed by notes that are "vibroable".
|
|
659
709
|
*
|
|
660
|
-
* A value closer to 1 indicates
|
|
710
|
+
* A value closer to 1 indicates most of tap difficulty is contributed by notes that are not "vibroable".
|
|
661
711
|
*
|
|
662
|
-
* A value closer to 0 indicates
|
|
712
|
+
* A value closer to 0 indicates most of tap difficulty is contributed by notes that are "vibroable".
|
|
663
713
|
*/
|
|
664
|
-
|
|
714
|
+
vibroFactor: number;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Represents options for osu!droid difficulty calculation.
|
|
719
|
+
*/
|
|
720
|
+
interface DroidDifficultyCalculationOptions extends DifficultyCalculationOptions {
|
|
721
|
+
/**
|
|
722
|
+
* Whether to calculate for old statistics (1.6.7 and older). Defaults to `false`.
|
|
723
|
+
*/
|
|
724
|
+
readonly oldStatistics?: boolean;
|
|
665
725
|
}
|
|
666
726
|
|
|
667
727
|
/**
|
|
@@ -687,6 +747,10 @@ interface HighStrainSection {
|
|
|
687
747
|
* as doing some analysis using the replay of a score.
|
|
688
748
|
*/
|
|
689
749
|
interface ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes {
|
|
750
|
+
/**
|
|
751
|
+
* The mode of the difficulty calculation.
|
|
752
|
+
*/
|
|
753
|
+
mode: "rebalance";
|
|
690
754
|
/**
|
|
691
755
|
* Possible sections at which the player can use three fingers on.
|
|
692
756
|
*/
|
|
@@ -722,36 +786,37 @@ interface ExtendedDroidDifficultyAttributes extends DroidDifficultyAttributes {
|
|
|
722
786
|
/**
|
|
723
787
|
* A difficulty calculator for osu!droid gamemode.
|
|
724
788
|
*/
|
|
725
|
-
declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
789
|
+
declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidDifficultyHitObject, DroidDifficultyAttributes> {
|
|
726
790
|
/**
|
|
727
791
|
* The aim star rating of the beatmap.
|
|
728
792
|
*/
|
|
729
|
-
aim: number;
|
|
793
|
+
get aim(): number;
|
|
730
794
|
/**
|
|
731
795
|
* The tap star rating of the beatmap.
|
|
732
796
|
*/
|
|
733
|
-
tap: number;
|
|
797
|
+
get tap(): number;
|
|
734
798
|
/**
|
|
735
799
|
* The rhythm star rating of the beatmap.
|
|
736
800
|
*/
|
|
737
|
-
rhythm: number;
|
|
801
|
+
get rhythm(): number;
|
|
738
802
|
/**
|
|
739
803
|
* The flashlight star rating of the beatmap.
|
|
740
804
|
*/
|
|
741
|
-
flashlight: number;
|
|
805
|
+
get flashlight(): number;
|
|
742
806
|
/**
|
|
743
807
|
* The visual star rating of the beatmap.
|
|
744
808
|
*/
|
|
745
|
-
visual: number;
|
|
809
|
+
get visual(): number;
|
|
746
810
|
/**
|
|
747
811
|
* The strain threshold to start detecting for possible three-fingered section.
|
|
748
812
|
*
|
|
749
813
|
* Increasing this number will result in less sections being flagged.
|
|
750
814
|
*/
|
|
751
|
-
static readonly threeFingerStrainThreshold
|
|
815
|
+
static readonly threeFingerStrainThreshold = 175;
|
|
752
816
|
readonly attributes: ExtendedDroidDifficultyAttributes;
|
|
753
|
-
|
|
754
|
-
protected readonly
|
|
817
|
+
get cacheableAttributes(): CacheableDifficultyAttributes<DroidDifficultyAttributes>;
|
|
818
|
+
protected readonly difficultyMultiplier = 0.18;
|
|
819
|
+
protected readonly mode = Modes.droid;
|
|
755
820
|
/**
|
|
756
821
|
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
757
822
|
*/
|
|
@@ -774,13 +839,9 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
774
839
|
calculateVisual(): void;
|
|
775
840
|
calculateTotal(): void;
|
|
776
841
|
calculateAll(): void;
|
|
777
|
-
/**
|
|
778
|
-
* Returns a string representative of the class.
|
|
779
|
-
*/
|
|
780
842
|
toString(): string;
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
*/
|
|
843
|
+
protected generateDifficultyHitObjects(convertedBeatmap: Beatmap): DroidDifficultyHitObject[];
|
|
844
|
+
protected computeDifficultyStatistics(options?: DroidDifficultyCalculationOptions): DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
784
845
|
protected createSkills(): DroidSkill[];
|
|
785
846
|
/**
|
|
786
847
|
* Called after aim skill calculation.
|
|
@@ -796,21 +857,14 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
796
857
|
/**
|
|
797
858
|
* Called after tap skill calculation.
|
|
798
859
|
*
|
|
799
|
-
* @param
|
|
860
|
+
* @param tapSkillCheese The tap skill that considers cheesing.
|
|
861
|
+
* @param tapSkillVibro The tap skill that considers vibro.
|
|
800
862
|
*/
|
|
801
863
|
private postCalculateTap;
|
|
802
864
|
/**
|
|
803
|
-
* Calculates
|
|
804
|
-
*/
|
|
805
|
-
private calculateSpeedAttributes;
|
|
806
|
-
/**
|
|
807
|
-
* Calculates the sum of strains for possible three-fingered sections.
|
|
808
|
-
*
|
|
809
|
-
* @param firstObjectIndex The index of the first object in the section.
|
|
810
|
-
* @param lastObjectIndex The index of the last object in the section.
|
|
811
|
-
* @returns The summed strain of the section.
|
|
865
|
+
* Calculates tap-related attributes.
|
|
812
866
|
*/
|
|
813
|
-
private
|
|
867
|
+
private calculateTapAttributes;
|
|
814
868
|
/**
|
|
815
869
|
* Called after rhythm skill calculation.
|
|
816
870
|
*
|
|
@@ -837,19 +891,20 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
837
891
|
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
838
892
|
*/
|
|
839
893
|
declare class DroidFlashlight extends DroidSkill {
|
|
840
|
-
protected readonly
|
|
841
|
-
protected readonly
|
|
842
|
-
protected readonly
|
|
843
|
-
protected readonly
|
|
844
|
-
|
|
894
|
+
protected readonly strainDecayBase = 0.15;
|
|
895
|
+
protected readonly reducedSectionCount = 0;
|
|
896
|
+
protected readonly reducedSectionBaseline = 1;
|
|
897
|
+
protected readonly starsPerDouble = 1.06;
|
|
898
|
+
private readonly skillMultiplier;
|
|
845
899
|
private readonly isHidden;
|
|
846
900
|
private readonly withSliders;
|
|
901
|
+
private currentFlashlightStrain;
|
|
847
902
|
constructor(mods: Mod[], withSliders: boolean);
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
protected
|
|
852
|
-
|
|
903
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
904
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
905
|
+
protected getObjectStrain(): number;
|
|
906
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
907
|
+
difficultyValue(): number;
|
|
853
908
|
}
|
|
854
909
|
|
|
855
910
|
/**
|
|
@@ -882,7 +937,7 @@ declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
882
937
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
883
938
|
* @param withSliders Whether to take slider difficulty into account.
|
|
884
939
|
*/
|
|
885
|
-
static evaluateDifficultyOf(current:
|
|
940
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, isHiddenMod: boolean, withSliders: boolean): number;
|
|
886
941
|
}
|
|
887
942
|
|
|
888
943
|
/**
|
|
@@ -922,7 +977,7 @@ interface PerformanceCalculationOptions {
|
|
|
922
977
|
/**
|
|
923
978
|
* The base class of performance calculators.
|
|
924
979
|
*/
|
|
925
|
-
declare abstract class PerformanceCalculator {
|
|
980
|
+
declare abstract class PerformanceCalculator<T extends DifficultyAttributes> {
|
|
926
981
|
/**
|
|
927
982
|
* The overall performance value.
|
|
928
983
|
*/
|
|
@@ -934,7 +989,7 @@ declare abstract class PerformanceCalculator {
|
|
|
934
989
|
/**
|
|
935
990
|
* The difficulty attributes that is being calculated.
|
|
936
991
|
*/
|
|
937
|
-
|
|
992
|
+
readonly difficultyAttributes: T;
|
|
938
993
|
/**
|
|
939
994
|
* Penalty for combo breaks.
|
|
940
995
|
*/
|
|
@@ -957,6 +1012,10 @@ declare abstract class PerformanceCalculator {
|
|
|
957
1012
|
* Nerf factor used for nerfing beatmaps with very likely dropped sliderends.
|
|
958
1013
|
*/
|
|
959
1014
|
protected sliderNerfFactor: number;
|
|
1015
|
+
/**
|
|
1016
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1017
|
+
*/
|
|
1018
|
+
constructor(difficultyAttributes: T | CacheableDifficultyAttributes<T>);
|
|
960
1019
|
/**
|
|
961
1020
|
* Calculates the performance points of the beatmap.
|
|
962
1021
|
*
|
|
@@ -976,7 +1035,7 @@ declare abstract class PerformanceCalculator {
|
|
|
976
1035
|
/**
|
|
977
1036
|
* Calculates the total performance value of the beatmap and stores it in this instance.
|
|
978
1037
|
*/
|
|
979
|
-
protected abstract calculateTotalValue():
|
|
1038
|
+
protected abstract calculateTotalValue(): number;
|
|
980
1039
|
/**
|
|
981
1040
|
* The total hits that can be done in the beatmap.
|
|
982
1041
|
*/
|
|
@@ -999,12 +1058,19 @@ declare abstract class PerformanceCalculator {
|
|
|
999
1058
|
* Calculates the amount of misses + sliderbreaks from combo.
|
|
1000
1059
|
*/
|
|
1001
1060
|
private calculateEffectiveMissCount;
|
|
1061
|
+
/**
|
|
1062
|
+
* Determines whether an attribute is a cacheable attribute.
|
|
1063
|
+
*
|
|
1064
|
+
* @param attributes The attributes to check.
|
|
1065
|
+
* @returns Whether the attributes are cacheable.
|
|
1066
|
+
*/
|
|
1067
|
+
private isCacheableAttribute;
|
|
1002
1068
|
}
|
|
1003
1069
|
|
|
1004
1070
|
/**
|
|
1005
1071
|
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
1006
1072
|
*/
|
|
1007
|
-
declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
1073
|
+
declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDifficultyAttributes> {
|
|
1008
1074
|
/**
|
|
1009
1075
|
* The aim performance value.
|
|
1010
1076
|
*/
|
|
@@ -1057,19 +1123,14 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1057
1123
|
* Can be properly obtained by analyzing the replay associated with the score.
|
|
1058
1124
|
*/
|
|
1059
1125
|
get visualSliderCheesePenalty(): number;
|
|
1060
|
-
readonly difficultyAttributes: DroidDifficultyAttributes;
|
|
1061
1126
|
protected finalMultiplier: number;
|
|
1062
|
-
protected readonly mode
|
|
1127
|
+
protected readonly mode = Modes.droid;
|
|
1063
1128
|
private _aimSliderCheesePenalty;
|
|
1064
1129
|
private _flashlightSliderCheesePenalty;
|
|
1065
1130
|
private _visualSliderCheesePenalty;
|
|
1066
1131
|
private _tapPenalty;
|
|
1067
1132
|
private _deviation;
|
|
1068
1133
|
private _tapDeviation;
|
|
1069
|
-
/**
|
|
1070
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1071
|
-
*/
|
|
1072
|
-
constructor(difficultyAttributes: DroidDifficultyAttributes);
|
|
1073
1134
|
/**
|
|
1074
1135
|
* Applies a tap penalty value to this calculator.
|
|
1075
1136
|
*
|
|
@@ -1103,7 +1164,7 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1103
1164
|
*/
|
|
1104
1165
|
applyVisualSliderCheesePenalty(value: number): void;
|
|
1105
1166
|
protected calculateValues(): void;
|
|
1106
|
-
protected calculateTotalValue():
|
|
1167
|
+
protected calculateTotalValue(): number;
|
|
1107
1168
|
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
1108
1169
|
/**
|
|
1109
1170
|
* Calculates the aim performance value of the beatmap.
|
|
@@ -1125,6 +1186,27 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1125
1186
|
* Calculates the visual performance value of the beatmap.
|
|
1126
1187
|
*/
|
|
1127
1188
|
private calculateVisualValue;
|
|
1189
|
+
/**
|
|
1190
|
+
* Calculates a strain-based miss penalty.
|
|
1191
|
+
*
|
|
1192
|
+
* Strain-based miss penalty assumes that a player will miss on the hardest parts of a map,
|
|
1193
|
+
* so we use the amount of relatively difficult sections to adjust miss penalty
|
|
1194
|
+
* to make it more punishing on maps with lower amount of hard sections.
|
|
1195
|
+
*/
|
|
1196
|
+
private calculateStrainBasedMissPenalty;
|
|
1197
|
+
/**
|
|
1198
|
+
* The object-based proportional miss penalty.
|
|
1199
|
+
*/
|
|
1200
|
+
private get proportionalMissPenalty();
|
|
1201
|
+
/**
|
|
1202
|
+
* Calculates the object-based length scaling based on the deviation of a player for a full
|
|
1203
|
+
* combo in this beatmap, taking retries into account.
|
|
1204
|
+
*
|
|
1205
|
+
* @param objectCount The amount of objects to be considered. Defaults to the amount of
|
|
1206
|
+
* objects in this beatmap.
|
|
1207
|
+
* @param punishForMemorization Whether to punish the deviation for memorization. Defaults to `false`.
|
|
1208
|
+
*/
|
|
1209
|
+
private calculateDeviationBasedLengthScaling;
|
|
1128
1210
|
/**
|
|
1129
1211
|
* Estimates the player's tap deviation based on the OD, number of circles and sliders,
|
|
1130
1212
|
* and number of 300s, 100s, 50s, and misses, assuming the player's mean hit error is 0.
|
|
@@ -1154,16 +1236,18 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1154
1236
|
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
1155
1237
|
*/
|
|
1156
1238
|
declare class DroidRhythm extends DroidSkill {
|
|
1157
|
-
protected readonly
|
|
1158
|
-
protected readonly
|
|
1159
|
-
protected readonly
|
|
1160
|
-
protected readonly
|
|
1161
|
-
|
|
1162
|
-
private
|
|
1239
|
+
protected readonly reducedSectionCount = 5;
|
|
1240
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1241
|
+
protected readonly strainDecayBase = 0.3;
|
|
1242
|
+
protected readonly starsPerDouble = 1.75;
|
|
1243
|
+
private currentRhythmStrain;
|
|
1244
|
+
private currentRhythmMultiplier;
|
|
1163
1245
|
private readonly hitWindow;
|
|
1164
1246
|
constructor(mods: Mod[], overallDifficulty: number);
|
|
1165
|
-
protected strainValueAt(current:
|
|
1166
|
-
protected
|
|
1247
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1248
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1249
|
+
protected getObjectStrain(): number;
|
|
1250
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1167
1251
|
}
|
|
1168
1252
|
|
|
1169
1253
|
/**
|
|
@@ -1187,30 +1271,44 @@ declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
|
|
|
1187
1271
|
* @param current The current object.
|
|
1188
1272
|
* @param greatWindow The great hit window of the current object.
|
|
1189
1273
|
*/
|
|
1190
|
-
static evaluateDifficultyOf(current:
|
|
1274
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, greatWindow: number): number;
|
|
1191
1275
|
}
|
|
1192
1276
|
|
|
1193
1277
|
/**
|
|
1194
1278
|
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1195
1279
|
*/
|
|
1196
1280
|
declare class DroidTap extends DroidSkill {
|
|
1197
|
-
protected readonly
|
|
1198
|
-
protected readonly
|
|
1199
|
-
protected readonly
|
|
1200
|
-
protected readonly
|
|
1201
|
-
protected readonly starsPerDouble: number;
|
|
1281
|
+
protected readonly reducedSectionCount = 10;
|
|
1282
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1283
|
+
protected readonly strainDecayBase = 0.3;
|
|
1284
|
+
protected readonly starsPerDouble = 1.1;
|
|
1202
1285
|
private currentTapStrain;
|
|
1203
|
-
private
|
|
1286
|
+
private currentRhythmMultiplier;
|
|
1287
|
+
private readonly skillMultiplier;
|
|
1204
1288
|
private readonly greatWindow;
|
|
1205
|
-
|
|
1289
|
+
private readonly considerCheesability;
|
|
1290
|
+
private readonly strainTimeCap?;
|
|
1291
|
+
private readonly _objectDeltaTimes;
|
|
1206
1292
|
/**
|
|
1207
|
-
*
|
|
1293
|
+
* The delta time of hitobjects.
|
|
1208
1294
|
*/
|
|
1209
|
-
|
|
1295
|
+
get objectDeltaTimes(): readonly number[];
|
|
1296
|
+
constructor(mods: Mod[], overallDifficulty: number, considerCheesability: boolean, strainTimeCap?: number);
|
|
1297
|
+
/**
|
|
1298
|
+
* The amount of notes that are relevant to the difficulty.
|
|
1299
|
+
*/
|
|
1300
|
+
relevantNoteCount(): number;
|
|
1301
|
+
/**
|
|
1302
|
+
* The delta time relevant to the difficulty.
|
|
1303
|
+
*/
|
|
1304
|
+
relevantDeltaTime(): number;
|
|
1305
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1306
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1307
|
+
protected getObjectStrain(): number;
|
|
1210
1308
|
/**
|
|
1211
1309
|
* @param current The hitobject to save to.
|
|
1212
1310
|
*/
|
|
1213
|
-
protected saveToHitObject(current:
|
|
1311
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1214
1312
|
}
|
|
1215
1313
|
|
|
1216
1314
|
/**
|
|
@@ -1231,33 +1329,39 @@ declare abstract class DroidTapEvaluator extends SpeedEvaluator {
|
|
|
1231
1329
|
*
|
|
1232
1330
|
* - time between pressing the previous and current object,
|
|
1233
1331
|
* - distance between those objects,
|
|
1234
|
-
* -
|
|
1332
|
+
* - how easily they can be cheesed,
|
|
1333
|
+
* - and the strain time cap.
|
|
1235
1334
|
*
|
|
1236
1335
|
* @param current The current object.
|
|
1237
1336
|
* @param greatWindow The great hit window of the current object.
|
|
1238
1337
|
* @param considerCheesability Whether to consider cheesability.
|
|
1338
|
+
* @param strainTimeCap The strain time to cap the object's strain time to.
|
|
1239
1339
|
*/
|
|
1240
|
-
static evaluateDifficultyOf(current:
|
|
1340
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, greatWindow: number, considerCheesability: boolean, strainTimeCap?: number): number;
|
|
1241
1341
|
}
|
|
1242
1342
|
|
|
1243
1343
|
/**
|
|
1244
1344
|
* Represents the skill required to read every object in the map.
|
|
1245
1345
|
*/
|
|
1246
1346
|
declare class DroidVisual extends DroidSkill {
|
|
1247
|
-
protected readonly starsPerDouble
|
|
1248
|
-
protected readonly reducedSectionCount
|
|
1249
|
-
protected readonly reducedSectionBaseline
|
|
1250
|
-
protected readonly
|
|
1251
|
-
protected readonly strainDecayBase: number;
|
|
1347
|
+
protected readonly starsPerDouble = 1.025;
|
|
1348
|
+
protected readonly reducedSectionCount = 10;
|
|
1349
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1350
|
+
protected readonly strainDecayBase = 0.1;
|
|
1252
1351
|
private readonly isHidden;
|
|
1253
|
-
private readonly
|
|
1352
|
+
private readonly withSliders;
|
|
1353
|
+
private currentVisualStrain;
|
|
1354
|
+
private currentRhythmMultiplier;
|
|
1355
|
+
private readonly skillMultiplier;
|
|
1254
1356
|
constructor(mods: Mod[], withSliders: boolean);
|
|
1255
|
-
protected strainValueAt(current:
|
|
1256
|
-
protected
|
|
1357
|
+
protected strainValueAt(current: DroidDifficultyHitObject): number;
|
|
1358
|
+
protected calculateInitialStrain(time: number, current: DroidDifficultyHitObject): number;
|
|
1359
|
+
protected getObjectStrain(): number;
|
|
1360
|
+
protected saveToHitObject(current: DroidDifficultyHitObject): void;
|
|
1257
1361
|
}
|
|
1258
1362
|
|
|
1259
1363
|
/**
|
|
1260
|
-
* An evaluator for calculating osu!droid
|
|
1364
|
+
* An evaluator for calculating osu!droid visual skill.
|
|
1261
1365
|
*/
|
|
1262
1366
|
declare abstract class DroidVisualEvaluator {
|
|
1263
1367
|
/**
|
|
@@ -1275,7 +1379,7 @@ declare abstract class DroidVisualEvaluator {
|
|
|
1275
1379
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1276
1380
|
* @param withSliders Whether to take slider difficulty into account.
|
|
1277
1381
|
*/
|
|
1278
|
-
static evaluateDifficultyOf(current:
|
|
1382
|
+
static evaluateDifficultyOf(current: DroidDifficultyHitObject, isHiddenMod: boolean, withSliders: boolean): number;
|
|
1279
1383
|
}
|
|
1280
1384
|
|
|
1281
1385
|
/**
|
|
@@ -1300,6 +1404,72 @@ declare abstract class OsuSkill extends StrainSkill {
|
|
|
1300
1404
|
difficultyValue(): number;
|
|
1301
1405
|
}
|
|
1302
1406
|
|
|
1407
|
+
/**
|
|
1408
|
+
* Represents an osu!standard hit object with difficulty calculation values.
|
|
1409
|
+
*/
|
|
1410
|
+
declare class OsuDifficultyHitObject extends DifficultyHitObject {
|
|
1411
|
+
/**
|
|
1412
|
+
* The speed strain generated by the hitobject.
|
|
1413
|
+
*/
|
|
1414
|
+
speedStrain: number;
|
|
1415
|
+
/**
|
|
1416
|
+
* The flashlight strain generated by this hitobject.
|
|
1417
|
+
*/
|
|
1418
|
+
flashlightStrain: number;
|
|
1419
|
+
private readonly radiusBuffThreshold;
|
|
1420
|
+
protected readonly mode = Modes.osu;
|
|
1421
|
+
protected get scalingFactor(): number;
|
|
1422
|
+
/**
|
|
1423
|
+
* Note: You **must** call `computeProperties` at some point due to how TypeScript handles
|
|
1424
|
+
* overridden properties (see [this](https://github.com/microsoft/TypeScript/issues/1617) GitHub issue).
|
|
1425
|
+
*
|
|
1426
|
+
* @param object The underlying hitobject.
|
|
1427
|
+
* @param lastObject The hitobject before this hitobject.
|
|
1428
|
+
* @param lastLastObject The hitobject before the last hitobject.
|
|
1429
|
+
* @param difficultyHitObjects All difficulty hitobjects in the processed beatmap.
|
|
1430
|
+
* @param clockRate The clock rate of the beatmap.
|
|
1431
|
+
*/
|
|
1432
|
+
constructor(object: PlaceableHitObject, lastObject: PlaceableHitObject | null, lastLastObject: PlaceableHitObject | null, difficultyHitObjects: readonly DifficultyHitObject[], clockRate: number);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1437
|
+
*/
|
|
1438
|
+
declare class OsuAim extends OsuSkill {
|
|
1439
|
+
protected readonly strainDecayBase: number;
|
|
1440
|
+
protected readonly reducedSectionCount: number;
|
|
1441
|
+
protected readonly reducedSectionBaseline: number;
|
|
1442
|
+
protected readonly decayWeight: number;
|
|
1443
|
+
private currentAimStrain;
|
|
1444
|
+
private readonly skillMultiplier;
|
|
1445
|
+
private readonly withSliders;
|
|
1446
|
+
constructor(mods: Mod[], withSliders: boolean);
|
|
1447
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1448
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1449
|
+
/**
|
|
1450
|
+
* @param current The hitobject to save to.
|
|
1451
|
+
*/
|
|
1452
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* An evaluator for calculating osu!standard Aim skill.
|
|
1457
|
+
*/
|
|
1458
|
+
declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
1459
|
+
/**
|
|
1460
|
+
* Evaluates the difficulty of aiming the current object, based on:
|
|
1461
|
+
*
|
|
1462
|
+
* - cursor velocity to the current object,
|
|
1463
|
+
* - angle difficulty,
|
|
1464
|
+
* - sharp velocity increases,
|
|
1465
|
+
* - and slider difficulty.
|
|
1466
|
+
*
|
|
1467
|
+
* @param current The current object.
|
|
1468
|
+
* @param withSliders Whether to take slider difficulty into account.
|
|
1469
|
+
*/
|
|
1470
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, withSliders: boolean): number;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1303
1473
|
/**
|
|
1304
1474
|
* Holds data that can be used to calculate osu!standard performance points.
|
|
1305
1475
|
*/
|
|
@@ -1313,22 +1483,23 @@ interface OsuDifficultyAttributes extends DifficultyAttributes {
|
|
|
1313
1483
|
/**
|
|
1314
1484
|
* A difficulty calculator for osu!standard gamemode.
|
|
1315
1485
|
*/
|
|
1316
|
-
declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
1486
|
+
declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuDifficultyHitObject, OsuDifficultyAttributes> {
|
|
1317
1487
|
/**
|
|
1318
1488
|
* The aim star rating of the beatmap.
|
|
1319
1489
|
*/
|
|
1320
|
-
aim: number;
|
|
1490
|
+
get aim(): number;
|
|
1321
1491
|
/**
|
|
1322
1492
|
* The speed star rating of the beatmap.
|
|
1323
1493
|
*/
|
|
1324
|
-
speed: number;
|
|
1494
|
+
get speed(): number;
|
|
1325
1495
|
/**
|
|
1326
1496
|
* The flashlight star rating of the beatmap.
|
|
1327
1497
|
*/
|
|
1328
|
-
flashlight: number;
|
|
1498
|
+
get flashlight(): number;
|
|
1329
1499
|
readonly attributes: OsuDifficultyAttributes;
|
|
1330
|
-
|
|
1331
|
-
protected readonly
|
|
1500
|
+
get cacheableAttributes(): CacheableDifficultyAttributes<OsuDifficultyAttributes>;
|
|
1501
|
+
protected readonly difficultyMultiplier = 0.0675;
|
|
1502
|
+
protected readonly mode = Modes.osu;
|
|
1332
1503
|
/**
|
|
1333
1504
|
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
1334
1505
|
*/
|
|
@@ -1343,13 +1514,9 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
1343
1514
|
calculateFlashlight(): void;
|
|
1344
1515
|
calculateTotal(): void;
|
|
1345
1516
|
calculateAll(): void;
|
|
1346
|
-
/**
|
|
1347
|
-
* Returns a string representative of the class.
|
|
1348
|
-
*/
|
|
1349
1517
|
toString(): string;
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
*/
|
|
1518
|
+
protected generateDifficultyHitObjects(convertedBeatmap: Beatmap): OsuDifficultyHitObject[];
|
|
1519
|
+
protected computeDifficultyStatistics(options?: DifficultyCalculationOptions): DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
1353
1520
|
protected createSkills(): OsuSkill[];
|
|
1354
1521
|
/**
|
|
1355
1522
|
* Called after aim skill calculation.
|
|
@@ -1376,86 +1543,21 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
1376
1543
|
private postCalculateFlashlight;
|
|
1377
1544
|
}
|
|
1378
1545
|
|
|
1379
|
-
/**
|
|
1380
|
-
* A difficulty calculator that calculates for both osu!droid and osu!standard gamemode.
|
|
1381
|
-
*/
|
|
1382
|
-
declare class MapStars {
|
|
1383
|
-
/**
|
|
1384
|
-
* The osu!droid difficulty calculator of the beatmap.
|
|
1385
|
-
*/
|
|
1386
|
-
readonly droid: DroidDifficultyCalculator;
|
|
1387
|
-
/**
|
|
1388
|
-
* The osu!standard difficulty calculator of the beatmap.
|
|
1389
|
-
*/
|
|
1390
|
-
readonly osu: OsuDifficultyCalculator;
|
|
1391
|
-
/**
|
|
1392
|
-
* Constructs this instance and calculates the given beatmap's osu!droid and osu!standard difficulty.
|
|
1393
|
-
*
|
|
1394
|
-
* @param beatmap The beatmap to calculate.
|
|
1395
|
-
* @param options Options for the difficulty calculation.
|
|
1396
|
-
*/
|
|
1397
|
-
constructor(beatmap: Beatmap, options?: DifficultyCalculationOptions);
|
|
1398
|
-
/**
|
|
1399
|
-
* Returns a string representative of the class.
|
|
1400
|
-
*/
|
|
1401
|
-
toString(): string;
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
/**
|
|
1405
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1406
|
-
*/
|
|
1407
|
-
declare class OsuAim extends OsuSkill {
|
|
1408
|
-
protected readonly skillMultiplier: number;
|
|
1409
|
-
protected readonly strainDecayBase: number;
|
|
1410
|
-
protected readonly reducedSectionCount: number;
|
|
1411
|
-
protected readonly reducedSectionBaseline: number;
|
|
1412
|
-
protected readonly decayWeight: number;
|
|
1413
|
-
private readonly withSliders;
|
|
1414
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
1415
|
-
/**
|
|
1416
|
-
* @param current The hitobject to calculate.
|
|
1417
|
-
*/
|
|
1418
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1419
|
-
/**
|
|
1420
|
-
* @param current The hitobject to save to.
|
|
1421
|
-
*/
|
|
1422
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* An evaluator for calculating osu!standard Aim skill.
|
|
1427
|
-
*/
|
|
1428
|
-
declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
1429
|
-
/**
|
|
1430
|
-
* Evaluates the difficulty of aiming the current object, based on:
|
|
1431
|
-
*
|
|
1432
|
-
* - cursor velocity to the current object,
|
|
1433
|
-
* - angle difficulty,
|
|
1434
|
-
* - sharp velocity increases,
|
|
1435
|
-
* - and slider difficulty.
|
|
1436
|
-
*
|
|
1437
|
-
* @param current The current object.
|
|
1438
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
1439
|
-
*/
|
|
1440
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
1546
|
/**
|
|
1444
1547
|
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1445
1548
|
*/
|
|
1446
1549
|
declare class OsuFlashlight extends OsuSkill {
|
|
1447
|
-
protected readonly skillMultiplier: number;
|
|
1448
1550
|
protected readonly strainDecayBase: number;
|
|
1449
1551
|
protected readonly reducedSectionCount: number;
|
|
1450
1552
|
protected readonly reducedSectionBaseline: number;
|
|
1451
1553
|
protected readonly decayWeight: number;
|
|
1554
|
+
private currentFlashlightStrain;
|
|
1555
|
+
private readonly skillMultiplier;
|
|
1452
1556
|
private readonly isHidden;
|
|
1453
1557
|
constructor(mods: Mod[]);
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1458
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1558
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1559
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1560
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1459
1561
|
}
|
|
1460
1562
|
|
|
1461
1563
|
/**
|
|
@@ -1474,13 +1576,13 @@ declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
1474
1576
|
* @param current The current object.
|
|
1475
1577
|
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1476
1578
|
*/
|
|
1477
|
-
static evaluateDifficultyOf(current:
|
|
1579
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, isHiddenMod: boolean): number;
|
|
1478
1580
|
}
|
|
1479
1581
|
|
|
1480
1582
|
/**
|
|
1481
1583
|
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1482
1584
|
*/
|
|
1483
|
-
declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
1585
|
+
declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficultyAttributes> {
|
|
1484
1586
|
/**
|
|
1485
1587
|
* The aim performance value.
|
|
1486
1588
|
*/
|
|
@@ -1497,15 +1599,10 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
1497
1599
|
* The flashlight performance value.
|
|
1498
1600
|
*/
|
|
1499
1601
|
flashlight: number;
|
|
1500
|
-
readonly difficultyAttributes: OsuDifficultyAttributes;
|
|
1501
1602
|
protected finalMultiplier: number;
|
|
1502
1603
|
protected readonly mode: Modes;
|
|
1503
1604
|
protected calculateValues(): void;
|
|
1504
|
-
protected calculateTotalValue():
|
|
1505
|
-
/**
|
|
1506
|
-
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1507
|
-
*/
|
|
1508
|
-
constructor(difficultyAttributes: OsuDifficultyAttributes);
|
|
1605
|
+
protected calculateTotalValue(): number;
|
|
1509
1606
|
/**
|
|
1510
1607
|
* Calculates the aim performance value of the beatmap.
|
|
1511
1608
|
*/
|
|
@@ -1536,31 +1633,32 @@ declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
|
|
|
1536
1633
|
* @param current The current object.
|
|
1537
1634
|
* @param greatWindow The great hit window of the current object.
|
|
1538
1635
|
*/
|
|
1539
|
-
static evaluateDifficultyOf(current:
|
|
1636
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, greatWindow: number): number;
|
|
1540
1637
|
}
|
|
1541
1638
|
|
|
1542
1639
|
/**
|
|
1543
1640
|
* 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
1641
|
*/
|
|
1545
1642
|
declare class OsuSpeed extends OsuSkill {
|
|
1546
|
-
protected readonly
|
|
1547
|
-
protected readonly
|
|
1548
|
-
protected readonly
|
|
1549
|
-
protected readonly
|
|
1550
|
-
protected readonly
|
|
1551
|
-
protected readonly decayWeight: number;
|
|
1643
|
+
protected readonly strainDecayBase = 0.3;
|
|
1644
|
+
protected readonly reducedSectionCount = 5;
|
|
1645
|
+
protected readonly reducedSectionBaseline = 0.75;
|
|
1646
|
+
protected readonly difficultyMultiplier = 1.04;
|
|
1647
|
+
protected readonly decayWeight = 0.9;
|
|
1552
1648
|
private currentSpeedStrain;
|
|
1553
1649
|
private currentRhythm;
|
|
1650
|
+
private readonly skillMultiplier;
|
|
1554
1651
|
private readonly greatWindow;
|
|
1555
|
-
constructor(mods: Mod[],
|
|
1652
|
+
constructor(mods: Mod[], overallDifficulty: number);
|
|
1556
1653
|
/**
|
|
1557
1654
|
* @param current The hitobject to calculate.
|
|
1558
1655
|
*/
|
|
1559
|
-
protected strainValueAt(current:
|
|
1656
|
+
protected strainValueAt(current: OsuDifficultyHitObject): number;
|
|
1657
|
+
protected calculateInitialStrain(time: number, current: OsuDifficultyHitObject): number;
|
|
1560
1658
|
/**
|
|
1561
1659
|
* @param current The hitobject to save to.
|
|
1562
1660
|
*/
|
|
1563
|
-
protected saveToHitObject(current:
|
|
1661
|
+
protected saveToHitObject(current: OsuDifficultyHitObject): void;
|
|
1564
1662
|
}
|
|
1565
1663
|
|
|
1566
1664
|
/**
|
|
@@ -1581,7 +1679,7 @@ declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
|
1581
1679
|
* @param current The current object.
|
|
1582
1680
|
* @param greatWindow The great hit window of the current object.
|
|
1583
1681
|
*/
|
|
1584
|
-
static evaluateDifficultyOf(current:
|
|
1682
|
+
static evaluateDifficultyOf(current: OsuDifficultyHitObject, greatWindow: number): number;
|
|
1585
1683
|
}
|
|
1586
1684
|
|
|
1587
|
-
export { AimEvaluator,
|
|
1685
|
+
export { AimEvaluator, type CacheableDifficultyAttributes, type DifficultSlider, type DifficultyAttributes, type DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DroidAim, DroidAimEvaluator, type DroidDifficultyAttributes, type DroidDifficultyCalculationOptions, DroidDifficultyCalculator, DroidDifficultyHitObject, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, type ExtendedDroidDifficultyAttributes, FlashlightEvaluator, type HighStrainSection, OsuAim, OsuAimEvaluator, type OsuDifficultyAttributes, OsuDifficultyCalculator, OsuDifficultyHitObject, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, type PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, type StrainPeaks };
|