Haha thank you for the screenshot. It should have ended after 100 when the boss spawns, but it seems I let a bug slip into my own spawner logic.
Not sure if it would have helped here, but alot of the time, I like to use things like >= instead of == all the time, just to make sure my conditions go off, and nothing weird happens with simulateous events, floating point math, or whatever. Living forever with negative lives is a good common example. It shouldn't be possible to lose two lives at once, but if you do, and your code is structured in a certain way, the player might live forever, even if you didn't do any extra checks after that, two bosses or more is probably a better result game structure wise XD.