Updated battle core so that it's more efficient.