@rian8337/osu-difficulty-calculator 3.0.0-beta.14 → 3.0.0-beta.18
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 +2957 -2957
- package/dist/index.js.map +1 -1
- package/package.json +37 -37
- package/typings/index.d.ts +1207 -1207
package/typings/index.d.ts
CHANGED
|
@@ -1,1287 +1,1287 @@
|
|
|
1
|
-
import { MapStats, Mod,
|
|
1
|
+
import { MapStats, Mod, PlaceableHitObject, Beatmap, Modes, HitObject, Accuracy } from '@rian8337/osu-base';
|
|
2
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;
|
|
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
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;
|
|
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
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Represents options for difficulty calculation.
|
|
35
|
-
*/
|
|
36
|
-
interface DifficultyCalculationOptions extends CalculationOptions {
|
|
37
|
-
/**
|
|
38
|
-
* The modifications to apply.
|
|
39
|
-
*/
|
|
40
|
-
mods?: Mod[];
|
|
33
|
+
/**
|
|
34
|
+
* Represents options for difficulty calculation.
|
|
35
|
+
*/
|
|
36
|
+
interface DifficultyCalculationOptions extends CalculationOptions {
|
|
37
|
+
/**
|
|
38
|
+
* The modifications to apply.
|
|
39
|
+
*/
|
|
40
|
+
mods?: Mod[];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Represents an osu!standard hit object with difficulty calculation values.
|
|
45
|
-
*/
|
|
46
|
-
declare class DifficultyHitObject {
|
|
47
|
-
/**
|
|
48
|
-
* The underlying hitobject.
|
|
49
|
-
*/
|
|
50
|
-
readonly object:
|
|
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
|
-
baseTimePreempt: number;
|
|
61
|
-
/**
|
|
62
|
-
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
63
|
-
*/
|
|
64
|
-
timePreempt: number;
|
|
65
|
-
/**
|
|
66
|
-
* The fade in time of the hitobject.
|
|
67
|
-
*/
|
|
68
|
-
timeFadeIn: number;
|
|
69
|
-
/**
|
|
70
|
-
* The aim strain generated by the hitobject if sliders are considered.
|
|
71
|
-
*/
|
|
72
|
-
aimStrainWithSliders: number;
|
|
73
|
-
/**
|
|
74
|
-
* The aim strain generated by the hitobject if sliders are not considered.
|
|
75
|
-
*/
|
|
76
|
-
aimStrainWithoutSliders: number;
|
|
77
|
-
/**
|
|
78
|
-
* The tap strain generated by the hitobject.
|
|
79
|
-
*
|
|
80
|
-
* This is also used for osu!standard as opposed to "speed strain".
|
|
81
|
-
*/
|
|
82
|
-
tapStrain: number;
|
|
83
|
-
/**
|
|
84
|
-
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
85
|
-
* OD. This is used in three-finger detection.
|
|
86
|
-
*/
|
|
87
|
-
originalTapStrain: number;
|
|
88
|
-
/**
|
|
89
|
-
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
90
|
-
*/
|
|
91
|
-
rhythmMultiplier: number;
|
|
92
|
-
/**
|
|
93
|
-
* The rhythm strain generated by the hitobject.
|
|
94
|
-
*/
|
|
95
|
-
rhythmStrain: number;
|
|
96
|
-
/**
|
|
97
|
-
* The flashlight strain generated by the hitobject.
|
|
98
|
-
*/
|
|
99
|
-
flashlightStrain: number;
|
|
100
|
-
/**
|
|
101
|
-
* The visual strain generated by the hitobject.
|
|
102
|
-
*/
|
|
103
|
-
visualStrain: number;
|
|
104
|
-
/**
|
|
105
|
-
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
106
|
-
*
|
|
107
|
-
* The "lazy" end position is the position at which the cursor ends up if the previous hitobject is followed with as minimal movement as possible (i.e. on the edge of slider follow circles).
|
|
108
|
-
*/
|
|
109
|
-
lazyJumpDistance: number;
|
|
110
|
-
/**
|
|
111
|
-
* The normalized shortest distance to consider for a jump between the previous hitobject and this hitobject.
|
|
112
|
-
*
|
|
113
|
-
* This is bounded from above by `lazyJumpDistance`, and is smaller than the former if a more natural path is able to be taken through the previous hitobject.
|
|
114
|
-
*
|
|
115
|
-
* Suppose a linear slider - circle pattern. Following the slider lazily (see: `lazyJumpDistance`) will result in underestimating the true end position of the slider as being closer towards the start position.
|
|
116
|
-
* As a result, `lazyJumpDistance` overestimates the jump distance because the player is able to take a more natural path by following through the slider to its end,
|
|
117
|
-
* such that the jump is felt as only starting from the slider's true end position.
|
|
118
|
-
*
|
|
119
|
-
* Now consider a slider - circle pattern where the circle is stacked along the path inside the slider.
|
|
120
|
-
* In this case, the lazy end position correctly estimates the true end position of the slider and provides the more natural movement path.
|
|
121
|
-
*/
|
|
122
|
-
minimumJumpDistance: number;
|
|
123
|
-
/**
|
|
124
|
-
* The time taken to travel through `minimumJumpDistance`, with a minimum value of 25ms.
|
|
125
|
-
*/
|
|
126
|
-
minimumJumpTime: number;
|
|
127
|
-
/**
|
|
128
|
-
* The normalized distance between the start and end position of this hitobject.
|
|
129
|
-
*/
|
|
130
|
-
travelDistance: number;
|
|
131
|
-
/**
|
|
132
|
-
* The time taken to travel through `travelDistance`, with a minimum value of 25ms for sliders.
|
|
133
|
-
*/
|
|
134
|
-
travelTime: number;
|
|
135
|
-
/**
|
|
136
|
-
* Angle the player has to take to hit this hitobject.
|
|
137
|
-
*
|
|
138
|
-
* Calculated as the angle between the circles (current-2, current-1, current).
|
|
139
|
-
*/
|
|
140
|
-
angle: number | null;
|
|
141
|
-
/**
|
|
142
|
-
* The amount of milliseconds elapsed between this hitobject and the last hitobject.
|
|
143
|
-
*/
|
|
144
|
-
deltaTime: number;
|
|
145
|
-
/**
|
|
146
|
-
* The amount of milliseconds elapsed since the start time of the previous hitobject, with a minimum of 25ms.
|
|
147
|
-
*/
|
|
148
|
-
strainTime: number;
|
|
149
|
-
/**
|
|
150
|
-
* Adjusted start time of the hitobject, taking speed multiplier into account.
|
|
151
|
-
*/
|
|
152
|
-
startTime: number;
|
|
153
|
-
/**
|
|
154
|
-
* Adjusted end time of the hitobject, taking speed multiplier into account.
|
|
155
|
-
*/
|
|
156
|
-
endTime: number;
|
|
157
|
-
/**
|
|
158
|
-
* The note density of the hitobject.
|
|
159
|
-
*/
|
|
160
|
-
noteDensity: number;
|
|
161
|
-
/**
|
|
162
|
-
* The overlapping factor of the hitobject.
|
|
163
|
-
*
|
|
164
|
-
* This is used to scale visual skill.
|
|
165
|
-
*/
|
|
166
|
-
overlappingFactor: number;
|
|
167
|
-
/**
|
|
168
|
-
* Adjusted velocity of the hitobject, taking speed multiplier into account.
|
|
169
|
-
*/
|
|
170
|
-
velocity: number;
|
|
171
|
-
private readonly hitObjects;
|
|
172
|
-
/**
|
|
173
|
-
* @param object The underlying hitobject.
|
|
174
|
-
* @param hitObjects All difficulty hitobjects in the processed beatmap.
|
|
175
|
-
*/
|
|
176
|
-
constructor(object:
|
|
177
|
-
/**
|
|
178
|
-
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
179
|
-
* difficulty hitobject's index.
|
|
180
|
-
*
|
|
181
|
-
* Will return `null` if the index is out of range.
|
|
182
|
-
*
|
|
183
|
-
* @param backwardsIndex The index to move backwards for.
|
|
184
|
-
* @returns The difficulty hitobject at the index with respect to the current
|
|
185
|
-
* difficulty hitobject's index, `null` if the index is out of range.
|
|
186
|
-
*/
|
|
187
|
-
previous(backwardsIndex: number): DifficultyHitObject | null;
|
|
188
|
-
/**
|
|
189
|
-
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
190
|
-
* difficulty hitobject's index.
|
|
191
|
-
*
|
|
192
|
-
* Will return `null` if the index is out of range.
|
|
193
|
-
*
|
|
194
|
-
* @param forwardsIndex The index to move forwards for.
|
|
195
|
-
* @returns The difficulty hitobject at the index with respect to the current
|
|
196
|
-
* difficulty hitobject's index, `null` if the index is out of range.
|
|
197
|
-
*/
|
|
198
|
-
next(forwardsIndex: number): DifficultyHitObject | null;
|
|
199
|
-
/**
|
|
200
|
-
* Calculates the opacity of the hitobject at a given time.
|
|
201
|
-
*
|
|
202
|
-
* @param time The time to calculate the hitobject's opacity at.
|
|
203
|
-
* @param isHidden Whether Hidden mod is used.
|
|
204
|
-
* @returns The opacity of the hitobject at the given time.
|
|
205
|
-
*/
|
|
206
|
-
opacityAt(time: number, isHidden: boolean): number;
|
|
207
|
-
/**
|
|
208
|
-
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
209
|
-
*
|
|
210
|
-
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
211
|
-
* can be hit with just a single tap in osu!droid.
|
|
212
|
-
*
|
|
213
|
-
* @param considerDistance Whether to consider the distance between both hitobjects.
|
|
214
|
-
* @returns Whether the hitobject is considered overlapping.
|
|
215
|
-
*/
|
|
216
|
-
isOverlapping(considerDistance: boolean): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Represents an osu!standard hit object with difficulty calculation values.
|
|
45
|
+
*/
|
|
46
|
+
declare class DifficultyHitObject {
|
|
47
|
+
/**
|
|
48
|
+
* The underlying hitobject.
|
|
49
|
+
*/
|
|
50
|
+
readonly object: PlaceableHitObject;
|
|
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
|
+
baseTimePreempt: number;
|
|
61
|
+
/**
|
|
62
|
+
* Adjusted preempt time of the hitobject, taking speed multiplier into account.
|
|
63
|
+
*/
|
|
64
|
+
timePreempt: number;
|
|
65
|
+
/**
|
|
66
|
+
* The fade in time of the hitobject.
|
|
67
|
+
*/
|
|
68
|
+
timeFadeIn: number;
|
|
69
|
+
/**
|
|
70
|
+
* The aim strain generated by the hitobject if sliders are considered.
|
|
71
|
+
*/
|
|
72
|
+
aimStrainWithSliders: number;
|
|
73
|
+
/**
|
|
74
|
+
* The aim strain generated by the hitobject if sliders are not considered.
|
|
75
|
+
*/
|
|
76
|
+
aimStrainWithoutSliders: number;
|
|
77
|
+
/**
|
|
78
|
+
* The tap strain generated by the hitobject.
|
|
79
|
+
*
|
|
80
|
+
* This is also used for osu!standard as opposed to "speed strain".
|
|
81
|
+
*/
|
|
82
|
+
tapStrain: number;
|
|
83
|
+
/**
|
|
84
|
+
* The tap strain generated by the hitobject if `strainTime` isn't modified by
|
|
85
|
+
* OD. This is used in three-finger detection.
|
|
86
|
+
*/
|
|
87
|
+
originalTapStrain: number;
|
|
88
|
+
/**
|
|
89
|
+
* The rhythm multiplier generated by the hitobject. This is used to alter tap strain.
|
|
90
|
+
*/
|
|
91
|
+
rhythmMultiplier: number;
|
|
92
|
+
/**
|
|
93
|
+
* The rhythm strain generated by the hitobject.
|
|
94
|
+
*/
|
|
95
|
+
rhythmStrain: number;
|
|
96
|
+
/**
|
|
97
|
+
* The flashlight strain generated by the hitobject.
|
|
98
|
+
*/
|
|
99
|
+
flashlightStrain: number;
|
|
100
|
+
/**
|
|
101
|
+
* The visual strain generated by the hitobject.
|
|
102
|
+
*/
|
|
103
|
+
visualStrain: number;
|
|
104
|
+
/**
|
|
105
|
+
* The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
|
|
106
|
+
*
|
|
107
|
+
* The "lazy" end position is the position at which the cursor ends up if the previous hitobject is followed with as minimal movement as possible (i.e. on the edge of slider follow circles).
|
|
108
|
+
*/
|
|
109
|
+
lazyJumpDistance: number;
|
|
110
|
+
/**
|
|
111
|
+
* The normalized shortest distance to consider for a jump between the previous hitobject and this hitobject.
|
|
112
|
+
*
|
|
113
|
+
* This is bounded from above by `lazyJumpDistance`, and is smaller than the former if a more natural path is able to be taken through the previous hitobject.
|
|
114
|
+
*
|
|
115
|
+
* Suppose a linear slider - circle pattern. Following the slider lazily (see: `lazyJumpDistance`) will result in underestimating the true end position of the slider as being closer towards the start position.
|
|
116
|
+
* As a result, `lazyJumpDistance` overestimates the jump distance because the player is able to take a more natural path by following through the slider to its end,
|
|
117
|
+
* such that the jump is felt as only starting from the slider's true end position.
|
|
118
|
+
*
|
|
119
|
+
* Now consider a slider - circle pattern where the circle is stacked along the path inside the slider.
|
|
120
|
+
* In this case, the lazy end position correctly estimates the true end position of the slider and provides the more natural movement path.
|
|
121
|
+
*/
|
|
122
|
+
minimumJumpDistance: number;
|
|
123
|
+
/**
|
|
124
|
+
* The time taken to travel through `minimumJumpDistance`, with a minimum value of 25ms.
|
|
125
|
+
*/
|
|
126
|
+
minimumJumpTime: number;
|
|
127
|
+
/**
|
|
128
|
+
* The normalized distance between the start and end position of this hitobject.
|
|
129
|
+
*/
|
|
130
|
+
travelDistance: number;
|
|
131
|
+
/**
|
|
132
|
+
* The time taken to travel through `travelDistance`, with a minimum value of 25ms for sliders.
|
|
133
|
+
*/
|
|
134
|
+
travelTime: number;
|
|
135
|
+
/**
|
|
136
|
+
* Angle the player has to take to hit this hitobject.
|
|
137
|
+
*
|
|
138
|
+
* Calculated as the angle between the circles (current-2, current-1, current).
|
|
139
|
+
*/
|
|
140
|
+
angle: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* The amount of milliseconds elapsed between this hitobject and the last hitobject.
|
|
143
|
+
*/
|
|
144
|
+
deltaTime: number;
|
|
145
|
+
/**
|
|
146
|
+
* The amount of milliseconds elapsed since the start time of the previous hitobject, with a minimum of 25ms.
|
|
147
|
+
*/
|
|
148
|
+
strainTime: number;
|
|
149
|
+
/**
|
|
150
|
+
* Adjusted start time of the hitobject, taking speed multiplier into account.
|
|
151
|
+
*/
|
|
152
|
+
startTime: number;
|
|
153
|
+
/**
|
|
154
|
+
* Adjusted end time of the hitobject, taking speed multiplier into account.
|
|
155
|
+
*/
|
|
156
|
+
endTime: number;
|
|
157
|
+
/**
|
|
158
|
+
* The note density of the hitobject.
|
|
159
|
+
*/
|
|
160
|
+
noteDensity: number;
|
|
161
|
+
/**
|
|
162
|
+
* The overlapping factor of the hitobject.
|
|
163
|
+
*
|
|
164
|
+
* This is used to scale visual skill.
|
|
165
|
+
*/
|
|
166
|
+
overlappingFactor: number;
|
|
167
|
+
/**
|
|
168
|
+
* Adjusted velocity of the hitobject, taking speed multiplier into account.
|
|
169
|
+
*/
|
|
170
|
+
velocity: number;
|
|
171
|
+
private readonly hitObjects;
|
|
172
|
+
/**
|
|
173
|
+
* @param object The underlying hitobject.
|
|
174
|
+
* @param hitObjects All difficulty hitobjects in the processed beatmap.
|
|
175
|
+
*/
|
|
176
|
+
constructor(object: PlaceableHitObject, hitObjects: DifficultyHitObject[]);
|
|
177
|
+
/**
|
|
178
|
+
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
179
|
+
* difficulty hitobject's index.
|
|
180
|
+
*
|
|
181
|
+
* Will return `null` if the index is out of range.
|
|
182
|
+
*
|
|
183
|
+
* @param backwardsIndex The index to move backwards for.
|
|
184
|
+
* @returns The difficulty hitobject at the index with respect to the current
|
|
185
|
+
* difficulty hitobject's index, `null` if the index is out of range.
|
|
186
|
+
*/
|
|
187
|
+
previous(backwardsIndex: number): DifficultyHitObject | null;
|
|
188
|
+
/**
|
|
189
|
+
* Gets the difficulty hitobject at a specific index with respect to the current
|
|
190
|
+
* difficulty hitobject's index.
|
|
191
|
+
*
|
|
192
|
+
* Will return `null` if the index is out of range.
|
|
193
|
+
*
|
|
194
|
+
* @param forwardsIndex The index to move forwards for.
|
|
195
|
+
* @returns The difficulty hitobject at the index with respect to the current
|
|
196
|
+
* difficulty hitobject's index, `null` if the index is out of range.
|
|
197
|
+
*/
|
|
198
|
+
next(forwardsIndex: number): DifficultyHitObject | null;
|
|
199
|
+
/**
|
|
200
|
+
* Calculates the opacity of the hitobject at a given time.
|
|
201
|
+
*
|
|
202
|
+
* @param time The time to calculate the hitobject's opacity at.
|
|
203
|
+
* @param isHidden Whether Hidden mod is used.
|
|
204
|
+
* @returns The opacity of the hitobject at the given time.
|
|
205
|
+
*/
|
|
206
|
+
opacityAt(time: number, isHidden: boolean): number;
|
|
207
|
+
/**
|
|
208
|
+
* Determines whether this hitobject is considered overlapping with the hitobject before it.
|
|
209
|
+
*
|
|
210
|
+
* Keep in mind that "overlapping" in this case is overlapping to the point where both hitobjects
|
|
211
|
+
* can be hit with just a single tap in osu!droid.
|
|
212
|
+
*
|
|
213
|
+
* @param considerDistance Whether to consider the distance between both hitobjects.
|
|
214
|
+
* @returns Whether the hitobject is considered overlapping.
|
|
215
|
+
*/
|
|
216
|
+
isOverlapping(considerDistance: boolean): boolean;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
/**
|
|
220
|
-
* A bare minimal abstract skill for fully custom skill implementations.
|
|
221
|
-
*
|
|
222
|
-
* This class should be considered a "processing" class and not persisted.
|
|
223
|
-
*/
|
|
224
|
-
declare abstract class Skill {
|
|
225
|
-
/**
|
|
226
|
-
* The mods that this skill processes.
|
|
227
|
-
*/
|
|
228
|
-
protected readonly mods: Mod[];
|
|
229
|
-
constructor(mods: Mod[]);
|
|
230
|
-
/**
|
|
231
|
-
* Processes a hitobject.
|
|
232
|
-
*
|
|
233
|
-
* @param current The hitobject to process.
|
|
234
|
-
*/
|
|
235
|
-
abstract process(current: DifficultyHitObject): void;
|
|
236
|
-
/**
|
|
237
|
-
* Returns the calculated difficulty value representing all hitobjects that have been processed up to this point.
|
|
238
|
-
*/
|
|
239
|
-
abstract difficultyValue(): number;
|
|
219
|
+
/**
|
|
220
|
+
* A bare minimal abstract skill for fully custom skill implementations.
|
|
221
|
+
*
|
|
222
|
+
* This class should be considered a "processing" class and not persisted.
|
|
223
|
+
*/
|
|
224
|
+
declare abstract class Skill {
|
|
225
|
+
/**
|
|
226
|
+
* The mods that this skill processes.
|
|
227
|
+
*/
|
|
228
|
+
protected readonly mods: Mod[];
|
|
229
|
+
constructor(mods: Mod[]);
|
|
230
|
+
/**
|
|
231
|
+
* Processes a hitobject.
|
|
232
|
+
*
|
|
233
|
+
* @param current The hitobject to process.
|
|
234
|
+
*/
|
|
235
|
+
abstract process(current: DifficultyHitObject): void;
|
|
236
|
+
/**
|
|
237
|
+
* Returns the calculated difficulty value representing all hitobjects that have been processed up to this point.
|
|
238
|
+
*/
|
|
239
|
+
abstract difficultyValue(): number;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
/**
|
|
243
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
244
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
245
|
-
*/
|
|
246
|
-
declare abstract class StrainSkill extends Skill {
|
|
247
|
-
/**
|
|
248
|
-
* The strain of currently calculated hitobject.
|
|
249
|
-
*/
|
|
250
|
-
protected currentStrain: number;
|
|
251
|
-
/**
|
|
252
|
-
* The current section's strain peak.
|
|
253
|
-
*/
|
|
254
|
-
protected currentSectionPeak: number;
|
|
255
|
-
/**
|
|
256
|
-
* Strain peaks are stored here.
|
|
257
|
-
*/
|
|
258
|
-
readonly strainPeaks: number[];
|
|
259
|
-
/**
|
|
260
|
-
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
261
|
-
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
262
|
-
*/
|
|
263
|
-
protected abstract readonly reducedSectionCount: number;
|
|
264
|
-
/**
|
|
265
|
-
* The baseline multiplier applied to the section with the biggest strain.
|
|
266
|
-
*/
|
|
267
|
-
protected abstract readonly reducedSectionBaseline: number;
|
|
268
|
-
/**
|
|
269
|
-
* Strain values are multiplied by this number for the given skill. Used to balance the value of different skills between each other.
|
|
270
|
-
*/
|
|
271
|
-
protected abstract readonly skillMultiplier: number;
|
|
272
|
-
/**
|
|
273
|
-
* Determines how quickly strain decays for the given skill.
|
|
274
|
-
*
|
|
275
|
-
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
276
|
-
*/
|
|
277
|
-
protected abstract readonly strainDecayBase: number;
|
|
278
|
-
private readonly sectionLength;
|
|
279
|
-
private currentSectionEnd;
|
|
280
|
-
private isFirstObject;
|
|
281
|
-
/**
|
|
282
|
-
* Calculates the strain value of a hitobject and stores the value in it. This value is affected by previously processed objects.
|
|
283
|
-
*
|
|
284
|
-
* @param current The hitobject to process.
|
|
285
|
-
*/
|
|
286
|
-
process(current: DifficultyHitObject): void;
|
|
287
|
-
/**
|
|
288
|
-
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
289
|
-
*/
|
|
290
|
-
saveCurrentPeak(): void;
|
|
291
|
-
/**
|
|
292
|
-
* Calculates strain decay for a specified time frame.
|
|
293
|
-
*
|
|
294
|
-
* @param ms The time frame to calculate.
|
|
295
|
-
*/
|
|
296
|
-
protected strainDecay(ms: number): number;
|
|
297
|
-
/**
|
|
298
|
-
* Calculates the strain value at a hitobject.
|
|
299
|
-
*/
|
|
300
|
-
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
301
|
-
/**
|
|
302
|
-
* Saves the current strain to a hitobject.
|
|
303
|
-
*/
|
|
304
|
-
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
305
|
-
/**
|
|
306
|
-
* Sets the initial strain level for a new section.
|
|
307
|
-
*
|
|
308
|
-
* @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
|
|
309
|
-
* @param current The current hitobject.
|
|
310
|
-
*/
|
|
311
|
-
private startNewSectionFrom;
|
|
242
|
+
/**
|
|
243
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
244
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
245
|
+
*/
|
|
246
|
+
declare abstract class StrainSkill extends Skill {
|
|
247
|
+
/**
|
|
248
|
+
* The strain of currently calculated hitobject.
|
|
249
|
+
*/
|
|
250
|
+
protected currentStrain: number;
|
|
251
|
+
/**
|
|
252
|
+
* The current section's strain peak.
|
|
253
|
+
*/
|
|
254
|
+
protected currentSectionPeak: number;
|
|
255
|
+
/**
|
|
256
|
+
* Strain peaks are stored here.
|
|
257
|
+
*/
|
|
258
|
+
readonly strainPeaks: number[];
|
|
259
|
+
/**
|
|
260
|
+
* The number of sections with the highest strains, which the peak strain reductions will apply to.
|
|
261
|
+
* This is done in order to decrease their impact on the overall difficulty of the map for this skill.
|
|
262
|
+
*/
|
|
263
|
+
protected abstract readonly reducedSectionCount: number;
|
|
264
|
+
/**
|
|
265
|
+
* The baseline multiplier applied to the section with the biggest strain.
|
|
266
|
+
*/
|
|
267
|
+
protected abstract readonly reducedSectionBaseline: number;
|
|
268
|
+
/**
|
|
269
|
+
* Strain values are multiplied by this number for the given skill. Used to balance the value of different skills between each other.
|
|
270
|
+
*/
|
|
271
|
+
protected abstract readonly skillMultiplier: number;
|
|
272
|
+
/**
|
|
273
|
+
* Determines how quickly strain decays for the given skill.
|
|
274
|
+
*
|
|
275
|
+
* For example, a value of 0.15 indicates that strain decays to 15% of its original value in one second.
|
|
276
|
+
*/
|
|
277
|
+
protected abstract readonly strainDecayBase: number;
|
|
278
|
+
private readonly sectionLength;
|
|
279
|
+
private currentSectionEnd;
|
|
280
|
+
private isFirstObject;
|
|
281
|
+
/**
|
|
282
|
+
* Calculates the strain value of a hitobject and stores the value in it. This value is affected by previously processed objects.
|
|
283
|
+
*
|
|
284
|
+
* @param current The hitobject to process.
|
|
285
|
+
*/
|
|
286
|
+
process(current: DifficultyHitObject): void;
|
|
287
|
+
/**
|
|
288
|
+
* Saves the current peak strain level to the list of strain peaks, which will be used to calculate an overall difficulty.
|
|
289
|
+
*/
|
|
290
|
+
saveCurrentPeak(): void;
|
|
291
|
+
/**
|
|
292
|
+
* Calculates strain decay for a specified time frame.
|
|
293
|
+
*
|
|
294
|
+
* @param ms The time frame to calculate.
|
|
295
|
+
*/
|
|
296
|
+
protected strainDecay(ms: number): number;
|
|
297
|
+
/**
|
|
298
|
+
* Calculates the strain value at a hitobject.
|
|
299
|
+
*/
|
|
300
|
+
protected abstract strainValueAt(current: DifficultyHitObject): number;
|
|
301
|
+
/**
|
|
302
|
+
* Saves the current strain to a hitobject.
|
|
303
|
+
*/
|
|
304
|
+
protected abstract saveToHitObject(current: DifficultyHitObject): void;
|
|
305
|
+
/**
|
|
306
|
+
* Sets the initial strain level for a new section.
|
|
307
|
+
*
|
|
308
|
+
* @param offset The beginning of the new section in milliseconds, adjusted by speed multiplier.
|
|
309
|
+
* @param current The current hitobject.
|
|
310
|
+
*/
|
|
311
|
+
private startNewSectionFrom;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
/**
|
|
315
|
-
* Holds additional data that is used in difficulty calculation.
|
|
316
|
-
*/
|
|
317
|
-
interface DifficultyAttributes {
|
|
318
|
-
speedNoteCount: number;
|
|
319
|
-
sliderFactor: number;
|
|
314
|
+
/**
|
|
315
|
+
* Holds additional data that is used in difficulty calculation.
|
|
316
|
+
*/
|
|
317
|
+
interface DifficultyAttributes {
|
|
318
|
+
speedNoteCount: number;
|
|
319
|
+
sliderFactor: number;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/**
|
|
323
|
-
* Represents the strain peaks of various calculated difficulties.
|
|
324
|
-
*/
|
|
325
|
-
interface StrainPeaks {
|
|
326
|
-
/**
|
|
327
|
-
* The strain peaks of aim difficulty if sliders are considered.
|
|
328
|
-
*/
|
|
329
|
-
aimWithSliders: number[];
|
|
330
|
-
/**
|
|
331
|
-
* The strain peaks of aim difficulty if sliders are not considered.
|
|
332
|
-
*/
|
|
333
|
-
aimWithoutSliders: number[];
|
|
334
|
-
/**
|
|
335
|
-
* The strain peaks of speed difficulty.
|
|
336
|
-
*/
|
|
337
|
-
speed: number[];
|
|
338
|
-
/**
|
|
339
|
-
* The strain peaks of flashlight difficulty.
|
|
340
|
-
*/
|
|
341
|
-
flashlight: number[];
|
|
322
|
+
/**
|
|
323
|
+
* Represents the strain peaks of various calculated difficulties.
|
|
324
|
+
*/
|
|
325
|
+
interface StrainPeaks {
|
|
326
|
+
/**
|
|
327
|
+
* The strain peaks of aim difficulty if sliders are considered.
|
|
328
|
+
*/
|
|
329
|
+
aimWithSliders: number[];
|
|
330
|
+
/**
|
|
331
|
+
* The strain peaks of aim difficulty if sliders are not considered.
|
|
332
|
+
*/
|
|
333
|
+
aimWithoutSliders: number[];
|
|
334
|
+
/**
|
|
335
|
+
* The strain peaks of speed difficulty.
|
|
336
|
+
*/
|
|
337
|
+
speed: number[];
|
|
338
|
+
/**
|
|
339
|
+
* The strain peaks of flashlight difficulty.
|
|
340
|
+
*/
|
|
341
|
+
flashlight: number[];
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
/**
|
|
345
|
-
* The base of difficulty calculators.
|
|
346
|
-
*/
|
|
347
|
-
declare abstract class DifficultyCalculator {
|
|
348
|
-
/**
|
|
349
|
-
* The calculated beatmap.
|
|
350
|
-
*/
|
|
351
|
-
readonly beatmap: Beatmap;
|
|
352
|
-
/**
|
|
353
|
-
* The difficulty objects of the beatmap.
|
|
354
|
-
*/
|
|
355
|
-
readonly objects: DifficultyHitObject[];
|
|
356
|
-
/**
|
|
357
|
-
* The modifications applied.
|
|
358
|
-
*/
|
|
359
|
-
mods: Mod[];
|
|
360
|
-
/**
|
|
361
|
-
* The total star rating of the beatmap.
|
|
362
|
-
*/
|
|
363
|
-
total: number;
|
|
364
|
-
/**
|
|
365
|
-
* The map statistics of the beatmap after modifications are applied.
|
|
366
|
-
*/
|
|
367
|
-
stats: MapStats;
|
|
368
|
-
/**
|
|
369
|
-
* The strain peaks of various calculated difficulties.
|
|
370
|
-
*/
|
|
371
|
-
readonly strainPeaks: StrainPeaks;
|
|
372
|
-
/**
|
|
373
|
-
* Additional data that is used in performance calculation.
|
|
374
|
-
*/
|
|
375
|
-
readonly attributes: DifficultyAttributes;
|
|
376
|
-
protected readonly sectionLength: number;
|
|
377
|
-
protected abstract readonly difficultyMultiplier: number;
|
|
378
|
-
protected abstract readonly mode:
|
|
379
|
-
/**
|
|
380
|
-
* Constructs a new instance of the calculator.
|
|
381
|
-
*
|
|
382
|
-
* @param beatmap The beatmap to calculate. This beatmap will be deep-cloned to prevent reference changes.
|
|
383
|
-
*/
|
|
384
|
-
constructor(beatmap: Beatmap);
|
|
385
|
-
/**
|
|
386
|
-
* Calculates the star rating of the specified beatmap.
|
|
387
|
-
*
|
|
388
|
-
* The beatmap is analyzed in chunks of `sectionLength` duration.
|
|
389
|
-
* For each chunk the highest hitobject strains are added to
|
|
390
|
-
* a list which is then collapsed into a weighted sum, much
|
|
391
|
-
* like scores are weighted on a user's profile.
|
|
392
|
-
*
|
|
393
|
-
* For subsequent chunks, the initial max strain is calculated
|
|
394
|
-
* by decaying the previous hitobject's strain until the
|
|
395
|
-
* beginning of the new chunk.
|
|
396
|
-
*
|
|
397
|
-
* @param options Options for the difficulty calculation.
|
|
398
|
-
* @returns The current instance.
|
|
399
|
-
*/
|
|
400
|
-
calculate(options?: DifficultyCalculationOptions): this;
|
|
401
|
-
/**
|
|
402
|
-
* Generates difficulty hitobjects for this calculator.
|
|
403
|
-
*/
|
|
404
|
-
generateDifficultyHitObjects(): void;
|
|
405
|
-
/**
|
|
406
|
-
* Calculates the skills provided.
|
|
407
|
-
*
|
|
408
|
-
* @param skills The skills to calculate.
|
|
409
|
-
*/
|
|
410
|
-
protected calculateSkills(...skills: StrainSkill[]): void;
|
|
411
|
-
/**
|
|
412
|
-
* Calculates the total star rating of the beatmap and stores it in this instance.
|
|
413
|
-
*/
|
|
414
|
-
abstract calculateTotal(): void;
|
|
415
|
-
/**
|
|
416
|
-
* Calculates every star rating of the beatmap and stores it in this instance.
|
|
417
|
-
*/
|
|
418
|
-
abstract calculateAll(): void;
|
|
419
|
-
/**
|
|
420
|
-
* Returns a string representative of the class.
|
|
421
|
-
*/
|
|
422
|
-
abstract toString(): string;
|
|
423
|
-
/**
|
|
424
|
-
* Creates skills to be calculated.
|
|
425
|
-
*/
|
|
426
|
-
protected abstract createSkills(): StrainSkill[];
|
|
427
|
-
/**
|
|
428
|
-
* Calculates the star rating value of a difficulty.
|
|
429
|
-
*
|
|
430
|
-
* @param difficulty The difficulty to calculate.
|
|
431
|
-
*/
|
|
432
|
-
protected starValue(difficulty: number): number;
|
|
433
|
-
/**
|
|
434
|
-
* Calculates the base performance value of a difficulty rating.
|
|
435
|
-
*
|
|
436
|
-
* @param rating The difficulty rating.
|
|
437
|
-
*/
|
|
438
|
-
protected basePerformanceValue(rating: number): number;
|
|
344
|
+
/**
|
|
345
|
+
* The base of difficulty calculators.
|
|
346
|
+
*/
|
|
347
|
+
declare abstract class DifficultyCalculator {
|
|
348
|
+
/**
|
|
349
|
+
* The calculated beatmap.
|
|
350
|
+
*/
|
|
351
|
+
readonly beatmap: Beatmap;
|
|
352
|
+
/**
|
|
353
|
+
* The difficulty objects of the beatmap.
|
|
354
|
+
*/
|
|
355
|
+
readonly objects: DifficultyHitObject[];
|
|
356
|
+
/**
|
|
357
|
+
* The modifications applied.
|
|
358
|
+
*/
|
|
359
|
+
mods: Mod[];
|
|
360
|
+
/**
|
|
361
|
+
* The total star rating of the beatmap.
|
|
362
|
+
*/
|
|
363
|
+
total: number;
|
|
364
|
+
/**
|
|
365
|
+
* The map statistics of the beatmap after modifications are applied.
|
|
366
|
+
*/
|
|
367
|
+
stats: MapStats;
|
|
368
|
+
/**
|
|
369
|
+
* The strain peaks of various calculated difficulties.
|
|
370
|
+
*/
|
|
371
|
+
readonly strainPeaks: StrainPeaks;
|
|
372
|
+
/**
|
|
373
|
+
* Additional data that is used in performance calculation.
|
|
374
|
+
*/
|
|
375
|
+
readonly attributes: DifficultyAttributes;
|
|
376
|
+
protected readonly sectionLength: number;
|
|
377
|
+
protected abstract readonly difficultyMultiplier: number;
|
|
378
|
+
protected abstract readonly mode: Modes;
|
|
379
|
+
/**
|
|
380
|
+
* Constructs a new instance of the calculator.
|
|
381
|
+
*
|
|
382
|
+
* @param beatmap The beatmap to calculate. This beatmap will be deep-cloned to prevent reference changes.
|
|
383
|
+
*/
|
|
384
|
+
constructor(beatmap: Beatmap);
|
|
385
|
+
/**
|
|
386
|
+
* Calculates the star rating of the specified beatmap.
|
|
387
|
+
*
|
|
388
|
+
* The beatmap is analyzed in chunks of `sectionLength` duration.
|
|
389
|
+
* For each chunk the highest hitobject strains are added to
|
|
390
|
+
* a list which is then collapsed into a weighted sum, much
|
|
391
|
+
* like scores are weighted on a user's profile.
|
|
392
|
+
*
|
|
393
|
+
* For subsequent chunks, the initial max strain is calculated
|
|
394
|
+
* by decaying the previous hitobject's strain until the
|
|
395
|
+
* beginning of the new chunk.
|
|
396
|
+
*
|
|
397
|
+
* @param options Options for the difficulty calculation.
|
|
398
|
+
* @returns The current instance.
|
|
399
|
+
*/
|
|
400
|
+
calculate(options?: DifficultyCalculationOptions): this;
|
|
401
|
+
/**
|
|
402
|
+
* Generates difficulty hitobjects for this calculator.
|
|
403
|
+
*/
|
|
404
|
+
generateDifficultyHitObjects(): void;
|
|
405
|
+
/**
|
|
406
|
+
* Calculates the skills provided.
|
|
407
|
+
*
|
|
408
|
+
* @param skills The skills to calculate.
|
|
409
|
+
*/
|
|
410
|
+
protected calculateSkills(...skills: StrainSkill[]): void;
|
|
411
|
+
/**
|
|
412
|
+
* Calculates the total star rating of the beatmap and stores it in this instance.
|
|
413
|
+
*/
|
|
414
|
+
abstract calculateTotal(): void;
|
|
415
|
+
/**
|
|
416
|
+
* Calculates every star rating of the beatmap and stores it in this instance.
|
|
417
|
+
*/
|
|
418
|
+
abstract calculateAll(): void;
|
|
419
|
+
/**
|
|
420
|
+
* Returns a string representative of the class.
|
|
421
|
+
*/
|
|
422
|
+
abstract toString(): string;
|
|
423
|
+
/**
|
|
424
|
+
* Creates skills to be calculated.
|
|
425
|
+
*/
|
|
426
|
+
protected abstract createSkills(): StrainSkill[];
|
|
427
|
+
/**
|
|
428
|
+
* Calculates the star rating value of a difficulty.
|
|
429
|
+
*
|
|
430
|
+
* @param difficulty The difficulty to calculate.
|
|
431
|
+
*/
|
|
432
|
+
protected starValue(difficulty: number): number;
|
|
433
|
+
/**
|
|
434
|
+
* Calculates the base performance value of a difficulty rating.
|
|
435
|
+
*
|
|
436
|
+
* @param rating The difficulty rating.
|
|
437
|
+
*/
|
|
438
|
+
protected basePerformanceValue(rating: number): number;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
/**
|
|
442
|
-
* A converter used to convert normal hitobjects into difficulty hitobjects.
|
|
443
|
-
*/
|
|
444
|
-
declare class DifficultyHitObjectCreator {
|
|
445
|
-
/**
|
|
446
|
-
* The threshold for small circle buff for osu!droid.
|
|
447
|
-
*/
|
|
448
|
-
private readonly DROID_CIRCLESIZE_BUFF_THRESHOLD;
|
|
449
|
-
/**
|
|
450
|
-
* The threshold for small circle buff for osu!standard.
|
|
451
|
-
*/
|
|
452
|
-
private readonly PC_CIRCLESIZE_BUFF_THRESHOLD;
|
|
453
|
-
/**
|
|
454
|
-
* The gamemode this creator is creating for.
|
|
455
|
-
*/
|
|
456
|
-
private mode;
|
|
457
|
-
/**
|
|
458
|
-
* The base normalized radius of hitobjects.
|
|
459
|
-
*/
|
|
460
|
-
private readonly normalizedRadius;
|
|
461
|
-
private readonly maximumSliderRadius;
|
|
462
|
-
private readonly assumedSliderRadius;
|
|
463
|
-
private readonly minDeltaTime;
|
|
464
|
-
/**
|
|
465
|
-
* Generates difficulty hitobjects for difficulty calculation.
|
|
466
|
-
*/
|
|
467
|
-
generateDifficultyObjects(params: {
|
|
468
|
-
objects: readonly HitObject[];
|
|
469
|
-
circleSize: number;
|
|
470
|
-
mods: Mod[];
|
|
471
|
-
speedMultiplier: number;
|
|
472
|
-
mode:
|
|
473
|
-
preempt?: number;
|
|
474
|
-
}): DifficultyHitObject[];
|
|
475
|
-
/**
|
|
476
|
-
* Calculates a slider's cursor position.
|
|
477
|
-
*/
|
|
478
|
-
private calculateSliderCursorPosition;
|
|
479
|
-
/**
|
|
480
|
-
* Gets the scaling factor of a radius.
|
|
481
|
-
*
|
|
482
|
-
* @param radius The radius to get the scaling factor from.
|
|
483
|
-
*/
|
|
484
|
-
private getScalingFactor;
|
|
485
|
-
/**
|
|
486
|
-
* Returns the end cursor position of a hitobject.
|
|
487
|
-
*/
|
|
488
|
-
private getEndCursorPosition;
|
|
441
|
+
/**
|
|
442
|
+
* A converter used to convert normal hitobjects into difficulty hitobjects.
|
|
443
|
+
*/
|
|
444
|
+
declare class DifficultyHitObjectCreator {
|
|
445
|
+
/**
|
|
446
|
+
* The threshold for small circle buff for osu!droid.
|
|
447
|
+
*/
|
|
448
|
+
private readonly DROID_CIRCLESIZE_BUFF_THRESHOLD;
|
|
449
|
+
/**
|
|
450
|
+
* The threshold for small circle buff for osu!standard.
|
|
451
|
+
*/
|
|
452
|
+
private readonly PC_CIRCLESIZE_BUFF_THRESHOLD;
|
|
453
|
+
/**
|
|
454
|
+
* The gamemode this creator is creating for.
|
|
455
|
+
*/
|
|
456
|
+
private mode;
|
|
457
|
+
/**
|
|
458
|
+
* The base normalized radius of hitobjects.
|
|
459
|
+
*/
|
|
460
|
+
private readonly normalizedRadius;
|
|
461
|
+
private readonly maximumSliderRadius;
|
|
462
|
+
private readonly assumedSliderRadius;
|
|
463
|
+
private readonly minDeltaTime;
|
|
464
|
+
/**
|
|
465
|
+
* Generates difficulty hitobjects for difficulty calculation.
|
|
466
|
+
*/
|
|
467
|
+
generateDifficultyObjects(params: {
|
|
468
|
+
objects: readonly HitObject[];
|
|
469
|
+
circleSize: number;
|
|
470
|
+
mods: Mod[];
|
|
471
|
+
speedMultiplier: number;
|
|
472
|
+
mode: Modes;
|
|
473
|
+
preempt?: number;
|
|
474
|
+
}): DifficultyHitObject[];
|
|
475
|
+
/**
|
|
476
|
+
* Calculates a slider's cursor position.
|
|
477
|
+
*/
|
|
478
|
+
private calculateSliderCursorPosition;
|
|
479
|
+
/**
|
|
480
|
+
* Gets the scaling factor of a radius.
|
|
481
|
+
*
|
|
482
|
+
* @param radius The radius to get the scaling factor from.
|
|
483
|
+
*/
|
|
484
|
+
private getScalingFactor;
|
|
485
|
+
/**
|
|
486
|
+
* Returns the end cursor position of a hitobject.
|
|
487
|
+
*/
|
|
488
|
+
private getEndCursorPosition;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
/**
|
|
492
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
493
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
494
|
-
*/
|
|
495
|
-
declare abstract class DroidSkill extends StrainSkill {
|
|
496
|
-
/**
|
|
497
|
-
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
498
|
-
*/
|
|
499
|
-
protected abstract readonly starsPerDouble: number;
|
|
500
|
-
difficultyValue(): number;
|
|
491
|
+
/**
|
|
492
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
493
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
494
|
+
*/
|
|
495
|
+
declare abstract class DroidSkill extends StrainSkill {
|
|
496
|
+
/**
|
|
497
|
+
* The bonus multiplier that is given for a sequence of notes of equal difficulty.
|
|
498
|
+
*/
|
|
499
|
+
protected abstract readonly starsPerDouble: number;
|
|
500
|
+
difficultyValue(): number;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
/**
|
|
504
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
505
|
-
*/
|
|
506
|
-
declare class DroidAim extends DroidSkill {
|
|
507
|
-
protected readonly skillMultiplier: number;
|
|
508
|
-
protected readonly strainDecayBase: number;
|
|
509
|
-
protected readonly reducedSectionCount: number;
|
|
510
|
-
protected readonly reducedSectionBaseline: number;
|
|
511
|
-
protected readonly starsPerDouble: number;
|
|
512
|
-
private readonly withSliders;
|
|
513
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
514
|
-
/**
|
|
515
|
-
* @param current The hitobject to calculate.
|
|
516
|
-
*/
|
|
517
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
518
|
-
/**
|
|
519
|
-
* @param current The hitobject to save to.
|
|
520
|
-
*/
|
|
521
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
503
|
+
/**
|
|
504
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
505
|
+
*/
|
|
506
|
+
declare class DroidAim extends DroidSkill {
|
|
507
|
+
protected readonly skillMultiplier: number;
|
|
508
|
+
protected readonly strainDecayBase: number;
|
|
509
|
+
protected readonly reducedSectionCount: number;
|
|
510
|
+
protected readonly reducedSectionBaseline: number;
|
|
511
|
+
protected readonly starsPerDouble: number;
|
|
512
|
+
private readonly withSliders;
|
|
513
|
+
constructor(mods: Mod[], withSliders: boolean);
|
|
514
|
+
/**
|
|
515
|
+
* @param current The hitobject to calculate.
|
|
516
|
+
*/
|
|
517
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
518
|
+
/**
|
|
519
|
+
* @param current The hitobject to save to.
|
|
520
|
+
*/
|
|
521
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
/**
|
|
525
|
-
* An evaluator for calculating osu!droid Aim skill.
|
|
526
|
-
*/
|
|
527
|
-
declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
528
|
-
/**
|
|
529
|
-
* Spacing threshold for a single hitobject spacing.
|
|
530
|
-
*/
|
|
531
|
-
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
532
|
-
private static readonly minSpeedBonus;
|
|
533
|
-
/**
|
|
534
|
-
* Evaluates the difficulty of aiming the current object, based on:
|
|
535
|
-
*
|
|
536
|
-
* - cursor velocity to the current object,
|
|
537
|
-
* - angle difficulty,
|
|
538
|
-
* - sharp velocity increases,
|
|
539
|
-
* - and slider difficulty.
|
|
540
|
-
*
|
|
541
|
-
* @param current The current object.
|
|
542
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
543
|
-
*/
|
|
544
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
545
|
-
/**
|
|
546
|
-
* Calculates the aim strain of a hitobject.
|
|
547
|
-
*/
|
|
548
|
-
private static aimStrainOf;
|
|
549
|
-
/**
|
|
550
|
-
* Calculates the movement strain of a hitobject.
|
|
551
|
-
*/
|
|
552
|
-
private static movementStrainOf;
|
|
524
|
+
/**
|
|
525
|
+
* An evaluator for calculating osu!droid Aim skill.
|
|
526
|
+
*/
|
|
527
|
+
declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
528
|
+
/**
|
|
529
|
+
* Spacing threshold for a single hitobject spacing.
|
|
530
|
+
*/
|
|
531
|
+
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
532
|
+
private static readonly minSpeedBonus;
|
|
533
|
+
/**
|
|
534
|
+
* Evaluates the difficulty of aiming the current object, based on:
|
|
535
|
+
*
|
|
536
|
+
* - cursor velocity to the current object,
|
|
537
|
+
* - angle difficulty,
|
|
538
|
+
* - sharp velocity increases,
|
|
539
|
+
* - and slider difficulty.
|
|
540
|
+
*
|
|
541
|
+
* @param current The current object.
|
|
542
|
+
* @param withSliders Whether to take slider difficulty into account.
|
|
543
|
+
*/
|
|
544
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
545
|
+
/**
|
|
546
|
+
* Calculates the aim strain of a hitobject.
|
|
547
|
+
*/
|
|
548
|
+
private static aimStrainOf;
|
|
549
|
+
/**
|
|
550
|
+
* Calculates the movement strain of a hitobject.
|
|
551
|
+
*/
|
|
552
|
+
private static movementStrainOf;
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
/**
|
|
556
|
-
* A difficulty calculator for osu!droid gamemode.
|
|
557
|
-
*/
|
|
558
|
-
declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
559
|
-
/**
|
|
560
|
-
* The aim star rating of the beatmap.
|
|
561
|
-
*/
|
|
562
|
-
aim: number;
|
|
563
|
-
/**
|
|
564
|
-
* The tap star rating of the beatmap.
|
|
565
|
-
*/
|
|
566
|
-
tap: number;
|
|
567
|
-
/**
|
|
568
|
-
* The rhythm star rating of the beatmap.
|
|
569
|
-
*/
|
|
570
|
-
rhythm: number;
|
|
571
|
-
/**
|
|
572
|
-
* The flashlight star rating of the beatmap.
|
|
573
|
-
*/
|
|
574
|
-
flashlight: number;
|
|
575
|
-
/**
|
|
576
|
-
* The visual star rating of the beatmap.
|
|
577
|
-
*/
|
|
578
|
-
visual: number;
|
|
579
|
-
protected readonly difficultyMultiplier: number;
|
|
580
|
-
protected readonly mode:
|
|
581
|
-
/**
|
|
582
|
-
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
583
|
-
*/
|
|
584
|
-
calculateAim(): void;
|
|
585
|
-
/**
|
|
586
|
-
* Calculates the tap star rating of the beatmap and stores it in this instance.
|
|
587
|
-
*/
|
|
588
|
-
calculateTap(): void;
|
|
589
|
-
/**
|
|
590
|
-
* Calculates the rhythm star rating of the beatmap and stores it in this instance.
|
|
591
|
-
*/
|
|
592
|
-
calculateRhythm(): void;
|
|
593
|
-
/**
|
|
594
|
-
* Calculates the flashlight star rating of the beatmap and stores it in this instance.
|
|
595
|
-
*/
|
|
596
|
-
calculateFlashlight(): void;
|
|
597
|
-
/**
|
|
598
|
-
* Calculates the visual star rating of the beatmap and stores it in this instance.
|
|
599
|
-
*/
|
|
600
|
-
calculateVisual(): void;
|
|
601
|
-
calculateTotal(): void;
|
|
602
|
-
calculateAll(): void;
|
|
603
|
-
/**
|
|
604
|
-
* Returns a string representative of the class.
|
|
605
|
-
*/
|
|
606
|
-
toString(): string;
|
|
607
|
-
/**
|
|
608
|
-
* Creates skills to be calculated.
|
|
609
|
-
*/
|
|
610
|
-
protected createSkills(): DroidSkill[];
|
|
611
|
-
/**
|
|
612
|
-
* Called after aim skill calculation.
|
|
613
|
-
*
|
|
614
|
-
* @param aimSkill The aim skill that considers sliders.
|
|
615
|
-
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
616
|
-
*/
|
|
617
|
-
private postCalculateAim;
|
|
618
|
-
/**
|
|
619
|
-
* Called after tap skill calculation.
|
|
620
|
-
*
|
|
621
|
-
* @param tapSkill The tap skill.
|
|
622
|
-
*/
|
|
623
|
-
private postCalculateTap;
|
|
624
|
-
/**
|
|
625
|
-
* Calculates speed-related attributes.
|
|
626
|
-
*/
|
|
627
|
-
private calculateSpeedAttributes;
|
|
628
|
-
/**
|
|
629
|
-
* Called after rhythm skill calculation.
|
|
630
|
-
*
|
|
631
|
-
* @param rhythmSkill The rhythm skill.
|
|
632
|
-
*/
|
|
633
|
-
private postCalculateRhythm;
|
|
634
|
-
/**
|
|
635
|
-
* Called after flashlight skill calculation.
|
|
636
|
-
*
|
|
637
|
-
* @param flashlightSkill The flashlight skill.
|
|
638
|
-
*/
|
|
639
|
-
private postCalculateFlashlight;
|
|
640
|
-
/**
|
|
641
|
-
* Called after visual skill calculation.
|
|
642
|
-
*
|
|
643
|
-
* @param visualSkill The visual skill.
|
|
644
|
-
*/
|
|
645
|
-
private postCalculateVisual;
|
|
555
|
+
/**
|
|
556
|
+
* A difficulty calculator for osu!droid gamemode.
|
|
557
|
+
*/
|
|
558
|
+
declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
559
|
+
/**
|
|
560
|
+
* The aim star rating of the beatmap.
|
|
561
|
+
*/
|
|
562
|
+
aim: number;
|
|
563
|
+
/**
|
|
564
|
+
* The tap star rating of the beatmap.
|
|
565
|
+
*/
|
|
566
|
+
tap: number;
|
|
567
|
+
/**
|
|
568
|
+
* The rhythm star rating of the beatmap.
|
|
569
|
+
*/
|
|
570
|
+
rhythm: number;
|
|
571
|
+
/**
|
|
572
|
+
* The flashlight star rating of the beatmap.
|
|
573
|
+
*/
|
|
574
|
+
flashlight: number;
|
|
575
|
+
/**
|
|
576
|
+
* The visual star rating of the beatmap.
|
|
577
|
+
*/
|
|
578
|
+
visual: number;
|
|
579
|
+
protected readonly difficultyMultiplier: number;
|
|
580
|
+
protected readonly mode: Modes;
|
|
581
|
+
/**
|
|
582
|
+
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
583
|
+
*/
|
|
584
|
+
calculateAim(): void;
|
|
585
|
+
/**
|
|
586
|
+
* Calculates the tap star rating of the beatmap and stores it in this instance.
|
|
587
|
+
*/
|
|
588
|
+
calculateTap(): void;
|
|
589
|
+
/**
|
|
590
|
+
* Calculates the rhythm star rating of the beatmap and stores it in this instance.
|
|
591
|
+
*/
|
|
592
|
+
calculateRhythm(): void;
|
|
593
|
+
/**
|
|
594
|
+
* Calculates the flashlight star rating of the beatmap and stores it in this instance.
|
|
595
|
+
*/
|
|
596
|
+
calculateFlashlight(): void;
|
|
597
|
+
/**
|
|
598
|
+
* Calculates the visual star rating of the beatmap and stores it in this instance.
|
|
599
|
+
*/
|
|
600
|
+
calculateVisual(): void;
|
|
601
|
+
calculateTotal(): void;
|
|
602
|
+
calculateAll(): void;
|
|
603
|
+
/**
|
|
604
|
+
* Returns a string representative of the class.
|
|
605
|
+
*/
|
|
606
|
+
toString(): string;
|
|
607
|
+
/**
|
|
608
|
+
* Creates skills to be calculated.
|
|
609
|
+
*/
|
|
610
|
+
protected createSkills(): DroidSkill[];
|
|
611
|
+
/**
|
|
612
|
+
* Called after aim skill calculation.
|
|
613
|
+
*
|
|
614
|
+
* @param aimSkill The aim skill that considers sliders.
|
|
615
|
+
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
616
|
+
*/
|
|
617
|
+
private postCalculateAim;
|
|
618
|
+
/**
|
|
619
|
+
* Called after tap skill calculation.
|
|
620
|
+
*
|
|
621
|
+
* @param tapSkill The tap skill.
|
|
622
|
+
*/
|
|
623
|
+
private postCalculateTap;
|
|
624
|
+
/**
|
|
625
|
+
* Calculates speed-related attributes.
|
|
626
|
+
*/
|
|
627
|
+
private calculateSpeedAttributes;
|
|
628
|
+
/**
|
|
629
|
+
* Called after rhythm skill calculation.
|
|
630
|
+
*
|
|
631
|
+
* @param rhythmSkill The rhythm skill.
|
|
632
|
+
*/
|
|
633
|
+
private postCalculateRhythm;
|
|
634
|
+
/**
|
|
635
|
+
* Called after flashlight skill calculation.
|
|
636
|
+
*
|
|
637
|
+
* @param flashlightSkill The flashlight skill.
|
|
638
|
+
*/
|
|
639
|
+
private postCalculateFlashlight;
|
|
640
|
+
/**
|
|
641
|
+
* Called after visual skill calculation.
|
|
642
|
+
*
|
|
643
|
+
* @param visualSkill The visual skill.
|
|
644
|
+
*/
|
|
645
|
+
private postCalculateVisual;
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
/**
|
|
649
|
-
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
650
|
-
*/
|
|
651
|
-
declare class DroidFlashlight extends DroidSkill {
|
|
652
|
-
protected readonly skillMultiplier: number;
|
|
653
|
-
protected readonly strainDecayBase: number;
|
|
654
|
-
protected readonly reducedSectionCount: number;
|
|
655
|
-
protected readonly reducedSectionBaseline: number;
|
|
656
|
-
protected readonly starsPerDouble: number;
|
|
657
|
-
private readonly isHidden;
|
|
658
|
-
constructor(mods: Mod[]);
|
|
659
|
-
/**
|
|
660
|
-
* @param current The hitobject to calculate.
|
|
661
|
-
*/
|
|
662
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
663
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
648
|
+
/**
|
|
649
|
+
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
650
|
+
*/
|
|
651
|
+
declare class DroidFlashlight extends DroidSkill {
|
|
652
|
+
protected readonly skillMultiplier: number;
|
|
653
|
+
protected readonly strainDecayBase: number;
|
|
654
|
+
protected readonly reducedSectionCount: number;
|
|
655
|
+
protected readonly reducedSectionBaseline: number;
|
|
656
|
+
protected readonly starsPerDouble: number;
|
|
657
|
+
private readonly isHidden;
|
|
658
|
+
constructor(mods: Mod[]);
|
|
659
|
+
/**
|
|
660
|
+
* @param current The hitobject to calculate.
|
|
661
|
+
*/
|
|
662
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
663
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
/**
|
|
667
|
-
* An evaluator for calculating flashlight skill.
|
|
668
|
-
*
|
|
669
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
670
|
-
*/
|
|
671
|
-
declare abstract class FlashlightEvaluator {
|
|
672
|
-
protected static readonly maxOpacityBonus: number;
|
|
673
|
-
protected static readonly hiddenBonus: number;
|
|
666
|
+
/**
|
|
667
|
+
* An evaluator for calculating flashlight skill.
|
|
668
|
+
*
|
|
669
|
+
* This class should be considered an "evaluating" class and not persisted.
|
|
670
|
+
*/
|
|
671
|
+
declare abstract class FlashlightEvaluator {
|
|
672
|
+
protected static readonly maxOpacityBonus: number;
|
|
673
|
+
protected static readonly hiddenBonus: number;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
-
/**
|
|
677
|
-
* An evaluator for calculating osu!droid Flashlight skill.
|
|
678
|
-
*/
|
|
679
|
-
declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
|
|
680
|
-
/**
|
|
681
|
-
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
682
|
-
*
|
|
683
|
-
* - distance between the previous and the current object,
|
|
684
|
-
* - the visual opacity of the current object,
|
|
685
|
-
* - and whether Hidden mod is enabled.
|
|
686
|
-
*
|
|
687
|
-
* @param current The current object.
|
|
688
|
-
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
689
|
-
*/
|
|
690
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
676
|
+
/**
|
|
677
|
+
* An evaluator for calculating osu!droid Flashlight skill.
|
|
678
|
+
*/
|
|
679
|
+
declare abstract class DroidFlashlightEvaluator extends FlashlightEvaluator {
|
|
680
|
+
/**
|
|
681
|
+
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
682
|
+
*
|
|
683
|
+
* - distance between the previous and the current object,
|
|
684
|
+
* - the visual opacity of the current object,
|
|
685
|
+
* - and whether Hidden mod is enabled.
|
|
686
|
+
*
|
|
687
|
+
* @param current The current object.
|
|
688
|
+
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
689
|
+
*/
|
|
690
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
/**
|
|
694
|
-
* Represents options for performance calculation.
|
|
695
|
-
*/
|
|
696
|
-
interface PerformanceCalculationOptions {
|
|
697
|
-
/**
|
|
698
|
-
* The maximum combo achieved in the score.
|
|
699
|
-
*/
|
|
700
|
-
combo?: number;
|
|
701
|
-
/**
|
|
702
|
-
* The accuracy achieved in the score.
|
|
703
|
-
*/
|
|
704
|
-
accPercent?: Accuracy | number;
|
|
705
|
-
/**
|
|
706
|
-
* The amount of misses achieved in the score.
|
|
707
|
-
*/
|
|
708
|
-
miss?: number;
|
|
709
|
-
/**
|
|
710
|
-
* The tap penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
711
|
-
*/
|
|
712
|
-
tapPenalty?: number;
|
|
693
|
+
/**
|
|
694
|
+
* Represents options for performance calculation.
|
|
695
|
+
*/
|
|
696
|
+
interface PerformanceCalculationOptions {
|
|
697
|
+
/**
|
|
698
|
+
* The maximum combo achieved in the score.
|
|
699
|
+
*/
|
|
700
|
+
combo?: number;
|
|
701
|
+
/**
|
|
702
|
+
* The accuracy achieved in the score.
|
|
703
|
+
*/
|
|
704
|
+
accPercent?: Accuracy | number;
|
|
705
|
+
/**
|
|
706
|
+
* The amount of misses achieved in the score.
|
|
707
|
+
*/
|
|
708
|
+
miss?: number;
|
|
709
|
+
/**
|
|
710
|
+
* The tap penalty to apply for penalized scores. Only used when using `DroidPerformanceCalculator`.
|
|
711
|
+
*/
|
|
712
|
+
tapPenalty?: number;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
/**
|
|
716
|
-
* The base class of performance calculators.
|
|
717
|
-
*/
|
|
718
|
-
declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
719
|
-
/**
|
|
720
|
-
* The overall performance value.
|
|
721
|
-
*/
|
|
722
|
-
total: number;
|
|
723
|
-
/**
|
|
724
|
-
* The calculated accuracy.
|
|
725
|
-
*/
|
|
726
|
-
computedAccuracy: Accuracy;
|
|
727
|
-
/**
|
|
728
|
-
* The difficulty calculator that is being calculated.
|
|
729
|
-
*/
|
|
730
|
-
readonly difficultyCalculator: T;
|
|
731
|
-
/**
|
|
732
|
-
* Penalty for combo breaks.
|
|
733
|
-
*/
|
|
734
|
-
protected comboPenalty: number;
|
|
735
|
-
/**
|
|
736
|
-
* The global multiplier to be applied to the final performance value.
|
|
737
|
-
*
|
|
738
|
-
* This is being adjusted to keep the final value scaled around what it used to be when changing things.
|
|
739
|
-
*/
|
|
740
|
-
protected abstract finalMultiplier: number;
|
|
741
|
-
/**
|
|
742
|
-
* The gamemode to calculate for.
|
|
743
|
-
*/
|
|
744
|
-
protected abstract readonly mode:
|
|
745
|
-
/**
|
|
746
|
-
* The amount of misses that are filtered out from sliderbreaks.
|
|
747
|
-
*/
|
|
748
|
-
protected effectiveMissCount: number;
|
|
749
|
-
/**
|
|
750
|
-
* Nerf factor used for nerfing beatmaps with very likely dropped sliderends.
|
|
751
|
-
*/
|
|
752
|
-
protected sliderNerfFactor: number;
|
|
753
|
-
/**
|
|
754
|
-
* @param difficultyCalculator The difficulty calculator to calculate.
|
|
755
|
-
*/
|
|
756
|
-
constructor(difficultyCalculator: T);
|
|
757
|
-
/**
|
|
758
|
-
* Calculates the performance points of the beatmap.
|
|
759
|
-
*
|
|
760
|
-
* @param options Options for performance calculation.
|
|
761
|
-
* @returns The current instance.
|
|
762
|
-
*/
|
|
763
|
-
calculate(options?: PerformanceCalculationOptions): this;
|
|
764
|
-
/**
|
|
765
|
-
* Returns a string representative of the class.
|
|
766
|
-
*/
|
|
767
|
-
abstract toString(): string;
|
|
768
|
-
/**
|
|
769
|
-
* Calculates all values that will be used for calculating the total
|
|
770
|
-
* performance value of the beatmap and stores them in this instance.
|
|
771
|
-
*/
|
|
772
|
-
protected abstract calculateValues(): void;
|
|
773
|
-
/**
|
|
774
|
-
* Calculates the total performance value of the beatmap and stores it in this instance.
|
|
775
|
-
*/
|
|
776
|
-
protected abstract calculateTotalValue(): void;
|
|
777
|
-
/**
|
|
778
|
-
* Calculates the base performance value of a star rating.
|
|
779
|
-
*/
|
|
780
|
-
protected baseValue(stars: number): number;
|
|
781
|
-
/**
|
|
782
|
-
* Processes given options for usage in performance calculation.
|
|
783
|
-
*
|
|
784
|
-
* @param options Options for performance calculation.
|
|
785
|
-
*/
|
|
786
|
-
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
787
|
-
/**
|
|
788
|
-
* Calculates the amount of misses + sliderbreaks from combo.
|
|
789
|
-
*/
|
|
790
|
-
private calculateEffectiveMissCount;
|
|
715
|
+
/**
|
|
716
|
+
* The base class of performance calculators.
|
|
717
|
+
*/
|
|
718
|
+
declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
719
|
+
/**
|
|
720
|
+
* The overall performance value.
|
|
721
|
+
*/
|
|
722
|
+
total: number;
|
|
723
|
+
/**
|
|
724
|
+
* The calculated accuracy.
|
|
725
|
+
*/
|
|
726
|
+
computedAccuracy: Accuracy;
|
|
727
|
+
/**
|
|
728
|
+
* The difficulty calculator that is being calculated.
|
|
729
|
+
*/
|
|
730
|
+
readonly difficultyCalculator: T;
|
|
731
|
+
/**
|
|
732
|
+
* Penalty for combo breaks.
|
|
733
|
+
*/
|
|
734
|
+
protected comboPenalty: number;
|
|
735
|
+
/**
|
|
736
|
+
* The global multiplier to be applied to the final performance value.
|
|
737
|
+
*
|
|
738
|
+
* This is being adjusted to keep the final value scaled around what it used to be when changing things.
|
|
739
|
+
*/
|
|
740
|
+
protected abstract finalMultiplier: number;
|
|
741
|
+
/**
|
|
742
|
+
* The gamemode to calculate for.
|
|
743
|
+
*/
|
|
744
|
+
protected abstract readonly mode: Modes;
|
|
745
|
+
/**
|
|
746
|
+
* The amount of misses that are filtered out from sliderbreaks.
|
|
747
|
+
*/
|
|
748
|
+
protected effectiveMissCount: number;
|
|
749
|
+
/**
|
|
750
|
+
* Nerf factor used for nerfing beatmaps with very likely dropped sliderends.
|
|
751
|
+
*/
|
|
752
|
+
protected sliderNerfFactor: number;
|
|
753
|
+
/**
|
|
754
|
+
* @param difficultyCalculator The difficulty calculator to calculate.
|
|
755
|
+
*/
|
|
756
|
+
constructor(difficultyCalculator: T);
|
|
757
|
+
/**
|
|
758
|
+
* Calculates the performance points of the beatmap.
|
|
759
|
+
*
|
|
760
|
+
* @param options Options for performance calculation.
|
|
761
|
+
* @returns The current instance.
|
|
762
|
+
*/
|
|
763
|
+
calculate(options?: PerformanceCalculationOptions): this;
|
|
764
|
+
/**
|
|
765
|
+
* Returns a string representative of the class.
|
|
766
|
+
*/
|
|
767
|
+
abstract toString(): string;
|
|
768
|
+
/**
|
|
769
|
+
* Calculates all values that will be used for calculating the total
|
|
770
|
+
* performance value of the beatmap and stores them in this instance.
|
|
771
|
+
*/
|
|
772
|
+
protected abstract calculateValues(): void;
|
|
773
|
+
/**
|
|
774
|
+
* Calculates the total performance value of the beatmap and stores it in this instance.
|
|
775
|
+
*/
|
|
776
|
+
protected abstract calculateTotalValue(): void;
|
|
777
|
+
/**
|
|
778
|
+
* Calculates the base performance value of a star rating.
|
|
779
|
+
*/
|
|
780
|
+
protected baseValue(stars: number): number;
|
|
781
|
+
/**
|
|
782
|
+
* Processes given options for usage in performance calculation.
|
|
783
|
+
*
|
|
784
|
+
* @param options Options for performance calculation.
|
|
785
|
+
*/
|
|
786
|
+
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
787
|
+
/**
|
|
788
|
+
* Calculates the amount of misses + sliderbreaks from combo.
|
|
789
|
+
*/
|
|
790
|
+
private calculateEffectiveMissCount;
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
-
/**
|
|
794
|
-
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
795
|
-
*/
|
|
796
|
-
declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDifficultyCalculator> {
|
|
797
|
-
/**
|
|
798
|
-
* The aim performance value.
|
|
799
|
-
*/
|
|
800
|
-
aim: number;
|
|
801
|
-
/**
|
|
802
|
-
* The tap performance value.
|
|
803
|
-
*/
|
|
804
|
-
tap: number;
|
|
805
|
-
/**
|
|
806
|
-
* The accuracy performance value.
|
|
807
|
-
*/
|
|
808
|
-
accuracy: number;
|
|
809
|
-
/**
|
|
810
|
-
* The flashlight performance value.
|
|
811
|
-
*/
|
|
812
|
-
flashlight: number;
|
|
813
|
-
/**
|
|
814
|
-
* The visual performance value.
|
|
815
|
-
*/
|
|
816
|
-
visual: number;
|
|
817
|
-
/**
|
|
818
|
-
* The penalty used to penalize the tap performance value.
|
|
819
|
-
*
|
|
820
|
-
* Can be properly obtained by analyzing the replay associated with the score.
|
|
821
|
-
*/
|
|
822
|
-
get tapPenalty(): number;
|
|
823
|
-
private _tapPenalty;
|
|
824
|
-
protected finalMultiplier: number;
|
|
825
|
-
protected readonly mode:
|
|
826
|
-
/**
|
|
827
|
-
* Applies a tap penalty value to this calculator.
|
|
828
|
-
*
|
|
829
|
-
* The total performance value will be recalculated afterwards.
|
|
830
|
-
*
|
|
831
|
-
* @param value The tap penalty value. Must be greater than 0.
|
|
832
|
-
*/
|
|
833
|
-
applyTapPenalty(value: number): void;
|
|
834
|
-
protected calculateValues(): void;
|
|
835
|
-
protected calculateTotalValue(): void;
|
|
836
|
-
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
837
|
-
/**
|
|
838
|
-
* Calculates the aim performance value of the beatmap.
|
|
839
|
-
*/
|
|
840
|
-
private calculateAimValue;
|
|
841
|
-
/**
|
|
842
|
-
* Calculates the tap performance value of the beatmap.
|
|
843
|
-
*/
|
|
844
|
-
private calculateTapValue;
|
|
845
|
-
/**
|
|
846
|
-
* Calculates the accuracy performance value of the beatmap.
|
|
847
|
-
*/
|
|
848
|
-
private calculateAccuracyValue;
|
|
849
|
-
/**
|
|
850
|
-
* Calculates the flashlight performance value of the beatmap.
|
|
851
|
-
*/
|
|
852
|
-
private calculateFlashlightValue;
|
|
853
|
-
/**
|
|
854
|
-
* Calculates the visual performance value of the beatmap.
|
|
855
|
-
*/
|
|
856
|
-
private calculateVisualValue;
|
|
857
|
-
toString(): string;
|
|
793
|
+
/**
|
|
794
|
+
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
795
|
+
*/
|
|
796
|
+
declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDifficultyCalculator> {
|
|
797
|
+
/**
|
|
798
|
+
* The aim performance value.
|
|
799
|
+
*/
|
|
800
|
+
aim: number;
|
|
801
|
+
/**
|
|
802
|
+
* The tap performance value.
|
|
803
|
+
*/
|
|
804
|
+
tap: number;
|
|
805
|
+
/**
|
|
806
|
+
* The accuracy performance value.
|
|
807
|
+
*/
|
|
808
|
+
accuracy: number;
|
|
809
|
+
/**
|
|
810
|
+
* The flashlight performance value.
|
|
811
|
+
*/
|
|
812
|
+
flashlight: number;
|
|
813
|
+
/**
|
|
814
|
+
* The visual performance value.
|
|
815
|
+
*/
|
|
816
|
+
visual: number;
|
|
817
|
+
/**
|
|
818
|
+
* The penalty used to penalize the tap performance value.
|
|
819
|
+
*
|
|
820
|
+
* Can be properly obtained by analyzing the replay associated with the score.
|
|
821
|
+
*/
|
|
822
|
+
get tapPenalty(): number;
|
|
823
|
+
private _tapPenalty;
|
|
824
|
+
protected finalMultiplier: number;
|
|
825
|
+
protected readonly mode: Modes;
|
|
826
|
+
/**
|
|
827
|
+
* Applies a tap penalty value to this calculator.
|
|
828
|
+
*
|
|
829
|
+
* The total performance value will be recalculated afterwards.
|
|
830
|
+
*
|
|
831
|
+
* @param value The tap penalty value. Must be greater than 0.
|
|
832
|
+
*/
|
|
833
|
+
applyTapPenalty(value: number): void;
|
|
834
|
+
protected calculateValues(): void;
|
|
835
|
+
protected calculateTotalValue(): void;
|
|
836
|
+
protected handleOptions(options?: PerformanceCalculationOptions): void;
|
|
837
|
+
/**
|
|
838
|
+
* Calculates the aim performance value of the beatmap.
|
|
839
|
+
*/
|
|
840
|
+
private calculateAimValue;
|
|
841
|
+
/**
|
|
842
|
+
* Calculates the tap performance value of the beatmap.
|
|
843
|
+
*/
|
|
844
|
+
private calculateTapValue;
|
|
845
|
+
/**
|
|
846
|
+
* Calculates the accuracy performance value of the beatmap.
|
|
847
|
+
*/
|
|
848
|
+
private calculateAccuracyValue;
|
|
849
|
+
/**
|
|
850
|
+
* Calculates the flashlight performance value of the beatmap.
|
|
851
|
+
*/
|
|
852
|
+
private calculateFlashlightValue;
|
|
853
|
+
/**
|
|
854
|
+
* Calculates the visual performance value of the beatmap.
|
|
855
|
+
*/
|
|
856
|
+
private calculateVisualValue;
|
|
857
|
+
toString(): string;
|
|
858
858
|
}
|
|
859
859
|
|
|
860
|
-
/**
|
|
861
|
-
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
862
|
-
*/
|
|
863
|
-
declare class DroidRhythm extends DroidSkill {
|
|
864
|
-
protected readonly skillMultiplier: number;
|
|
865
|
-
protected readonly reducedSectionCount: number;
|
|
866
|
-
protected readonly reducedSectionBaseline: number;
|
|
867
|
-
protected readonly strainDecayBase: number;
|
|
868
|
-
protected readonly starsPerDouble: number;
|
|
869
|
-
private currentRhythm;
|
|
870
|
-
private readonly hitWindow;
|
|
871
|
-
constructor(mods: Mod[], overallDifficulty: number);
|
|
872
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
873
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
860
|
+
/**
|
|
861
|
+
* Represents the skill required to properly follow a beatmap's rhythm.
|
|
862
|
+
*/
|
|
863
|
+
declare class DroidRhythm extends DroidSkill {
|
|
864
|
+
protected readonly skillMultiplier: number;
|
|
865
|
+
protected readonly reducedSectionCount: number;
|
|
866
|
+
protected readonly reducedSectionBaseline: number;
|
|
867
|
+
protected readonly strainDecayBase: number;
|
|
868
|
+
protected readonly starsPerDouble: number;
|
|
869
|
+
private currentRhythm;
|
|
870
|
+
private readonly hitWindow;
|
|
871
|
+
constructor(mods: Mod[], overallDifficulty: number);
|
|
872
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
873
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
874
874
|
}
|
|
875
875
|
|
|
876
|
-
/**
|
|
877
|
-
* An evaluator for calculating rhythm skill.
|
|
878
|
-
*
|
|
879
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
880
|
-
*/
|
|
881
|
-
declare abstract class RhythmEvaluator {
|
|
882
|
-
protected static readonly historyTimeMax: number;
|
|
876
|
+
/**
|
|
877
|
+
* An evaluator for calculating rhythm skill.
|
|
878
|
+
*
|
|
879
|
+
* This class should be considered an "evaluating" class and not persisted.
|
|
880
|
+
*/
|
|
881
|
+
declare abstract class RhythmEvaluator {
|
|
882
|
+
protected static readonly historyTimeMax: number;
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
/**
|
|
886
|
-
* An evaluator for calculating osu!droid Rhythm skill.
|
|
887
|
-
*/
|
|
888
|
-
declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
|
|
889
|
-
/**
|
|
890
|
-
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
891
|
-
* with historic data of the current object.
|
|
892
|
-
*
|
|
893
|
-
* @param current The current object.
|
|
894
|
-
* @param greatWindow The great hit window of the current object.
|
|
895
|
-
*/
|
|
896
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
897
|
-
/**
|
|
898
|
-
* Calculates the rhythm multiplier of a given hit window.
|
|
899
|
-
*
|
|
900
|
-
* @param greatWindow The great hit window.
|
|
901
|
-
*/
|
|
902
|
-
private static calculateRhythmMultiplier;
|
|
885
|
+
/**
|
|
886
|
+
* An evaluator for calculating osu!droid Rhythm skill.
|
|
887
|
+
*/
|
|
888
|
+
declare abstract class DroidRhythmEvaluator extends RhythmEvaluator {
|
|
889
|
+
/**
|
|
890
|
+
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
891
|
+
* with historic data of the current object.
|
|
892
|
+
*
|
|
893
|
+
* @param current The current object.
|
|
894
|
+
* @param greatWindow The great hit window of the current object.
|
|
895
|
+
*/
|
|
896
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
897
|
+
/**
|
|
898
|
+
* Calculates the rhythm multiplier of a given hit window.
|
|
899
|
+
*
|
|
900
|
+
* @param greatWindow The great hit window.
|
|
901
|
+
*/
|
|
902
|
+
private static calculateRhythmMultiplier;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
/**
|
|
906
|
-
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
907
|
-
*/
|
|
908
|
-
declare class DroidTap extends DroidSkill {
|
|
909
|
-
protected readonly skillMultiplier: number;
|
|
910
|
-
protected readonly reducedSectionCount: number;
|
|
911
|
-
protected readonly reducedSectionBaseline: number;
|
|
912
|
-
protected readonly strainDecayBase: number;
|
|
913
|
-
protected readonly starsPerDouble: number;
|
|
914
|
-
private currentTapStrain;
|
|
915
|
-
private currentOriginalTapStrain;
|
|
916
|
-
private readonly greatWindow;
|
|
917
|
-
constructor(mods: Mod[], overallDifficulty: number);
|
|
918
|
-
/**
|
|
919
|
-
* @param current The hitobject to calculate.
|
|
920
|
-
*/
|
|
921
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
922
|
-
/**
|
|
923
|
-
* @param current The hitobject to save to.
|
|
924
|
-
*/
|
|
925
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
905
|
+
/**
|
|
906
|
+
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
907
|
+
*/
|
|
908
|
+
declare class DroidTap extends DroidSkill {
|
|
909
|
+
protected readonly skillMultiplier: number;
|
|
910
|
+
protected readonly reducedSectionCount: number;
|
|
911
|
+
protected readonly reducedSectionBaseline: number;
|
|
912
|
+
protected readonly strainDecayBase: number;
|
|
913
|
+
protected readonly starsPerDouble: number;
|
|
914
|
+
private currentTapStrain;
|
|
915
|
+
private currentOriginalTapStrain;
|
|
916
|
+
private readonly greatWindow;
|
|
917
|
+
constructor(mods: Mod[], overallDifficulty: number);
|
|
918
|
+
/**
|
|
919
|
+
* @param current The hitobject to calculate.
|
|
920
|
+
*/
|
|
921
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
922
|
+
/**
|
|
923
|
+
* @param current The hitobject to save to.
|
|
924
|
+
*/
|
|
925
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
926
926
|
}
|
|
927
927
|
|
|
928
|
-
/**
|
|
929
|
-
* An evaluator for calculating speed or tap skill.
|
|
930
|
-
*
|
|
931
|
-
* This class should be considered an "evaluating" class and not persisted.
|
|
932
|
-
*/
|
|
933
|
-
declare abstract class SpeedEvaluator {
|
|
934
|
-
protected static readonly minSpeedBonus: number;
|
|
928
|
+
/**
|
|
929
|
+
* An evaluator for calculating speed or tap skill.
|
|
930
|
+
*
|
|
931
|
+
* This class should be considered an "evaluating" class and not persisted.
|
|
932
|
+
*/
|
|
933
|
+
declare abstract class SpeedEvaluator {
|
|
934
|
+
protected static readonly minSpeedBonus: number;
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
/**
|
|
938
|
-
* An evaluator for calculating osu!droid tap skill.
|
|
939
|
-
*/
|
|
940
|
-
declare abstract class DroidTapEvaluator extends SpeedEvaluator {
|
|
941
|
-
/**
|
|
942
|
-
* Evaluates the difficulty of tapping the current object, based on:
|
|
943
|
-
*
|
|
944
|
-
* - time between pressing the previous and current object,
|
|
945
|
-
* - distance between those objects,
|
|
946
|
-
* - and how easily they can be cheesed.
|
|
947
|
-
*
|
|
948
|
-
* @param current The current object.
|
|
949
|
-
* @param greatWindow The great hit window of the current object.
|
|
950
|
-
* @param considerCheesability Whether to consider cheesability.
|
|
951
|
-
*/
|
|
952
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number, considerCheesability: boolean): number;
|
|
937
|
+
/**
|
|
938
|
+
* An evaluator for calculating osu!droid tap skill.
|
|
939
|
+
*/
|
|
940
|
+
declare abstract class DroidTapEvaluator extends SpeedEvaluator {
|
|
941
|
+
/**
|
|
942
|
+
* Evaluates the difficulty of tapping the current object, based on:
|
|
943
|
+
*
|
|
944
|
+
* - time between pressing the previous and current object,
|
|
945
|
+
* - distance between those objects,
|
|
946
|
+
* - and how easily they can be cheesed.
|
|
947
|
+
*
|
|
948
|
+
* @param current The current object.
|
|
949
|
+
* @param greatWindow The great hit window of the current object.
|
|
950
|
+
* @param considerCheesability Whether to consider cheesability.
|
|
951
|
+
*/
|
|
952
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number, considerCheesability: boolean): number;
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
/**
|
|
956
|
-
* Represents the skill required to read every object in the map.
|
|
957
|
-
*/
|
|
958
|
-
declare class DroidVisual extends DroidSkill {
|
|
959
|
-
protected readonly starsPerDouble: number;
|
|
960
|
-
protected readonly reducedSectionCount: number;
|
|
961
|
-
protected readonly reducedSectionBaseline: number;
|
|
962
|
-
protected readonly skillMultiplier: number;
|
|
963
|
-
protected readonly strainDecayBase: number;
|
|
964
|
-
private readonly isHidden;
|
|
965
|
-
constructor(mods: Mod[]);
|
|
966
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
967
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
955
|
+
/**
|
|
956
|
+
* Represents the skill required to read every object in the map.
|
|
957
|
+
*/
|
|
958
|
+
declare class DroidVisual extends DroidSkill {
|
|
959
|
+
protected readonly starsPerDouble: number;
|
|
960
|
+
protected readonly reducedSectionCount: number;
|
|
961
|
+
protected readonly reducedSectionBaseline: number;
|
|
962
|
+
protected readonly skillMultiplier: number;
|
|
963
|
+
protected readonly strainDecayBase: number;
|
|
964
|
+
private readonly isHidden;
|
|
965
|
+
constructor(mods: Mod[]);
|
|
966
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
967
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
968
968
|
}
|
|
969
969
|
|
|
970
|
-
/**
|
|
971
|
-
* An evaluator for calculating osu!droid Visual skill.
|
|
972
|
-
*/
|
|
973
|
-
declare abstract class DroidVisualEvaluator {
|
|
974
|
-
/**
|
|
975
|
-
* Evaluates the difficulty of reading the current object, based on:
|
|
976
|
-
*
|
|
977
|
-
* - note density of the current object,
|
|
978
|
-
* - overlapping factor of the current object,
|
|
979
|
-
* - the preempt time of the current object,
|
|
980
|
-
* - the visual opacity of the current object,
|
|
981
|
-
* - the velocity of the current object if it's a slider,
|
|
982
|
-
* - past objects' velocity if they are sliders,
|
|
983
|
-
* - and whether the Hidden mod is enabled.
|
|
984
|
-
*
|
|
985
|
-
* @param current The current object.
|
|
986
|
-
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
987
|
-
*/
|
|
988
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
970
|
+
/**
|
|
971
|
+
* An evaluator for calculating osu!droid Visual skill.
|
|
972
|
+
*/
|
|
973
|
+
declare abstract class DroidVisualEvaluator {
|
|
974
|
+
/**
|
|
975
|
+
* Evaluates the difficulty of reading the current object, based on:
|
|
976
|
+
*
|
|
977
|
+
* - note density of the current object,
|
|
978
|
+
* - overlapping factor of the current object,
|
|
979
|
+
* - the preempt time of the current object,
|
|
980
|
+
* - the visual opacity of the current object,
|
|
981
|
+
* - the velocity of the current object if it's a slider,
|
|
982
|
+
* - past objects' velocity if they are sliders,
|
|
983
|
+
* - and whether the Hidden mod is enabled.
|
|
984
|
+
*
|
|
985
|
+
* @param current The current object.
|
|
986
|
+
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
987
|
+
*/
|
|
988
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
-
/**
|
|
992
|
-
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
993
|
-
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
994
|
-
*/
|
|
995
|
-
declare abstract class OsuSkill extends StrainSkill {
|
|
996
|
-
/**
|
|
997
|
-
* The default multiplier applied to the final difficulty value after all other calculations.
|
|
998
|
-
*
|
|
999
|
-
* May be overridden via {@link difficultyMultiplier}.
|
|
1000
|
-
*/
|
|
1001
|
-
static readonly defaultDifficultyMultiplier: number;
|
|
1002
|
-
/**
|
|
1003
|
-
* The final multiplier to be applied to the final difficulty value after all other calculations.
|
|
1004
|
-
*/
|
|
1005
|
-
protected readonly difficultyMultiplier: number;
|
|
1006
|
-
/**
|
|
1007
|
-
* The weight by which each strain value decays.
|
|
1008
|
-
*/
|
|
1009
|
-
protected abstract readonly decayWeight: number;
|
|
1010
|
-
difficultyValue(): number;
|
|
991
|
+
/**
|
|
992
|
+
* Used to processes strain values of difficulty hitobjects, keep track of strain levels caused by the processed objects
|
|
993
|
+
* and to calculate a final difficulty value representing the difficulty of hitting all the processed objects.
|
|
994
|
+
*/
|
|
995
|
+
declare abstract class OsuSkill extends StrainSkill {
|
|
996
|
+
/**
|
|
997
|
+
* The default multiplier applied to the final difficulty value after all other calculations.
|
|
998
|
+
*
|
|
999
|
+
* May be overridden via {@link difficultyMultiplier}.
|
|
1000
|
+
*/
|
|
1001
|
+
static readonly defaultDifficultyMultiplier: number;
|
|
1002
|
+
/**
|
|
1003
|
+
* The final multiplier to be applied to the final difficulty value after all other calculations.
|
|
1004
|
+
*/
|
|
1005
|
+
protected readonly difficultyMultiplier: number;
|
|
1006
|
+
/**
|
|
1007
|
+
* The weight by which each strain value decays.
|
|
1008
|
+
*/
|
|
1009
|
+
protected abstract readonly decayWeight: number;
|
|
1010
|
+
difficultyValue(): number;
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
/**
|
|
1014
|
-
* A difficulty calculator for osu!standard gamemode.
|
|
1015
|
-
*/
|
|
1016
|
-
declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
1017
|
-
/**
|
|
1018
|
-
* The aim star rating of the beatmap.
|
|
1019
|
-
*/
|
|
1020
|
-
aim: number;
|
|
1021
|
-
/**
|
|
1022
|
-
* The speed star rating of the beatmap.
|
|
1023
|
-
*/
|
|
1024
|
-
speed: number;
|
|
1025
|
-
/**
|
|
1026
|
-
* The flashlight star rating of the beatmap.
|
|
1027
|
-
*/
|
|
1028
|
-
flashlight: number;
|
|
1029
|
-
protected readonly difficultyMultiplier: number;
|
|
1030
|
-
protected readonly mode:
|
|
1031
|
-
/**
|
|
1032
|
-
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
1033
|
-
*/
|
|
1034
|
-
calculateAim(): void;
|
|
1035
|
-
/**
|
|
1036
|
-
* Calculates the speed star rating of the beatmap and stores it in this instance.
|
|
1037
|
-
*/
|
|
1038
|
-
calculateSpeed(): void;
|
|
1039
|
-
/**
|
|
1040
|
-
* Calculates the flashlight star rating of the beatmap and stores it in this instance.
|
|
1041
|
-
*/
|
|
1042
|
-
calculateFlashlight(): void;
|
|
1043
|
-
calculateTotal(): void;
|
|
1044
|
-
calculateAll(): void;
|
|
1045
|
-
/**
|
|
1046
|
-
* Returns a string representative of the class.
|
|
1047
|
-
*/
|
|
1048
|
-
toString(): string;
|
|
1049
|
-
/**
|
|
1050
|
-
* Creates skills to be calculated.
|
|
1051
|
-
*/
|
|
1052
|
-
protected createSkills(): OsuSkill[];
|
|
1053
|
-
/**
|
|
1054
|
-
* Called after aim skill calculation.
|
|
1055
|
-
*
|
|
1056
|
-
* @param aimSkill The aim skill that considers sliders.
|
|
1057
|
-
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
1058
|
-
*/
|
|
1059
|
-
private postCalculateAim;
|
|
1060
|
-
/**
|
|
1061
|
-
* Called after speed skill calculation.
|
|
1062
|
-
*
|
|
1063
|
-
* @param speedSkill The speed skill.
|
|
1064
|
-
*/
|
|
1065
|
-
private postCalculateSpeed;
|
|
1066
|
-
/**
|
|
1067
|
-
* Calculates speed-related attributes.
|
|
1068
|
-
*/
|
|
1069
|
-
private calculateSpeedAttributes;
|
|
1070
|
-
/**
|
|
1071
|
-
* Called after flashlight skill calculation.
|
|
1072
|
-
*
|
|
1073
|
-
* @param flashlightSkill The flashlight skill.
|
|
1074
|
-
*/
|
|
1075
|
-
private postCalculateFlashlight;
|
|
1013
|
+
/**
|
|
1014
|
+
* A difficulty calculator for osu!standard gamemode.
|
|
1015
|
+
*/
|
|
1016
|
+
declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
1017
|
+
/**
|
|
1018
|
+
* The aim star rating of the beatmap.
|
|
1019
|
+
*/
|
|
1020
|
+
aim: number;
|
|
1021
|
+
/**
|
|
1022
|
+
* The speed star rating of the beatmap.
|
|
1023
|
+
*/
|
|
1024
|
+
speed: number;
|
|
1025
|
+
/**
|
|
1026
|
+
* The flashlight star rating of the beatmap.
|
|
1027
|
+
*/
|
|
1028
|
+
flashlight: number;
|
|
1029
|
+
protected readonly difficultyMultiplier: number;
|
|
1030
|
+
protected readonly mode: Modes;
|
|
1031
|
+
/**
|
|
1032
|
+
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
1033
|
+
*/
|
|
1034
|
+
calculateAim(): void;
|
|
1035
|
+
/**
|
|
1036
|
+
* Calculates the speed star rating of the beatmap and stores it in this instance.
|
|
1037
|
+
*/
|
|
1038
|
+
calculateSpeed(): void;
|
|
1039
|
+
/**
|
|
1040
|
+
* Calculates the flashlight star rating of the beatmap and stores it in this instance.
|
|
1041
|
+
*/
|
|
1042
|
+
calculateFlashlight(): void;
|
|
1043
|
+
calculateTotal(): void;
|
|
1044
|
+
calculateAll(): void;
|
|
1045
|
+
/**
|
|
1046
|
+
* Returns a string representative of the class.
|
|
1047
|
+
*/
|
|
1048
|
+
toString(): string;
|
|
1049
|
+
/**
|
|
1050
|
+
* Creates skills to be calculated.
|
|
1051
|
+
*/
|
|
1052
|
+
protected createSkills(): OsuSkill[];
|
|
1053
|
+
/**
|
|
1054
|
+
* Called after aim skill calculation.
|
|
1055
|
+
*
|
|
1056
|
+
* @param aimSkill The aim skill that considers sliders.
|
|
1057
|
+
* @param aimSkillWithoutSliders The aim skill that doesn't consider sliders.
|
|
1058
|
+
*/
|
|
1059
|
+
private postCalculateAim;
|
|
1060
|
+
/**
|
|
1061
|
+
* Called after speed skill calculation.
|
|
1062
|
+
*
|
|
1063
|
+
* @param speedSkill The speed skill.
|
|
1064
|
+
*/
|
|
1065
|
+
private postCalculateSpeed;
|
|
1066
|
+
/**
|
|
1067
|
+
* Calculates speed-related attributes.
|
|
1068
|
+
*/
|
|
1069
|
+
private calculateSpeedAttributes;
|
|
1070
|
+
/**
|
|
1071
|
+
* Called after flashlight skill calculation.
|
|
1072
|
+
*
|
|
1073
|
+
* @param flashlightSkill The flashlight skill.
|
|
1074
|
+
*/
|
|
1075
|
+
private postCalculateFlashlight;
|
|
1076
1076
|
}
|
|
1077
1077
|
|
|
1078
|
-
/**
|
|
1079
|
-
* A difficulty calculator that calculates for both osu!droid and osu!standard gamemode.
|
|
1080
|
-
*/
|
|
1081
|
-
declare class MapStars {
|
|
1082
|
-
/**
|
|
1083
|
-
* The osu!droid difficulty calculator of the beatmap.
|
|
1084
|
-
*/
|
|
1085
|
-
readonly droid: DroidDifficultyCalculator;
|
|
1086
|
-
/**
|
|
1087
|
-
* The osu!standard difficulty calculator of the beatmap.
|
|
1088
|
-
*/
|
|
1089
|
-
readonly osu: OsuDifficultyCalculator;
|
|
1090
|
-
/**
|
|
1091
|
-
* Constructs this instance and calculates the given beatmap's osu!droid and osu!standard difficulty.
|
|
1092
|
-
*
|
|
1093
|
-
* @param beatmap The beatmap to calculate.
|
|
1094
|
-
* @param options Options for the difficulty calculation.
|
|
1095
|
-
*/
|
|
1096
|
-
constructor(beatmap: Beatmap, options?: DifficultyCalculationOptions);
|
|
1097
|
-
/**
|
|
1098
|
-
* Returns a string representative of the class.
|
|
1099
|
-
*/
|
|
1100
|
-
toString(): string;
|
|
1078
|
+
/**
|
|
1079
|
+
* A difficulty calculator that calculates for both osu!droid and osu!standard gamemode.
|
|
1080
|
+
*/
|
|
1081
|
+
declare class MapStars {
|
|
1082
|
+
/**
|
|
1083
|
+
* The osu!droid difficulty calculator of the beatmap.
|
|
1084
|
+
*/
|
|
1085
|
+
readonly droid: DroidDifficultyCalculator;
|
|
1086
|
+
/**
|
|
1087
|
+
* The osu!standard difficulty calculator of the beatmap.
|
|
1088
|
+
*/
|
|
1089
|
+
readonly osu: OsuDifficultyCalculator;
|
|
1090
|
+
/**
|
|
1091
|
+
* Constructs this instance and calculates the given beatmap's osu!droid and osu!standard difficulty.
|
|
1092
|
+
*
|
|
1093
|
+
* @param beatmap The beatmap to calculate.
|
|
1094
|
+
* @param options Options for the difficulty calculation.
|
|
1095
|
+
*/
|
|
1096
|
+
constructor(beatmap: Beatmap, options?: DifficultyCalculationOptions);
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns a string representative of the class.
|
|
1099
|
+
*/
|
|
1100
|
+
toString(): string;
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
|
-
/**
|
|
1104
|
-
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1105
|
-
*/
|
|
1106
|
-
declare class OsuAim extends OsuSkill {
|
|
1107
|
-
protected readonly skillMultiplier: number;
|
|
1108
|
-
protected readonly strainDecayBase: number;
|
|
1109
|
-
protected readonly reducedSectionCount: number;
|
|
1110
|
-
protected readonly reducedSectionBaseline: number;
|
|
1111
|
-
protected readonly difficultyMultiplier: number;
|
|
1112
|
-
protected readonly decayWeight: number;
|
|
1113
|
-
private readonly withSliders;
|
|
1114
|
-
constructor(mods: Mod[], withSliders: boolean);
|
|
1115
|
-
/**
|
|
1116
|
-
* @param current The hitobject to calculate.
|
|
1117
|
-
*/
|
|
1118
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1119
|
-
/**
|
|
1120
|
-
* @param current The hitobject to save to.
|
|
1121
|
-
*/
|
|
1122
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
1105
|
+
*/
|
|
1106
|
+
declare class OsuAim extends OsuSkill {
|
|
1107
|
+
protected readonly skillMultiplier: number;
|
|
1108
|
+
protected readonly strainDecayBase: number;
|
|
1109
|
+
protected readonly reducedSectionCount: number;
|
|
1110
|
+
protected readonly reducedSectionBaseline: number;
|
|
1111
|
+
protected readonly difficultyMultiplier: number;
|
|
1112
|
+
protected readonly decayWeight: number;
|
|
1113
|
+
private readonly withSliders;
|
|
1114
|
+
constructor(mods: Mod[], withSliders: boolean);
|
|
1115
|
+
/**
|
|
1116
|
+
* @param current The hitobject to calculate.
|
|
1117
|
+
*/
|
|
1118
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1119
|
+
/**
|
|
1120
|
+
* @param current The hitobject to save to.
|
|
1121
|
+
*/
|
|
1122
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
-
/**
|
|
1126
|
-
* An evaluator for calculating osu!standard Aim skill.
|
|
1127
|
-
*/
|
|
1128
|
-
declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
1129
|
-
/**
|
|
1130
|
-
* Evaluates the difficulty of aiming the current object, based on:
|
|
1131
|
-
*
|
|
1132
|
-
* - cursor velocity to the current object,
|
|
1133
|
-
* - angle difficulty,
|
|
1134
|
-
* - sharp velocity increases,
|
|
1135
|
-
* - and slider difficulty.
|
|
1136
|
-
*
|
|
1137
|
-
* @param current The current object.
|
|
1138
|
-
* @param withSliders Whether to take slider difficulty into account.
|
|
1139
|
-
*/
|
|
1140
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
1125
|
+
/**
|
|
1126
|
+
* An evaluator for calculating osu!standard Aim skill.
|
|
1127
|
+
*/
|
|
1128
|
+
declare abstract class OsuAimEvaluator extends AimEvaluator {
|
|
1129
|
+
/**
|
|
1130
|
+
* Evaluates the difficulty of aiming the current object, based on:
|
|
1131
|
+
*
|
|
1132
|
+
* - cursor velocity to the current object,
|
|
1133
|
+
* - angle difficulty,
|
|
1134
|
+
* - sharp velocity increases,
|
|
1135
|
+
* - and slider difficulty.
|
|
1136
|
+
*
|
|
1137
|
+
* @param current The current object.
|
|
1138
|
+
* @param withSliders Whether to take slider difficulty into account.
|
|
1139
|
+
*/
|
|
1140
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, withSliders: boolean): number;
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
-
/**
|
|
1144
|
-
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1145
|
-
*/
|
|
1146
|
-
declare class OsuFlashlight extends OsuSkill {
|
|
1147
|
-
protected readonly skillMultiplier: number;
|
|
1148
|
-
protected readonly strainDecayBase: number;
|
|
1149
|
-
protected readonly reducedSectionCount: number;
|
|
1150
|
-
protected readonly reducedSectionBaseline: number;
|
|
1151
|
-
protected readonly decayWeight: number;
|
|
1152
|
-
private readonly isHidden;
|
|
1153
|
-
constructor(mods: Mod[]);
|
|
1154
|
-
/**
|
|
1155
|
-
* @param current The hitobject to calculate.
|
|
1156
|
-
*/
|
|
1157
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1158
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1143
|
+
/**
|
|
1144
|
+
* Represents the skill required to memorize and hit every object in a beatmap with the Flashlight mod enabled.
|
|
1145
|
+
*/
|
|
1146
|
+
declare class OsuFlashlight extends OsuSkill {
|
|
1147
|
+
protected readonly skillMultiplier: number;
|
|
1148
|
+
protected readonly strainDecayBase: number;
|
|
1149
|
+
protected readonly reducedSectionCount: number;
|
|
1150
|
+
protected readonly reducedSectionBaseline: number;
|
|
1151
|
+
protected readonly decayWeight: number;
|
|
1152
|
+
private readonly isHidden;
|
|
1153
|
+
constructor(mods: Mod[]);
|
|
1154
|
+
/**
|
|
1155
|
+
* @param current The hitobject to calculate.
|
|
1156
|
+
*/
|
|
1157
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1158
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
|
-
/**
|
|
1162
|
-
* An evaluator for calculating osu!standard Flashlight skill.
|
|
1163
|
-
*/
|
|
1164
|
-
declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
|
|
1165
|
-
private static readonly minVelocity;
|
|
1166
|
-
private static readonly sliderMultiplier;
|
|
1167
|
-
private static readonly minAngleMultiplier;
|
|
1168
|
-
/**
|
|
1169
|
-
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
1170
|
-
*
|
|
1171
|
-
* - distance between a number of previous objects and the current object,
|
|
1172
|
-
* - the visual opacity of the current object,
|
|
1173
|
-
* - the angle made by the current object,
|
|
1174
|
-
* - length and speed of the current object (for sliders),
|
|
1175
|
-
* - and whether Hidden mod is enabled.
|
|
1176
|
-
*
|
|
1177
|
-
* @param current The current object.
|
|
1178
|
-
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1179
|
-
*/
|
|
1180
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
1161
|
+
/**
|
|
1162
|
+
* An evaluator for calculating osu!standard Flashlight skill.
|
|
1163
|
+
*/
|
|
1164
|
+
declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
|
|
1165
|
+
private static readonly minVelocity;
|
|
1166
|
+
private static readonly sliderMultiplier;
|
|
1167
|
+
private static readonly minAngleMultiplier;
|
|
1168
|
+
/**
|
|
1169
|
+
* Evaluates the difficulty of memorizing and hitting the current object, based on:
|
|
1170
|
+
*
|
|
1171
|
+
* - distance between a number of previous objects and the current object,
|
|
1172
|
+
* - the visual opacity of the current object,
|
|
1173
|
+
* - the angle made by the current object,
|
|
1174
|
+
* - length and speed of the current object (for sliders),
|
|
1175
|
+
* - and whether Hidden mod is enabled.
|
|
1176
|
+
*
|
|
1177
|
+
* @param current The current object.
|
|
1178
|
+
* @param isHiddenMod Whether the Hidden mod is enabled.
|
|
1179
|
+
*/
|
|
1180
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, isHiddenMod: boolean): number;
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
|
-
/**
|
|
1184
|
-
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1185
|
-
*/
|
|
1186
|
-
declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficultyCalculator> {
|
|
1187
|
-
/**
|
|
1188
|
-
* The aim performance value.
|
|
1189
|
-
*/
|
|
1190
|
-
aim: number;
|
|
1191
|
-
/**
|
|
1192
|
-
* The speed performance value.
|
|
1193
|
-
*/
|
|
1194
|
-
speed: number;
|
|
1195
|
-
/**
|
|
1196
|
-
* The accuracy performance value.
|
|
1197
|
-
*/
|
|
1198
|
-
accuracy: number;
|
|
1199
|
-
/**
|
|
1200
|
-
* The flashlight performance value.
|
|
1201
|
-
*/
|
|
1202
|
-
flashlight: number;
|
|
1203
|
-
protected finalMultiplier: number;
|
|
1204
|
-
protected readonly mode:
|
|
1205
|
-
protected calculateValues(): void;
|
|
1206
|
-
protected calculateTotalValue(): void;
|
|
1207
|
-
/**
|
|
1208
|
-
* Calculates the aim performance value of the beatmap.
|
|
1209
|
-
*/
|
|
1210
|
-
private calculateAimValue;
|
|
1211
|
-
/**
|
|
1212
|
-
* Calculates the speed performance value of the beatmap.
|
|
1213
|
-
*/
|
|
1214
|
-
private calculateSpeedValue;
|
|
1215
|
-
/**
|
|
1216
|
-
* Calculates the accuracy performance value of the beatmap.
|
|
1217
|
-
*/
|
|
1218
|
-
private calculateAccuracyValue;
|
|
1219
|
-
/**
|
|
1220
|
-
* Calculates the flashlight performance value of the beatmap.
|
|
1221
|
-
*/
|
|
1222
|
-
private calculateFlashlightValue;
|
|
1223
|
-
toString(): string;
|
|
1183
|
+
/**
|
|
1184
|
+
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1185
|
+
*/
|
|
1186
|
+
declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficultyCalculator> {
|
|
1187
|
+
/**
|
|
1188
|
+
* The aim performance value.
|
|
1189
|
+
*/
|
|
1190
|
+
aim: number;
|
|
1191
|
+
/**
|
|
1192
|
+
* The speed performance value.
|
|
1193
|
+
*/
|
|
1194
|
+
speed: number;
|
|
1195
|
+
/**
|
|
1196
|
+
* The accuracy performance value.
|
|
1197
|
+
*/
|
|
1198
|
+
accuracy: number;
|
|
1199
|
+
/**
|
|
1200
|
+
* The flashlight performance value.
|
|
1201
|
+
*/
|
|
1202
|
+
flashlight: number;
|
|
1203
|
+
protected finalMultiplier: number;
|
|
1204
|
+
protected readonly mode: Modes;
|
|
1205
|
+
protected calculateValues(): void;
|
|
1206
|
+
protected calculateTotalValue(): void;
|
|
1207
|
+
/**
|
|
1208
|
+
* Calculates the aim performance value of the beatmap.
|
|
1209
|
+
*/
|
|
1210
|
+
private calculateAimValue;
|
|
1211
|
+
/**
|
|
1212
|
+
* Calculates the speed performance value of the beatmap.
|
|
1213
|
+
*/
|
|
1214
|
+
private calculateSpeedValue;
|
|
1215
|
+
/**
|
|
1216
|
+
* Calculates the accuracy performance value of the beatmap.
|
|
1217
|
+
*/
|
|
1218
|
+
private calculateAccuracyValue;
|
|
1219
|
+
/**
|
|
1220
|
+
* Calculates the flashlight performance value of the beatmap.
|
|
1221
|
+
*/
|
|
1222
|
+
private calculateFlashlightValue;
|
|
1223
|
+
toString(): string;
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
1226
|
-
/**
|
|
1227
|
-
* An evaluator for calculating osu!standard Rhythm skill.
|
|
1228
|
-
*/
|
|
1229
|
-
declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
|
|
1230
|
-
private static readonly rhythmMultiplier;
|
|
1231
|
-
/**
|
|
1232
|
-
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
1233
|
-
* with historic data of the current object.
|
|
1234
|
-
*
|
|
1235
|
-
* @param current The current object.
|
|
1236
|
-
* @param greatWindow The great hit window of the current object.
|
|
1237
|
-
*/
|
|
1238
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1226
|
+
/**
|
|
1227
|
+
* An evaluator for calculating osu!standard Rhythm skill.
|
|
1228
|
+
*/
|
|
1229
|
+
declare abstract class OsuRhythmEvaluator extends RhythmEvaluator {
|
|
1230
|
+
private static readonly rhythmMultiplier;
|
|
1231
|
+
/**
|
|
1232
|
+
* Calculates a rhythm multiplier for the difficulty of the tap associated
|
|
1233
|
+
* with historic data of the current object.
|
|
1234
|
+
*
|
|
1235
|
+
* @param current The current object.
|
|
1236
|
+
* @param greatWindow The great hit window of the current object.
|
|
1237
|
+
*/
|
|
1238
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
|
-
/**
|
|
1242
|
-
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1243
|
-
*/
|
|
1244
|
-
declare class OsuSpeed extends OsuSkill {
|
|
1245
|
-
protected readonly skillMultiplier: number;
|
|
1246
|
-
protected readonly strainDecayBase: number;
|
|
1247
|
-
protected readonly reducedSectionCount: number;
|
|
1248
|
-
protected readonly reducedSectionBaseline: number;
|
|
1249
|
-
protected readonly difficultyMultiplier: number;
|
|
1250
|
-
protected readonly decayWeight: number;
|
|
1251
|
-
private currentSpeedStrain;
|
|
1252
|
-
private currentRhythm;
|
|
1253
|
-
private readonly minSpeedBonus;
|
|
1254
|
-
private readonly greatWindow;
|
|
1255
|
-
constructor(mods: Mod[], greatWindow: number);
|
|
1256
|
-
/**
|
|
1257
|
-
* @param current The hitobject to calculate.
|
|
1258
|
-
*/
|
|
1259
|
-
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1260
|
-
/**
|
|
1261
|
-
* @param current The hitobject to save to.
|
|
1262
|
-
*/
|
|
1263
|
-
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1241
|
+
/**
|
|
1242
|
+
* Represents the skill required to press keys or tap with regards to keeping up with the speed at which objects need to be hit.
|
|
1243
|
+
*/
|
|
1244
|
+
declare class OsuSpeed extends OsuSkill {
|
|
1245
|
+
protected readonly skillMultiplier: number;
|
|
1246
|
+
protected readonly strainDecayBase: number;
|
|
1247
|
+
protected readonly reducedSectionCount: number;
|
|
1248
|
+
protected readonly reducedSectionBaseline: number;
|
|
1249
|
+
protected readonly difficultyMultiplier: number;
|
|
1250
|
+
protected readonly decayWeight: number;
|
|
1251
|
+
private currentSpeedStrain;
|
|
1252
|
+
private currentRhythm;
|
|
1253
|
+
private readonly minSpeedBonus;
|
|
1254
|
+
private readonly greatWindow;
|
|
1255
|
+
constructor(mods: Mod[], greatWindow: number);
|
|
1256
|
+
/**
|
|
1257
|
+
* @param current The hitobject to calculate.
|
|
1258
|
+
*/
|
|
1259
|
+
protected strainValueAt(current: DifficultyHitObject): number;
|
|
1260
|
+
/**
|
|
1261
|
+
* @param current The hitobject to save to.
|
|
1262
|
+
*/
|
|
1263
|
+
protected saveToHitObject(current: DifficultyHitObject): void;
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
|
-
/**
|
|
1267
|
-
* An evaluator for calculating osu!standard speed skill.
|
|
1268
|
-
*/
|
|
1269
|
-
declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
1270
|
-
/**
|
|
1271
|
-
* Spacing threshold for a single hitobject spacing.
|
|
1272
|
-
*/
|
|
1273
|
-
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
1274
|
-
/**
|
|
1275
|
-
* Evaluates the difficulty of tapping the current object, based on:
|
|
1276
|
-
*
|
|
1277
|
-
* - time between pressing the previous and current object,
|
|
1278
|
-
* - distance between those objects,
|
|
1279
|
-
* - and how easily they can be cheesed.
|
|
1280
|
-
*
|
|
1281
|
-
* @param current The current object.
|
|
1282
|
-
* @param greatWindow The great hit window of the current object.
|
|
1283
|
-
*/
|
|
1284
|
-
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1266
|
+
/**
|
|
1267
|
+
* An evaluator for calculating osu!standard speed skill.
|
|
1268
|
+
*/
|
|
1269
|
+
declare abstract class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
1270
|
+
/**
|
|
1271
|
+
* Spacing threshold for a single hitobject spacing.
|
|
1272
|
+
*/
|
|
1273
|
+
private static readonly SINGLE_SPACING_THRESHOLD;
|
|
1274
|
+
/**
|
|
1275
|
+
* Evaluates the difficulty of tapping the current object, based on:
|
|
1276
|
+
*
|
|
1277
|
+
* - time between pressing the previous and current object,
|
|
1278
|
+
* - distance between those objects,
|
|
1279
|
+
* - and how easily they can be cheesed.
|
|
1280
|
+
*
|
|
1281
|
+
* @param current The current object.
|
|
1282
|
+
* @param greatWindow The great hit window of the current object.
|
|
1283
|
+
*/
|
|
1284
|
+
static evaluateDifficultyOf(current: DifficultyHitObject, greatWindow: number): number;
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
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 };
|