Skip to content

Allow Customization of LN Missed Release Judgement #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Quaver.API/Maps/Processors/Scoring/JudgementWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class JudgementWindows

public Judgement ComboBreakJudgement { get; set; } = Judgement.Miss;

// Never actually null; the nullability is to allow migration from the old database schema without this column.
public Judgement? LNMissJudgement { get; set; } = Judgement.Good;

/// <summary>
/// Returns the value of the window from <see cref="Judgement"/>
/// </summary>
Expand Down
12 changes: 10 additions & 2 deletions Quaver.API/Maps/Processors/Scoring/ScoreProcessorKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,16 @@ public Judgement CalculateScore(int hitDifference, KeyPressType keyPressType, bo
if (!(absoluteDifference <= window))
continue;

// Make Okays no longer possible on releases (good window increases)
if (keyPressType == KeyPressType.Release && j == Judgement.Okay)
// Releasing an LN late rounds the judgement up to what holding it forever would give
// On Default*, this rounds up to a Good
if (keyPressType == KeyPressType.Release && hitDifference < 0 && i > (int)Windows.LNMissJudgement)
{
judgement = Windows.LNMissJudgement.Value;
break;
}

// Make Okays no longer possible on releases (good window increases) unless LNMissJudgement is Okay or worse
if (keyPressType == KeyPressType.Release && j == Judgement.Okay && (int)Windows.LNMissJudgement < (int)Judgement.Okay)
{
judgement = Judgement.Good;
break;
Expand Down
6 changes: 3 additions & 3 deletions Quaver.API/Replays/Virtual/VirtualReplayPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,12 @@ private void HandleMissedLongNoteReleases()
continue;

// Judgement when a user doesn't release an LN.
var missedReleaseJudgement = Judgement.Good;
var missedReleaseJudgement = ScoreProcessor.Windows.LNMissJudgement;

ScoreProcessor.CalculateScore(missedReleaseJudgement, true);
ScoreProcessor.CalculateScore(missedReleaseJudgement.Value, true);

// Add new miss stat.
var stat = new HitStat(HitStatType.Miss, KeyPressType.None, hitObject, hitObject.EndTime, missedReleaseJudgement, int.MinValue,
var stat = new HitStat(HitStatType.Miss, KeyPressType.None, hitObject, hitObject.EndTime, missedReleaseJudgement.Value, int.MinValue,
ScoreProcessor.Accuracy, ScoreProcessor.Health);

ScoreProcessor.Stats.Add(stat);
Expand Down