7 list_objs_at_loc(struct object *location)
13 if (obj != player && obj->location == location) {
15 printf("%s:\n", location->contents);
16 printf("%s\n", obj->description);
29 if (distance_to(obj) == dist_here && obj->health > 0)
37 get_passage_to(struct object *target)
42 if (obj->location == player->location
43 && obj->prospect == target)
51 distance_to(struct object *obj)
53 return !valid_obj(obj) ? dist_unknown_obj
56 : obj == player->location ? dist_location
57 : obj->location == player
59 : obj->location == player->location
61 : get_passage_to(obj) != NULL
66 : obj->location->location
69 : obj->location->location
76 move_player(struct object *passage)
78 printf("%s\n", passage->text_go);
79 if (passage->destination != NULL) {
80 player->location = passage->destination;
87 weight_of_contents(struct object *container)
93 if (obj->location == container)
100 object_within_reach(const char *verb, struct param *par)
104 enum distance dist = par->distance;
106 if (dist > dist_not_here)
107 printf("I don't understand what you want to %s.\n", verb);
108 else if (dist == dist_not_here)
109 printf("You don't see any %s here.\n", par->tag);
110 else if (dist >= dist_here_contained)
111 printf("That is out of reach.\n");
112 else if (par->count > 1)
113 printf("Multiple choices to %s; be more specific.\n", verb);