Skip to content

Commit 5fdbd23

Browse files
LasercarEliteMasterEric
authored andcommitted
Misses now actually make you miss your grade
Sustain notes no longer add to the miss tally
1 parent 23a9e7f commit 5fdbd23

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

source/funkin/play/PlayState.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ class PlayState extends MusicBeatSubState
24252425
dispatchEvent(event);
24262426

24272427
trace('Penalizing score by ${event.score} and health by ${event.healthChange} for dropping hold note (is combo break: ${event.isComboBreak})!');
2428-
applyScore(event.score, 'miss', event.healthChange, event.isComboBreak);
2428+
applyScore(event.score, '', event.healthChange, event.isComboBreak);
24292429

24302430
// Play the miss sound.
24312431
vocals.playerVolume = 0;
@@ -2765,6 +2765,8 @@ class PlayState extends MusicBeatSubState
27652765
Highscore.tallies.shit += 1;
27662766
case 'miss':
27672767
Highscore.tallies.missed += 1;
2768+
default:
2769+
// Nothing!
27682770
}
27692771
health += healthChange;
27702772
if (isComboBreak)

source/funkin/play/ResultState.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ class ResultState extends MusicBeatSubState
488488
FlxTween.tween(bgFlash, {alpha: 0}, 5 / 24);
489489
// NOTE: Only divide if totalNotes > 0 to prevent divide-by-zero errors.
490490
var clearPercentFloat = params.scoreData.tallies.totalNotes == 0 ? 0.0 : (params.scoreData.tallies.sick +
491-
params.scoreData.tallies.good) / params.scoreData.tallies.totalNotes * 100;
491+
params.scoreData.tallies.good
492+
- params.scoreData.tallies.missed) / params.scoreData.tallies.totalNotes * 100;
492493
clearPercentTarget = Math.floor(clearPercentFloat);
493494
// Prevent off-by-one errors.
494495

source/funkin/play/components/ClearPercentCounter.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
6565
var seperatedScore:Array<Int> = [];
6666
var tempCombo:Int = Math.round(curNumber);
6767

68-
while (tempCombo != 0)
68+
while (tempCombo > 0 && tempCombo != 0)
6969
{
7070
seperatedScore.push(tempCombo % 10);
7171
tempCombo = Math.floor(tempCombo / 10);

source/funkin/play/scoring/Scoring.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class Scoring
384384

385385
// Final Grade = (Sick + Good - Miss) / (Total Notes)
386386

387-
var grade = (scoreData.tallies.sick + scoreData.tallies.good) / scoreData.tallies.totalNotes;
387+
var grade = (scoreData.tallies.sick + scoreData.tallies.good - scoreData.tallies.missed) / scoreData.tallies.totalNotes;
388388

389389
if (grade == Constants.RANK_PERFECT_THRESHOLD)
390390
{

source/funkin/ui/freeplay/FreeplayState.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2061,7 +2061,8 @@ class FreeplayState extends MusicBeatSubState
20612061
{
20622062
var songScore:Null<SaveScoreData> = Save.instance.getSongScore(daSongCapsule.freeplayData.data.id, currentDifficulty, currentVariation);
20632063
intendedScore = songScore?.score ?? 0;
2064-
intendedCompletion = songScore == null ? 0.0 : ((songScore.tallies.sick + songScore.tallies.good) / songScore.tallies.totalNotes);
2064+
intendedCompletion = songScore == null ? 0.0 : ((songScore.tallies.sick +
2065+
songScore.tallies.good - songScore.tallies.missed) / songScore.tallies.totalNotes);
20652066
rememberedSongId = daSongCapsule.freeplayData.data.id;
20662067
changeDiff();
20672068
daSongCapsule.refreshDisplay();

0 commit comments

Comments
 (0)