@rian8337/osu-rebalance-difficulty-calculator 1.4.8 → 1.4.11-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -74,11 +74,10 @@ class DifficultyHitObjectCreator {
|
|
|
74
74
|
object.overlappingFactor +=
|
|
75
75
|
// Penalize objects that are too close to the object in both distance
|
|
76
76
|
// and delta time to prevent stream maps from being overweighted.
|
|
77
|
-
Math.max(0,
|
|
78
|
-
(
|
|
79
|
-
object.object.
|
|
80
|
-
|
|
81
|
-
(50 /
|
|
77
|
+
Math.max(0, 1 -
|
|
78
|
+
object.object.stackedPosition.getDistance(hitObject.stackedEndPosition) /
|
|
79
|
+
(3 * object.object.radius)) *
|
|
80
|
+
(7.5 /
|
|
82
81
|
(1 +
|
|
83
82
|
Math.exp(0.15 *
|
|
84
83
|
(Math.max(deltaTime, this.minDeltaTime) -
|
|
@@ -9,6 +9,7 @@ const DroidSkill_1 = require("./DroidSkill");
|
|
|
9
9
|
class DroidVisual extends DroidSkill_1.DroidSkill {
|
|
10
10
|
constructor(mods, preempt) {
|
|
11
11
|
super(mods);
|
|
12
|
+
this.historyLength = 4;
|
|
12
13
|
this.starsPerDouble = 1.025;
|
|
13
14
|
this.reducedSectionCount = 10;
|
|
14
15
|
this.reducedSectionBaseline = 0.75;
|
|
@@ -28,12 +29,12 @@ class DroidVisual extends DroidSkill_1.DroidSkill {
|
|
|
28
29
|
// Add density caps for sanity.
|
|
29
30
|
let strain = Math.min(20, Math.pow(current.noteDensity, 2)) /
|
|
30
31
|
10 /
|
|
31
|
-
(1 + current.overlappingFactor
|
|
32
|
+
(1 + current.overlappingFactor);
|
|
32
33
|
if (this.isHidden) {
|
|
33
34
|
strain +=
|
|
34
35
|
Math.min(25, Math.pow(current.noteDensity, 1.25)) /
|
|
35
36
|
10 /
|
|
36
|
-
(1 + current.overlappingFactor * 1.
|
|
37
|
+
(1 + current.overlappingFactor * 1.25);
|
|
37
38
|
}
|
|
38
39
|
// Give bonus for AR higher than 10.33.
|
|
39
40
|
if (this.preempt < 400) {
|
|
@@ -41,22 +42,29 @@ class DroidVisual extends DroidSkill_1.DroidSkill {
|
|
|
41
42
|
}
|
|
42
43
|
if (current.object instanceof osu_base_1.Slider) {
|
|
43
44
|
const currentVelocity = current.travelDistance / current.travelTime;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const scalingFactor = 50 / current.object.radius;
|
|
46
|
+
// Reward sliders based on velocity.
|
|
47
|
+
strain += Math.min(
|
|
48
|
+
// Avoid overbuffing extremely fast sliders.
|
|
49
|
+
Math.min(15, currentVelocity * 3) *
|
|
50
|
+
// Scale with distance travelled to avoid overbuffing fast sliders with short distance.
|
|
51
|
+
Math.min(1, current.travelDistance / scalingFactor / 100));
|
|
52
|
+
let cumulativeStrainTime = 0;
|
|
53
|
+
// Reward for velocity changes based on last few sliders.
|
|
47
54
|
for (let i = 0; i < this.previous.length; ++i) {
|
|
48
55
|
const last = this.previous[i];
|
|
49
|
-
|
|
56
|
+
cumulativeStrainTime += last.strainTime;
|
|
50
57
|
if (!(last.object instanceof osu_base_1.Slider)) {
|
|
51
58
|
continue;
|
|
52
59
|
}
|
|
53
60
|
const prevVelocity = last.travelDistance / last.travelTime;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
(
|
|
59
|
-
|
|
61
|
+
strain += Math.min(
|
|
62
|
+
// Avoid overbuffing extremely fast velocity changes.
|
|
63
|
+
Math.min(15, 2.5 * Math.abs(currentVelocity - prevVelocity)) *
|
|
64
|
+
// Scale with distance travelled to avoid overbuffing fast sliders with short distance.
|
|
65
|
+
Math.min(1, last.travelDistance / scalingFactor / 100) *
|
|
66
|
+
// Scale with cumulative strain time to avoid overbuffing past sliders.
|
|
67
|
+
Math.min(1, 300 / cumulativeStrainTime));
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
70
|
return strain;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-rebalance-difficulty-calculator",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.11-alpha.0",
|
|
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",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "00bf75cdcd669cebe53d04eec274f119202881cd"
|
|
39
39
|
}
|