debug function for battles