Magnetic battery assembly