From 0f87321db5172aadff11129290a88d119e8c1f14 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 20 Mar 2021 02:07:08 -0700 Subject: [PATCH] forgot to push pr --- source/MainMenuState.hx | 2 +- source/PlayState.hx | 16 +++++++++++++--- version.downloadMe | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 4c4182f..a90db07 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -32,7 +32,7 @@ class MainMenuState extends MusicBeatState var newGaming2:FlxText; var newInput:Bool = true; - public static var kadeEngineVer:String = "1.2"; + public static var kadeEngineVer:String = "1.2.1-BETA"; public static var gameVer:String = "0.2.7.1"; var magenta:FlxSprite; diff --git a/source/PlayState.hx b/source/PlayState.hx index 24df30a..bb696f1 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2372,6 +2372,7 @@ class PlayState extends MusicBeatState } var mashing:Int = 0; + var mashViolations:Int = 0; function noteCheck(controlArray:Array, note:Note):Void // sorry lol { @@ -2398,8 +2399,13 @@ class PlayState extends MusicBeatState mashing++; } - if (mashing <= getKeyPresses(note)) - goodNoteHit(note); + // ANTI MASH CODE FOR THE BOYS + + if (mashing <= getKeyPresses(note) && mashViolations < 3) + { + mashViolations++; + goodNoteHit(note, !(mashing <= getKeyPresses(note))); + } else { playerStrums.members[note.noteData].animation.play('static'); @@ -2412,10 +2418,14 @@ class PlayState extends MusicBeatState } } - function goodNoteHit(note:Note):Void + function goodNoteHit(note:Note, resetMashViolation = true):Void { if (mashing != 0) mashing = 0; + + if (resetMashViolation) + mashViolations = 0; + if (!note.wasGoodHit) { if (!note.isSustainNote) diff --git a/version.downloadMe b/version.downloadMe index 5625e59..ea710ab 100644 --- a/version.downloadMe +++ b/version.downloadMe @@ -1 +1 @@ -1.2 +1.2 \ No newline at end of file