From b417b4892e19ff08c51b2e00f3fa0dcbf39ea1d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:45:55 +0000 Subject: [PATCH 1/2] Bump ppy.osu.Game from 2023.1114.1 to 2023.1231.0 Bumps [ppy.osu.Game](https://github.com/ppy/osu) from 2023.1114.1 to 2023.1231.0. - [Release notes](https://github.com/ppy/osu/releases) - [Commits](https://github.com/ppy/osu/compare/2023.1114.1...2023.1231.0) --- updated-dependencies: - dependency-name: ppy.osu.Game dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- osu.Game.Rulesets.Soyokaze/osu.Game.Rulesets.Soyokaze.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Soyokaze/osu.Game.Rulesets.Soyokaze.csproj b/osu.Game.Rulesets.Soyokaze/osu.Game.Rulesets.Soyokaze.csproj index 3a2f21e..1d2dd91 100644 --- a/osu.Game.Rulesets.Soyokaze/osu.Game.Rulesets.Soyokaze.csproj +++ b/osu.Game.Rulesets.Soyokaze/osu.Game.Rulesets.Soyokaze.csproj @@ -11,7 +11,7 @@ - + From 5e6addf7ea9eb68362ac77f2a2d634dd51dbd8fe Mon Sep 17 00:00:00 2001 From: Alden Wu Date: Wed, 3 Jan 2024 17:46:03 -0800 Subject: [PATCH 2/2] Update score processor functions --- .../Objects/Drawables/DrawableHold.cs | 15 ++++++++------- .../Scoring/SoyokazeScoreProcessor.cs | 6 +++--- .../Statistics/AccuracyGraph.cs | 13 +++++-------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/osu.Game.Rulesets.Soyokaze/Objects/Drawables/DrawableHold.cs b/osu.Game.Rulesets.Soyokaze/Objects/Drawables/DrawableHold.cs index 54dc470..9b24dab 100644 --- a/osu.Game.Rulesets.Soyokaze/Objects/Drawables/DrawableHold.cs +++ b/osu.Game.Rulesets.Soyokaze/Objects/Drawables/DrawableHold.cs @@ -14,6 +14,7 @@ using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Soyokaze.Judgements; +using osu.Game.Rulesets.Soyokaze.Scoring; using osu.Game.Rulesets.Soyokaze.Skinning; using osu.Game.Rulesets.Soyokaze.UI; using osu.Game.Skinning; @@ -140,7 +141,7 @@ protected override void UpdateInitialTransforms() { base.UpdateInitialTransforms(); - HoldProgress.FadeInFromZero(System.Math.Min(HitObject.FadeIn * 2, HitObject.Preempt / 2)); + HoldProgress.FadeInFromZero(Math.Min(HitObject.FadeIn * 2, HitObject.Preempt / 2)); using (BeginDelayedSequence(HitObject.Preempt)) { HoldProgress.FillTo(1.0, HitObject.Duration); @@ -188,18 +189,18 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) double holdFraction = holdDuration / HitObject.Duration; double holdCircleFraction = 0.0; - JudgementResult trueRes = HoldCircle.TrueResult; - if (trueRes != null) + JudgementResult trueResult = HoldCircle.TrueResult; + if (trueResult != null) { - Judgement judgement = trueRes.Judgement; - holdCircleFraction = (double)judgement.NumericResultFor(trueRes) - / judgement.MaxNumericResult; + SoyokazeScoreProcessor scorer = new SoyokazeScoreProcessor(); + double score = scorer.GetBaseScoreForResult(trueResult.Type); + double max = scorer.GetBaseScoreForResult(trueResult.Judgement.MaxResult); + holdCircleFraction = score / max; } double scoreFraction = (holdCircleFraction + holdFraction) / 2; HitResult result; - if (scoreFraction > 0.9) result = HitResult.Perfect; else if (scoreFraction > 0.8) diff --git a/osu.Game.Rulesets.Soyokaze/Scoring/SoyokazeScoreProcessor.cs b/osu.Game.Rulesets.Soyokaze/Scoring/SoyokazeScoreProcessor.cs index fda07be..e3bab13 100644 --- a/osu.Game.Rulesets.Soyokaze/Scoring/SoyokazeScoreProcessor.cs +++ b/osu.Game.Rulesets.Soyokaze/Scoring/SoyokazeScoreProcessor.cs @@ -9,8 +9,8 @@ namespace osu.Game.Rulesets.Soyokaze.Scoring { public partial class SoyokazeScoreProcessor : ScoreProcessor { - public SoyokazeScoreProcessor(Ruleset ruleset) - : base(ruleset) + public SoyokazeScoreProcessor(SoyokazeRuleset ruleset = null) + : base(ruleset ?? new SoyokazeRuleset()) { } @@ -19,7 +19,7 @@ protected override HitEvent CreateHitEvent(JudgementResult result) var hitEvent = base.CreateHitEvent(result); if (result is SoyokazeHoldJudgementResult hr) - hitEvent = new HitEvent(hr.TrueTimeOffset, hitEvent.Result, hitEvent.HitObject, hitEvent.LastHitObject, hitEvent.Position); + hitEvent = new HitEvent(hr.TrueTimeOffset, hitEvent.GameplayRate, hitEvent.Result, hitEvent.HitObject, hitEvent.LastHitObject, hitEvent.Position); return hitEvent; } diff --git a/osu.Game.Rulesets.Soyokaze/Statistics/AccuracyGraph.cs b/osu.Game.Rulesets.Soyokaze/Statistics/AccuracyGraph.cs index 7de8981..9dcb602 100644 --- a/osu.Game.Rulesets.Soyokaze/Statistics/AccuracyGraph.cs +++ b/osu.Game.Rulesets.Soyokaze/Statistics/AccuracyGraph.cs @@ -7,8 +7,8 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; -using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; +using osu.Game.Rulesets.Soyokaze.Scoring; using osu.Game.Screens.Ranking.Statistics; using osuTK; @@ -68,15 +68,12 @@ private float calculateAccuracy(List hitEvents) { int maxScore = 0; int score = 0; - + + SoyokazeScoreProcessor scorer = new SoyokazeScoreProcessor(); foreach (HitEvent hitEvent in hitEvents) { - JudgementResult result = new JudgementResult(hitEvent.HitObject, hitEvent.HitObject.CreateJudgement()) - { - Type = hitEvent.Result - }; - score += result.Judgement.NumericResultFor(result); - maxScore += result.Judgement.MaxNumericResult; + score += scorer.GetBaseScoreForResult(hitEvent.Result); + maxScore += scorer.GetBaseScoreForResult(hitEvent.HitObject.CreateJudgement().MaxResult); } return (float)score / maxScore;