@rian8337/osu-rebalance-difficulty-calculator 4.0.0-beta.30 → 4.0.0-beta.31
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 +8 -37
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1163,7 +1163,7 @@ class DroidFlashlight extends DroidSkill {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
-
|
|
1166
|
+
class Island {
|
|
1167
1167
|
constructor(delta, deltaDifferenceEpsilon) {
|
|
1168
1168
|
this.delta = Number.MAX_SAFE_INTEGER;
|
|
1169
1169
|
this.deltaCount = 0;
|
|
@@ -1190,7 +1190,8 @@ let Island$1 = class Island {
|
|
|
1190
1190
|
return (Math.abs(this.delta - other.delta) < this.deltaDifferenceEpsilon &&
|
|
1191
1191
|
this.deltaCount === other.deltaCount);
|
|
1192
1192
|
}
|
|
1193
|
-
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1194
1195
|
/**
|
|
1195
1196
|
* An evaluator for calculating osu!droid Rhythm skill.
|
|
1196
1197
|
*/
|
|
@@ -1207,8 +1208,8 @@ class DroidRhythmEvaluator {
|
|
|
1207
1208
|
}
|
|
1208
1209
|
const deltaDifferenceEpsilon = current.fullGreatWindow * 0.3;
|
|
1209
1210
|
let rhythmComplexitySum = 0;
|
|
1210
|
-
let island = new Island
|
|
1211
|
-
let previousIsland = new Island
|
|
1211
|
+
let island = new Island(deltaDifferenceEpsilon);
|
|
1212
|
+
let previousIsland = new Island(deltaDifferenceEpsilon);
|
|
1212
1213
|
const islandCounts = new Map();
|
|
1213
1214
|
// Store the ratio of the current start of an island to buff for tighter rhythms.
|
|
1214
1215
|
let startRatio = 0;
|
|
@@ -1320,7 +1321,7 @@ class DroidRhythmEvaluator {
|
|
|
1320
1321
|
// If we're speeding up, this stays as is and we keep counting island size.
|
|
1321
1322
|
firstDeltaSwitch = false;
|
|
1322
1323
|
}
|
|
1323
|
-
island = new Island
|
|
1324
|
+
island = new Island(currentDelta, deltaDifferenceEpsilon);
|
|
1324
1325
|
}
|
|
1325
1326
|
}
|
|
1326
1327
|
else if (prevDelta > currentDelta + deltaDifferenceEpsilon) {
|
|
@@ -1338,7 +1339,7 @@ class DroidRhythmEvaluator {
|
|
|
1338
1339
|
effectiveRatio *= 0.6;
|
|
1339
1340
|
}
|
|
1340
1341
|
startRatio = effectiveRatio;
|
|
1341
|
-
island = new Island
|
|
1342
|
+
island = new Island(currentDelta, deltaDifferenceEpsilon);
|
|
1342
1343
|
}
|
|
1343
1344
|
}
|
|
1344
1345
|
return (Math.sqrt(4 + rhythmComplexitySum * this.rhythmOverallMultiplier) /
|
|
@@ -2840,9 +2841,7 @@ class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
|
2840
2841
|
*/
|
|
2841
2842
|
class OsuSkill extends StrainSkill {
|
|
2842
2843
|
difficultyValue() {
|
|
2843
|
-
const strains = this.strainPeaks
|
|
2844
|
-
.slice()
|
|
2845
|
-
.sort((a, b) => b - a);
|
|
2844
|
+
const strains = this.strainPeaks.slice().sort((a, b) => b - a);
|
|
2846
2845
|
if (this.reducedSectionCount > 0) {
|
|
2847
2846
|
// We are reducing the highest strains first to account for extreme difficulty spikes.
|
|
2848
2847
|
for (let i = 0; i < Math.min(strains.length, this.reducedSectionCount); ++i) {
|
|
@@ -3081,34 +3080,6 @@ class OsuSpeedEvaluator extends SpeedEvaluator {
|
|
|
3081
3080
|
OsuSpeedEvaluator.SINGLE_SPACING_THRESHOLD = 125;
|
|
3082
3081
|
OsuSpeedEvaluator.DISTANCE_MULTIPLIER = 0.94;
|
|
3083
3082
|
|
|
3084
|
-
class Island {
|
|
3085
|
-
constructor(delta, deltaDifferenceEpsilon) {
|
|
3086
|
-
this.delta = Number.MAX_SAFE_INTEGER;
|
|
3087
|
-
this.deltaCount = 0;
|
|
3088
|
-
if (deltaDifferenceEpsilon === undefined) {
|
|
3089
|
-
this.deltaDifferenceEpsilon = delta;
|
|
3090
|
-
}
|
|
3091
|
-
else {
|
|
3092
|
-
this.deltaDifferenceEpsilon = deltaDifferenceEpsilon;
|
|
3093
|
-
this.addDelta(delta);
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
addDelta(delta) {
|
|
3097
|
-
if (this.delta === Number.MAX_SAFE_INTEGER) {
|
|
3098
|
-
this.delta = Math.max(Math.trunc(delta), DifficultyHitObject.minDeltaTime);
|
|
3099
|
-
}
|
|
3100
|
-
++this.deltaCount;
|
|
3101
|
-
}
|
|
3102
|
-
isSimilarPolarity(other) {
|
|
3103
|
-
// TODO: consider islands to be of similar polarity only if they're having the same average delta (we don't want to consider 3 singletaps similar to a triple)
|
|
3104
|
-
// naively adding delta check here breaks _a lot_ of maps because of the flawed ratio calculation
|
|
3105
|
-
return this.deltaCount % 2 == other.deltaCount % 2;
|
|
3106
|
-
}
|
|
3107
|
-
equals(other) {
|
|
3108
|
-
return (Math.abs(this.delta - other.delta) < this.deltaDifferenceEpsilon &&
|
|
3109
|
-
this.deltaCount === other.deltaCount);
|
|
3110
|
-
}
|
|
3111
|
-
}
|
|
3112
3083
|
/**
|
|
3113
3084
|
* An evaluator for calculating osu!standard Rhythm skill.
|
|
3114
3085
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-rebalance-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.31",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the latest osu!lazer difficulty and performance algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"url": "https://github.com/Rian8337/osu-droid-module/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@rian8337/osu-base": "^4.0.0-beta.
|
|
36
|
+
"@rian8337/osu-base": "^4.0.0-beta.31"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "39d3f8d4e23493a0ee772603b022a826951a2f42"
|
|
42
42
|
}
|