fixed battle end conditions so that the battle can be repeated. improvement dead character management