6 swap_locations(struct object *a, struct object *b)
14 a->location = b->location;
19 cannot_be_opened(struct object *o)
21 return "That cannot be opened.";
25 cannot_be_closed(struct object *o)
27 return "That cannot be closed.";
31 cannot_be_locked(struct object *o)
33 return "That cannot be locked.";
37 cannot_be_unlocked(struct object *o)
39 return "That cannot be unlocked.";
43 is_already_open(struct object *o)
45 return "That is already open.";
49 is_already_closed(struct object *o)
51 return "That is already closed.";
55 is_already_locked(struct object *o)
57 return "That is already locked.";
61 is_already_unlocked(struct object *o)
63 return "That is already unlocked.";
67 is_still_open(struct object *o)
69 return "That is still open.";
73 is_still_locked(struct object *o)
75 return "That is still locked.";
79 toggle_backdoor(struct object *o)
81 swap_locations(open_door_to_backroom, closed_door_to_backroom);
82 swap_locations(open_door_to_cave, closed_door_to_cave);
87 toggle_box(struct object *o)
89 swap_locations(open_box, closed_box);
94 toggle_box_lock(struct object *o)
96 if (key_for_box->location == player) {
97 swap_locations(closed_box, locked_box);
100 return "You try really hard, but the closed box won't open "