updated battle ui logic