From d57c02ddf52236d5e1a43152bfda0b100c5bd01f Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 10 Aug 2020 00:06:48 -0400 Subject: [PATCH] top_record is 1-indexed... --- youmubot-osu/src/discord/embeds.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youmubot-osu/src/discord/embeds.rs b/youmubot-osu/src/discord/embeds.rs index d4f3024..ad43769 100644 --- a/youmubot-osu/src/discord/embeds.rs +++ b/youmubot-osu/src/discord/embeds.rs @@ -223,7 +223,7 @@ pub(crate) fn score_embed<'a>( top_record .map(|top| { let after_pp = u.pp.unwrap(); - let effective_pp = full_pp * (0.95f64).powi(top as i32); + let effective_pp = full_pp * (0.95f64).powi(top as i32 - 1); let before_pp = after_pp - effective_pp; format!( "**pp gained**: **{:.2}**pp (+**{:.2}**pp | {:.2}pp \\➡️ {:.2}pp)",