diff --git a/assets/preload/data/funnyTips.txt b/assets/preload/data/funnyTips.txt index 7cf1c5c642a..09d2835408c 100644 --- a/assets/preload/data/funnyTips.txt +++ b/assets/preload/data/funnyTips.txt @@ -1,5 +1,6 @@ The code for this was made by Stefan2008! OS Engine? Hah, that engine sucks. +"waaaah this engine sucks because its unoptimized!!" HOW ABOUT ACTUALLY SUGGEST SOME OPTIMIZATIONS THAT I CAN DO? OPTIMIZE THE CODE AND MAKE A PR BECAUSE I DON'T KNOW OPTIMIZATION It's always Bambi being a printer If you see that your memory is leaking, then KJLÑWQEJKLÑTFIKOREI,POǛT45O,`.P6B+.O,P`5R7,IO56KPO. Follow the rhythm ------ of your heart~ diff --git a/assets/preload/data/pico/pico-jshard.json b/assets/preload/data/pico/pico-jshard.json index 5338edf7baa..c2ca2ce8512 100644 --- a/assets/preload/data/pico/pico-jshard.json +++ b/assets/preload/data/pico/pico-jshard.json @@ -1,20 +1,20 @@ { "song": { "player1": "bf", - "player2": "pico", + "events": [], + "gfVersion": "gf", "notes": [ { - "lengthInSteps": 16, "sectionNotes": [], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 3800, @@ -37,10 +37,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 5000, @@ -73,10 +73,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 7000, @@ -99,10 +99,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 8200, @@ -135,10 +135,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 10200, @@ -161,10 +161,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 11400, @@ -197,10 +197,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 13400, @@ -223,10 +223,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 14600, @@ -259,10 +259,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 16200, @@ -295,10 +295,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 17800, @@ -336,10 +336,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 19400, @@ -372,10 +372,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 21000, @@ -408,10 +408,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 22600, @@ -444,10 +444,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 24200, @@ -485,10 +485,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 25800, @@ -521,10 +521,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 27400, @@ -557,10 +557,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 29000, @@ -598,10 +598,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 30400, @@ -639,10 +639,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 32200, @@ -680,10 +680,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 33600, @@ -721,10 +721,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 35400, @@ -762,10 +762,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 36800, @@ -803,10 +803,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 38400, @@ -849,10 +849,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 40000, @@ -890,10 +890,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 41800, @@ -931,10 +931,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 43400, @@ -972,10 +972,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 45000, @@ -1013,10 +1013,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 46600, @@ -1054,10 +1054,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 48200, @@ -1095,10 +1095,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 49800, @@ -1136,10 +1136,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 51400, @@ -1177,10 +1177,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 53000, @@ -1218,10 +1218,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 55000, @@ -1279,10 +1279,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 56000, @@ -1345,10 +1345,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 57800, @@ -1406,10 +1406,10 @@ 200 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 59400, @@ -1492,10 +1492,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 61000, @@ -1533,10 +1533,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 62600, @@ -1574,10 +1574,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 64200, @@ -1615,10 +1615,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 65800, @@ -1656,10 +1656,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 67400, @@ -1697,10 +1697,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 68800, @@ -1738,10 +1738,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 70600, @@ -1779,10 +1779,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 72000, @@ -1820,10 +1820,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": false }, { - "lengthInSteps": 16, "sectionNotes": [ [ 73800, @@ -1861,10 +1861,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 75200, @@ -1902,10 +1902,10 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 77000, @@ -1941,12 +1941,17 @@ 78200, 3, 0 + ], + [ + 76800, + 3, + 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "lengthInSteps": 16, "sectionNotes": [ [ 78400, @@ -1984,27 +1989,38 @@ 0 ] ], + "lengthInSteps": 16, "mustHitSection": true }, { - "sectionBeats": 4, - "sectionNotes": [], "typeOfSection": 0, - "gfSection": false, + "sectionNotes": [], + "sectionBeats": 4, "altAnim": false, - "mustHitSection": true, + "gfSection": false, + "bpm": 150, "changeBPM": false, - "bpm": 150 + "mustHitSection": true }, { - "sectionBeats": 4, - "sectionNotes": [], "typeOfSection": 0, + "sectionNotes": [], + "sectionBeats": 4, + "altAnim": false, "gfSection": false, + "bpm": 150, + "changeBPM": false, + "mustHitSection": true + }, + { + "typeOfSection": 0, + "sectionNotes": [], + "sectionBeats": 4, "altAnim": false, - "mustHitSection": true, + "gfSection": false, + "bpm": 150, "changeBPM": false, - "bpm": 150 + "mustHitSection": true }, { "sectionBeats": 4, @@ -2027,15 +2043,14 @@ "mustHitSection": true } ], - "gfVersion": "gf", - "events": [], + "player2": "pico", "player3": null, "event7Value": null, "song": "Pico", - "stage": "philly", - "needsVoices": true, "songCredit": "Kawai Sprite", - "speed": 1.6, - "bpm": 150 + "needsVoices": true, + "stage": "philly", + "bpm": 150, + "speed": 1.6 } } \ No newline at end of file diff --git a/source/PlayState.hx b/source/PlayState.hx index c9f1c6fb9de..5884d4d7ce3 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -5479,223 +5479,47 @@ if (ClientPrefs.showNPS) { for (i in 0...unspawnNotes.length) { final daNote = unspawnNotes[i]; - if(daNote.mustPress && cpuControlled) { - if (daNote.strumTime + (ClientPrefs.communityGameBot ? FlxG.random.float(ClientPrefs.minCGBMS, ClientPrefs.maxCGBMS) : 0) <= Conductor.songPosition || daNote.isSustainNote && daNote.strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * daNote.earlyHitMult /2)) { - if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) goodNoteHit(daNote); - if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG && !daNote.wasGoodHit) - { - if (!daNote.isSustainNote) { - totalNotesPlayed += 1 * polyphony; - if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well - notesHitArray.push(1 * polyphony); - notesHitDateArray.push(Date.now()); - } - } - } - daNote.wasGoodHit = true; - } - } - - if (!daNote.mustPress && !daNote.hitByOpponent && !daNote.ignoreNote && daNote.strumTime <= Conductor.songPosition) - { - if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) { - if (!opponentChart) { - if (Paths.formatToSongPath(SONG.song) != 'tutorial' && !camZooming) - camZooming = true; - } - - var char:Character = dad; - if(opponentChart) char = boyfriend; - if(daNote.noteType == 'Hey!' && char.animOffsets.exists('hey')) { - char.playAnim('hey', true); - char.specialAnim = true; - char.heyTimer = 0.6; - } else if(!daNote.noAnimation) { - var altAnim:String = daNote.animSuffix; - - if (SONG.notes[curSection] != null) - { - if (SONG.notes[curSection].altAnim && !SONG.notes[curSection].gfSection && !opponentChart) { - altAnim = '-alt'; - } - } - - var char:Character = dad; - var animToPlay:String = singAnimations[Std.int(Math.abs(daNote.noteData))] + altAnim; - if(daNote.gfNote && ClientPrefs.charsAndBG) { - char = gf; - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (gf.mostRecentRow != daNote.row) - { - gf.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - - gf.mostRecentRow = daNote.row; - // dad.angle += 15; lmaooooo - doGhostAnim('gf', animToPlay); - } - } - } - if(opponentChart && ClientPrefs.charsAndBG) { - boyfriend.playAnim(animToPlay, true); - boyfriend.holdTimer = 0; - } - else if(char != null && !opponentChart && ClientPrefs.charsAndBG) - { - char.playAnim(animToPlay, true); - char.holdTimer = 0; - if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'oppt'); - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (char.mostRecentRow != daNote.row) - { - char.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - // dad.angle += 15; lmaooooo - if (!daNote.noAnimation && !daNote.gfNote) - { - if(char.mostRecentRow != daNote.row) - doGhostAnim('char', animToPlay + altAnim); - dadGhost.color = FlxColor.fromRGB(dad.healthColorArray[0] + 50, dad.healthColorArray[1] + 50, dad.healthColorArray[2] + 50); - dadGhostTween = FlxTween.tween(dadGhost, {alpha: 0}, 0.75, { - ease: FlxEase.linear, - onComplete: function(twn:FlxTween) - { - dadGhostTween = null; - } - }); - } - char.mostRecentRow = daNote.row; - } - } - else{ - char.playAnim(animToPlay + daNote.animSuffix, true); - // dad.angle = 0; - } - } - if (opponentChart && ClientPrefs.charsAndBG) - { - boyfriend.playAnim(animToPlay + daNote.animSuffix, true); - boyfriend.holdTimer = 0; - if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'bf'); - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (boyfriend.mostRecentRow != daNote.row) - { - boyfriend.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - boyfriend.mostRecentRow = daNote.row; - // dad.angle += 15; lmaooooo - doGhostAnim('bf', animToPlay); - } - else{ - boyfriend.playAnim(animToPlay + daNote.animSuffix, true); - // dad.angle = 0; - } - } - } - } - - if(ClientPrefs.oppNoteSplashes && !daNote.isSustainNote) - { - spawnNoteSplashOnNote(true, daNote); - } - - if (SONG.needsVoices) - vocals.volume = 1; - - var time:Float = 0; - if (ClientPrefs.strumLitStyle == 'Full Anim') time = 0.15 / playbackRate; - if (ClientPrefs.strumLitStyle == 'BPM Based') time = (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; - if (ClientPrefs.opponentLightStrum) - { - if(daNote.isSustainNote && (ClientPrefs.showNotes && !daNote.animation.curAnim.name.endsWith('end'))) { - if (ClientPrefs.strumLitStyle == 'Full Anim') time += 0.15 / playbackRate; - if (ClientPrefs.strumLitStyle == 'BPM Based') time += (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; - } - var spr:StrumNote = opponentStrums.members[daNote.noteData]; - - if(spr != null) { - if ((ClientPrefs.noteColorStyle == 'Quant-Based' || ClientPrefs.rainbowNotes) && ClientPrefs.showNotes) { - spr.playAnim('confirm', true, daNote.colorSwap.hue, daNote.colorSwap.saturation, daNote.colorSwap.brightness); - } else { - spr.playAnim('confirm', true, 0, 0, 0, ClientPrefs.noteColorStyle == 'Char-Based', false, daNote.gfNote); - } - spr.resetAnim = time; - } - } - daNote.hitByOpponent = true; - - if (opponentDrain && health > 0.1) health -= daNote.hitHealth * hpDrainLevel * polyphony; - if (ClientPrefs.denpaDrainBug) displayedHealth -= daNote.hitHealth * hpDrainLevel * polyphony; - - callOnLuas('opponentNoteHit', [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); - callOnLuas((opponentChart ? 'goodNoteHitFix' : 'opponentNoteHitFix'), [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); - - if (!daNote.isSustainNote) - { - if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well - oppNotesHitArray.push(1 * polyphony); - oppNotesHitDateArray.push(Date.now()); - } - enemyHits += 1 * polyphony; - if (ClientPrefs.showNotes) notes.remove(daNote, true); - if (shouldKillNotes) - { - daNote.destroy(); - } - } + if(daNote.mustPress && cpuControlled) { + if (daNote.strumTime + (ClientPrefs.communityGameBot ? FlxG.random.float(ClientPrefs.minCGBMS, ClientPrefs.maxCGBMS) : 0) <= Conductor.songPosition || daNote.isSustainNote && daNote.strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * daNote.earlyHitMult /2)) + { + if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) goodNoteHit(daNote); + if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG && !daNote.wasGoodHit) + { + if (!daNote.isSustainNote) { + totalNotesPlayed += 1 * polyphony; + if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well + notesHitArray.push(1 * polyphony); + notesHitDateArray.push(Date.now()); } - if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG) - { - if (!daNote.isSustainNote) { - enemyHits += 1 * polyphony; - if (ClientPrefs.showNPS) { - oppNotesHitArray.push(1 * polyphony); - oppNotesHitDateArray.push(Date.now()); - } - } - daNote.hitByOpponent = true; - } - } + } + } + daNote.wasGoodHit = true; + } + } + else if (!daNote.mustPress && daNote.strumTime <= Conductor.songPosition && !daNote.hitByOpponent) + { + if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) opponentNoteHit(daNote); + if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG) + { + if (!daNote.isSustainNote) + { + enemyHits += 1 * polyphony; + if (ClientPrefs.showNPS) { + oppNotesHitArray.push(1 * polyphony); + oppNotesHitDateArray.push(Date.now()); + } + } + daNote.hitByOpponent = true; + } + } + notesAddedCount++; } if (notesAddedCount > 0) { for (i in 0...notesAddedCount) - unspawnNotes.shift(); + unspawnNotes.splice(0, notesAddedCount); } -} + } if (generatedMusic) { if(!inCutscene) @@ -5730,192 +5554,7 @@ if (ClientPrefs.showNPS) { if (!daNote.mustPress && !daNote.hitByOpponent && !daNote.ignoreNote && daNote.strumTime <= Conductor.songPosition) { - if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) { - if (!opponentChart) { - if (Paths.formatToSongPath(SONG.song) != 'tutorial' && !camZooming) - camZooming = true; - } - - var char:Character = dad; - if(opponentChart) char = boyfriend; - if(daNote.noteType == 'Hey!' && char.animOffsets.exists('hey')) { - char.playAnim('hey', true); - char.specialAnim = true; - char.heyTimer = 0.6; - } else if(!daNote.noAnimation) { - var altAnim:String = daNote.animSuffix; - - if (SONG.notes[curSection] != null) - { - if (SONG.notes[curSection].altAnim && !SONG.notes[curSection].gfSection && !opponentChart) { - altAnim = '-alt'; - } - } - - var char:Character = dad; - var animToPlay:String = singAnimations[Std.int(Math.abs(daNote.noteData))] + altAnim; - if(daNote.gfNote && ClientPrefs.charsAndBG) { - char = gf; - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (gf.mostRecentRow != daNote.row) - { - gf.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - - gf.mostRecentRow = daNote.row; - // dad.angle += 15; lmaooooo - doGhostAnim('gf', animToPlay); - } - } - } - if(opponentChart && ClientPrefs.charsAndBG) { - boyfriend.playAnim(animToPlay, true); - boyfriend.holdTimer = 0; - } - else if(char != null && !opponentChart && ClientPrefs.charsAndBG) - { - char.playAnim(animToPlay, true); - char.holdTimer = 0; - if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'oppt'); - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (char.mostRecentRow != daNote.row) - { - char.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - // dad.angle += 15; lmaooooo - if (!daNote.noAnimation && !daNote.gfNote) - { - if(char.mostRecentRow != daNote.row) - doGhostAnim('char', animToPlay + altAnim); - dadGhost.color = FlxColor.fromRGB(dad.healthColorArray[0] + 50, dad.healthColorArray[1] + 50, dad.healthColorArray[2] + 50); - dadGhostTween = FlxTween.tween(dadGhost, {alpha: 0}, 0.75, { - ease: FlxEase.linear, - onComplete: function(twn:FlxTween) - { - dadGhostTween = null; - } - }); - } - char.mostRecentRow = daNote.row; - } - } - else{ - char.playAnim(animToPlay + daNote.animSuffix, true); - // dad.angle = 0; - } - } - if (opponentChart && ClientPrefs.charsAndBG) - { - boyfriend.playAnim(animToPlay + daNote.animSuffix, true); - boyfriend.holdTimer = 0; - if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'bf'); - if (ClientPrefs.doubleGhost) - { - if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) - { - // potentially have jump anims? - var chord = noteRows[daNote.mustPress?0:1][daNote.row]; - var animNote = chord[0]; - var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; - if (boyfriend.mostRecentRow != daNote.row) - { - boyfriend.playAnim(realAnim, true); - } - - // if (daNote != animNote) - // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); - - boyfriend.mostRecentRow = daNote.row; - // dad.angle += 15; lmaooooo - doGhostAnim('bf', animToPlay); - } - else{ - boyfriend.playAnim(animToPlay + daNote.animSuffix, true); - // dad.angle = 0; - } - } - } - } - - if(ClientPrefs.oppNoteSplashes && !daNote.isSustainNote) - { - spawnNoteSplashOnNote(true, daNote); - } - - if (SONG.needsVoices) - vocals.volume = 1; - - var time:Float = 0; - if (ClientPrefs.strumLitStyle == 'Full Anim') time = 0.15 / playbackRate; - if (ClientPrefs.strumLitStyle == 'BPM Based') time = (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; - if (ClientPrefs.opponentLightStrum) - { - if(daNote.isSustainNote && (ClientPrefs.showNotes && !daNote.animation.curAnim.name.endsWith('end'))) { - if (ClientPrefs.strumLitStyle == 'Full Anim') time += 0.15 / playbackRate; - if (ClientPrefs.strumLitStyle == 'BPM Based') time += (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; - } - var spr:StrumNote = opponentStrums.members[daNote.noteData]; - - if(spr != null) { - if ((ClientPrefs.noteColorStyle == 'Quant-Based' || ClientPrefs.rainbowNotes) && ClientPrefs.showNotes) { - spr.playAnim('confirm', true, daNote.colorSwap.hue, daNote.colorSwap.saturation, daNote.colorSwap.brightness); - } else { - spr.playAnim('confirm', true, 0, 0, 0, ClientPrefs.noteColorStyle == 'Char-Based', false, daNote.gfNote); - } - spr.resetAnim = time; - } - } - daNote.hitByOpponent = true; - - - callOnLuas('opponentNoteHit', [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); - callOnLuas((opponentChart ? 'goodNoteHitFix' : 'opponentNoteHitFix'), [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); - if (ClientPrefs.ratingCounter && judgeCountUpdateFrame <= 4) updateRatingCounter(); - if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); - - if (!daNote.isSustainNote) - { - if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well - oppNotesHitArray.push(1 * polyphony); - oppNotesHitDateArray.push(Date.now()); - } - enemyHits += 1 * polyphony; - if (ClientPrefs.showNotes) notes.remove(daNote, true); - if (shouldKillNotes) - { - daNote.destroy(); - } - } - if (opponentDrain && health > 0.1 && !practiceMode || opponentDrain && practiceMode) { - health -= daNote.hitHealth * hpDrainLevel * polyphony; - if (ClientPrefs.healthDisplay && !ClientPrefs.hideScore && scoreTxtUpdateFrame <= 4 && scoreTxt != null) updateScore(); - } - if (ClientPrefs.denpaDrainBug) displayedHealth -= daNote.hitHealth * hpDrainLevel * polyphony; - if (ClientPrefs.ratingCounter && judgeCountUpdateFrame <= 4) updateRatingCounter(); - if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); - } + if (!ClientPrefs.showcaseMode || ClientPrefs.charsAndBG) opponentNoteHit(daNote); if (ClientPrefs.showcaseMode && !ClientPrefs.charsAndBG) { if (!daNote.isSustainNote) { @@ -8319,39 +7958,28 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT if (hitSoundString == 'vine boom') { SPUNCHBOB = new FlxSprite().loadGraphic(Paths.image('sadsponge')); - SPUNCHBOB.antialiasing = ClientPrefs.globalAntialiasing; - SPUNCHBOB.scrollFactor.set(); - SPUNCHBOB.setGraphicSize(Std.int(SPUNCHBOB.width / FlxG.camera.zoom)); - SPUNCHBOB.updateHitbox(); - SPUNCHBOB.screenCenter(); - SPUNCHBOB.alpha = 1; - SPUNCHBOB.cameras = [camGame]; - add(SPUNCHBOB); - FlxTween.tween(SPUNCHBOB, {alpha: 0}, 1 / (SONG.bpm/100) / playbackRate, { - onComplete: function(tween:FlxTween) - { - SPUNCHBOB.destroy(); - } - }); } if (hitSoundString == "i'm spongebob!") { SPUNCHBOB = new FlxSprite().loadGraphic(Paths.image('itspongebob')); - SPUNCHBOB.antialiasing = ClientPrefs.globalAntialiasing; - SPUNCHBOB.scrollFactor.set(); - SPUNCHBOB.setGraphicSize(Std.int(SPUNCHBOB.width / FlxG.camera.zoom)); - SPUNCHBOB.updateHitbox(); - SPUNCHBOB.screenCenter(); - SPUNCHBOB.alpha = 1; - SPUNCHBOB.cameras = [camGame]; - add(SPUNCHBOB); - FlxTween.tween(SPUNCHBOB, {alpha: 0}, 1 / (SONG.bpm/100) / playbackRate, { - onComplete: function(tween:FlxTween) - { - SPUNCHBOB.destroy(); - } - }); } + if (hitSoundString == "i'm spongebob!" || hitSoundString == 'vine boom') + { + SPUNCHBOB.antialiasing = ClientPrefs.globalAntialiasing; + SPUNCHBOB.scrollFactor.set(); + SPUNCHBOB.setGraphicSize(Std.int(SPUNCHBOB.width / FlxG.camera.zoom)); + SPUNCHBOB.updateHitbox(); + SPUNCHBOB.screenCenter(); + SPUNCHBOB.alpha = 1; + SPUNCHBOB.cameras = [camGame]; + add(SPUNCHBOB); + FlxTween.tween(SPUNCHBOB, {alpha: 0}, 1 / (SONG.bpm/100) / playbackRate, { + onComplete: function(tween:FlxTween) + { + SPUNCHBOB.destroy(); + } + }); + } } if(note.hitCausesMiss) { @@ -8701,6 +8329,194 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); } } + function opponentNoteHit(daNote:Note):Void + { + if (!opponentChart) { + if (Paths.formatToSongPath(SONG.song) != 'tutorial' && !camZooming) + camZooming = true; + } + + var char:Character = dad; + if(opponentChart) char = boyfriend; + if(daNote.noteType == 'Hey!' && char.animOffsets.exists('hey')) { + char.playAnim('hey', true); + char.specialAnim = true; + char.heyTimer = 0.6; + } else if(!daNote.noAnimation) { + var altAnim:String = daNote.animSuffix; + + if (SONG.notes[curSection] != null) + { + if (SONG.notes[curSection].altAnim && !SONG.notes[curSection].gfSection && !opponentChart) { + altAnim = '-alt'; + } + } + + var char:Character = dad; + var animToPlay:String = singAnimations[Std.int(Math.abs(daNote.noteData))] + altAnim; + if(daNote.gfNote && ClientPrefs.charsAndBG) { + char = gf; + if (ClientPrefs.doubleGhost) + { + if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) + { + // potentially have jump anims? + var chord = noteRows[daNote.mustPress?0:1][daNote.row]; + var animNote = chord[0]; + var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; + if (gf.mostRecentRow != daNote.row) + { + gf.playAnim(realAnim, true); + } + + // if (daNote != animNote) + // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); + + + gf.mostRecentRow = daNote.row; + // dad.angle += 15; lmaooooo + doGhostAnim('gf', animToPlay); + } + } + } + if(opponentChart && ClientPrefs.charsAndBG) { + boyfriend.playAnim(animToPlay, true); + boyfriend.holdTimer = 0; + } + else if(char != null && !opponentChart && ClientPrefs.charsAndBG) + { + char.playAnim(animToPlay, true); + char.holdTimer = 0; + if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'oppt'); + if (ClientPrefs.doubleGhost) + { + if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) + { + // potentially have jump anims? + var chord = noteRows[daNote.mustPress?0:1][daNote.row]; + var animNote = chord[0]; + var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; + if (char.mostRecentRow != daNote.row) + { + char.playAnim(realAnim, true); + } + + // if (daNote != animNote) + // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); + + // dad.angle += 15; lmaooooo + if (!daNote.noAnimation && !daNote.gfNote) + { + if(char.mostRecentRow != daNote.row) + doGhostAnim('char', animToPlay + altAnim); + dadGhost.color = FlxColor.fromRGB(dad.healthColorArray[0] + 50, dad.healthColorArray[1] + 50, dad.healthColorArray[2] + 50); + dadGhostTween = FlxTween.tween(dadGhost, {alpha: 0}, 0.75, { + ease: FlxEase.linear, + onComplete: function(twn:FlxTween) + { + dadGhostTween = null; + } + }); + } + char.mostRecentRow = daNote.row; + } + } + else{ + char.playAnim(animToPlay + daNote.animSuffix, true); + // dad.angle = 0; + } + } + if (opponentChart && ClientPrefs.charsAndBG) + { + boyfriend.playAnim(animToPlay + daNote.animSuffix, true); + boyfriend.holdTimer = 0; + if (ClientPrefs.cameraPanning) camPanRoutine(animToPlay, 'bf'); + if (ClientPrefs.doubleGhost) + { + if (!daNote.isSustainNote && noteRows[daNote.mustPress?0:1][daNote.row].length > 1) + { + // potentially have jump anims? + var chord = noteRows[daNote.mustPress?0:1][daNote.row]; + var animNote = chord[0]; + var realAnim = singAnimations[Std.int(Math.abs(animNote.noteData))]; + if (boyfriend.mostRecentRow != daNote.row) + { + boyfriend.playAnim(realAnim, true); + } + + // if (daNote != animNote) + // dad.playGhostAnim(chord.indexOf(daNote)-1, animToPlay, true); + + boyfriend.mostRecentRow = daNote.row; + // dad.angle += 15; lmaooooo + doGhostAnim('bf', animToPlay); + } + else{ + boyfriend.playAnim(animToPlay + daNote.animSuffix, true); + // dad.angle = 0; + } + } + } + } + + if(ClientPrefs.oppNoteSplashes && !daNote.isSustainNote) + { + spawnNoteSplashOnNote(true, daNote); + } + + if (SONG.needsVoices) + vocals.volume = 1; + + var time:Float = 0; + if (ClientPrefs.strumLitStyle == 'Full Anim') time = 0.15 / playbackRate; + if (ClientPrefs.strumLitStyle == 'BPM Based') time = (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; + if (ClientPrefs.opponentLightStrum) + { + if(daNote.isSustainNote && (ClientPrefs.showNotes && !daNote.animation.curAnim.name.endsWith('end'))) { + if (ClientPrefs.strumLitStyle == 'Full Anim') time += 0.15 / playbackRate; + if (ClientPrefs.strumLitStyle == 'BPM Based') time += (Conductor.stepCrochet * 1.5 / 1000) / playbackRate; + } + var spr:StrumNote = opponentStrums.members[daNote.noteData]; + + if(spr != null) { + if ((ClientPrefs.noteColorStyle == 'Quant-Based' || ClientPrefs.rainbowNotes) && ClientPrefs.showNotes) { + spr.playAnim('confirm', true, daNote.colorSwap.hue, daNote.colorSwap.saturation, daNote.colorSwap.brightness); + } else { + spr.playAnim('confirm', true, 0, 0, 0, ClientPrefs.noteColorStyle == 'Char-Based', false, daNote.gfNote); + } + spr.resetAnim = time; + } + } + daNote.hitByOpponent = true; + + + callOnLuas('opponentNoteHit', [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); + callOnLuas((opponentChart ? 'goodNoteHitFix' : 'opponentNoteHitFix'), [notes.members.indexOf(daNote), Math.abs(daNote.noteData), daNote.noteType, daNote.isSustainNote]); + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame <= 4) updateRatingCounter(); + if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); + + if (!daNote.isSustainNote) + { + if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well + oppNotesHitArray.push(1 * polyphony); + oppNotesHitDateArray.push(Date.now()); + } + enemyHits += 1 * polyphony; + if (ClientPrefs.showNotes) notes.remove(daNote, true); + if (shouldKillNotes) + { + daNote.destroy(); + } + } + if (opponentDrain && health > 0.1 && !practiceMode || opponentDrain && practiceMode) { + health -= daNote.hitHealth * hpDrainLevel * polyphony; + if (ClientPrefs.healthDisplay && !ClientPrefs.hideScore && scoreTxtUpdateFrame <= 4 && scoreTxt != null) updateScore(); + } + if (ClientPrefs.denpaDrainBug) displayedHealth -= daNote.hitHealth * hpDrainLevel * polyphony; + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame <= 4) updateRatingCounter(); + if (ClientPrefs.compactNumbers && compactUpdateFrame <= 4) updateCompactNumbers(); + } + public function spawnNoteSplashOnNote(isDad:Bool, note:Note) { if(ClientPrefs.noteSplashes && note != null) {