like a lot of things lmaooo
This commit is contained in:
parent
cef2cbde05
commit
83a9f484ef
21
source/ConvertScore.hx
Normal file
21
source/ConvertScore.hx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
class ConvertScore
|
||||||
|
{
|
||||||
|
public static function convertScore(noteDiff:Float):Int
|
||||||
|
{
|
||||||
|
var daRating:String = Ratings.CalculateRating(noteDiff, 166);
|
||||||
|
|
||||||
|
switch(daRating)
|
||||||
|
{
|
||||||
|
case 'shit':
|
||||||
|
return -300;
|
||||||
|
case 'bad':
|
||||||
|
return 0;
|
||||||
|
case 'good':
|
||||||
|
return 200;
|
||||||
|
case 'sick':
|
||||||
|
return 350;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -26,9 +26,6 @@ class KadeEngineData
|
|||||||
if (FlxG.save.data.songPosition == null)
|
if (FlxG.save.data.songPosition == null)
|
||||||
FlxG.save.data.songPosition = false;
|
FlxG.save.data.songPosition = false;
|
||||||
|
|
||||||
if (FlxG.save.data.etternaMode == null)
|
|
||||||
FlxG.save.data.etternaMode = false;
|
|
||||||
|
|
||||||
if (FlxG.save.data.fps == null)
|
if (FlxG.save.data.fps == null)
|
||||||
FlxG.save.data.fps = false;
|
FlxG.save.data.fps = false;
|
||||||
|
|
||||||
@ -54,6 +51,12 @@ class KadeEngineData
|
|||||||
if (FlxG.save.data.npsDisplay == null)
|
if (FlxG.save.data.npsDisplay == null)
|
||||||
FlxG.save.data.npsDisplay = false;
|
FlxG.save.data.npsDisplay = false;
|
||||||
|
|
||||||
|
if (FlxG.save.data.frames == null)
|
||||||
|
FlxG.save.data.frames = 10;
|
||||||
|
|
||||||
|
Conductor.safeFrames = FlxG.save.data.frames;
|
||||||
|
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
|
||||||
|
|
||||||
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,19 +45,28 @@ class Option
|
|||||||
}
|
}
|
||||||
private var description:String = "";
|
private var description:String = "";
|
||||||
private var display:String;
|
private var display:String;
|
||||||
|
private var acceptValues:Bool = false;
|
||||||
public final function getDisplay():String
|
public final function getDisplay():String
|
||||||
{
|
{
|
||||||
return display;
|
return display;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final function getAccept():Bool
|
||||||
|
{
|
||||||
|
return acceptValues;
|
||||||
|
}
|
||||||
|
|
||||||
public final function getDescription():String
|
public final function getDescription():String
|
||||||
{
|
{
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Returns whether the label is to be updated.
|
// Returns whether the label is to be updated.
|
||||||
public function press():Bool { return throw "stub!"; }
|
public function press():Bool { return throw "stub!"; }
|
||||||
private function updateDisplay():String { return throw "stub!"; }
|
private function updateDisplay():String { return throw "stub!"; }
|
||||||
|
public function left():Bool { return throw "stub!"; }
|
||||||
|
public function right():Bool { return throw "stub!"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
class DFJKOption extends Option
|
class DFJKOption extends Option
|
||||||
@ -150,24 +159,55 @@ class SongPositionOption extends Option
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class EtternaModeOption extends Option
|
class Judgement extends Option
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function new(desc:String)
|
public function new(desc:String)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
description = desc;
|
description = desc;
|
||||||
|
acceptValues = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override function press():Bool
|
public override function press():Bool
|
||||||
{
|
{
|
||||||
FlxG.save.data.etternaMode = !FlxG.save.data.etternaMode;
|
|
||||||
display = updateDisplay();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private override function updateDisplay():String
|
private override function updateDisplay():String
|
||||||
{
|
{
|
||||||
return "Etterna Mode " + (!FlxG.save.data.etternaMode ? "off" : "on");
|
return "Safe Frames";
|
||||||
|
}
|
||||||
|
|
||||||
|
override function left():Bool {
|
||||||
|
Conductor.safeFrames -= 1;
|
||||||
|
FlxG.save.data.frames = Conductor.safeFrames;
|
||||||
|
|
||||||
|
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current Safe Frames: " + Conductor.safeFrames + " - Description - " + description +
|
||||||
|
" - SIK: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.25, 0) +
|
||||||
|
"ms GD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.40, 0) +
|
||||||
|
"ms BD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.50, 0) +
|
||||||
|
"ms SHT: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.70, 0) +
|
||||||
|
"ms TOTAL: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
override function right():Bool {
|
||||||
|
Conductor.safeFrames += 1;
|
||||||
|
FlxG.save.data.frames = Conductor.safeFrames;
|
||||||
|
|
||||||
|
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current Safe Frames: " + Conductor.safeFrames + " - Description - " + description +
|
||||||
|
" - SIK: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.25, 0) +
|
||||||
|
"ms GD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.40, 0) +
|
||||||
|
"ms BD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.50, 0) +
|
||||||
|
"ms SHT: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.70, 0) +
|
||||||
|
"ms TOTAL: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +239,7 @@ class FPSCapOption extends Option
|
|||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
description = desc;
|
description = desc;
|
||||||
|
acceptValues = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override function press():Bool
|
public override function press():Bool
|
||||||
@ -210,6 +251,28 @@ class FPSCapOption extends Option
|
|||||||
{
|
{
|
||||||
return "FPS Cap";
|
return "FPS Cap";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override function right():Bool {
|
||||||
|
if (FlxG.save.data.fpsCap > 290)
|
||||||
|
return false;
|
||||||
|
FlxG.save.data.fpsCap = FlxG.save.data.fpsCap + 10;
|
||||||
|
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current FPS Cap: " + FlxG.save.data.fpsCap + " - Description - " + description;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
override function left():Bool {
|
||||||
|
if (FlxG.save.data.fpsCap < 60)
|
||||||
|
return false;
|
||||||
|
FlxG.save.data.fpsCap = FlxG.save.data.fpsCap - 10;
|
||||||
|
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current FPS Cap: " + FlxG.save.data.fpsCap + " - Description - " + description;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,6 +282,7 @@ class ScrollSpeedOption extends Option
|
|||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
description = desc;
|
description = desc;
|
||||||
|
acceptValues = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override function press():Bool
|
public override function press():Bool
|
||||||
@ -230,6 +294,33 @@ class ScrollSpeedOption extends Option
|
|||||||
{
|
{
|
||||||
return "Scroll Speed";
|
return "Scroll Speed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override function right():Bool {
|
||||||
|
FlxG.save.data.scrollSpeed += 0.1;
|
||||||
|
|
||||||
|
if (FlxG.save.data.scrollSpeed < 1)
|
||||||
|
FlxG.save.data.scrollSpeed = 1;
|
||||||
|
|
||||||
|
if (FlxG.save.data.scrollSpeed > 10)
|
||||||
|
FlxG.save.data.scrollSpeed = 10;
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current Scroll Speed: " + OptionsMenu.truncateFloat(FlxG.save.data.scrollSpeed,1) + " - Description - " + description;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
override function left():Bool {
|
||||||
|
FlxG.save.data.scrollSpeed -= 0.1;
|
||||||
|
|
||||||
|
if (FlxG.save.data.scrollSpeed < 1)
|
||||||
|
FlxG.save.data.scrollSpeed = 1;
|
||||||
|
|
||||||
|
if (FlxG.save.data.scrollSpeed > 10)
|
||||||
|
FlxG.save.data.scrollSpeed = 10;
|
||||||
|
|
||||||
|
|
||||||
|
OptionsMenu.versionShit.text = "Current Scroll Speed: " + OptionsMenu.truncateFloat(FlxG.save.data.scrollSpeed,1) + " - Description - " + description;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,10 @@ class OptionsMenu extends MusicBeatState
|
|||||||
var options:Array<OptionCatagory> = [
|
var options:Array<OptionCatagory> = [
|
||||||
new OptionCatagory("Gameplay", [
|
new OptionCatagory("Gameplay", [
|
||||||
new DFJKOption(controls),
|
new DFJKOption(controls),
|
||||||
new FPSCapOption("Cap your FPS (Left for -10, Right for -10)"),
|
new Judgement("Customize your Hit Timings (LEFT or RIGHT)"),
|
||||||
|
#if !html
|
||||||
|
new FPSCapOption("Cap your FPS (Left for -10, Right for -10. SHIFT to go faster)"),
|
||||||
|
#end
|
||||||
new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)"),
|
new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)"),
|
||||||
new OffsetMenu("Get a note offset based off of your inputs!"),
|
new OffsetMenu("Get a note offset based off of your inputs!"),
|
||||||
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
||||||
@ -30,22 +33,24 @@ class OptionsMenu extends MusicBeatState
|
|||||||
new OptionCatagory("Appearence", [
|
new OptionCatagory("Appearence", [
|
||||||
new SongPositionOption("Show the songs current position (as a bar)"),
|
new SongPositionOption("Show the songs current position (as a bar)"),
|
||||||
new DownscrollOption("Change the layout of the strumline."),
|
new DownscrollOption("Change the layout of the strumline."),
|
||||||
|
#if !html
|
||||||
new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggeled on)"),
|
new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggeled on)"),
|
||||||
|
#end
|
||||||
new AccuracyOption("Display accuracy information."),
|
new AccuracyOption("Display accuracy information."),
|
||||||
new NPSDisplayOption("Shows your current Notes Per Second.")
|
new NPSDisplayOption("Shows your current Notes Per Second.")
|
||||||
]),
|
]),
|
||||||
|
#if !mobile
|
||||||
new OptionCatagory("Misc", [
|
new OptionCatagory("Misc", [
|
||||||
new EtternaModeOption("Harder Hit Windows and a different scoring system."),
|
|
||||||
#if !mobile
|
|
||||||
new FPSOption("Toggle the FPS Counter"),
|
new FPSOption("Toggle the FPS Counter"),
|
||||||
#end
|
|
||||||
new ReplayOption("View replays")
|
new ReplayOption("View replays")
|
||||||
])
|
])
|
||||||
|
#end
|
||||||
];
|
];
|
||||||
|
|
||||||
private var currentDescription:String = "";
|
private var currentDescription:String = "";
|
||||||
private var grpControls:FlxTypedGroup<Alphabet>;
|
private var grpControls:FlxTypedGroup<Alphabet>;
|
||||||
var versionShit:FlxText;
|
public static var versionShit:FlxText;
|
||||||
|
|
||||||
var currentSelectedCat:OptionCatagory;
|
var currentSelectedCat:OptionCatagory;
|
||||||
|
|
||||||
@ -84,7 +89,7 @@ class OptionsMenu extends MusicBeatState
|
|||||||
|
|
||||||
var isCat:Bool = false;
|
var isCat:Bool = false;
|
||||||
|
|
||||||
function truncateFloat( number : Float, precision : Int): Float {
|
public static function truncateFloat( number : Float, precision : Int): Float {
|
||||||
var num = number;
|
var num = number;
|
||||||
num = num * Math.pow(10, precision);
|
num = num * Math.pow(10, precision);
|
||||||
num = Math.round( num ) / Math.pow(10, precision);
|
num = Math.round( num ) / Math.pow(10, precision);
|
||||||
@ -118,51 +123,36 @@ class OptionsMenu extends MusicBeatState
|
|||||||
|
|
||||||
if (isCat)
|
if (isCat)
|
||||||
{
|
{
|
||||||
switch(currentSelectedCat.getOptions()[curSelected].getDisplay())
|
if (currentSelectedCat.getOptions()[curSelected].getAccept())
|
||||||
{
|
{
|
||||||
case 'FPS Cap':
|
if (FlxG.keys.pressed.SHIFT)
|
||||||
var fps = (cast (Lib.current.getChildAt(0), Main)).getFPSCap();
|
|
||||||
|
|
||||||
if (FlxG.keys.pressed.RIGHT && fps < 285) // actual cap is 285
|
|
||||||
{
|
{
|
||||||
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(fps + 10);
|
if (FlxG.keys.pressed.RIGHT)
|
||||||
FlxG.save.data.fpsCap = fps + 10;
|
currentSelectedCat.getOptions()[curSelected].right();
|
||||||
|
if (FlxG.keys.pressed.LEFT)
|
||||||
|
currentSelectedCat.getOptions()[curSelected].left();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (FlxG.keys.pressed.LEFT && fps > 60)
|
{
|
||||||
{
|
|
||||||
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(fps - 10);
|
|
||||||
FlxG.save.data.fpsCap = fps - 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
versionShit.text = "Current FPS Cap: " + fps + " - Description - " + currentDescription;
|
|
||||||
|
|
||||||
|
|
||||||
case 'Scroll Speed':
|
|
||||||
if (FlxG.keys.justPressed.RIGHT)
|
if (FlxG.keys.justPressed.RIGHT)
|
||||||
FlxG.save.data.scrollSpeed += 0.1;
|
currentSelectedCat.getOptions()[curSelected].right();
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.LEFT)
|
if (FlxG.keys.justPressed.LEFT)
|
||||||
FlxG.save.data.scrollSpeed -= 0.1;
|
currentSelectedCat.getOptions()[curSelected].left();
|
||||||
|
}
|
||||||
// caps
|
}
|
||||||
|
else
|
||||||
if (FlxG.save.data.scrollSpeed < 1)
|
{
|
||||||
FlxG.save.data.scrollSpeed = 1;
|
if (FlxG.keys.pressed.SHIFT)
|
||||||
|
|
||||||
if (FlxG.save.data.scrollSpeed > 10)
|
|
||||||
FlxG.save.data.scrollSpeed = 10;
|
|
||||||
|
|
||||||
|
|
||||||
versionShit.text = "Current Scroll Speed: " + truncateFloat(FlxG.save.data.scrollSpeed,1) + " - Description - " + currentDescription;
|
|
||||||
default:
|
|
||||||
if (FlxG.keys.pressed.RIGHT)
|
if (FlxG.keys.pressed.RIGHT)
|
||||||
FlxG.save.data.offset += 0.01;
|
FlxG.save.data.offset += 1;
|
||||||
|
else if (FlxG.keys.pressed.LEFT)
|
||||||
|
FlxG.save.data.offset -= 1;
|
||||||
|
else if (controls.RIGHT_P)
|
||||||
|
FlxG.save.data.offset += 0.1;
|
||||||
|
else if (controls.LEFT_P)
|
||||||
|
FlxG.save.data.offset -= 0.1;
|
||||||
|
|
||||||
if (FlxG.keys.pressed.LEFT)
|
versionShit.text = "Offset (Left, Right, Shift to go faster): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
||||||
FlxG.save.data.offset -= 0.01;
|
|
||||||
|
|
||||||
versionShit.text = "Offset (Left, Right): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -173,7 +163,7 @@ class OptionsMenu extends MusicBeatState
|
|||||||
if (FlxG.keys.pressed.LEFT)
|
if (FlxG.keys.pressed.LEFT)
|
||||||
FlxG.save.data.offset-= 0.01;
|
FlxG.save.data.offset-= 0.01;
|
||||||
|
|
||||||
versionShit.text = "Offset (Left, Right): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
versionShit.text = "Offset (Left, Right, Shift to go faster): " + truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,7 +107,9 @@ class PlayState extends MusicBeatState
|
|||||||
private var combo:Int = 0;
|
private var combo:Int = 0;
|
||||||
public static var misses:Int = 0;
|
public static var misses:Int = 0;
|
||||||
private var accuracy:Float = 0.00;
|
private var accuracy:Float = 0.00;
|
||||||
|
private var accuracyDefault:Float = 0.00;
|
||||||
private var totalNotesHit:Float = 0;
|
private var totalNotesHit:Float = 0;
|
||||||
|
private var totalNotesHitDefault:Float = 0;
|
||||||
private var totalPlayed:Int = 0;
|
private var totalPlayed:Int = 0;
|
||||||
private var ss:Bool = false;
|
private var ss:Bool = false;
|
||||||
|
|
||||||
@ -154,6 +156,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var talking:Bool = true;
|
var talking:Bool = true;
|
||||||
var songScore:Int = 0;
|
var songScore:Int = 0;
|
||||||
|
var songScoreDef:Int = 0;
|
||||||
var scoreTxt:FlxText;
|
var scoreTxt:FlxText;
|
||||||
var replayTxt:FlxText;
|
var replayTxt:FlxText;
|
||||||
|
|
||||||
@ -176,12 +179,6 @@ class PlayState extends MusicBeatState
|
|||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (FlxG.save.data.etternaMode)
|
|
||||||
Conductor.safeFrames = 5; // 116ms hit window (j3-4)
|
|
||||||
else
|
|
||||||
Conductor.safeFrames = 10; // 166ms hit window (j1)
|
|
||||||
|
|
||||||
|
|
||||||
if (FlxG.sound.music != null)
|
if (FlxG.sound.music != null)
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
@ -257,6 +254,8 @@ class PlayState extends MusicBeatState
|
|||||||
Conductor.mapBPMChanges(SONG);
|
Conductor.mapBPMChanges(SONG);
|
||||||
Conductor.changeBPM(SONG.bpm);
|
Conductor.changeBPM(SONG.bpm);
|
||||||
|
|
||||||
|
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset);
|
||||||
|
|
||||||
switch (SONG.song.toLowerCase())
|
switch (SONG.song.toLowerCase())
|
||||||
{
|
{
|
||||||
case 'tutorial':
|
case 'tutorial':
|
||||||
@ -1615,7 +1614,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
if (FlxG.save.data.accuracyDisplay)
|
if (FlxG.save.data.accuracyDisplay)
|
||||||
{
|
{
|
||||||
scoreTxt.text = (FlxG.save.data.npsDisplay ? "NPS: " + nps + " | " : "") + "Score:" + (FlxG.save.data.etternaMode ? Math.max(0,etternaModeScore) + " (" + songScore + ")" : "" + songScore) + " | Combo Breaks:" + misses + " | Accuracy:" + truncateFloat(accuracy, 2) + "% | " + generateRanking();
|
scoreTxt.text = (FlxG.save.data.npsDisplay ? "NPS: " + nps + " | " : "") + "Score:" + (Conductor.safeFrames != 10 ? songScore + " (" + songScoreDef + ")" : "" + songScore) + " | Combo Breaks:" + misses + " | Accuracy:" + truncateFloat(accuracy, 2) + "% | " + generateRanking();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2058,8 +2057,8 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
private function popUpScore(daNote:Note):Void
|
private function popUpScore(daNote:Note):Void
|
||||||
{
|
{
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(Conductor.songPosition - daNote.strumTime);
|
||||||
var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
|
var wife:Float = EtternaFunctions.wife3(noteDiff, 1.7);
|
||||||
// boyfriend.playAnim('hey');
|
// boyfriend.playAnim('hey');
|
||||||
vocals.volume = 1;
|
vocals.volume = 1;
|
||||||
|
|
||||||
@ -2107,9 +2106,6 @@ class PlayState extends MusicBeatState
|
|||||||
sicks++;
|
sicks++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.save.data.etternaMode)
|
|
||||||
etternaModeScore += Math.round(score / wife);
|
|
||||||
|
|
||||||
// trace('Wife accuracy loss: ' + wife + ' | Rating: ' + daRating + ' | Score: ' + score + ' | Weight: ' + (1 - wife));
|
// trace('Wife accuracy loss: ' + wife + ' | Rating: ' + daRating + ' | Score: ' + score + ' | Weight: ' + (1 - wife));
|
||||||
|
|
||||||
if (daRating != 'shit' || daRating != 'bad')
|
if (daRating != 'shit' || daRating != 'bad')
|
||||||
@ -2117,6 +2113,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
|
|
||||||
songScore += Math.round(score);
|
songScore += Math.round(score);
|
||||||
|
songScoreDef += Math.round(ConvertScore.convertScore(noteDiff));
|
||||||
|
|
||||||
/* if (combo > 60)
|
/* if (combo > 60)
|
||||||
daRating = 'sick';
|
daRating = 'sick';
|
||||||
@ -2198,6 +2195,8 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
add(currentTimingShown);
|
add(currentTimingShown);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||||
comboSpr.screenCenter();
|
comboSpr.screenCenter();
|
||||||
comboSpr.x = rating.x;
|
comboSpr.x = rating.x;
|
||||||
@ -2463,14 +2462,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
|
daNote.rating = Ratings.CalculateRating(noteDiff);
|
||||||
daNote.rating = "shit";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
|
|
||||||
daNote.rating = "bad";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
|
|
||||||
daNote.rating = "good";
|
|
||||||
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
|
|
||||||
daNote.rating = "sick";
|
|
||||||
|
|
||||||
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
|
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
|
||||||
{
|
{
|
||||||
@ -2520,14 +2512,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
|
daNote.rating = Ratings.CalculateRating(noteDiff);
|
||||||
daNote.rating = "shit";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
|
|
||||||
daNote.rating = "bad";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
|
|
||||||
daNote.rating = "good";
|
|
||||||
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
|
|
||||||
daNote.rating = "sick";
|
|
||||||
|
|
||||||
goodNoteHit(daNote);
|
goodNoteHit(daNote);
|
||||||
trace('force note hit');
|
trace('force note hit');
|
||||||
@ -2776,12 +2761,9 @@ class PlayState extends MusicBeatState
|
|||||||
*/
|
*/
|
||||||
function updateAccuracy()
|
function updateAccuracy()
|
||||||
{
|
{
|
||||||
if (misses > 0 || accuracy < 96)
|
|
||||||
fc = false;
|
|
||||||
else
|
|
||||||
fc = true;
|
|
||||||
totalPlayed += 1;
|
totalPlayed += 1;
|
||||||
accuracy = Math.max(0,totalNotesHit / totalPlayed * 100);
|
accuracy = Math.max(0,totalNotesHit / totalPlayed * 100);
|
||||||
|
accuracyDefault = Math.max(0, totalNotesHitDefault / totalPlayed * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2870,14 +2852,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var noteDiff:Float = Math.abs(note.strumTime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(note.strumTime - Conductor.songPosition);
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
|
note.rating = Ratings.CalculateRating(noteDiff);
|
||||||
note.rating = "shit";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
|
|
||||||
note.rating = "bad";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
|
|
||||||
note.rating = "good";
|
|
||||||
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
|
|
||||||
note.rating = "sick";
|
|
||||||
|
|
||||||
if (!note.isSustainNote)
|
if (!note.isSustainNote)
|
||||||
notesHitArray.push(Date.now());
|
notesHitArray.push(Date.now());
|
||||||
|
30
source/Ratings.hx
Normal file
30
source/Ratings.hx
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
class Ratings
|
||||||
|
{
|
||||||
|
public static function CalculateRating(noteDiff:Float, ?customSafeZone:Float):String
|
||||||
|
{
|
||||||
|
|
||||||
|
if (customSafeZone == null)
|
||||||
|
{
|
||||||
|
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
|
||||||
|
customSafeZone = Conductor.safeZoneOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// I HATE THIS IF CONDITION
|
||||||
|
// IF LEMON SEES THIS I'M SORRY :(
|
||||||
|
|
||||||
|
if (noteDiff > customSafeZone * 0.50) // way early
|
||||||
|
return "shit";
|
||||||
|
else if (noteDiff > customSafeZone * 0.26) // early
|
||||||
|
return "bad";
|
||||||
|
else if (noteDiff > customSafeZone * 0.20) // your kinda there
|
||||||
|
return "good";
|
||||||
|
else if (noteDiff < customSafeZone * -0.20) // little late
|
||||||
|
return "good";
|
||||||
|
else if (noteDiff < customSafeZone * -0.26) // late
|
||||||
|
return "bad";
|
||||||
|
else if (noteDiff < customSafeZone * -0.50) // late as fuck
|
||||||
|
return "shit";
|
||||||
|
return "sick";
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user