@rian8337/osu-difficulty-calculator 4.0.0-beta.11 → 4.0.0-beta.13
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 +411 -380
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/typings/index.d.ts +147 -143
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.13",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the current difficulty and performance algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"types": "typings/index.d.ts",
|
|
14
14
|
"typedocMain": "src/index.ts",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
15
18
|
"files": [
|
|
16
19
|
"dist/**",
|
|
17
20
|
"typings/**"
|
|
@@ -23,17 +26,17 @@
|
|
|
23
26
|
"scripts": {
|
|
24
27
|
"build": "rollup -c ../../rollup.config.mjs",
|
|
25
28
|
"lint": "eslint --ext ts",
|
|
26
|
-
"
|
|
29
|
+
"prepublishOnly": "npm run build",
|
|
27
30
|
"test": "jest"
|
|
28
31
|
},
|
|
29
32
|
"bugs": {
|
|
30
33
|
"url": "https://github.com/Rian8337/osu-droid-module/issues"
|
|
31
34
|
},
|
|
32
35
|
"dependencies": {
|
|
33
|
-
"@rian8337/osu-base": "^4.0.0-beta.
|
|
36
|
+
"@rian8337/osu-base": "^4.0.0-beta.13"
|
|
34
37
|
},
|
|
35
38
|
"publishConfig": {
|
|
36
39
|
"access": "public"
|
|
37
40
|
},
|
|
38
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e257d4c0d01722835ede297c9347a86668a4647c"
|
|
39
42
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -295,6 +295,28 @@ declare class DifficultyHitObject {
|
|
|
295
295
|
isOverlapping(considerDistance: boolean): boolean;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Represents the strain peaks of various calculated difficulties.
|
|
300
|
+
*/
|
|
301
|
+
interface StrainPeaks {
|
|
302
|
+
/**
|
|
303
|
+
* The strain peaks of aim difficulty if sliders are considered.
|
|
304
|
+
*/
|
|
305
|
+
aimWithSliders: number[];
|
|
306
|
+
/**
|
|
307
|
+
* The strain peaks of aim difficulty if sliders are not considered.
|
|
308
|
+
*/
|
|
309
|
+
aimWithoutSliders: number[];
|
|
310
|
+
/**
|
|
311
|
+
* The strain peaks of speed difficulty.
|
|
312
|
+
*/
|
|
313
|
+
speed: number[];
|
|
314
|
+
/**
|
|
315
|
+
* The strain peaks of flashlight difficulty.
|
|
316
|
+
*/
|
|
317
|
+
flashlight: number[];
|
|
318
|
+
}
|
|
319
|
+
|
|
298
320
|
/**
|
|
299
321
|
* A bare minimal abstract skill for fully custom skill implementations.
|
|
300
322
|
*
|
|
@@ -319,100 +341,7 @@ declare abstract class Skill {
|
|
|
319
341
|
}
|
|
320
342
|
|
|
321
343
|
/**
|
|
322
|
-
*
|
|
323
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
324
|
-
*/
|
|
325
|
-
declare abstract class StrainSkill extends Skill {
|
|
326
|
-
/**
|
|
327
|
-
* The strain of currently calculated hitobject.
|
|
328
|
-
*/
|
|
329
|
-
protected currentStrain: number;
|
|
330
|
-
/**
|
|
331
|
-
* The current section's strain peak.
|
|
332
|
-
*/
|
|
333
|
-
protected currentSectionPeak: number;
|
|
334
|
-
/**
|
|
335
|
-
* Strain peaks are stored here.
|
|
336
|
-
*/
|
|
337
|
-
readonly strainPeaks: number[];
|
|
338
|
-
/**
|
|
339
|
-
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
340
|
-
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
341
|
-
*/
|
|
342
|
-
protected abstract readonly reducedSectionCount: number;
|
|
343
|
-
/**
|
|
344
|
-
* The baseline multiplier applied to the section with the biggest strain.
|
|
345
|
-
*/
|
|
346
|
-
protected abstract readonly reducedSectionBaseline: number;
|
|
347
|
-
/**
|
|
348
|
-
* Strain values are multiplied by this number for the given skill. Used to balance the value of different skills between each other.
|
|
349
|
-
*/
|
|
350
|
-
protected abstract readonly skillMultiplier: number;
|
|
351
|
-
/**
|
|
352
|
-
* Determines how quickly strain decays for the given skill.
|
|
353
|
-
*
|
|
354
|
-
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
355
|
-
*/
|
|
356
|
-
protected abstract readonly strainDecayBase: number;
|
|
357
|
-
private readonly sectionLength;
|
|
358
|
-
private currentSectionEnd;
|
|
359
|
-
/**
|
|
360
|
-
* Calculates the strain value of a hitobject and stores the value in it. This value is affected by previously processed objects.
|
|
361
|
-
*
|
|
362
|
-
* @param current The hitobject to process.
|
|
363
|
-
*/
|
|
364
|
-
process(current: DifficultyHitObject): void;
|
|
365
|
-
/**
|
|
366
|
-
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
367
|
-
*/
|
|
368
|
-
saveCurrentPeak(): void;
|
|
369
|
-
/**
|
|
370
|
-
* Calculates strain decay for a specified time frame.
|
|
371
|
-
*
|
|
372
|
-
* @param ms The time frame to calculate.
|
|
373
|
-
*/
|
|
374
|
-
protected strainDecay(ms: number): number;
|
|
375
|
-
/**
|
|
376
|
-
* Calculates the strain value at a hitobject.
|
|
377
|
-
*/
|
|
378
|
-
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
379
|
-
/**
|
|
380
|
-
* Saves the current strain to a hitobject.
|
|
381
|
-
*/
|
|
382
|
-
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
383
|
-
/**
|
|
384
|
-
* Sets the initial strain level for a new section.
|
|
385
|
-
*
|
|
386
|
-
* @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
|
|
387
|
-
* @param current The current hitobject.
|
|
388
|
-
*/
|
|
389
|
-
private startNewSectionFrom;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Represents the strain peaks of various calculated difficulties.
|
|
394
|
-
*/
|
|
395
|
-
interface StrainPeaks {
|
|
396
|
-
/**
|
|
397
|
-
* The strain peaks of aim difficulty if sliders are considered.
|
|
398
|
-
*/
|
|
399
|
-
aimWithSliders: number[];
|
|
400
|
-
/**
|
|
401
|
-
* The strain peaks of aim difficulty if sliders are not considered.
|
|
402
|
-
*/
|
|
403
|
-
aimWithoutSliders: number[];
|
|
404
|
-
/**
|
|
405
|
-
* The strain peaks of speed difficulty.
|
|
406
|
-
*/
|
|
407
|
-
speed: number[];
|
|
408
|
-
/**
|
|
409
|
-
* The strain peaks of flashlight difficulty.
|
|
410
|
-
*/
|
|
411
|
-
flashlight: number[];
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* The base of difficulty calculators.
|
|
344
|
+
* The base of a difficulty calculator.
|
|
416
345
|
*/
|
|
417
346
|
declare abstract class DifficultyCalculator {
|
|
418
347
|
/**
|
|
@@ -480,7 +409,7 @@ declare abstract class DifficultyCalculator {
|
|
|
480
409
|
*
|
|
481
410
|
* @param skills The skills to calculate.
|
|
482
411
|
*/
|
|
483
|
-
protected calculateSkills(...skills:
|
|
412
|
+
protected calculateSkills(...skills: Skill[]): void;
|
|
484
413
|
/**
|
|
485
414
|
* Calculates the total star rating of the beatmap and stores it in this instance.
|
|
486
415
|
*/
|
|
@@ -496,7 +425,7 @@ declare abstract class DifficultyCalculator {
|
|
|
496
425
|
/**
|
|
497
426
|
* Creates skills to be calculated.
|
|
498
427
|
*/
|
|
499
|
-
protected abstract createSkills():
|
|
428
|
+
protected abstract createSkills(): Skill[];
|
|
500
429
|
/**
|
|
501
430
|
* Populates the stored difficulty attributes with necessary data.
|
|
502
431
|
*/
|
|
@@ -586,6 +515,72 @@ interface DifficultSlider {
|
|
|
586
515
|
readonly difficultyRating: number;
|
|
587
516
|
}
|
|
588
517
|
|
|
518
|
+
/**
|
|
519
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
520
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
521
|
+
*/
|
|
522
|
+
declare abstract class StrainSkill extends Skill {
|
|
523
|
+
/**
|
|
524
|
+
* Strain peaks are stored here.
|
|
525
|
+
*/
|
|
526
|
+
readonly strainPeaks: number[];
|
|
527
|
+
/**
|
|
528
|
+
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
529
|
+
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
530
|
+
*/
|
|
531
|
+
protected abstract readonly reducedSectionCount: number;
|
|
532
|
+
/**
|
|
533
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
534
|
+
*/
|
|
535
|
+
protected abstract readonly reducedSectionBaseline: number;
|
|
536
|
+
/**
|
|
537
|
+
* Determines how quickly strain decays for the given skill.
|
|
538
|
+
*
|
|
539
|
+
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
540
|
+
*/
|
|
541
|
+
protected abstract readonly strainDecayBase: number;
|
|
542
|
+
private readonly sectionLength;
|
|
543
|
+
private currentStrain;
|
|
544
|
+
private currentSectionPeak;
|
|
545
|
+
private currentSectionEnd;
|
|
546
|
+
process(current: DifficultyHitObject): void;
|
|
547
|
+
/**
|
|
548
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
549
|
+
*/
|
|
550
|
+
saveCurrentPeak(): void;
|
|
551
|
+
/**
|
|
552
|
+
* Calculates strain decay for a specified time frame.
|
|
553
|
+
*
|
|
554
|
+
* @param ms The time frame to calculate.
|
|
555
|
+
*/
|
|
556
|
+
protected strainDecay(ms: number): number;
|
|
557
|
+
/**
|
|
558
|
+
* Calculates the strain value at a hitobject.
|
|
559
|
+
*
|
|
560
|
+
* @param current The hitobject to calculate.
|
|
561
|
+
*/
|
|
562
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
563
|
+
/**
|
|
564
|
+
* Saves the current strain to a hitobject.
|
|
565
|
+
*/
|
|
566
|
+
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
567
|
+
/**
|
|
568
|
+
* Retrieves the peak strain at a point in time.
|
|
569
|
+
*
|
|
570
|
+
* @param time The time to retrieve the peak strain at.
|
|
571
|
+
* @param current The current hit object.
|
|
572
|
+
* @returns The peak strain.
|
|
573
|
+
*/
|
|
574
|
+
protected abstract calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
575
|
+
/**
|
|
576
|
+
* Sets the initial strain level for a new section.
|
|
577
|
+
*
|
|
578
|
+
* @param time The beginning of the new section in milliseconds.
|
|
579
|
+
* @param current The current hitobject.
|
|
580
|
+
*/
|
|
581
|
+
private startNewSectionFrom;
|
|
582
|
+
}
|
|
583
|
+
|
|
589
584
|
/**
|
|
590
585
|
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
591
586
|
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
@@ -602,17 +597,16 @@ declare abstract class DroidSkill extends StrainSkill {
|
|
|
602
597
|
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
603
598
|
*/
|
|
604
599
|
declare class DroidAim extends DroidSkill {
|
|
605
|
-
protected readonly skillMultiplier: number;
|
|
606
600
|
protected readonly strainDecayBase: number;
|
|
607
601
|
protected readonly reducedSectionCount: number;
|
|
608
602
|
protected readonly reducedSectionBaseline: number;
|
|
609
603
|
protected readonly starsPerDouble: number;
|
|
604
|
+
private readonly skillMultiplier;
|
|
610
605
|
private readonly withSliders;
|
|
606
|
+
private currentAimStrain;
|
|
611
607
|
constructor(mods: Mod[], withSliders: boolean);
|
|
612
|
-
/**
|
|
613
|
-
* @param current The hitobject to calculate.
|
|
614
|
-
*/
|
|
615
608
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
609
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
616
610
|
/**
|
|
617
611
|
* @param current The hitobject to save to.
|
|
618
612
|
*/
|
|
@@ -626,10 +620,7 @@ declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
|
626
620
|
protected static readonly wideAngleMultiplier: number;
|
|
627
621
|
protected static readonly sliderMultiplier: number;
|
|
628
622
|
protected static readonly velocityChangeMultiplier: number;
|
|
629
|
-
|
|
630
|
-
* Spacing threshold for a single hitobject spacing.
|
|
631
|
-
*/
|
|
632
|
-
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
623
|
+
private static readonly singleSpacingThreshold;
|
|
633
624
|
private static readonly minSpeedBonus;
|
|
634
625
|
/**
|
|
635
626
|
* Evaluates the difficulty of aiming the current object, based on:
|
|
@@ -644,13 +635,13 @@ declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
|
644
635
|
*/
|
|
645
636
|
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
646
637
|
/**
|
|
647
|
-
* Calculates the aim strain of a hitobject.
|
|
638
|
+
* Calculates the snap aim strain of a hitobject.
|
|
648
639
|
*/
|
|
649
|
-
private static
|
|
640
|
+
private static snapAimStrainOf;
|
|
650
641
|
/**
|
|
651
|
-
* Calculates the
|
|
642
|
+
* Calculates the flow aim strain of a hitobject.
|
|
652
643
|
*/
|
|
653
|
-
private static
|
|
644
|
+
private static flowAimStrainOf;
|
|
654
645
|
}
|
|
655
646
|
|
|
656
647
|
/**
|
|
@@ -818,13 +809,13 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
818
809
|
/**
|
|
819
810
|
* Called after tap skill calculation.
|
|
820
811
|
*
|
|
821
|
-
* @param
|
|
812
|
+
* @param tapSkillCheese The tap skill that considers cheesing.
|
|
822
813
|
*/
|
|
823
814
|
private postCalculateTap;
|
|
824
815
|
/**
|
|
825
|
-
* Calculates
|
|
816
|
+
* Calculates tap-related attributes.
|
|
826
817
|
*/
|
|
827
|
-
private
|
|
818
|
+
private calculateTapAttributes;
|
|
828
819
|
/**
|
|
829
820
|
* Calculates the sum of strains for possible three-fingered sections.
|
|
830
821
|
*
|
|
@@ -859,18 +850,17 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
859
850
|
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
860
851
|
*/
|
|
861
852
|
declare class DroidFlashlight extends DroidSkill {
|
|
862
|
-
protected readonly skillMultiplier: number;
|
|
863
853
|
protected readonly strainDecayBase: number;
|
|
864
854
|
protected readonly reducedSectionCount: number;
|
|
865
855
|
protected readonly reducedSectionBaseline: number;
|
|
866
856
|
protected readonly starsPerDouble: number;
|
|
857
|
+
private readonly skillMultiplier;
|
|
867
858
|
private readonly isHidden;
|
|
868
859
|
private readonly withSliders;
|
|
860
|
+
private currentFlashlightStrain;
|
|
869
861
|
constructor(mods: Mod[], withSliders: boolean);
|
|
870
|
-
/**
|
|
871
|
-
* @param current The hitobject to calculate.
|
|
872
|
-
*/
|
|
873
862
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
863
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
874
864
|
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
875
865
|
difficultyValue(): number;
|
|
876
866
|
}
|
|
@@ -999,7 +989,7 @@ declare abstract class PerformanceCalculator {
|
|
|
999
989
|
/**
|
|
1000
990
|
* Calculates the total performance value of the beatmap and stores it in this instance.
|
|
1001
991
|
*/
|
|
1002
|
-
protected abstract calculateTotalValue():
|
|
992
|
+
protected abstract calculateTotalValue(): number;
|
|
1003
993
|
/**
|
|
1004
994
|
* The total hits that can be done in the beatmap.
|
|
1005
995
|
*/
|
|
@@ -1126,7 +1116,7 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1126
1116
|
*/
|
|
1127
1117
|
applyVisualSliderCheesePenalty(value: number): void;
|
|
1128
1118
|
protected calculateValues(): void;
|
|
1129
|
-
protected calculateTotalValue():
|
|
1119
|
+
protected calculateTotalValue(): number;
|
|
1130
1120
|
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
1131
1121
|
/**
|
|
1132
1122
|
* Calculates the aim performance value of the beatmap.
|
|
@@ -1149,13 +1139,26 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1149
1139
|
*/
|
|
1150
1140
|
private calculateVisualValue;
|
|
1151
1141
|
/**
|
|
1152
|
-
* Calculates miss penalty.
|
|
1142
|
+
* Calculates a strain-based miss penalty.
|
|
1153
1143
|
*
|
|
1154
|
-
*
|
|
1144
|
+
* Strain-based miss penalty assumes that a player will miss on the hardest parts of a map,
|
|
1155
1145
|
* so we use the amount of relatively difficult sections to adjust miss penalty
|
|
1156
1146
|
* to make it more punishing on maps with lower amount of hard sections.
|
|
1157
1147
|
*/
|
|
1158
|
-
private
|
|
1148
|
+
private calculateStrainBasedMissPenalty;
|
|
1149
|
+
/**
|
|
1150
|
+
* The object-based proportional miss penalty.
|
|
1151
|
+
*/
|
|
1152
|
+
private get proportionalMissPenalty();
|
|
1153
|
+
/**
|
|
1154
|
+
* Calculates the object-based length scaling based on the deviation of a player for a full
|
|
1155
|
+
* combo in this beatmap, taking retries into account.
|
|
1156
|
+
*
|
|
1157
|
+
* @param objectCount The amount of objects to be considered. Defaults to the amount of
|
|
1158
|
+
* objects in this beatmap.
|
|
1159
|
+
* @param punishForMemorization Whether to punish the deviation for memorization. Defaults to `false`.
|
|
1160
|
+
*/
|
|
1161
|
+
private calculateDeviationBasedLengthScaling;
|
|
1159
1162
|
/**
|
|
1160
1163
|
* Estimates the player's tap deviation based on the OD, number of circles and sliders,
|
|
1161
1164
|
* and number of 300s, 100s, 50s, and misses, assuming the player's mean hit error is 0.
|
|
@@ -1185,15 +1188,16 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
1185
1188
|
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
1186
1189
|
*/
|
|
1187
1190
|
declare class DroidRhythm extends DroidSkill {
|
|
1188
|
-
protected readonly skillMultiplier: number;
|
|
1189
1191
|
protected readonly reducedSectionCount: number;
|
|
1190
1192
|
protected readonly reducedSectionBaseline: number;
|
|
1191
1193
|
protected readonly strainDecayBase: number;
|
|
1192
1194
|
protected readonly starsPerDouble: number;
|
|
1193
|
-
private
|
|
1195
|
+
private currentRhythmStrain;
|
|
1196
|
+
private currentRhythmMultiplier;
|
|
1194
1197
|
private readonly hitWindow;
|
|
1195
1198
|
constructor(mods: Mod[], overallDifficulty: number);
|
|
1196
1199
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1200
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1197
1201
|
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1198
1202
|
}
|
|
1199
1203
|
|
|
@@ -1225,19 +1229,18 @@ declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
|
|
|
1225
1229
|
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1226
1230
|
*/
|
|
1227
1231
|
declare class DroidTap extends DroidSkill {
|
|
1228
|
-
protected readonly skillMultiplier: number;
|
|
1229
1232
|
protected readonly reducedSectionCount: number;
|
|
1230
1233
|
protected readonly reducedSectionBaseline: number;
|
|
1231
1234
|
protected readonly strainDecayBase: number;
|
|
1232
1235
|
protected readonly starsPerDouble: number;
|
|
1233
1236
|
private currentTapStrain;
|
|
1234
|
-
private
|
|
1237
|
+
private currentRhythmMultiplier;
|
|
1238
|
+
private readonly skillMultiplier;
|
|
1235
1239
|
private readonly greatWindow;
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
* @param current The hitobject to calculate.
|
|
1239
|
-
*/
|
|
1240
|
+
private readonly considerCheesability;
|
|
1241
|
+
constructor(mods: Mod[], overallDifficulty: number, considerCheesability: boolean);
|
|
1240
1242
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1243
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1241
1244
|
/**
|
|
1242
1245
|
* @param current The hitobject to save to.
|
|
1243
1246
|
*/
|
|
@@ -1278,12 +1281,15 @@ declare class DroidVisual extends DroidSkill {
|
|
|
1278
1281
|
protected readonly starsPerDouble: number;
|
|
1279
1282
|
protected readonly reducedSectionCount: number;
|
|
1280
1283
|
protected readonly reducedSectionBaseline: number;
|
|
1281
|
-
protected readonly skillMultiplier: number;
|
|
1282
1284
|
protected readonly strainDecayBase: number;
|
|
1283
1285
|
private readonly isHidden;
|
|
1284
|
-
private readonly
|
|
1286
|
+
private readonly withSliders;
|
|
1287
|
+
private currentVisualStrain;
|
|
1288
|
+
private currentRhythmMultiplier;
|
|
1289
|
+
private readonly skillMultiplier;
|
|
1285
1290
|
constructor(mods: Mod[], withSliders: boolean);
|
|
1286
1291
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1292
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1287
1293
|
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1288
1294
|
}
|
|
1289
1295
|
|
|
@@ -1431,18 +1437,16 @@ declare class MapStars {
|
|
|
1431
1437
|
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1432
1438
|
*/
|
|
1433
1439
|
declare class OsuAim extends OsuSkill {
|
|
1434
|
-
protected readonly skillMultiplier: number;
|
|
1435
1440
|
protected readonly strainDecayBase: number;
|
|
1436
1441
|
protected readonly reducedSectionCount: number;
|
|
1437
1442
|
protected readonly reducedSectionBaseline: number;
|
|
1438
|
-
protected readonly difficultyMultiplier: number;
|
|
1439
1443
|
protected readonly decayWeight: number;
|
|
1444
|
+
private currentAimStrain;
|
|
1445
|
+
private readonly skillMultiplier;
|
|
1440
1446
|
private readonly withSliders;
|
|
1441
1447
|
constructor(mods: Mod[], withSliders: boolean);
|
|
1442
|
-
/**
|
|
1443
|
-
* @param current The hitobject to calculate.
|
|
1444
|
-
*/
|
|
1445
1448
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1449
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1446
1450
|
/**
|
|
1447
1451
|
* @param current The hitobject to save to.
|
|
1448
1452
|
*/
|
|
@@ -1471,17 +1475,16 @@ declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
|
1471
1475
|
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1472
1476
|
*/
|
|
1473
1477
|
declare class OsuFlashlight extends OsuSkill {
|
|
1474
|
-
protected readonly skillMultiplier: number;
|
|
1475
1478
|
protected readonly strainDecayBase: number;
|
|
1476
1479
|
protected readonly reducedSectionCount: number;
|
|
1477
1480
|
protected readonly reducedSectionBaseline: number;
|
|
1478
1481
|
protected readonly decayWeight: number;
|
|
1482
|
+
private currentFlashlightStrain;
|
|
1483
|
+
private readonly skillMultiplier;
|
|
1479
1484
|
private readonly isHidden;
|
|
1480
1485
|
constructor(mods: Mod[]);
|
|
1481
|
-
/**
|
|
1482
|
-
* @param current The hitobject to calculate.
|
|
1483
|
-
*/
|
|
1484
1486
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1487
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1485
1488
|
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1486
1489
|
}
|
|
1487
1490
|
|
|
@@ -1527,12 +1530,12 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
|
1527
1530
|
readonly difficultyAttributes: OsuDifficultyAttributes;
|
|
1528
1531
|
protected finalMultiplier: number;
|
|
1529
1532
|
protected readonly mode: Modes;
|
|
1533
|
+
protected calculateValues(): void;
|
|
1534
|
+
protected calculateTotalValue(): number;
|
|
1530
1535
|
/**
|
|
1531
1536
|
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1532
1537
|
*/
|
|
1533
1538
|
constructor(difficultyAttributes: OsuDifficultyAttributes);
|
|
1534
|
-
protected calculateValues(): void;
|
|
1535
|
-
protected calculateTotalValue(): void;
|
|
1536
1539
|
/**
|
|
1537
1540
|
* Calculates the aim performance value of the beatmap.
|
|
1538
1541
|
*/
|
|
@@ -1570,7 +1573,6 @@ declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
|
|
|
1570
1573
|
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1571
1574
|
*/
|
|
1572
1575
|
declare class OsuSpeed extends OsuSkill {
|
|
1573
|
-
protected readonly skillMultiplier: number;
|
|
1574
1576
|
protected readonly strainDecayBase: number;
|
|
1575
1577
|
protected readonly reducedSectionCount: number;
|
|
1576
1578
|
protected readonly reducedSectionBaseline: number;
|
|
@@ -1578,12 +1580,14 @@ declare class OsuSpeed extends OsuSkill {
|
|
|
1578
1580
|
protected readonly decayWeight: number;
|
|
1579
1581
|
private currentSpeedStrain;
|
|
1580
1582
|
private currentRhythm;
|
|
1583
|
+
private readonly skillMultiplier;
|
|
1581
1584
|
private readonly greatWindow;
|
|
1582
1585
|
constructor(mods: Mod[], greatWindow: number);
|
|
1583
1586
|
/**
|
|
1584
1587
|
* @param current The hitobject to calculate.
|
|
1585
1588
|
*/
|
|
1586
1589
|
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1590
|
+
protected calculateInitialStrain(time: number, current: DifficultyHitObject): number;
|
|
1587
1591
|
/**
|
|
1588
1592
|
* @param current The hitobject to save to.
|
|
1589
1593
|
*/
|
|
@@ -1611,4 +1615,4 @@ declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
|
1611
1615
|
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1612
1616
|
}
|
|
1613
1617
|
|
|
1614
|
-
export { AimEvaluator, CalculationOptions, DifficultSlider, DifficultyAttributes, DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidAimEvaluator, DroidDifficultyAttributes, DroidDifficultyCalculator, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, ExtendedDroidDifficultyAttributes, FlashlightEvaluator, HighStrainSection, MapStars, OsuAim, OsuAimEvaluator, OsuDifficultyAttributes, OsuDifficultyCalculator, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, StrainPeaks };
|
|
1618
|
+
export { AimEvaluator, type CalculationOptions, type DifficultSlider, type DifficultyAttributes, type DifficultyCalculationOptions, DifficultyCalculator, DifficultyHitObject, DifficultyHitObjectCreator, DroidAim, DroidAimEvaluator, type DroidDifficultyAttributes, DroidDifficultyCalculator, DroidFlashlight, DroidFlashlightEvaluator, DroidPerformanceCalculator, DroidRhythm, DroidRhythmEvaluator, DroidTap, DroidTapEvaluator, DroidVisual, DroidVisualEvaluator, type ExtendedDroidDifficultyAttributes, FlashlightEvaluator, type HighStrainSection, MapStars, OsuAim, OsuAimEvaluator, type OsuDifficultyAttributes, OsuDifficultyCalculator, OsuFlashlight, OsuFlashlightEvaluator, OsuPerformanceCalculator, OsuRhythmEvaluator, OsuSpeed, OsuSpeedEvaluator, type PerformanceCalculationOptions, PerformanceCalculator, RhythmEvaluator, SpeedEvaluator, type StrainPeaks };
|