Attack enemy only if it's not in a wall or on lava.