Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Botplay done pog
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnusStrom committed Jun 28, 2021
1 parent 41ce837 commit f1de44f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->

<app title="Friday Night Funkin' ProjectFNF" file="ProjectFNF" packageName="com.aflac.projectfnf" package="com.aflac.projectfnf" main="Main" version="0.3-a-p" company="aflac" />
<app title="Friday Night Funkin' ProjectFNF" file="ProjectFNF" packageName="com.aflac.projectfnf" package="com.aflac.projectfnf" main="Main" version="0.3-a" company="aflac" />
<!-- DO NOT TOUCH THE VERSION -->
<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />
Expand Down
105 changes: 62 additions & 43 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1652,8 +1652,7 @@ class PlayState extends MusicBeatState

if (FlxG.save.data.botplay) {
infoTxt.text = "BOTPLAY // ProjectFNF " + Application.current.meta.get('version');
}
if (!FlxG.save.data.advancedinfobar) {
} else if (!FlxG.save.data.advancedinfobar) {
infoTxt.text = "Misses: " + songNotesMissed + " // Health: " + healthBar.percent + "% // Score: " + songScore + " // ProjectFNF " + Application.current.meta.get('version');
// infoTxt.updateHitbox();
} else {
Expand Down Expand Up @@ -2158,7 +2157,7 @@ class PlayState extends MusicBeatState
songNotesMissed += 1;
vocals.volume = 0;
if (theFunne)
noteMiss(daNote.noteData);
noteMiss(daNote.noteData, daNote);
}

daNote.visible = false;
Expand Down Expand Up @@ -2452,9 +2451,9 @@ class PlayState extends MusicBeatState
var leftR = controls.LEFT_R;

var controlArray:Array<Bool> = [leftP, downP, upP, rightP];

// FlxG.watch.addQuick('asdfa', upP);
if ((upP || rightP || downP || leftP) && generatedMusic)
if (generatedMusic) {
if ((upP || rightP || downP || leftP) || FlxG.save.data.botplay)
{
boyfriend.holdTimer = 0;

Expand All @@ -2478,8 +2477,9 @@ class PlayState extends MusicBeatState
{
var daNote = possibleNotes[0];

if (perfectMode)
noteCheck(true, daNote);
//if (perfectMode)
//noteCheck(true, daNote);
//goodNoteHit(daNote);

// Jump notes
if (possibleNotes.length >= 2)
Expand All @@ -2488,7 +2488,7 @@ class PlayState extends MusicBeatState
{
for (coolNote in possibleNotes)
{
if (controlArray[coolNote.noteData])
if (controlArray[coolNote.noteData] || FlxG.save.data.botplay)
goodNoteHit(coolNote);
else
{
Expand All @@ -2498,10 +2498,10 @@ class PlayState extends MusicBeatState
if (controlArray[ignoreList[shit]])
inIgnoreList = true;
}
if (!inIgnoreList && !FlxG.save.data.botplay)
badNoteCheck();
if (!inIgnoreList)
badNoteCheck(coolNote);
}
}
}
}
else if (possibleNotes[0].noteData == possibleNotes[1].noteData)
{
Expand Down Expand Up @@ -2548,37 +2548,55 @@ class PlayState extends MusicBeatState
daNote.destroy();
}
*/
}
}
else
{
badNoteCheck();
badNoteCheck("none");
}
}
}

if ((up || right || down || left) && generatedMusic)
if (generatedMusic)
{
notes.forEachAlive(function(daNote:Note)
{
if (daNote.canBeHit && daNote.mustPress && daNote.isSustainNote)
{
switch (daNote.noteData)
if (daNote.canBeHit && daNote.mustPress && daNote.isSustainNote)
{
// NOTES YOU ARE HOLDING
case 0:
if (left)
if (FlxG.save.data.botplay) {
switch (daNote.noteData)
{
// NOTES YOU ARE HOLDING
case 0:
goodNoteHit(daNote);
case 1:
if (down)
case 1:
goodNoteHit(daNote);
case 2:
if (up)
case 2:
goodNoteHit(daNote);
case 3:
if (right)
case 3:
goodNoteHit(daNote);
}
}
} else {
if (up || right || down || left) {
switch (daNote.noteData)
{
// NOTES YOU ARE HOLDING
case 0:
if (left)
goodNoteHit(daNote);
case 1:
if (down)
goodNoteHit(daNote);
case 2:
if (up)
goodNoteHit(daNote);
case 3:
if (right)
goodNoteHit(daNote);
}
}
});
}
}
});
}

if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !up && !down && !right && !left)
Expand All @@ -2594,24 +2612,24 @@ class PlayState extends MusicBeatState
switch (spr.ID)
{
case 0:
if (leftP && spr.animation.curAnim.name != 'confirm')
if ((leftP || FlxG.save.data.botplay) && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (leftR)
if ((leftR || FlxG.save.data.botplay))
spr.animation.play('static');
case 1:
if (downP && spr.animation.curAnim.name != 'confirm')
if ((downP || FlxG.save.data.botplay) && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (downR)
if ((downR || FlxG.save.data.botplay))
spr.animation.play('static');
case 2:
if (upP && spr.animation.curAnim.name != 'confirm')
if ((upP || FlxG.save.data.botplay) && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (upR)
if ((upR || FlxG.save.data.botplay))
spr.animation.play('static');
case 3:
if (rightP && spr.animation.curAnim.name != 'confirm')
if ((rightP || FlxG.save.data.botplay) && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (rightR)
if ((rightR || FlxG.save.data.botplay))
spr.animation.play('static');
}

Expand All @@ -2627,7 +2645,7 @@ class PlayState extends MusicBeatState
}


function noteMiss(direction:Int = 1):Void
function noteMiss(direction:Int = 1, note:Any):Void
{
if (!FlxG.save.data.ghosttapping) {
if (!boyfriend.stunned)
Expand Down Expand Up @@ -2753,8 +2771,9 @@ class PlayState extends MusicBeatState
}
}*/

function badNoteCheck()
function badNoteCheck(note:Any)
{
// its 5 am lol
// just double pasting this shit cuz fuk u
// REDO THIS SYSTEM!
var upP = controls.UP_P;
Expand All @@ -2763,13 +2782,13 @@ class PlayState extends MusicBeatState
var leftP = controls.LEFT_P;

if (leftP)
noteMiss(0);
noteMiss(0, note);
if (downP)
noteMiss(1);
noteMiss(1, note);
if (upP)
noteMiss(2);
noteMiss(2, note);
if (rightP)
noteMiss(3);
noteMiss(3, note);
}

function noteCheck(keyP:Bool, note:Note):Void
Expand All @@ -2779,7 +2798,7 @@ class PlayState extends MusicBeatState
goodNoteHit(note);
else
{
badNoteCheck();
badNoteCheck(note);
}
}

Expand Down

0 comments on commit f1de44f

Please sign in to comment.