Fix battle bugs and add metafiles