7 list_objs_at_loc(struct object *location)
14 if (obj != player && obj->location == location) {
16 printf("%s:\n", location->contents);
17 printf("%s\n", obj->description);
31 if (distance_to(obj) == dist_here && obj->health > 0)
39 get_passage_to(struct object *target)
45 if (obj->location == player->location
46 && obj->prospect == target)
54 distance_to(struct object *obj)
56 return !valid_obj(obj) ? dist_unknown_obj
59 : obj == player->location ? dist_location
60 : obj->location == player
62 : obj->location == player->location
64 : get_passage_to(obj) != NULL
69 : obj->location->location
72 : obj->location->location
79 move_player(struct object *passage)
81 printf("%s\n", passage->text_go);
82 if (passage->destination != NULL) {
83 player->location = passage->destination;
90 weight_of_contents(struct object *container)
97 if (obj->location == container)
104 object_within_reach(const char *verb, struct param *par)
108 enum distance dist = par->distance;
110 if (dist > dist_not_here)
111 printf("I don't understand what you want to %s.\n", verb);
112 else if (dist == dist_not_here)
113 printf("You don't see any %s here.\n", par->tag);
114 else if (dist >= dist_here_contained)
115 printf("That is out of reach.\n");
116 else if (par->count > 1)
117 printf("Multiple choices to %s; be more specific.\n", verb);