It's really simple and I don't know why it wasn't implemented this way since it's the way the battle tower has always worked. Disconnecting/shutting off the game in the middle of a battle equals a loss on your record. Some people would get losses because of actual power problems but it would stop people getting out of losses by turning the game off.