battling game logic