4 int (*condition)(struct object*);
5 const char *description;
7 struct object *location;
8 struct object *destination;
9 struct object *prospect;
16 const char *(*open)(struct object*);
17 const char *(*close)(struct object*);
18 const char *(*lock)(struct object*);
19 const char *(*unlock)(struct object*);
22 extern struct object objs[];
25 description "an open field"
27 details "The filed is a nice and quiet place under a clear blue sky."
30 description "a little cave"
32 details "The cave is just a cold, damp, rocky chamber."
35 description "a silver coin"
36 tags "silver", "coin", "sirver coin"
38 details "The coin has an eagle on the obverse."
42 description "a gold coin"
43 tags "gold", "coin", "gold coin"
45 details "The shiny coin seems to be a rare and priceless artefact."
49 description "a burly guard"
50 tags "guard", "burly guard"
52 details "The guard is a really big fellow."
58 description "yourself"
61 details "You would need a mirror to look at yourself."
67 condition { return guard->health == 0 || silver->location == guard; }
68 description "a cave entrance to the east"
69 tags "east", "entrance"
72 details "The entrance is just a narrow opening in a small outcrop."
73 text_go "You walk into the cave."
77 condition { return guard->health > 0 && silver->location != guard; }
78 description "a cave entrance to the east"
79 tags "east", "entrance"
82 details "The entrance is just a narrow opening in a small outcrop."
83 text_go "The guard stops you from walking into the cave."
87 description "a way out to the west"
91 details "Sunlight pours in through an opening in the cave's wall."
92 text_go "You walk out of the cave."
96 description "dense forest all around"
97 tags "west", "north", "south", "forest"
99 details "The field is surrounded by trees and undergrowth."
100 text_go "Dense forest is blocking the way."
103 description "solid rock all around"
104 tags "east", "north", "rock"
106 details "carved in stone is a secret password 'abccb'."
107 text_go "Solid rock is blocking the way."
110 description "a backroom"
112 details "The room is dusty and messy."
115 description "solid rock all around"
116 tags "east", "west", "south", "rock"
118 details "Trendy wallpaper covers the rock walls."
119 text_go "Solid rock is blocking the way."
121 - open_door_to_backroom
122 description "an open door to the south"
123 tags "south", "door", "doorway"
125 details "The door is open."
126 text_go "You walk through the door into the backroom."
128 close toggle_backdoor
130 - closed_door_to_backroom
131 description "a closed door to the south"
132 tags "south", "door", "doorway"
135 details "The door is closed."
136 text_go "The door is closed."
138 close is_already_closed
141 description "an open door to the north"
142 tags "north", "door", "doorway"
144 details "The door is open"
145 text_go "You walk through the door into the cave."
147 close toggle_backdoor
149 - closed_door_to_cave
150 description "a closed door to the north"
151 tags "north", "door", "doorway"
154 details "The door is closed."
155 text_go "The door is closed."
157 close is_already_closed
160 description "a wooden box"
161 tags "box", "wooden box"
162 details "The box is open."
168 unlock is_already_open
171 description "a wooden box"
172 tags "box", "wooden box"
173 details "The box is closed."
176 close is_already_closed
178 unlock is_already_unlocked
181 description "a wooden box"
182 tags "box", "wooden box"
184 details "The box is closed."
187 close is_already_closed
188 lock is_already_locked
189 unlock toggle_box_lock
192 description "a tiny key"
193 tags "key", "tiny key"
195 details "The key is really small and shiny."
199 description "a small, rusty knife"
200 tags "knife", "rusty knife", "small knife"
202 details "This knife has surely seen better times."