Add woot precision (#10)

* woot precision

* update formula

* increase exponent

* overhaul

* adjustments

* more adjust

* yeah

* changes

* 3
This commit is contained in:
James Wilson
2024-05-12 01:01:51 +01:00
committed by GitHub
parent 5c97207f25
commit f713156ccb
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -400,6 +400,11 @@ impl<'m> OsuPP<'m> {
aim_value *= base_buff;
}
// Precision buff (reading)
if attributes.cs > 5.58 {
aim_value *= ((attributes.cs as f32 - 5.46).powf(1.8) + 1.0).powf(0.03);
}
// Scale with accuracy
aim_value *= 0.3 + self.acc.unwrap() / 2.0;
aim_value *= 0.98 + attributes.od as f32 * attributes.od as f32 / 2500.0;
+4 -2
View File
@@ -28,6 +28,7 @@ pub fn stars(map: &Beatmap, mods: u32, passed_objects: Option<usize>) -> OsuDiff
let mut diff_attributes = OsuDifficultyAttributes {
ar: map_attributes.ar,
od: map_attributes.od,
cs: map_attributes.cs,
..Default::default()
};
@@ -39,8 +40,8 @@ pub fn stars(map: &Beatmap, mods: u32, passed_objects: Option<usize>) -> OsuDiff
let radius = OBJECT_RADIUS * (1.0 - 0.7 * (map_attributes.cs as f32 - 5.0) / 5.0) / 2.0;
let mut scaling_factor = NORMALIZED_RADIUS / radius;
if radius < 30.0 {
let small_circle_bonus = (30.0 - radius).min(5.0) / 50.0;
if radius < 30.05 {
let small_circle_bonus = ((30.05 - radius) / 50.0).powf(1.1) * 1.45;
scaling_factor *= 1.0 + small_circle_bonus;
}
@@ -148,6 +149,7 @@ pub struct OsuDifficultyAttributes {
pub ar: f64,
pub od: f64,
pub hp: f64,
pub cs: f64,
pub n_circles: usize,
pub n_sliders: usize,
pub n_spinners: usize,