Fixed battle function