free skill option
This commit is contained in:
parent
42e916df6d
commit
b2929d9ab8
@ -20,14 +20,16 @@ class Highscore
|
|||||||
NGio.postScore(score, song);
|
NGio.postScore(score, song);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
if(!FlxG.save.data.botplay)
|
||||||
if (songScores.exists(daSong))
|
|
||||||
{
|
{
|
||||||
if (songScores.get(daSong) < score)
|
if (songScores.exists(daSong))
|
||||||
|
{
|
||||||
|
if (songScores.get(daSong) < score)
|
||||||
|
setScore(daSong, score);
|
||||||
|
}
|
||||||
|
else
|
||||||
setScore(daSong, score);
|
setScore(daSong, score);
|
||||||
}
|
}else trace('BotPlay detected. Score saving is disabled.');
|
||||||
else
|
|
||||||
setScore(daSong, score);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
|
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
|
||||||
@ -37,16 +39,18 @@ class Highscore
|
|||||||
NGio.postScore(score, "Week " + week);
|
NGio.postScore(score, "Week " + week);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
if(!FlxG.save.data.botplay)
|
||||||
var daWeek:String = formatSong('week' + week, diff);
|
|
||||||
|
|
||||||
if (songScores.exists(daWeek))
|
|
||||||
{
|
{
|
||||||
if (songScores.get(daWeek) < score)
|
var daWeek:String = formatSong('week' + week, diff);
|
||||||
|
|
||||||
|
if (songScores.exists(daWeek))
|
||||||
|
{
|
||||||
|
if (songScores.get(daWeek) < score)
|
||||||
|
setScore(daWeek, score);
|
||||||
|
}
|
||||||
|
else
|
||||||
setScore(daWeek, score);
|
setScore(daWeek, score);
|
||||||
}
|
}else trace('BotPlay detected. Score saving is disabled.');
|
||||||
else
|
|
||||||
setScore(daWeek, score);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,4 +99,4 @@ class Highscore
|
|||||||
songScores = FlxG.save.data.songScores;
|
songScores = FlxG.save.data.songScores;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,75 +1,78 @@
|
|||||||
import openfl.Lib;
|
import openfl.Lib;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
|
||||||
class KadeEngineData
|
class KadeEngineData
|
||||||
{
|
{
|
||||||
public static function initSave()
|
public static function initSave()
|
||||||
{
|
{
|
||||||
if (FlxG.save.data.newInput == null)
|
if (FlxG.save.data.newInput == null)
|
||||||
FlxG.save.data.newInput = true;
|
FlxG.save.data.newInput = true;
|
||||||
|
|
||||||
if (FlxG.save.data.downscroll == null)
|
if (FlxG.save.data.downscroll == null)
|
||||||
FlxG.save.data.downscroll = false;
|
FlxG.save.data.downscroll = false;
|
||||||
|
|
||||||
if (FlxG.save.data.dfjk == null)
|
if (FlxG.save.data.dfjk == null)
|
||||||
FlxG.save.data.dfjk = false;
|
FlxG.save.data.dfjk = false;
|
||||||
|
|
||||||
if (FlxG.save.data.accuracyDisplay == null)
|
if (FlxG.save.data.accuracyDisplay == null)
|
||||||
FlxG.save.data.accuracyDisplay = true;
|
FlxG.save.data.accuracyDisplay = true;
|
||||||
|
|
||||||
if (FlxG.save.data.offset == null)
|
if (FlxG.save.data.offset == null)
|
||||||
FlxG.save.data.offset = 0;
|
FlxG.save.data.offset = 0;
|
||||||
|
|
||||||
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.fps == null)
|
if (FlxG.save.data.fps == null)
|
||||||
FlxG.save.data.fps = false;
|
FlxG.save.data.fps = false;
|
||||||
|
|
||||||
if (FlxG.save.data.changedHit == null)
|
if (FlxG.save.data.changedHit == null)
|
||||||
{
|
{
|
||||||
FlxG.save.data.changedHitX = -1;
|
FlxG.save.data.changedHitX = -1;
|
||||||
FlxG.save.data.changedHitY = -1;
|
FlxG.save.data.changedHitY = -1;
|
||||||
FlxG.save.data.changedHit = false;
|
FlxG.save.data.changedHit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.save.data.fpsRain == null)
|
if (FlxG.save.data.fpsRain == null)
|
||||||
FlxG.save.data.fpsRain = false;
|
FlxG.save.data.fpsRain = false;
|
||||||
|
|
||||||
if (FlxG.save.data.fpsCap == null)
|
if (FlxG.save.data.fpsCap == null)
|
||||||
FlxG.save.data.fpsCap = 120;
|
FlxG.save.data.fpsCap = 120;
|
||||||
|
|
||||||
if (FlxG.save.data.fpsCap > 285 || FlxG.save.data.fpsCap < 60)
|
if (FlxG.save.data.fpsCap > 285 || FlxG.save.data.fpsCap < 60)
|
||||||
FlxG.save.data.fpsCap = 120; // baby proof so you can't hard lock ur copy of kade engine
|
FlxG.save.data.fpsCap = 120; // baby proof so you can't hard lock ur copy of kade engine
|
||||||
|
|
||||||
if (FlxG.save.data.scrollSpeed == null)
|
if (FlxG.save.data.scrollSpeed == null)
|
||||||
FlxG.save.data.scrollSpeed = 1;
|
FlxG.save.data.scrollSpeed = 1;
|
||||||
|
|
||||||
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)
|
if (FlxG.save.data.frames == null)
|
||||||
FlxG.save.data.frames = 10;
|
FlxG.save.data.frames = 10;
|
||||||
|
|
||||||
if (FlxG.save.data.accuracyMod == null)
|
if (FlxG.save.data.accuracyMod == null)
|
||||||
FlxG.save.data.accuracyMod = 1;
|
FlxG.save.data.accuracyMod = 1;
|
||||||
|
|
||||||
if (FlxG.save.data.watermark == null)
|
if (FlxG.save.data.watermark == null)
|
||||||
FlxG.save.data.watermark = true;
|
FlxG.save.data.watermark = true;
|
||||||
|
|
||||||
if (FlxG.save.data.ghost == null)
|
if (FlxG.save.data.ghost == null)
|
||||||
FlxG.save.data.ghost = true;
|
FlxG.save.data.ghost = true;
|
||||||
|
|
||||||
if (FlxG.save.data.distractions == null)
|
if (FlxG.save.data.distractions == null)
|
||||||
FlxG.save.data.distractions = true;
|
FlxG.save.data.distractions = true;
|
||||||
|
|
||||||
if (FlxG.save.data.flashing == null)
|
if (FlxG.save.data.flashing == null)
|
||||||
FlxG.save.data.flashing = true;
|
FlxG.save.data.flashing = true;
|
||||||
|
|
||||||
Conductor.recalculateTimings();
|
if (FlxG.save.data.botplay == null)
|
||||||
|
FlxG.save.data.botplay = false;
|
||||||
Main.watermarks = FlxG.save.data.watermark;
|
|
||||||
|
Conductor.recalculateTimings();
|
||||||
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
|
||||||
}
|
Main.watermarks = FlxG.save.data.watermark;
|
||||||
}
|
|
||||||
|
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
|
||||||
|
}
|
||||||
|
}
|
@ -553,6 +553,22 @@ class OffsetMenu extends Option
|
|||||||
return "Time your offset";
|
return "Time your offset";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class BotPlay extends Option
|
||||||
|
{
|
||||||
|
public function new(desc:String)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
description = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override function press():Bool
|
||||||
|
{
|
||||||
|
FlxG.save.data.botplay = !FlxG.save.data.botplay;
|
||||||
|
trace('BotPlay : ' + FlxG.save.data.botplay);
|
||||||
|
display = updateDisplay();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private override function updateDisplay():String
|
||||||
|
return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off");
|
||||||
|
}
|
@ -58,8 +58,8 @@ class OptionsMenu extends MusicBeatState
|
|||||||
new FPSOption("Toggle the FPS Counter"),
|
new FPSOption("Toggle the FPS Counter"),
|
||||||
new ReplayOption("View replays"),
|
new ReplayOption("View replays"),
|
||||||
#end
|
#end
|
||||||
new WatermarkOption("Turn off all watermarks from the engine.")
|
new WatermarkOption("Turn off all watermarks from the engine."),
|
||||||
|
new BotPlay("Showcase your charts and mods with autoplay.")
|
||||||
])
|
])
|
||||||
|
|
||||||
];
|
];
|
||||||
@ -239,7 +239,7 @@ class OptionsMenu extends MusicBeatState
|
|||||||
if (isCat)
|
if (isCat)
|
||||||
currentDescription = currentSelectedCat.getOptions()[curSelected].getDescription();
|
currentDescription = currentSelectedCat.getOptions()[curSelected].getDescription();
|
||||||
else
|
else
|
||||||
currentDescription = "Please select a catagory";
|
currentDescription = "Please select a category";
|
||||||
versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription;
|
||||||
|
|
||||||
// selector.y = (70 * curSelected) + 30;
|
// selector.y = (70 * curSelected) + 30;
|
||||||
@ -261,4 +261,4 @@ class OptionsMenu extends MusicBeatState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -201,6 +201,8 @@ class PlayState extends MusicBeatState
|
|||||||
private var allowedToHeadbang:Bool = false;
|
private var allowedToHeadbang:Bool = false;
|
||||||
// Per song additive offset
|
// Per song additive offset
|
||||||
public static var songOffset:Float = 0;
|
public static var songOffset:Float = 0;
|
||||||
|
// BotPlay text
|
||||||
|
private var botPlayState:FlxText;
|
||||||
|
|
||||||
private var executeModchart = false;
|
private var executeModchart = false;
|
||||||
|
|
||||||
@ -299,7 +301,7 @@ 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 + '\nTS: ' + Conductor.timeScale);
|
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay);
|
||||||
|
|
||||||
switch (SONG.song.toLowerCase())
|
switch (SONG.song.toLowerCase())
|
||||||
{
|
{
|
||||||
@ -921,15 +923,22 @@ class PlayState extends MusicBeatState
|
|||||||
scoreTxt.scrollFactor.set();
|
scoreTxt.scrollFactor.set();
|
||||||
if (offsetTesting)
|
if (offsetTesting)
|
||||||
scoreTxt.x += 300;
|
scoreTxt.x += 300;
|
||||||
|
if(FlxG.save.data.botplay) scoreTxt.x = FlxG.width / 2 - 20;
|
||||||
add(scoreTxt);
|
add(scoreTxt);
|
||||||
|
|
||||||
replayTxt = new FlxText(healthBarBG.x + healthBarBG.width / 2 - 75, healthBarBG.y + (FlxG.save.data.downscroll ? 100 : -100), 0, "REPLAY", 20);
|
replayTxt = new FlxText(healthBarBG.x + healthBarBG.width / 2 - 75, healthBarBG.y + (FlxG.save.data.downscroll ? 100 : -100), 0, "REPLAY", 20);
|
||||||
replayTxt.setFormat(Paths.font("vcr.ttf"), 42, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
|
replayTxt.setFormat(Paths.font("vcr.ttf"), 42, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
|
||||||
replayTxt.scrollFactor.set();
|
replayTxt.scrollFactor.set();
|
||||||
if (loadRep)
|
if (loadRep)
|
||||||
{
|
{
|
||||||
add(replayTxt);
|
add(replayTxt);
|
||||||
}
|
}
|
||||||
|
// Literally copy-paste of the above, fu
|
||||||
|
botPlayState = new FlxText(healthBarBG.x + healthBarBG.width / 2 - 75, healthBarBG.y + (FlxG.save.data.downscroll ? 100 : -100), 0, "BOTPLAY", 20);
|
||||||
|
botPlayState.setFormat(Paths.font("vcr.ttf"), 42, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
|
||||||
|
botPlayState.scrollFactor.set();
|
||||||
|
|
||||||
|
if(FlxG.save.data.botplay) add(botPlayState);
|
||||||
|
|
||||||
iconP1 = new HealthIcon(SONG.player1, true);
|
iconP1 = new HealthIcon(SONG.player1, true);
|
||||||
iconP1.y = healthBar.y - (iconP1.height / 2);
|
iconP1.y = healthBar.y - (iconP1.height / 2);
|
||||||
@ -2141,9 +2150,19 @@ class PlayState extends MusicBeatState
|
|||||||
else
|
else
|
||||||
daNote.y += daNote.height / 2;
|
daNote.y += daNote.height / 2;
|
||||||
|
|
||||||
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= (strumLine.y + Note.swagWidth / 2))
|
// If not in botplay, only clip sustain notes when properly hit, botplay gets to clip it everytime
|
||||||
|
if(!FlxG.save.data.botplay)
|
||||||
{
|
{
|
||||||
// Clip to strumline
|
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= (strumLine.y + Note.swagWidth / 2))
|
||||||
|
{
|
||||||
|
// Clip to strumline
|
||||||
|
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
||||||
|
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
|
swagRect.y = daNote.frameHeight - swagRect.height;
|
||||||
|
|
||||||
|
daNote.clipRect = swagRect;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
||||||
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
swagRect.y = daNote.frameHeight - swagRect.height;
|
swagRect.y = daNote.frameHeight - swagRect.height;
|
||||||
@ -2161,9 +2180,18 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
daNote.y -= daNote.height / 2;
|
daNote.y -= daNote.height / 2;
|
||||||
|
|
||||||
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
|
if(!FlxG.save.data.botplay)
|
||||||
{
|
{
|
||||||
// Clip to strumline
|
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
|
||||||
|
{
|
||||||
|
// Clip to strumline
|
||||||
|
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
||||||
|
swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
|
swagRect.height -= swagRect.y;
|
||||||
|
|
||||||
|
daNote.clipRect = swagRect;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
||||||
swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
swagRect.height -= swagRect.y;
|
swagRect.height -= swagRect.y;
|
||||||
@ -2197,7 +2225,7 @@ class PlayState extends MusicBeatState
|
|||||||
dad.playAnim('singDOWN' + altAnim, true);
|
dad.playAnim('singDOWN' + altAnim, true);
|
||||||
case 0:
|
case 0:
|
||||||
dad.playAnim('singLEFT' + altAnim, true);
|
dad.playAnim('singLEFT' + altAnim, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
if (luaModchart != null)
|
if (luaModchart != null)
|
||||||
@ -2497,9 +2525,9 @@ class PlayState extends MusicBeatState
|
|||||||
rating.acceleration.y = 550;
|
rating.acceleration.y = 550;
|
||||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||||
|
|
||||||
|
|
||||||
var msTiming = HelperFunctions.truncateFloat(noteDiff, 3);
|
var msTiming = HelperFunctions.truncateFloat(noteDiff, 3);
|
||||||
|
if(FlxG.save.data.botplay) msTiming = 0;
|
||||||
|
|
||||||
if (currentTimingShown != null)
|
if (currentTimingShown != null)
|
||||||
remove(currentTimingShown);
|
remove(currentTimingShown);
|
||||||
@ -2545,10 +2573,8 @@ class PlayState extends MusicBeatState
|
|||||||
if (currentTimingShown.alpha != 1)
|
if (currentTimingShown.alpha != 1)
|
||||||
currentTimingShown.alpha = 1;
|
currentTimingShown.alpha = 1;
|
||||||
|
|
||||||
add(currentTimingShown);
|
if(!FlxG.save.data.botplay) 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;
|
||||||
@ -2564,7 +2590,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
||||||
currentTimingShown.velocity.x += comboSpr.velocity.x;
|
currentTimingShown.velocity.x += comboSpr.velocity.x;
|
||||||
add(rating);
|
if(!FlxG.save.data.botplay) add(rating);
|
||||||
|
|
||||||
if (!curStage.startsWith('school'))
|
if (!curStage.startsWith('school'))
|
||||||
{
|
{
|
||||||
@ -2701,6 +2727,13 @@ class PlayState extends MusicBeatState
|
|||||||
controls.RIGHT_R
|
controls.RIGHT_R
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Prevent player input if botplay is on
|
||||||
|
if(FlxG.save.data.botplay)
|
||||||
|
{
|
||||||
|
holdArray = [false, false, false, false];
|
||||||
|
pressArray = [false, false, false, false];
|
||||||
|
releaseArray = [false, false, false, false];
|
||||||
|
}
|
||||||
// HOLDS, check for sustain notes
|
// HOLDS, check for sustain notes
|
||||||
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
||||||
{
|
{
|
||||||
@ -2798,7 +2831,7 @@ class PlayState extends MusicBeatState
|
|||||||
noteMiss(shit, null);
|
noteMiss(shit, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dontCheck && possibleNotes.length > 0 && FlxG.save.data.ghost)
|
if(dontCheck && possibleNotes.length > 0 && FlxG.save.data.ghost && !FlxG.save.data.botplay)
|
||||||
{
|
{
|
||||||
if (mashViolations > 4)
|
if (mashViolations > 4)
|
||||||
{
|
{
|
||||||
@ -2811,13 +2844,25 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notes.forEachAlive(function(daNote:Note)
|
||||||
|
{
|
||||||
|
if(FlxG.save.data.downscroll && daNote.y > strumLine.y ||
|
||||||
|
!FlxG.save.data.downscroll && daNote.y < strumLine.y)
|
||||||
|
{
|
||||||
|
// Force good note hit regardless if it's too late to hit it or not as a fail safe
|
||||||
|
if(FlxG.save.data.botplay && daNote.canBeHit && daNote.mustPress ||
|
||||||
|
FlxG.save.data.botplay && daNote.tooLate && daNote.mustPress)
|
||||||
|
{
|
||||||
|
goodNoteHit(daNote);
|
||||||
|
boyfriend.holdTimer = daNote.sustainLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !holdArray.contains(true))
|
if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !holdArray.contains(true))
|
||||||
{
|
{
|
||||||
if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss'))
|
if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss'))
|
||||||
{
|
|
||||||
boyfriend.playAnim('idle');
|
boyfriend.playAnim('idle');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStrums.forEach(function(spr:FlxSprite)
|
playerStrums.forEach(function(spr:FlxSprite)
|
||||||
@ -3333,4 +3378,4 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
var curLight:Int = 0;
|
var curLight:Int = 0;
|
||||||
}
|
}
|
@ -5,6 +5,8 @@ class Ratings
|
|||||||
public static function GenerateLetterRank(accuracy:Float) // generate a letter ranking
|
public static function GenerateLetterRank(accuracy:Float) // generate a letter ranking
|
||||||
{
|
{
|
||||||
var ranking:String = "N/A";
|
var ranking:String = "N/A";
|
||||||
|
if(FlxG.save.data.botplay)
|
||||||
|
ranking = "BotPlay";
|
||||||
|
|
||||||
if (PlayState.misses == 0 && PlayState.bads == 0 && PlayState.shits == 0 && PlayState.goods == 0) // Marvelous (SICK) Full Combo
|
if (PlayState.misses == 0 && PlayState.bads == 0 && PlayState.shits == 0 && PlayState.goods == 0) // Marvelous (SICK) Full Combo
|
||||||
ranking = "(MFC)";
|
ranking = "(MFC)";
|
||||||
@ -84,6 +86,8 @@ class Ratings
|
|||||||
|
|
||||||
if (accuracy == 0)
|
if (accuracy == 0)
|
||||||
ranking = "N/A";
|
ranking = "N/A";
|
||||||
|
else if(FlxG.save.data.botplay)
|
||||||
|
ranking = "BotPlay";
|
||||||
|
|
||||||
return ranking;
|
return ranking;
|
||||||
}
|
}
|
||||||
@ -119,16 +123,18 @@ class Ratings
|
|||||||
return "shit";
|
return "shit";
|
||||||
else if (noteDiff < -166 * customTimeScale) // so god damn late its a miss
|
else if (noteDiff < -166 * customTimeScale) // so god damn late its a miss
|
||||||
return "miss";
|
return "miss";
|
||||||
|
else if (FlxG.save.data.botplay)
|
||||||
|
return "sick";
|
||||||
return "sick";
|
return "sick";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function CalculateRanking(score:Int,scoreDef:Int,nps:Int,accuracy:Float):String
|
public static function CalculateRanking(score:Int,scoreDef:Int,nps:Int,accuracy:Float):String
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(FlxG.save.data.npsDisplay ? "NPS: " + nps + " | " : "") + // NPS Toggle
|
(FlxG.save.data.npsDisplay ? "NPS: " + nps + (!FlxG.save.data.botplay ? " | " : "") : "") + (!FlxG.save.data.botplay ? // NPS Toggle
|
||||||
"Score:" + (Conductor.safeFrames != 10 ? score + " (" + scoreDef + ")" : "" + score) + // Score
|
"Score:" + (Conductor.safeFrames != 10 ? score + " (" + scoreDef + ")" : "" + score) + // Score
|
||||||
" | Combo Breaks:" + PlayState.misses + // Misses/Combo Breaks
|
" | Combo Breaks:" + PlayState.misses + // Misses/Combo Breaks
|
||||||
" | Accuracy:" + HelperFunctions.truncateFloat(accuracy, 2) + // Accuracy
|
" | Accuracy:" + (FlxG.save.data.botplay ? "N/A" : HelperFunctions.truncateFloat(accuracy, 2) + " %") + // Accuracy
|
||||||
"% | " + GenerateLetterRank(accuracy); // Letter Rank
|
" | " + GenerateLetterRank(accuracy) : ""); // Letter Rank
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user