@rian8337/osu-rebalance-difficulty-calculator 2.0.0-alpha.7 → 2.0.0

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.
@@ -1,4 +1,44 @@
1
- import { HitObject, modes, Mod, Beatmap, MapStats, Accuracy } from '@rian8337/osu-base';
1
+ import { MapStats, Mod, HitObject, Beatmap, modes, Accuracy } from '@rian8337/osu-base';
2
+
3
+ /**
4
+ * An evaluator for calculating aim skill.
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
+ * Represents options for difficulty calculation.
35
+ */
36
+ interface DifficultyCalculationOptions extends CalculationOptions {
37
+ /**
38
+ * The modifications to apply.
39
+ */
40
+ mods?: Mod[];
41
+ }
2
42
 
3
43
  /**
4
44
  * Represents an osu!standard hit object with difficulty calculation values.
@@ -8,6 +48,20 @@ declare class DifficultyHitObject {
8
48
  * The underlying hitobject.
9
49
  */
10
50
  readonly object: HitObject;
51
+ /**
52
+ * The index of this hitobject in the list of all hitobjects.
53
+ *
54
+ * This is one less than the actual index of the hitobject in the beatmap.
55
+ */
56
+ index: number;
57
+ /**
58
+ * The preempt time of the hitobject.
59
+ */
60
+ timePreempt: number;
61
+ /**
62
+ * The fade in time of the hitobject.
63
+ */
64
+ timeFadeIn: number;
11
65
  /**
12
66
  * The aim strain generated by the hitobject if sliders are considered.
13
67
  */
@@ -110,87 +164,60 @@ declare class DifficultyHitObject {
110
164
  * Adjusted velocity of the hitobject, taking speed multiplier into account.
111
165
  */
112
166
  velocity: number;
167
+ private readonly hitObjects;
113
168
  /**
114
169
  * @param object The underlying hitobject.
170
+ * @param hitObjects All difficulty hitobjects in the processed beatmap.
115
171
  */
116
- constructor(object: HitObject);
117
- }
118
-
119
- /**
120
- * A converter used to convert normal hitobjects into difficulty hitobjects.
121
- */
122
- declare class DifficultyHitObjectCreator {
123
- /**
124
- * The threshold for small circle buff for osu!droid.
125
- */
126
- private readonly DROID_CIRCLESIZE_BUFF_THRESHOLD;
172
+ constructor(object: HitObject, hitObjects: DifficultyHitObject[]);
127
173
  /**
128
- * The threshold for small circle buff for osu!standard.
129
- */
130
- private readonly PC_CIRCLESIZE_BUFF_THRESHOLD;
131
- /**
132
- * The gamemode this creator is creating for.
133
- */
134
- private mode;
135
- /**
136
- * The base normalized radius of hitobjects.
137
- */
138
- private readonly normalizedRadius;
139
- private readonly maximumSliderRadius;
140
- private readonly assumedSliderRadius;
141
- private readonly minDeltaTime;
142
- /**
143
- * Generates difficulty hitobjects for difficulty calculation.
144
- */
145
- generateDifficultyObjects(params: {
146
- objects: readonly HitObject[];
147
- circleSize: number;
148
- speedMultiplier: number;
149
- mode: modes;
150
- preempt?: number;
151
- }): DifficultyHitObject[];
152
- /**
153
- * Calculates a slider's cursor position.
174
+ * Gets the difficulty hitobject at a specific index with respect to the current
175
+ * difficulty hitobject's index.
176
+ *
177
+ * Will return `null` if the index is out of range.
178
+ *
179
+ * @param backwardsIndex The index to move backwards for.
180
+ * @returns The difficulty hitobject at the index with respect to the current
181
+ * difficulty hitobject's index, `null` if the index is out of range.
154
182
  */
155
- private calculateSliderCursorPosition;
183
+ previous(backwardsIndex: number): DifficultyHitObject | null;
156
184
  /**
157
- * Gets the scaling factor of a radius.
185
+ * Gets the difficulty hitobject at a specific index with respect to the current
186
+ * difficulty hitobject's index.
158
187
  *
159
- * @param radius The radius to get the scaling factor from.
188
+ * Will return `null` if the index is out of range.
189
+ *
190
+ * @param forwardsIndex The index to move forwards for.
191
+ * @returns The difficulty hitobject at the index with respect to the current
192
+ * difficulty hitobject's index, `null` if the index is out of range.
160
193
  */
161
- private getScalingFactor;
194
+ next(forwardsIndex: number): DifficultyHitObject | null;
162
195
  /**
163
- * Returns the end cursor position of a hitobject.
196
+ * Calculates the opacity of the hitobject at a given time.
197
+ *
198
+ * @param time The time to calculate the hitobject's opacity at.
199
+ * @param isHidden Whether Hidden mod is used.
200
+ * @returns The opacity of the hitobject at the given time.
164
201
  */
165
- private getEndCursorPosition;
202
+ opacityAt(time: number, isHidden: boolean): number;
166
203
  }
167
204
 
168
205
  /**
169
206
  * A bare minimal abstract skill for fully custom skill implementations.
170
207
  */
