It started out like some kind of normal dream, fighting some kind of monster. Beat the monster and then all of sudden, I had this kind of fourth wall clarity where I knew the next enemies to fight. And then I had a weird thought, "okay, I think it makes much more narrative sense if the final fight is the evil prince instead of the king because he's a mirror of the player character". And then I somehow knew that the two enemies switched places in sequence.