From bdf6a541b7b7a7fe7577b7208750c84eee008ab1 Mon Sep 17 00:00:00 2001 From: Yoshubs <37424048+Yoshubs@users.noreply.github.com> Date: Mon, 27 Sep 2021 17:52:52 -0400 Subject: [PATCH] fc shit idk --- source/gameFolder/meta/data/Timings.hx | 31 ++++++------ source/gameFolder/meta/state/PlayState.hx | 57 +++++++++++++---------- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/source/gameFolder/meta/data/Timings.hx b/source/gameFolder/meta/data/Timings.hx index bb17f66cb..36d937457 100644 --- a/source/gameFolder/meta/data/Timings.hx +++ b/source/gameFolder/meta/data/Timings.hx @@ -16,9 +16,9 @@ class Timings // from left to right // max milliseconds, score from it and percentage public static var judgementsMap:Map> = [ - "sick" => [0, 50, 350, 100], - "good" => [1, 100, 150, 75], - "bad" => [2, 120, 0, 25], + "sick" => [0, 50, 350, 100, ' [SFC]'], + "good" => [1, 100, 150, 75, ' [GFC]'], + "bad" => [2, 120, 0, 25, ' [FC]'], "shit" => [3, 160, -50, -150], "miss" => [4, 200, -100, -175], ]; @@ -34,6 +34,9 @@ class Timings public static var comboDisplay:String = ''; public static var notesHitNoSus:Int = 0; + public static var gottenJudgements:Map = []; + public static var smallestRating:String; + public static function callAccuracy() { // reset the accuracy to 0% @@ -48,6 +51,11 @@ class Timings biggestThreshold = judgementsMap.get(i)[1]; msThreshold = biggestThreshold; + // set the gotten judgement amounts + for (judgement in judgementsMap.keys()) + gottenJudgements.set(judgement, 0); + smallestRating = 'sick'; + notesHit = 0; notesHitNoSus = 0; @@ -86,20 +94,9 @@ class Timings public static function updateFCDisplay() { // update combo display - // if you dont understand this look up ternary operators, they're REALLY useful for condensing code and - // I would totally encourage you check them out and learn a little more - comboDisplay = ((PlayState.combo >= notesHitNoSus) ? ((trueAccuracy >= 100) ? ' [PERFECT]' : ' [FC]') : ''); - - // to break it down further - /* - if (PlayState.combo >= notesHitNoSus) { - if (trueAccuracy >= 100) - comboDisplay = ' [PERFECT]'; - else - comboDisplay = ' [FC]'; - } else - comboDisplay = ''; - */ + comboDisplay = ''; + if (judgementsMap.get(smallestRating)[4] != null) + comboDisplay = judgementsMap.get(smallestRating)[4]; // this updates the most so uh PlayState.uiHUD.updateScoreText(); diff --git a/source/gameFolder/meta/state/PlayState.hx b/source/gameFolder/meta/state/PlayState.hx index 562b35103..7f3958718 100644 --- a/source/gameFolder/meta/state/PlayState.hx +++ b/source/gameFolder/meta/state/PlayState.hx @@ -719,27 +719,27 @@ class PlayState extends MusicBeatState // check all of the controls for (i in 0...pressControls.length) { - // improved this a little bit, maybe its a lil - var possibleNoteList:Array = []; - var pressedNotes:Array = []; - - characterStrums.notesGroup.forEachAlive(function(daNote:Note) + // and if a note is being pressed + if (pressControls[i]) { - if ((daNote.noteData == i) && daNote.canBeHit && !daNote.tooLate && !daNote.wasGoodHit) - possibleNoteList.push(daNote); - }); - possibleNoteList.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); + // improved this a little bit, maybe its a lil + var possibleNoteList:Array = []; + var pressedNotes:Array = []; - // if there is a list of notes that exists for that control - if (possibleNoteList.length > 0) - { - var eligable = true; - var firstNote = true; - // loop through the possible notes - for (coolNote in possibleNoteList) + characterStrums.notesGroup.forEachAlive(function(daNote:Note) + { + if ((daNote.noteData == i) && daNote.canBeHit && !daNote.tooLate && !daNote.wasGoodHit) + possibleNoteList.push(daNote); + }); + possibleNoteList.sort((a, b) -> Std.int(a.strumTime - b.strumTime)); + + // if there is a list of notes that exists for that control + if (possibleNoteList.length > 0) { - // and if a note is being pressed - if (pressControls[coolNote.noteData]) + var eligable = true; + var firstNote = true; + // loop through the possible notes + for (coolNote in possibleNoteList) { for (noteDouble in pressedNotes) { @@ -754,14 +754,14 @@ class PlayState extends MusicBeatState goodNoteHit(coolNote, character, characterStrums, firstNote); // then hit the note pressedNotes.push(coolNote); } + // end of this little check } - // end of this little check + // } - // + else // else just call bad notes + if (!Init.trueSettings.get('Ghost Tapping')) + missNoteCheck(true, i, character, true); } - else // else just call bad notes - if (!Init.trueSettings.get('Ghost Tapping') && pressControls[i]) - missNoteCheck(true, i, character, true); // } } @@ -1139,7 +1139,7 @@ class PlayState extends MusicBeatState numScore.x -= 95; numScore.x -= ((comboString.length - 1) * 22); lastCombo.push(numScore); - FlxTween.tween(numScore, {y: numScore.y + 20}, 0.1, {type: FlxTween.BACKWARD, ease: FlxEase.circOut}); + FlxTween.tween(numScore, {y: numScore.y + 20}, 0.1, {type: FlxTweenType.BACKWARD, ease: FlxEase.circOut}); } if (preload) numScore.visible = false; @@ -1244,6 +1244,15 @@ class PlayState extends MusicBeatState rating.screenCenter(); } + // return the actual rating to the array of judgements + Timings.gottenJudgements.set(daRating, Timings.gottenJudgements.get(daRating) + 1); + + // set new smallest rating + if (Timings.smallestRating != daRating) { + if (Timings.judgementsMap.get(Timings.smallestRating)[0] < Timings.judgementsMap.get(daRating)[0]) + Timings.smallestRating = daRating; + } + if (cache) rating.visible = false; }