171
208
  declare abstract class Skill {
172
- /**
173
- * The hitobjects that were processed previously. They can affect the strain values of the following objects.
174
- *
175
- * The latest hitobject is at index 0.
176
- */
177
- protected readonly previous: DifficultyHitObject[];
178
- /**
179
- * Number of previous hitobjects to keep inside the `previous` array.
180
- */
181
- protected readonly historyLength: number;
182
209
  /**
183
210
  * The mods that this skill processes.
184
211
  */
185
212
  protected readonly mods: Mod[];
186
213
  constructor(mods: Mod[]);
187
- processInternal(current: DifficultyHitObject): void;
188
214
  /**
189
- * Processes a hitobject.
215
+ * Calculates the strain value of a hitobject and stores the value in it.
216
+ * This value is affected by previously processed objects.
190
217
  *
191
218
  * @param current The hitobject to process.
192
219
  */
193
- protected abstract process(current: DifficultyHitObject): void;
220
+ abstract process(current: DifficultyHitObject): void;
194
221
  /**
195
222
  * Returns the calculated difficulty value representing all hitobjects that have been processed up to this point.
196
223
  */
@@ -233,24 +260,19 @@ declare abstract class StrainSkill extends Skill {
233
260
  * For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
234
261
  */
235
262
  protected abstract readonly strainDecayBase: number;
236
- protected readonly sectionLength: number;
237
- protected currentSectionEnd: number;
263
+ private readonly sectionLength;
264
+ private currentSectionEnd;
265
+ private isFirstObject;
238
266
  /**
239
267
  * Calculates the strain value of a hitobject and stores the value in it. This value is affected by previously processed objects.
240
268
  *
241
269
  * @param current The hitobject to process.
242
270
  */
243
- protected process(current: DifficultyHitObject): void;
271
+ process(current: DifficultyHitObject): void;
244
272
  /**
245
273
  * Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
246
274
  */
247
275
  saveCurrentPeak(): void;
248
- /**
249
- * Sets the initial strain level for a new section.
250
- *
251
- * @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
252
- */
253
- protected startNewSectionFrom(offset: number): void;
254
276
  /**
255
277
  * Calculates strain decay for a specified time frame.
256
278
  *
@@ -265,106 +287,55 @@ declare abstract class StrainSkill extends Skill {
265
287
  * Saves the current strain to a hitobject.
266
288
  */
267
289
  protected abstract saveToHitObject(current: DifficultyHitObject): void;
290
+ /**
291
+ * Sets the initial strain level for a new section.
292
+ *
293
+ * @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
294
+ * @param current The current hitobject.
295
+ */
296
+ private startNewSectionFrom;
268
297
  }
269
298
 
270
299
  /**
271
- * Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
272
- * and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
300
+ * Holds additional data that is used in difficulty calculation.
273
301
  */
274
- declare abstract class DroidSkill extends StrainSkill {
275
- /**
276
- * The bonus multiplier that is given for a sequence of notes of equal difficulty.
277
- */
278
- protected abstract readonly starsPerDouble: number;
279
- difficultyValue(): number;
302
+ interface DifficultyAttributes {
303
+ speedNoteCount: number;
304
+ sliderFactor: number;
305
+ aimDifficultStrainCount: number;
306
+ speedDifficultStrainCount: number;
280
307
  }
281
308
 
282
309
  /**
283
- * Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
310
+ * Represents the strain peaks of various calculated difficulties.
284
311
  */
285
- declare class DroidAim extends DroidSkill {
286
- protected readonly skillMultiplier: number;
287
- protected readonly strainDecayBase: number;
288
- protected readonly reducedSectionCount: number;
289
- protected readonly reducedSectionBaseline: number;
290
- protected readonly starsPerDouble: number;
291
- /**
292
- * Spacing threshold for a single hitobject spacing.
293
- */
294
- private readonly SINGLE_SPACING_THRESHOLD;
295
- private readonly minSpeedBonus;
296
- private readonly wideAngleMultiplier;
297
- private readonly acuteAngleMultiplier;
298
- private readonly sliderMultiplier;
299
- private readonly velocityChangeMultiplier;
300
- private readonly withSliders;
301
- constructor(mods: Mod[], withSliders: boolean);
302
- /**
303
- * @param current The hitobject to calculate.
304
- */
305
- protected strainValueOf(current: DifficultyHitObject): number;
306
- /**
307
- * Calculates the aim strain of a hitobject.
308
- */
309
- private aimStrainOf;
312
+ interface StrainPeaks {
310
313
  /**
311
- * Calculates the movement strain of a hitobject.
314
+ * The strain peaks of aim difficulty if sliders are considered.
312
315
  */
313
- private movementStrainOf;
316
+ aimWithSliders: number[];
314
317
  /**
315
- * @param current The hitobject to calculate.
316
- */
317
- protected strainValueAt(current: DifficultyHitObject): number;
318
- /**
319
- * @param current The hitobject to save to.
318
+ * The strain peaks of aim difficulty if sliders are not considered.
320
319
  */
321
- protected saveToHitObject(current: DifficultyHitObject): void;
320
+ aimWithoutSliders: number[];
322
321
  /**
323
- * Calculates the bonus of wide angles.
322
+ * The strain peaks of speed difficulty.
324
323
  */
325
- private calculateWideAngleBonus;
324
+ speed: number[];
326
325
  /**
327
- * Calculates the bonus of acute angles.
326
+ * The strain peaks of flashlight difficulty.
328
327
  */
329
- private calculateAcuteAngleBonus;
328
+ flashlight: number[];
330
329
  }
331
330
 
332
331
  /**
333
- * Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
332
+ * The base of a difficulty calculator.
334
333
  */
335
- declare class DroidFlashlight extends DroidSkill {
336
- protected readonly historyLength: number;
337
- protected readonly skillMultiplier: number;
338
- protected readonly strainDecayBase: number;
339
- protected readonly reducedSectionCount: number;
340
- protected readonly reducedSectionBaseline: number;
341
- protected readonly starsPerDouble: number;
342
- protected strainValueOf(current: DifficultyHitObject): number;
343
- /**
344
- * @param current The hitobject to calculate.
345
- */
346
- protected strainValueAt(current: DifficultyHitObject): number;
347
- protected saveToHitObject(current: DifficultyHitObject): void;
348
- }
349
-
350
- /**
351
- * Holds additional data that is used in difficulty calculation.
352
- */
353
- interface DifficultyAttributes {
354
- speedNoteCount: number;
355
- sliderFactor: number;
356
- aimDifficultStrainCount: number;
357
- speedDifficultStrainCount: number;
358
- }
359
-
360
- /**
361
- * The base of difficulty calculation.
362
- */
363
- declare abstract class StarRating {
334
+ declare abstract class DifficultyCalculator {
364
335
  /**
365
336
  * The calculated beatmap.
366
337
  */
367
- map: Beatmap;
338
+ readonly beatmap: Beatmap;
368
339
  /**
369
340
  * The difficulty objects of the beatmap.
370
341
  */
@@ -384,30 +355,20 @@ declare abstract class StarRating {
384
355
  /**
385
356
  * The strain peaks of various calculated difficulties.
386
357
  */
387
- readonly strainPeaks: {
388
- /**
389
- * The strain peaks of aim difficulty if sliders are considered.
390
- */
391
- aimWithSliders: number[];
392
- /**
393
- * The strain peaks of aim difficulty if sliders are not considered.
394
- */
395
- aimWithoutSliders: number[];
396
- /**
397
- * The strain peaks of speed difficulty.
398
- */
399
- speed: number[];
400
- /**
401
- * The strain peaks of flashlight difficulty.
402
- */
403
- flashlight: number[];
404
- };
358
+ readonly strainPeaks: StrainPeaks;
405
359
  /**
406
360
  * Additional data that is used in performance calculation.
407
361
  */
408
362
  readonly attributes: DifficultyAttributes;
409
363
  protected readonly sectionLength: number;
410
364
  protected abstract readonly difficultyMultiplier: number;
365
+ protected abstract readonly mode: modes;
366
+ /**
367
+ * Constructs a new instance of the calculator.
368
+ *
369
+ * @param beatmap The beatmap to calculate. This beatmap will be deep-cloned to prevent reference changes.
370
+ */
371
+ constructor(beatmap: Beatmap);
411
372
  /**
412
373
  * Calculates the star rating of the specified beatmap.
413
374
  *
@@ -420,32 +381,13 @@ declare abstract class StarRating {
420
381
  * by decaying the previous hitobject's strain until the
421
382
  * beginning of the new chunk.
422
383
  *
423
- * The first object doesn't generate a strain
424
- * so we begin calculating from the second object.
425
- *
426
- * Also don't forget to manually add the peak strain for the last
427
- * section which would otherwise be ignored.
428
- */
429
- calculate(params: {
430
- /**
431
- * The beatmap to calculate.
432
- */
433
- map: Beatmap;
434
- /**
435
- * Applied modifications in osu!standard format.
436
- */
437
- mods?: Mod[];
438
- /**
439
- * Custom map statistics to apply custom speed multiplier as well as old statistics.
440
- */
441
- stats?: MapStats;
442
- }, mode: modes): this;
384
+ * @param options Options for the difficulty calculation.
385
+ */
386
+ calculate(options?: DifficultyCalculationOptions): this;
443
387
  /**
444
388
  * Generates difficulty hitobjects for this calculator.
445
- *
446
- * @param mode The gamemode to generate difficulty hitobjects for.
447
389
  */
448
- protected generateDifficultyHitObjects(mode: modes): void;
390
+ generateDifficultyHitObjects(): void;
449
391
  /**
450
392
  * Calculates the skills provided.
451
393
  *
@@ -483,9 +425,122 @@ declare abstract class StarRating {
483
425
  }
484
426
 
485
427
  /**
486
- * Difficulty calculator for osu!droid gamemode.
428
+ * A converter used to convert normal hitobjects into difficulty hitobjects.
429
+ */
430
+ declare class DifficultyHitObjectCreator {
431
+ /**
432
+ * The threshold for small circle buff for osu!droid.
433
+ */
434
+ private readonly DROID_CIRCLESIZE_BUFF_THRESHOLD;
435
+ /**
436
+ * The threshold for small circle buff for osu!standard.
437
+ */
438
+ private readonly PC_CIRCLESIZE_BUFF_THRESHOLD;
439
+ /**
440
+ * The gamemode this creator is creating for.
441
+ */
442
+ private mode;
443
+ /**
444
+ * The base normalized radius of hitobjects.
445
+ */
446
+ private readonly normalizedRadius;
447
+ private readonly maximumSliderRadius;
448
+ private readonly assumedSliderRadius;
449
+ private readonly minDeltaTime;
450
+ /**
451
+ * Generates difficulty hitobjects for difficulty calculation.
452
+ */
453
+ generateDifficultyObjects(params: {
454
+ objects: readonly HitObject[];
455
+ circleSize: number;
456
+ speedMultiplier: number;
457
+ mode: modes;
458
+ preempt?: number;
459
+ }): DifficultyHitObject[];
460
+ /**
461
+ * Calculates a slider's cursor position.
462
+ */
463
+ private calculateSliderCursorPosition;
464
+ /**
465
+ * Gets the scaling factor of a radius.
466
+ *
467
+ * @param radius The radius to get the scaling factor from.
468
+ */
469
+ private getScalingFactor;
470
+ /**
471
+ * Returns the end cursor position of a hitobject.
472
+ */
473
+ private getEndCursorPosition;
474
+ }
475
+
476
+ /**
477
+ * Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
478
+ * and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
487
479
  */
488
- declare class DroidStarRating extends StarRating {
480
+ declare abstract class DroidSkill extends StrainSkill {
481
+ /**
482
+ * The bonus multiplier that is given for a sequence of notes of equal difficulty.
483
+ */
484
+ protected abstract readonly starsPerDouble: number;
485
+ difficultyValue(): number;
486
+ }
487
+
488
+ /**
489
+ * Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
490
+ */
491
+ declare class DroidAim extends DroidSkill {
492
+ protected readonly skillMultiplier: number;
493
+ protected readonly strainDecayBase: number;
494
+ protected readonly reducedSectionCount: number;
495
+ protected readonly reducedSectionBaseline: number;
496
+ protected readonly starsPerDouble: number;
497
+ private readonly withSliders;
498
+ constructor(mods: Mod[], withSliders: boolean);
499
+ /**
500
+ * @param current The hitobject to calculate.
501
+ */
502
+ protected strainValueAt(current: DifficultyHitObject): number;
503
+ /**
504
+ * @param current The hitobject to save to.
505
+ */
506
+ protected saveToHitObject(current: DifficultyHitObject): void;
507
+ }
508
+
509
+ /**
510
+ * An evaluator for calculating osu!droid Aim skill.
511
+ */
512
+ declare abstract class DroidAimEvaluator extends AimEvaluator {
513
+ /**
514
+ * Spacing threshold for a single hitobject spacing.
515
+ */
516
+ private static readonly SINGLE_SPACING_THRESHOLD;
517
+ private static readonly minSpeedBonus;
518
+ /**
519
+ * Evaluates the difficulty of aiming the current object, based on:
520
+ *
521
+ * - cursor velocity to the current object,
522
+ * - angle difficulty,
523
+ * - sharp velocity increases,
524
+ * - and slider difficulty.
525
+ *
526
+ * @param current The current object.
527
+ * @param withSliders Whether to take slider difficulty into account.
528
+ */
529
+ static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
530
+ /**
531
+ * Calculates the aim strain of a hitobject.
532
+ */
533
+ private static aimStrainOf;
534
+ /**
535
+ * Calculates the movement strain of a hitobject.
536
+ */
537
+ private static movementStrainOf;
538
+ }
539
+
540
+ /**
541
+ * A difficulty calculator for osu!droid gamemode.
542
+ */
543
+ declare class DroidDifficultyCalculator extends DifficultyCalculator {
489
544
  /**
490
545
  * The aim star rating of the beatmap.
491
546
  */
@@ -507,48 +562,13 @@ declare class DroidStarRating extends StarRating {
507
562
  */
508
563
  visual: number;
509
564
  protected readonly difficultyMultiplier: number;
510
- /**
511
- * Calculates the star rating of the specified beatmap.
512
- *
513
- * The beatmap is analyzed in chunks of `sectionLength` duration.
514
- * For each chunk the highest hitobject strains are added to
515
- * a list which is then collapsed into a weighted sum, much
516
- * like scores are weighted on a user's profile.
517
- *
518
- * For subsequent chunks, the initial max strain is calculated
519
- * by decaying the previous hitobject's strain until the
520
- * beginning of the new chunk.
521
- *
522
- * The first object doesn't generate a strain
523
- * so we begin calculating from the second object.
524
- *
525
- * Also don't forget to manually add the peak strain for the last
526
- * section which would otherwise be ignored.
527
- */
528
- calculate(params: {
529
- /**
530
- * The beatmap to calculate.
531
- */
532
- map: Beatmap;
533
- /**
534
- * Applied modifications.
535
- */
536
- mods?: Mod[];
537
- /**
538
- * Custom map statistics to apply custom tap multiplier as well as old statistics.
539
- */
540
- stats?: MapStats;
541
- }): this;
542
- /**
543
- * Generates difficulty hitobjects for this calculator.
544
- */
545
- generateDifficultyHitObjects(): void;
565
+ protected readonly mode: modes;
546
566
  /**
547
567
  * Calculates the aim star rating of the beatmap and stores it in this instance.
548
568
  */
549
569
  calculateAim(): void;
550
570
  /**
551
- * Calculates the speed star rating of the beatmap and stores it in this instance.
571
+ * Calculates the tap star rating of the beatmap and stores it in this instance.
552
572
  */
553
573
  calculateTap(): void;
554
574
  /**
@@ -610,10 +630,77 @@ declare class DroidStarRating extends StarRating {
610
630
  private postCalculateVisual;
611
631
  }
612
632
 
633
+ /**
634
+ * Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
635
+ */
636
+ declare class DroidFlashlight extends DroidSkill {
637
+ protected readonly skillMultiplier: number;
638
+ protected readonly strainDecayBase: number;
639
+ protected readonly reducedSectionCount: number;
640
+ protected readonly reducedSectionBaseline: number;
641
+ protected readonly starsPerDouble: number;
642
+ private readonly isHidden;
643
+ constructor(mods: Mod[]);
644
+ /**
645
+ * @param current The hitobject to calculate.
646
+ */
647
+ protected strainValueAt(current: DifficultyHitObject): number;
648
+ protected saveToHitObject(current: DifficultyHitObject): void;
649
+ }
650
+
651
+ /**
652
+ * An evaluator for calculating flashlight skill.
653
+ *
654
+ * This class should be considered an "evaluating" class and not persisted.
655
+ */
656
+ declare abstract class FlashlightEvaluator {
657
+ protected static readonly maxOpacityBonus: number;
658
+ protected static readonly hiddenBonus: number;
659
+ }
660
+
661
+ /**
662
+ * An evaluator for calculating osu!droid Flashlight skill.
663
+ */
664
+ declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
665
+ /**
666
+ * Evaluates the difficulty of memorizing and hitting the current object, based on:
667
+ *
668
+ * - distance between the previous and the current object,
669
+ * - the visual opacity of the current object,
670
+ * - and whether Hidden mod is enabled.
671
+ *
672
+ * @param current The current object.
673
+ * @param isHiddenMod Whether the Hidden mod is enabled.
674
+ */
675
+ static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
676
+ }
677
+
678
+ /**
679
+ * Represents options for performance calculation.
680
+ */
681
+ interface PerformanceCalculationOptions extends CalculationOptions {
682
+ /**
683
+ * The maximum combo achieved in the score.
684
+ */
685
+ combo?: number;
686
+ /**
687
+ * The accuracy achieved in the score.
688
+ */
689
+ accPercent?: Accuracy | number;
690
+ /**
691
+ * The amount of misses achieved in the score.
692
+ */
693
+ miss?: number;
694
+ /**
695
+ * The tap penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
696
+ */
697
+ tapPenalty?: number;
698
+ }
699
+
613
700
  /**
614
701
  * The base class of performance calculators.
615
702
  */
616
- declare abstract class PerformanceCalculator {
703
+ declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
617
704
  /**
618
705
  * The overall performance value.
619
706
  */
@@ -623,9 +710,9 @@ declare abstract class PerformanceCalculator {
623
710
  */
624
711
  computedAccuracy: Accuracy;
625
712
  /**
626
- * The calculated beatmap.
713
+ * The difficulty calculator that is being calculated.
627
714
  */
628
- abstract stars: StarRating;
715
+ readonly difficultyCalculator: T;
629
716
  /**
630
717
  * The map statistics after applying modifications.
631
718
  */
@@ -640,6 +727,10 @@ declare abstract class PerformanceCalculator {
640
727
  * This is being adjusted to keep the final value scaled around what it used to be when changing things.
641
728
  */
642
729
  protected abstract finalMultiplier: number;
730
+ /**
731
+ * The gamemode to calculate for.
732
+ */
733
+ protected abstract readonly mode: modes;
643
734
  /**
644
735
  * The amount of misses that are filtered out from sliderbreaks.
645
736
  */
@@ -649,83 +740,37 @@ declare abstract class PerformanceCalculator {
649
740
  */
650
741
  protected sliderNerfFactor: number;
651
742
  /**
652
- * Calculates the performance points of a beatmap.
653
- */
654
- abstract calculate(params: {
655
- /**
656
- * The star rating instance to calculate.
657
- */
658
- stars: StarRating;
659
- /**
660
- * The maximum combo achieved in the score.
661
- */
662
- combo?: number;
663
- /**
664
- * The accuracy achieved in the score.
665
- */
666
- accPercent?: Accuracy | number;
667
- /**
668
- * The amount of misses achieved in the score.
669
- */
670
- miss?: number;
671
- /**
672
- * The tap penalty to apply for penalized scores. Only applies to droid gamemode.
673
- */
674
- tapPenalty?: number;
675
- /**
676
- * Custom map statistics to apply custom speed multiplier and force AR values as well as old statistics.
677
- */
678
- stats?: MapStats;
679
- }): this;
743
+ * @param difficultyCalculator The difficulty calculator to calculate.
744
+ */
745
+ constructor(difficultyCalculator: T);
746
+ /**
747
+ * Calculates the performance points of the beatmap.
748
+ *
749
+ * @param options Options for performance calculation.
750
+ * @returns The current instance.
751
+ */
752
+ calculate(options?: PerformanceCalculationOptions): this;
680
753
  /**
681
754
  * Returns a string representative of the class.
682
755
  */
683
756
  abstract toString(): string;
684
757
  /**
685
- * Internal calculation method, used to process calculation from implementations.
686
- */
687
- protected calculateInternal(params: {
688
- /**
689
- * The star rating instance to calculate.
690
- */
691
- stars: StarRating;
692
- /**
693
- * The maximum combo achieved in the score.
694
- */
695
- combo?: number;
696
- /**
697
- * The accuracy achieved in the score.
698
- */
699
- accPercent?: Accuracy | number;
700
- /**
701
- * The amount of misses achieved in the score.
702
- */
703
- miss?: number;
704
- /**
705
- * The tap penalty to apply for penalized scores. Only applies to droid gamemode.
706
- */
707
- tapPenalty?: number;
708
- /**
709
- * Custom map statistics to apply custom speed multiplier and force AR values as well as old statistics.
710
- */
711
- stats?: MapStats;
712
- }, mode: modes): this;
713
- /**
714
- * Calculates values that will be used for calculating the total performance value of the beatmap.
758
+ * Calculates all values that will be used for calculating the total
759
+ * performance value of the beatmap and stores them in this instance.
715
760
  */
716
761
  protected abstract calculateValues(): void;
717
762
  /**
718
- * Calculates the total performance value of the beatmap.
763
+ * Calculates the total performance value of the beatmap and stores it in this instance.
719
764
  */
720
- protected abstract calculateTotalValue(): number;
765
+ protected abstract calculateTotalValue(): void;
721
766
  /**
722
767
  * Calculates the base performance value of a star rating.
723
768
  */
724
769
  protected baseValue(stars: number): number;
725
770
  /**
726
- * Processes given parameters for usage in performance calculation.
771
+ * Processes given options for usage in performance calculation.
727
772
  */
728
- private handleParams;
773
+ protected handleOptions(options?: PerformanceCalculationOptions): void;
729
774
  /**
730
775
  * Calculates the amount of misses + sliderbreaks from combo.
731
776
  */
@@ -735,9 +780,7 @@ declare abstract class PerformanceCalculator {
735
780
  /**
736
781
  * A performance points calculator that calculates performance points for osu!droid gamemode.
737
782
  */
738
- declare class DroidPerformanceCalculator extends PerformanceCalculator {
739
- stars: DroidStarRating;
740
- protected finalMultiplier: number;
783
+ declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDifficultyCalculator> {
741
784
  /**
742
785
  * The aim performance value.
743
786
  */
@@ -758,35 +801,12 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
758
801
  * The visual performance value.
759
802
  */
760
803
  visual: number;
804
+ protected finalMultiplier: number;
805
+ protected readonly mode: modes;
761
806
  private tapPenalty;
762
- calculate(params: {
763
- /**
764
- * The star rating instance to calculate.
765
- */
766
- stars: DroidStarRating;
767
- /**
768
- * The maximum combo achieved in the score.
769
- */
770
- combo?: number;
771
- /**
772
- * The accuracy achieved in the score.
773
- */
774
- accPercent?: Accuracy | number;
775
- /**
776
- * The amount of misses achieved in the score.
777
- */
778
- miss?: number;
779
- /**
780
- * The tap penalty to apply for penalized scores.
781
- */
782
- tapPenalty?: number;
783
- /**
784
- * Custom map statistics to apply custom tap multiplier and force AR values as well as old statistics.
785
- */
786
- stats?: MapStats;
787
- }): this;
788
807
  protected calculateValues(): void;
789
- protected calculateTotalValue(): number;
808
+ protected calculateTotalValue(): void;
809
+ protected handleOptions(options?: PerformanceCalculationOptions): void;
790
810
  /**
791
811
  * Calculates the aim performance value of the beatmap.
792
812
  */
@@ -814,25 +834,47 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
814
834
  * Represents the skill required to properly follow a beatmap's rhythm.
815
835
  */
816
836
  declare class DroidRhythm extends DroidSkill {
817
- protected readonly historyLength: number;
818
837
  protected readonly skillMultiplier: number;
819
838
  protected readonly reducedSectionCount: number;
820
839
  protected readonly reducedSectionBaseline: number;
821
840
  protected readonly strainDecayBase: number;
822
841
  protected readonly starsPerDouble: number;
823
- private readonly rhythmMultiplier;
824
- private readonly historyTimeMax;
825
842
  private currentRhythm;
826
843
  private readonly hitWindow;
827
844
  constructor(mods: Mod[], overallDifficulty: number);
828
- /**
829
- * Calculates a rhythm multiplier for the difficulty of the tap associated with historic data of the current object.
830
- */
831
- private calculateRhythmBonus;
832
845
  protected strainValueAt(current: DifficultyHitObject): number;
833
846
  protected saveToHitObject(current: DifficultyHitObject): void;
834
847
  }
835
848
 
849
+ /**
850
+ * An evaluator for calculating rhythm skill.
851
+ *
852
+ * This class should be considered an "evaluating" class and not persisted.
853
+ */
854
+ declare abstract class RhythmEvaluator {
855
+ protected static readonly historyTimeMax: number;
856
+ }
857
+
858
+ /**
859
+ * An evaluator for calculating osu!droid Rhythm skill.
860
+ */
861
+ declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
862
+ /**
863
+ * Calculates a rhythm multiplier for the difficulty of the tap associated
864
+ * with historic data of the current object.
865
+ *
866
+ * @param current The current object.
867
+ * @param greatWindow The great hit window of the current object.
868
+ */
869
+ static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
870
+ /**
871
+ * Calculates the rhythm multiplier of a given hit window.
872
+ *
873
+ * @param greatWindow The great hit window.
874
+ */
875
+ private static calculateRhythmMultiplier;
876
+ }
877
+
836
878
  /**
837
879
  * Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
838
880
  */
@@ -845,16 +887,8 @@ declare class DroidTap extends DroidSkill {
845
887
  private readonly minSpeedBonus;
846
888
  private currentTapStrain;
847
889
  private currentOriginalTapStrain;
848
- private readonly hitWindow;
890
+ private readonly greatWindow;
849
891
  constructor(mods: Mod[], overallDifficulty: number);
850
- /**
851
- * @param current The hitobject to calculate.
852
- */
853
- protected strainValueOf(current: DifficultyHitObject): number;
854
- /**
855
- * Calculates the tap strain of a hitobject given a specific speed bonus and strain time.
856
- */
857
- private tapStrainOf;
858
892
  /**
859
893
  * @param current The hitobject to calculate.
860
894
  */
@@ -865,27 +899,68 @@ declare class DroidTap extends DroidSkill {
865
899
  protected saveToHitObject(current: DifficultyHitObject): void;
866
900
  }
867
901
 
902
+ /**
903
+ * An evaluator for calculating speed or tap skill.
904
+ *
905
+ * This class should be considered an "evaluating" class and not persisted.
906
+ */
907
+ declare abstract class SpeedEvaluator {
908
+ protected static readonly minSpeedBonus: number;
909
+ }
910
+
911
+ /**
912
+ * An evaluator for calculating osu!droid tap skill.
913
+ */
914
+ declare abstract class DroidTapEvaluator extends SpeedEvaluator {
915
+ /**
916
+ * Evaluates the difficulty of tapping the current object, based on:
917
+ *
918
+ * - time between pressing the previous and current object,
919
+ * - distance between those objects,
920
+ * - and how easily they can be cheesed.
921
+ *
922
+ * @param current The current object.
923
+ * @param greatWindow The great hit window of the current object.
924
+ * @param considerCheesability Whether to consider cheesability.
925
+ */
926
+ static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number, considerCheesability: boolean): number;
927
+ }
928
+
868
929
  /**
869
930
  * Represents the skill required to read every object in the map.
870
931
  */
871
932
  declare class DroidVisual extends DroidSkill {
872
- protected readonly historyLength: number;
873
933
  protected readonly starsPerDouble: number;
874
934
  protected readonly reducedSectionCount: number;
875
935
  protected readonly reducedSectionBaseline: number;
876
936
  protected readonly skillMultiplier: number;
877
937
  protected readonly strainDecayBase: number;
878
- private readonly preempt;
879
938
  private readonly isHidden;
880
- constructor(mods: Mod[], preempt: number);
881
- /**
882
- * @param current The hitobject to calculate.
883
- */
884
- protected strainValueOf(current: DifficultyHitObject): number;
939
+ constructor(mods: Mod[]);
885
940
  protected strainValueAt(current: DifficultyHitObject): number;
886
941
  protected saveToHitObject(current: DifficultyHitObject): void;
887
942
  }
888
943
 
944
+ /**
945
+ * An evaluator for calculating osu!droid Rhythm skill.
946
+ */
947
+ declare abstract class DroidVisualEvaluator {
948
+ /**
949
+ * Evaluates the difficulty of reading the current object, based on:
950
+ *
951
+ * - note density of the current object,
952
+ * - overlapping factor of the current object,
953
+ * - the preempt time of the current object,
954
+ * - the velocity of the current object if it's a slider,
955
+ * - past objects' velocity if they are sliders,
956
+ * - and whether the Hidden mod is enabled.
957
+ *
958
+ * @param current The current object.
959
+ * @param isHiddenMod Whether the Hidden mod is enabled.
960
+ */
961
+ static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
962
+ }
963
+
889
964
  /**
890
965
  * Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
891
966
  * and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
@@ -903,9 +978,9 @@ declare abstract class OsuSkill extends StrainSkill {
903
978
  }
904
979
 
905
980
  /**
906
- * Difficulty calculator for osu!standard gamemode.
981
+ * A difficulty calculator for osu!standard gamemode.
907
982
  */
908
- declare class OsuStarRating extends StarRating {
983
+ declare class OsuDifficultyCalculator extends DifficultyCalculator {
909
984
  /**
910
985
  * The aim star rating of the beatmap.
911
986
  */
@@ -919,24 +994,7 @@ declare class OsuStarRating extends StarRating {
919
994
  */
920
995
  flashlight: number;
921
996
  protected readonly difficultyMultiplier: number;
922
- calculate(params: {
923
- /**
924
- * The beatmap to calculate.
925
- */
926
- map: Beatmap;
927
- /**
928
- * Applied modifications.
929
- */
930
- mods?: Mod[];
931
- /**
932
- * Custom map statistics to apply custom speed multiplier as well as old statistics.
933
- */
934
- stats?: MapStats;
935
- }): this;
936
- /**
937
- * Generates difficulty hitobjects for this calculator.
938
- */
939
- generateDifficultyHitObjects(): void;
997
+ protected readonly mode: modes;
940
998
  /**
941
999
  * Calculates the aim star rating of the beatmap and stores it in this instance.
942
1000
  */
@@ -981,34 +1039,24 @@ declare class OsuStarRating extends StarRating {
981
1039
  }
982
1040
 
983
1041
  /**
984
- * A star rating calculator that configures which mode to calculate difficulty for and what mods are applied.
1042
+ * A difficulty calculator that calculates for both osu!droid and osu!standard gamemode.
985
1043
  */
986
1044
  declare class MapStars {
987
1045
  /**
988
- * The osu!droid star rating of the beatmap.
1046
+ * The osu!droid difficulty calculator of the beatmap.
989
1047
  */
990
- readonly droidStars: DroidStarRating;
1048
+ readonly droid: DroidDifficultyCalculator;
991
1049
  /**
992
- * The osu!standard star rating of the beatmap.
1050
+ * The osu!standard difficulty calculator of the beatmap.
993
1051
  */
994
- readonly pcStars: OsuStarRating;
1052
+ readonly osu: OsuDifficultyCalculator;
995
1053
  /**
996
- * Calculates the star rating of a beatmap.
1054
+ * Constructs this instance and calculates the given beatmap's osu!droid and osu!standard difficulty.
1055
+ *
1056
+ * @param beatmap The beatmap to calculate.
1057
+ * @param options Options for the difficulty calculation.
997
1058
  */
998
- calculate(params: {
999
- /**
1000
- * The beatmap to calculate.
1001
- */
1002
- map: Beatmap;
1003
- /**
1004
- * Applied modifications.
1005
- */
1006
- mods?: Mod[];
1007
- /**
1008
- * Custom map statistics to apply speed multiplier and force AR values as well as old statistics.
1009
- */
1010
- stats?: MapStats;
1011
- }): MapStars;
1059
+ constructor(beatmap: Beatmap, options?: DifficultyCalculationOptions);
1012
1060
  /**
1013
1061
  * Returns a string representative of the class.
1014
1062
  */
@@ -1025,16 +1073,8 @@ declare class OsuAim extends OsuSkill {
1025
1073
  protected readonly reducedSectionBaseline: number;
1026
1074
  protected readonly difficultyMultiplier: number;
1027
1075
  protected readonly decayWeight: number;
1028
- private readonly wideAngleMultiplier;
1029
- private readonly acuteAngleMultiplier;
1030
- private readonly sliderMultiplier;
1031
- private readonly velocityChangeMultiplier;
1032
1076
  private readonly withSliders;
1033
1077
  constructor(mods: Mod[], withSliders: boolean);
1034
- /**
1035
- * @param current The hitobject to calculate.
1036
- */
1037
- protected strainValueOf(current: DifficultyHitObject): number;
1038
1078
  /**
1039
1079
  * @param current The hitobject to calculate.
1040
1080
  */
@@ -1043,28 +1083,38 @@ declare class OsuAim extends OsuSkill {
1043
1083
  * @param current The hitobject to save to.
1044
1084
  */
1045
1085
  protected saveToHitObject(current: DifficultyHitObject): void;
1086
+ }
1087
+
1088
+ /**
1089
+ * An evaluator for calculating osu!standard Aim skill.
1090
+ */
1091
+ declare abstract class OsuAimEvaluator extends AimEvaluator {
1046
1092
  /**
1047
- * Calculates the bonus of wide angles.
1048
- */
1049
- private calculateWideAngleBonus;
1050
- /**
1051
- * Calculates the bonus of acute angles.
1093
+ * Evaluates the difficulty of aiming the current object, based on:
1094
+ *
1095
+ * - cursor velocity to the current object,
1096
+ * - angle difficulty,
1097
+ * - sharp velocity increases,
1098
+ * - and slider difficulty.
1099
+ *
1100
+ * @param current The current object.
1101
+ * @param withSliders Whether to take slider difficulty into account.
1052
1102
  */
1053
- private calculateAcuteAngleBonus;
1103
+ static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
1054
1104
  }
1055
1105
 
1056
1106
  /**
1057
1107
  * Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
1058
1108
  */
1059
1109
  declare class OsuFlashlight extends OsuSkill {
1060
- protected readonly historyLength: number;
1061
1110
  protected readonly skillMultiplier: number;
1062
1111
  protected readonly strainDecayBase: number;
1063
1112
  protected readonly reducedSectionCount: number;
1064
1113
  protected readonly reducedSectionBaseline: number;
1065
1114
  protected readonly difficultyMultiplier: number;
1066
1115
  protected readonly decayWeight: number;
1067
- protected strainValueOf(current: DifficultyHitObject): number;
1116
+ private readonly isHidden;
1117
+ constructor(mods: Mod[]);
1068
1118
  /**
1069
1119
  * @param current The hitobject to calculate.
1070
1120
  */
@@ -1072,12 +1122,27 @@ declare class OsuFlashlight extends OsuSkill {
1072
1122
  protected saveToHitObject(current: DifficultyHitObject): void;
1073
1123
  }
1074
1124
 
1125
+ /**
1126
+ * An evaluator for calculating osu!standard Flashlight skill.
1127
+ */
1128
+ declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
1129
+ /**
1130
+ * Evaluates the difficulty of memorizing and hitting the current object, based on:
1131
+ *
1132
+ * - distance between the previous and the current object,
1133
+ * - the visual opacity of the current object,
1134
+ * - and whether Hidden mod is enabled.
1135
+ *
1136
+ * @param current The current object.
1137
+ * @param isHiddenMod Whether the Hidden mod is enabled.
1138
+ */
1139
+ static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
1140
+ }
1141
+
1075
1142
  /**
1076
1143
  * A performance points calculator that calculates performance points for osu!standard gamemode.
1077
1144
  */
1078
- declare class OsuPerformanceCalculator extends PerformanceCalculator {
1079
- stars: OsuStarRating;
1080
- protected finalMultiplier: number;
1145
+ declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficultyCalculator> {
1081
1146
  /**
1082
1147
  * The aim performance value.
1083
1148
  */
@@ -1094,30 +1159,10 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator {
1094
1159
  * The flashlight performance value.
1095
1160
  */
1096
1161
  flashlight: number;
1097
- calculate(params: {
1098
- /**
1099
- * The star rating instance to calculate.
1100
- */
1101
- stars: OsuStarRating;
1102
- /**
1103
- * The maximum combo achieved in the score.
1104
- */
1105
- combo?: number;
1106
- /**
1107
- * The accuracy achieved in the score.
1108
- */
1109
- accPercent?: Accuracy | number;
1110
- /**
1111
- * The amount of misses achieved in the score.
1112
- */
1113
- miss?: number;
1114
- /**
1115
- * Custom map statistics to apply custom speed multiplier and force AR values as well as old statistics.
1116
- */
1117
- stats?: MapStats;
1118
- }): this;
1162
+ protected finalMultiplier: number;
1163
+ protected readonly mode: modes;
1119
1164
  protected calculateValues(): void;
1120
- protected calculateTotalValue(): number;
1165
+ protected calculateTotalValue(): void;
1121
1166
  /**
1122
1167
  * Calculates the aim performance value of the beatmap.
1123
1168
  */
@@ -1138,22 +1183,30 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator {
1138
1183
  }
1139
1184
 
1140
1185
  /**
1141
- * Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
1186
+ * An evaluator for calculating osu!standard Rhythm skill.
1142
1187
  */
1143
- declare class OsuSpeed extends OsuSkill {
1188
+ declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
1189
+ private static readonly rhythmMultiplier;
1144
1190
  /**
1145
- * Spacing threshold for a single hitobject spacing.
1191
+ * Calculates a rhythm multiplier for the difficulty of the tap associated
1192
+ * with historic data of the current object.
1193
+ *
1194
+ * @param current The current object.
1195
+ * @param greatWindow The great hit window of the current object.
1146
1196
  */
1147
- private readonly SINGLE_SPACING_THRESHOLD;
1148
- protected readonly historyLength: number;
1197
+ static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
1198
+ }
1199
+
1200
+ /**
1201
+ * Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
1202
+ */
1203
+ declare class OsuSpeed extends OsuSkill {
1149
1204
  protected readonly skillMultiplier: number;
1150
1205
  protected readonly strainDecayBase: number;
1151
1206
  protected readonly reducedSectionCount: number;
1152
1207
  protected readonly reducedSectionBaseline: number;
1153
1208
  protected readonly difficultyMultiplier: number;
1154
1209
  protected readonly decayWeight: number;
1155
- private readonly rhythmMultiplier;
1156
- private readonly historyTimeMax;
1157
1210
  private currentSpeedStrain;
1158
1211
  private currentRhythm;
1159
1212
  private readonly minSpeedBonus;
@@ -1162,19 +1215,32 @@ declare class OsuSpeed extends OsuSkill {
1162
1215
  /**
1163
1216
  * @param current The hitobject to calculate.
1164
1217
  */
1165
- protected strainValueOf(current: DifficultyHitObject): number;
1218
+ protected strainValueAt(current: DifficultyHitObject): number;
1166
1219
  /**
1167
- * @param current The hitobject to calculate.
1220
+ * @param current The hitobject to save to.
1168
1221
  */
1169
- protected strainValueAt(current: DifficultyHitObject): number;
1222
+ protected saveToHitObject(current: DifficultyHitObject): void;
1223
+ }
1224
+
1225
+ /**
1226
+ * An evaluator for calculating osu!standard speed skill.
1227
+ */
1228
+ declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
1170
1229
  /**
1171
- * Calculates a rhythm multiplier for the difficulty of the tap associated with historic data of the current object.
1230
+ * Spacing threshold for a single hitobject spacing.
1172
1231
  */
1173
- private calculateRhythmBonus;
1232
+ private static readonly SINGLE_SPACING_THRESHOLD;
1174
1233
  /**
1175
- * @param current The hitobject to save to.
1234
+ * Evaluates the difficulty of tapping the current object, based on:
1235
+ *
1236
+ * - time between pressing the previous and current object,
1237
+ * - distance between those objects,
1238
+ * - and how easily they can be cheesed.
1239
+ *
1240
+ * @param current The current object.
1241
+ * @param greatWindow The great hit window of the current object.
1176
1242
  */
1177
- protected saveToHitObject(current: DifficultyHitObject): void;
1243
+ static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
1178
1244
  }
1179
1245
 
1180
- export { DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidFlashlight, DroidPerformanceCalculator, DroidRhythm, DroidStarRating, DroidTap, DroidVisual, MapStars, OsuAim, OsuFlashlight, OsuPerformanceCalculator, OsuSpeed, OsuStarRating, PerformanceCalculator, StarRating };
1246
+ export { AimEvaluator, CalculationOptions, DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidAimEvaluator, DroidDifficultyCalculator, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, FlashlightEvaluator, MapStars, OsuAim, OsuAimEvaluator, OsuDifficultyCalculator, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, StrainPeaks };