added an exception for if there are no enemies when attacking (rarely occurs) and added the spacebar to be pressed when entering final battle end or pony time checks (sometimes the spacebar didnt register and the program would end when it could still be going)