The (#7)
* some concepts * add back length bonus * PLEASE FIX * attempt * MORE * some minor attempts * revert 3 mod change * more attempts * bring back acc pp * increment package version
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "akatsuki-pp"
|
name = "akatsuki-pp"
|
||||||
version = "0.9.4"
|
version = "0.9.5"
|
||||||
authors = ["MaxOhn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
|
authors = ["MaxOhn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
+27
-69
@@ -242,7 +242,7 @@ impl<'m> OsuPP<'m> {
|
|||||||
self.assert_hitresults();
|
self.assert_hitresults();
|
||||||
|
|
||||||
let total_hits = self.total_hits() as f32;
|
let total_hits = self.total_hits() as f32;
|
||||||
let mut multiplier = 1.12;
|
let mut multiplier = 1.09;
|
||||||
|
|
||||||
let effective_miss_count = self.calculate_effective_miss_count();
|
let effective_miss_count = self.calculate_effective_miss_count();
|
||||||
|
|
||||||
@@ -262,51 +262,37 @@ impl<'m> OsuPP<'m> {
|
|||||||
let acc_value = self.compute_accuracy_value(total_hits);
|
let acc_value = self.compute_accuracy_value(total_hits);
|
||||||
|
|
||||||
let mut acc_depression = 1.0;
|
let mut acc_depression = 1.0;
|
||||||
if self.mods.rx() {
|
|
||||||
multiplier *= 0.97;
|
|
||||||
|
|
||||||
let difficulty = self.attributes.as_ref().unwrap();
|
let difficulty = self.attributes.as_ref().unwrap();
|
||||||
let streams_nerf = ((difficulty.aim_strain / difficulty.speed_strain) * 100.0).round() / 100.0;
|
let streams_nerf =
|
||||||
|
((difficulty.aim_strain / difficulty.speed_strain) * 100.0).round() / 100.0;
|
||||||
|
|
||||||
if streams_nerf < 1.09 {
|
if streams_nerf < 1.09 {
|
||||||
let acc_factor = (1.0 - self.acc.unwrap()).abs();
|
let acc_factor = (1.0 - self.acc.unwrap()).abs();
|
||||||
acc_depression = (0.84 - acc_factor).max(0.5);
|
acc_depression = (0.86 - acc_factor).max(0.5);
|
||||||
|
|
||||||
if acc_depression > 0.0 {
|
if acc_depression > 0.0 {
|
||||||
aim_value *= acc_depression;
|
aim_value *= acc_depression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let nodt_bonus = match !self.mods.change_speed() && self.mods.rx() {
|
let nodt_bonus = match !self.mods.change_speed() {
|
||||||
true => 1.01,
|
true => 1.02,
|
||||||
false => 1.0,
|
false => 1.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
let speed_factor = match self.mods.rx() {
|
let mut pp = (aim_value.powf(1.185 * nodt_bonus)
|
||||||
true => speed_value.powf(0.83 * acc_depression),
|
+ speed_value.powf(0.83 * acc_depression)
|
||||||
false => speed_value.powf(1.1),
|
+ acc_value.powf(1.14 * nodt_bonus))
|
||||||
};
|
.powf(1.0 / 1.1)
|
||||||
|
* multiplier;
|
||||||
|
|
||||||
let aim_factor = match self.mods.rx() {
|
|
||||||
true => aim_value.powf(1.185 * nodt_bonus),
|
|
||||||
false => aim_value.powf(1.1),
|
|
||||||
};
|
|
||||||
|
|
||||||
let acc_factor = match self.mods.rx() {
|
|
||||||
true => acc_value.powf(1.14 * nodt_bonus),
|
|
||||||
false => acc_value.powf(1.1),
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut pp = (aim_factor + speed_factor + acc_factor).powf(1.0 / 1.1) * multiplier;
|
|
||||||
|
|
||||||
if self.mods.rx() {
|
|
||||||
if self.mods.dt() && self.mods.hr() {
|
if self.mods.dt() && self.mods.hr() {
|
||||||
pp *= 1.025;
|
pp *= 1.025;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.map.creator == "ParkourWizard" {
|
if self.map.creator == "gwb" || self.map.creator == "Plasma" {
|
||||||
pp *= 0.9;
|
pp *= 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
pp *= match self.map.beatmap_id {
|
pp *= match self.map.beatmap_id {
|
||||||
@@ -319,12 +305,9 @@ impl<'m> OsuPP<'m> {
|
|||||||
// Just press F [Parkour's ok this is epic]
|
// Just press F [Parkour's ok this is epic]
|
||||||
1844776 => 0.64,
|
1844776 => 0.64,
|
||||||
|
|
||||||
// Hardawre Store [skyapple mode]
|
// Hardware Store [skyapple mode]
|
||||||
1777768 => 0.90,
|
1777768 => 0.90,
|
||||||
|
|
||||||
// HONESTY [RIGHTEOUSNESS OF MORALITY]
|
|
||||||
2079597 => 0.90,
|
|
||||||
|
|
||||||
// Akatsuki compilation [ok this is akatsuki]
|
// Akatsuki compilation [ok this is akatsuki]
|
||||||
1962833 => {
|
1962833 => {
|
||||||
pp *= 0.885;
|
pp *= 0.885;
|
||||||
@@ -346,12 +329,11 @@ impl<'m> OsuPP<'m> {
|
|||||||
2382377 => 0.85,
|
2382377 => 0.85,
|
||||||
|
|
||||||
_ => 1.0,
|
_ => 1.0,
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
|
||||||
OsuPerformanceAttributes {
|
OsuPerformanceAttributes {
|
||||||
difficulty: self.attributes.unwrap(),
|
difficulty: self.attributes.unwrap(),
|
||||||
pp_acc: acc_value as f64,
|
pp_acc: 0.0,
|
||||||
pp_aim: aim_value as f64,
|
pp_aim: aim_value as f64,
|
||||||
pp_flashlight: 0.0,
|
pp_flashlight: 0.0,
|
||||||
pp_speed: speed_value as f64,
|
pp_speed: speed_value as f64,
|
||||||
@@ -373,8 +355,7 @@ impl<'m> OsuPP<'m> {
|
|||||||
let mut aim_value = (5.0 * (raw_aim / 0.0675).max(1.0) - 4.0).powi(3) / 100_000.0;
|
let mut aim_value = (5.0 * (raw_aim / 0.0675).max(1.0) - 4.0).powi(3) / 100_000.0;
|
||||||
|
|
||||||
// Longer maps are worth more
|
// Longer maps are worth more
|
||||||
let bonus_factor = if self.mods.rx() { 0.88 } else { 0.95 };
|
let len_bonus = 0.88
|
||||||
let len_bonus = bonus_factor
|
|
||||||
+ 0.4 * (total_hits / 2000.0).min(1.0)
|
+ 0.4 * (total_hits / 2000.0).min(1.0)
|
||||||
+ (total_hits > 2000.0) as u8 as f32 * 0.5 * (total_hits / 2000.0).log10();
|
+ (total_hits > 2000.0) as u8 as f32 * 0.5 * (total_hits / 2000.0).log10();
|
||||||
aim_value *= len_bonus;
|
aim_value *= len_bonus;
|
||||||
@@ -400,35 +381,17 @@ impl<'m> OsuPP<'m> {
|
|||||||
|
|
||||||
// HD bonus
|
// HD bonus
|
||||||
if self.mods.hd() {
|
if self.mods.hd() {
|
||||||
aim_value *= match self.mods.rx() {
|
aim_value *= 1.0 + 0.05 * (11.0 - attributes.ar) as f32;
|
||||||
true => 1.0 + 0.05 * (11.0 - attributes.ar) as f32,
|
|
||||||
false => 1.0 + 0.04 * (12.0 - attributes.ar) as f32,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FL bonus
|
// FL bonus
|
||||||
if self.mods.fl() {
|
if self.mods.fl() {
|
||||||
let first_factor = match self.mods.rx() {
|
|
||||||
true => 0.3,
|
|
||||||
false => 0.35,
|
|
||||||
};
|
|
||||||
|
|
||||||
let second_factor = match self.mods.rx() {
|
|
||||||
true => 0.25,
|
|
||||||
false => 0.3,
|
|
||||||
};
|
|
||||||
|
|
||||||
let third_factor = match self.mods.rx() {
|
|
||||||
true => 1600.0,
|
|
||||||
false => 1200.0,
|
|
||||||
};
|
|
||||||
|
|
||||||
aim_value *= 1.0
|
aim_value *= 1.0
|
||||||
+ first_factor * (total_hits / 200.0).min(1.0)
|
+ 0.3 * (total_hits / 200.0).min(1.0)
|
||||||
+ (total_hits > 200.0) as u8 as f32
|
+ (total_hits > 200.0) as u8 as f32
|
||||||
* second_factor
|
* 0.25
|
||||||
* ((total_hits - 200.0) / 300.0).min(1.0)
|
* ((total_hits - 200.0) / 300.0).min(1.0)
|
||||||
+ (total_hits > 500.0) as u8 as f32 * (total_hits - 500.0) / third_factor;
|
+ (total_hits > 500.0) as u8 as f32 * (total_hits - 500.0) / 1600.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// EZ bonus
|
// EZ bonus
|
||||||
@@ -443,8 +406,7 @@ impl<'m> OsuPP<'m> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Scale with accuracy
|
// Scale with accuracy
|
||||||
let acc_factor = if self.mods.rx() { 0.3 } else { 0.5 };
|
aim_value *= 0.3 + self.acc.unwrap() / 2.0;
|
||||||
aim_value *= acc_factor + self.acc.unwrap() / 2.0;
|
|
||||||
aim_value *= 0.98 + attributes.od as f32 * attributes.od as f32 / 2500.0;
|
aim_value *= 0.98 + attributes.od as f32 * attributes.od as f32 / 2500.0;
|
||||||
|
|
||||||
aim_value
|
aim_value
|
||||||
@@ -457,8 +419,7 @@ impl<'m> OsuPP<'m> {
|
|||||||
(5.0 * (attributes.speed_strain as f32 / 0.0675).max(1.0) - 4.0).powi(3) / 100_000.0;
|
(5.0 * (attributes.speed_strain as f32 / 0.0675).max(1.0) - 4.0).powi(3) / 100_000.0;
|
||||||
|
|
||||||
// Longer maps are worth more
|
// Longer maps are worth more
|
||||||
let bonus_factor = if self.mods.rx() { 0.88 } else { 0.95 };
|
let len_bonus = 0.88
|
||||||
let len_bonus = bonus_factor
|
|
||||||
+ 0.4 * (total_hits / 2000.0).min(1.0)
|
+ 0.4 * (total_hits / 2000.0).min(1.0)
|
||||||
+ (total_hits > 2000.0) as u8 as f32 * 0.5 * (total_hits / 2000.0).log10();
|
+ (total_hits > 2000.0) as u8 as f32 * 0.5 * (total_hits / 2000.0).log10();
|
||||||
speed_value *= len_bonus;
|
speed_value *= len_bonus;
|
||||||
@@ -486,15 +447,11 @@ impl<'m> OsuPP<'m> {
|
|||||||
|
|
||||||
// HD bonus
|
// HD bonus
|
||||||
if self.mods.hd() {
|
if self.mods.hd() {
|
||||||
speed_value *= match self.mods.rx() {
|
speed_value *= 1.0 + 0.05 * (11.0 - attributes.ar) as f32;
|
||||||
true => 1.0 + 0.05 * (11.0 - attributes.ar) as f32,
|
|
||||||
false => 1.0 + 0.04 * (12.0 - attributes.ar) as f32,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scaling the speed value with accuracy and OD
|
// Scaling the speed value with accuracy and OD
|
||||||
let acc_factor = if self.mods.rx() { 0.93 } else { 0.95 };
|
speed_value *= (0.93 + attributes.od as f32 * attributes.od as f32 / 750.0)
|
||||||
speed_value *= (acc_factor + attributes.od as f32 * attributes.od as f32 / 750.0)
|
|
||||||
* self
|
* self
|
||||||
.acc
|
.acc
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@@ -550,7 +507,8 @@ impl<'m> OsuPP<'m> {
|
|||||||
fn calculate_miss_penalty(&self, effective_miss_count: f32) -> f32 {
|
fn calculate_miss_penalty(&self, effective_miss_count: f32) -> f32 {
|
||||||
let total_hits = self.total_hits() as f32;
|
let total_hits = self.total_hits() as f32;
|
||||||
|
|
||||||
0.97 * (1.0 - (effective_miss_count / total_hits).powf(0.5)).powf(1.0 + (effective_miss_count / 1.5))
|
0.97 * (1.0 - (effective_miss_count / total_hits).powf(0.5))
|
||||||
|
.powf(1.0 + (effective_miss_count / 1.5))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|||||||
Reference in New Issue
Block a user