From dbab5a912db8805f58ef9ab0695c6c1a0c74d878 Mon Sep 17 00:00:00 2001
From: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Date: Wed, 31 May 2023 03:03:10 -0400
Subject: [PATCH] death alt easter egg

---
 .../graphics/adobeanimate/FlxAtlasSprite.hx    |  2 +-
 source/funkin/play/GameOverSubstate.hx         | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx
index aad9cd851..1c120a7c7 100644
--- a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx
+++ b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx
@@ -16,7 +16,7 @@ class FlxAtlasSprite extends FlxAnimate
       FrameRate: 24.0,
       Reversed: false,
       // ?OnComplete:Void -> Void,
-      ShowPivot: #if debug true #else false #end,
+      ShowPivot: #if debug false #else false #end,
       Antialiasing: true,
       ScrollFactor: new FlxPoint(1, 1),
       // Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset
diff --git a/source/funkin/play/GameOverSubstate.hx b/source/funkin/play/GameOverSubstate.hx
index 3d5470324..b07f5786b 100644
--- a/source/funkin/play/GameOverSubstate.hx
+++ b/source/funkin/play/GameOverSubstate.hx
@@ -1,5 +1,7 @@
 package funkin.play;
 
+import funkin.graphics.adobeanimate.FlxAtlasSprite;
+import flixel.FlxG;
 import flixel.FlxObject;
 import flixel.FlxSprite;
 import flixel.system.FlxSound;
@@ -97,7 +99,21 @@ class GameOverSubstate extends MusicBeatSubstate
     boyfriend.isDead = true;
     add(boyfriend);
     boyfriend.resetCharacter();
-    boyfriend.playAnimation('firstDeath', true, true);
+
+    if (animationSuffix == "" && FlxG.random.bool((1 / 4000) * 100))
+    {
+      var bfFake:FlxAtlasSprite = new FlxAtlasSprite(boyfriend.x - 440, boyfriend.y - 240, Paths.animateAtlas("characters/bfFakeOut", "shared"),);
+      add(bfFake);
+      bfFake.playAnimation("");
+      bfFake.anim.onComplete = () -> {
+        bfFake.visible = false;
+        boyfriend.visible = true;
+        boyfriend.playAnimation('firstDeath', true, true);
+      };
+      boyfriend.visible = false;
+    }
+    else
+      boyfriend.playAnimation('firstDeath', true, true);
 
     // Assign a camera follow point to the boyfriend's position.
     cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);