Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
shit fix :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed Mar 30, 2021
1 parent 7b62e78 commit 69ee9f0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
31 changes: 28 additions & 3 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Note extends FlxSprite
public static var BLUE_NOTE:Int = 1;
public static var RED_NOTE:Int = 3;

public var rating:String = "shit";

public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
{
super();
Expand Down Expand Up @@ -178,15 +180,38 @@ class Note extends FlxSprite

if (mustPress)
{
// The * 0.5 is so that it's easier to hit them too late, instead of too early
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset)
canBeHit = true;
else
canBeHit = false;

if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
var noteDiff:Float = Math.abs(strumTime - Conductor.songPosition);

if (canBeHit)
{
if (noteDiff > Conductor.safeZoneOffset * 0.95)
rating = "shit";
else if (noteDiff < Conductor.safeZoneOffset * -0.95)
rating = "shit";
else if (noteDiff > Conductor.safeZoneOffset * 0.70)
rating = "bad";
else if (noteDiff < Conductor.safeZoneOffset * -0.75)
rating = "bad";
else if (noteDiff > Conductor.safeZoneOffset * 0.45)
rating = "good";
else if (noteDiff < Conductor.safeZoneOffset * -0.45)
rating = "good";
else
rating = "sick";
FlxG.watch.addQuick("Note " + this.ID,rating);
}

if (strumTime < Conductor.songPosition - (Conductor.safeZoneOffset * 0.80) && !wasGoodHit)
{
tooLate = true;
rating = "shit";
}
}
else
{
Expand Down
76 changes: 26 additions & 50 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2009,14 +2009,15 @@ class PlayState extends MusicBeatState
}
}


var endingSong:Bool = false;

var timeShown = 0;
var currentTimingShown:FlxText = null;

private function popUpScore(strumtime:Float):Void
private function popUpScore(daNote:Note):Void
{
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
// boyfriend.playAnim('hey');
vocals.volume = 1;
Expand All @@ -2032,68 +2033,38 @@ class PlayState extends MusicBeatState

var rating:FlxSprite = new FlxSprite();
var score:Float = 350;

var daRating:String = "sick";


totalNotesHit += wife;

if (noteDiff > Conductor.safeZoneOffset * 1.25)
{
daRating = 'shit';
score = -3000;
combo = 0;
misses++;
health -= 0.2;
ss = false;
shits++;
}
else if (noteDiff < Conductor.safeZoneOffset * -1.25)
{
daRating = 'shit';
score = -3000;
var daRating = daNote.rating;

switch(daRating)
{
case 'shit':
score = -300;
combo = 0;
misses++;
health -= 0.2;
ss = false;
shits++;
}
else if (noteDiff < Conductor.safeZoneOffset * -0.45)
{
case 'bad':
daRating = 'bad';
score = 0;
health -= 0.03;
health -= 0.06;
ss = false;
bads++;
}
else if (noteDiff > Conductor.safeZoneOffset * 0.45)
{
daRating = 'bad';
score = 0;
health -= 0.03;
ss = false;
bads++;
}
else if (noteDiff < Conductor.safeZoneOffset * -0.25)
{
daRating = 'good';
score = 200;
ss = false;
goods++;
}
else if (noteDiff > Conductor.safeZoneOffset * 0.35)
{
case 'good':
daRating = 'good';
score = 200;
ss = false;
goods++;
}
if (daRating == 'sick')
{
if (health < 2)
health += 0.1;
sicks++;
if (health < 2)
health += 0.04;
case 'sick':
if (health < 2)
health += 0.1;
sicks++;
}


if (FlxG.save.data.etternaMode)
etternaModeScore += Math.round(score / wife);
Expand Down Expand Up @@ -2771,7 +2742,12 @@ class PlayState extends MusicBeatState
}
else
{
playerStrums.members[note.noteData].animation.play('static');
// this is bad but fuck you
playerStrums.members[0].animation.play('static');
playerStrums.members[1].animation.play('static');
playerStrums.members[2].animation.play('static');
playerStrums.members[3].animation.play('static');
health -= 0.2;
trace('mash ' + mashing);
}

Expand All @@ -2790,7 +2766,7 @@ class PlayState extends MusicBeatState
{
if (!note.isSustainNote)
{
popUpScore(note.strumTime);
popUpScore(note);
combo += 1;
}
else
Expand Down

0 comments on commit 69ee9f0

Please sign in to comment.