Refactor cave_illuminate() to be less ugly.