mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-02-13 15:13:16 +00:00
note miss stuff, clean up 'stunned' remnants
This commit is contained in:
parent
e6f115dbfe
commit
5aefe519e0
source
|
@ -9,7 +9,7 @@ using StringTools;
|
||||||
|
|
||||||
class Boyfriend extends Character
|
class Boyfriend extends Character
|
||||||
{
|
{
|
||||||
public var stunned:Bool = false;
|
// public var stunned:Bool = false;
|
||||||
|
|
||||||
public function new(x:Float, y:Float, ?char:String = 'bf')
|
public function new(x:Float, y:Float, ?char:String = 'bf')
|
||||||
{
|
{
|
||||||
|
|
|
@ -2162,7 +2162,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
if (health <= 0 && !practiceMode)
|
if (health <= 0 && !practiceMode)
|
||||||
{
|
{
|
||||||
boyfriend.stunned = true;
|
// boyfriend.stunned = true;
|
||||||
|
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
persistentDraw = false;
|
persistentDraw = false;
|
||||||
|
@ -2199,7 +2199,8 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
notes.forEachAlive(function(daNote:Note)
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
if (daNote.y > FlxG.height)
|
if ((PreferencesMenu.getPref('downscroll') && daNote.y < -daNote.height)
|
||||||
|
|| (!PreferencesMenu.getPref('downscroll') && daNote.y > FlxG.height))
|
||||||
{
|
{
|
||||||
daNote.active = false;
|
daNote.active = false;
|
||||||
daNote.visible = false;
|
daNote.visible = false;
|
||||||
|
@ -2292,17 +2293,19 @@ class PlayState extends MusicBeatState
|
||||||
// WIP interpolation shit? Need to fix the pause issue
|
// WIP interpolation shit? Need to fix the pause issue
|
||||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * SONG.speed));
|
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * SONG.speed));
|
||||||
|
|
||||||
var noteMiss:Bool = daNote.y < -daNote.height;
|
// removing this so whether the note misses or not is entirely up to Note class
|
||||||
|
// var noteMiss:Bool = daNote.y < -daNote.height;
|
||||||
|
|
||||||
if (PreferencesMenu.getPref('downscroll'))
|
// if (PreferencesMenu.getPref('downscroll'))
|
||||||
noteMiss = daNote.y > FlxG.height;
|
// noteMiss = daNote.y > FlxG.height;
|
||||||
|
|
||||||
if (noteMiss)
|
if (daNote.tooLate || daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
if (daNote.tooLate || !daNote.wasGoodHit)
|
if (daNote.tooLate)
|
||||||
{
|
{
|
||||||
health -= 0.0475;
|
health -= 0.0475;
|
||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
|
killCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
daNote.active = false;
|
daNote.active = false;
|
||||||
|
@ -2324,6 +2327,13 @@ class PlayState extends MusicBeatState
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function killCombo():Void
|
||||||
|
{
|
||||||
|
if (combo > 5 && gf.animOffsets.exists('sad'))
|
||||||
|
gf.playAnim('sad');
|
||||||
|
combo = 0;
|
||||||
|
}
|
||||||
|
|
||||||
function endSong():Void
|
function endSong():Void
|
||||||
{
|
{
|
||||||
seenCutscene = false;
|
seenCutscene = false;
|
||||||
|
@ -2725,7 +2735,7 @@ class PlayState extends MusicBeatState
|
||||||
for (shit in 0...pressArray.length)
|
for (shit in 0...pressArray.length)
|
||||||
{ // if a direction is hit that shouldn't be
|
{ // if a direction is hit that shouldn't be
|
||||||
if (pressArray[shit] && !directionList.contains(shit))
|
if (pressArray[shit] && !directionList.contains(shit))
|
||||||
badNoteHit();
|
noteMiss(shit);
|
||||||
}
|
}
|
||||||
for (coolNote in possibleNotes)
|
for (coolNote in possibleNotes)
|
||||||
{
|
{
|
||||||
|
@ -2735,7 +2745,9 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
badNoteHit();
|
for (shit in 0...pressArray.length)
|
||||||
|
if (pressArray[shit])
|
||||||
|
noteMiss(shit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2767,29 +2779,23 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
function noteMiss(direction:Int = 1):Void
|
function noteMiss(direction:Int = 1):Void
|
||||||
{
|
{
|
||||||
if (!boyfriend.stunned)
|
// whole function used to be encased in if (!boyfriend.stunned)
|
||||||
{
|
|
||||||
health -= 0.04;
|
health -= 0.04;
|
||||||
if (combo > 5 && gf.animOffsets.exists('sad'))
|
killCombo();
|
||||||
{
|
|
||||||
gf.playAnim('sad');
|
|
||||||
}
|
|
||||||
combo = 0;
|
|
||||||
|
|
||||||
if (!practiceMode)
|
if (!practiceMode)
|
||||||
songScore -= 10;
|
songScore -= 10;
|
||||||
|
|
||||||
|
vocals.volume = 0;
|
||||||
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
||||||
// FlxG.sound.play(Paths.sound('missnote1'), 1, false);
|
|
||||||
// FlxG.log.add('played imss note');
|
|
||||||
|
|
||||||
boyfriend.stunned = true;
|
/* boyfriend.stunned = true;
|
||||||
|
|
||||||
// get stunned for 5 seconds
|
// get stunned for 5 seconds
|
||||||
new FlxTimer().start(5 / 60, function(tmr:FlxTimer)
|
new FlxTimer().start(5 / 60, function(tmr:FlxTimer)
|
||||||
{
|
{
|
||||||
boyfriend.stunned = false;
|
boyfriend.stunned = false;
|
||||||
});
|
}); */
|
||||||
|
|
||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
|
@ -2803,7 +2809,8 @@ class PlayState extends MusicBeatState
|
||||||
boyfriend.playAnim('singRIGHTmiss', true);
|
boyfriend.playAnim('singRIGHTmiss', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/* not used anymore lol
|
||||||
|
|
||||||
function badNoteHit()
|
function badNoteHit()
|
||||||
{
|
{
|
||||||
|
@ -2822,7 +2829,7 @@ class PlayState extends MusicBeatState
|
||||||
noteMiss(2);
|
noteMiss(2);
|
||||||
if (rightP)
|
if (rightP)
|
||||||
noteMiss(3);
|
noteMiss(3);
|
||||||
}
|
} */
|
||||||
|
|
||||||
function goodNoteHit(note:Note):Void
|
function goodNoteHit(note:Note):Void
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue