shit fix :)

This commit is contained in:
KadeDev 2021-03-30 09:39:08 -07:00
parent 7b62e78c94
commit 69ee9f0a01
2 changed files with 66 additions and 65 deletions

View File

@ -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();
@ -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
{

View File

@ -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;
@ -2033,67 +2034,37 @@ 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;
combo = 0;
misses++;
health -= 0.2;
ss = false;
shits++;
}
else if (noteDiff < Conductor.safeZoneOffset * -0.45)
{
daRating = 'bad';
score = 0;
health -= 0.03;
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)
{
daRating = 'good';
score = 200;
ss = false;
goods++;
}
if (daRating == 'sick')
{
if (health < 2)
health += 0.1;
sicks++;
}
var daRating = daNote.rating;
switch(daRating)
{
case 'shit':
score = -300;
combo = 0;
misses++;
health -= 0.2;
ss = false;
shits++;
case 'bad':
daRating = 'bad';
score = 0;
health -= 0.06;
ss = false;
bads++;
case 'good':
daRating = 'good';
score = 200;
ss = false;
goods++;
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);
@ -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);
}
@ -2790,7 +2766,7 @@ class PlayState extends MusicBeatState
{
if (!note.isSustainNote)
{
popUpScore(note.strumTime);
popUpScore(note);
combo += 1;
}
else