So it's a trial. the Y battalion locke. The leafeon is Battalion.
So if your pokemon faints the percentage of battalion appearing gets higher. If your pokemon faints, its form changes into this.... uhhh thing??? anyways they cut it down to 50 hp or lower but faint, they'll need 1-2 days to recover, and if they get battalion's hp to zero, they have to wait until postgame.