dunnet.el 110 KB
Newer Older
Glenn Morris's avatar
Glenn Morris committed
1
;;; dunnet.el --- text adventure for Emacs
Richard M. Stallman's avatar
Richard M. Stallman committed
2

Paul Eggert's avatar
Paul Eggert committed
3
;; Copyright (C) 1992-1993, 2001-2017 Free Software Foundation, Inc.
Erik Naggum's avatar
Erik Naggum committed
4

Richard M. Stallman's avatar
Richard M. Stallman committed
5
;; Author: Ron Schnell <ronnie@driver-aces.com>
Richard M. Stallman's avatar
Richard M. Stallman committed
6
;; Created: 25 Jul 1992
7
;; Version: 2.02
Richard M. Stallman's avatar
Richard M. Stallman committed
8 9 10 11
;; Keywords: games

;; This file is part of GNU Emacs.

12
;; GNU Emacs is free software: you can redistribute it and/or modify
Richard M. Stallman's avatar
Richard M. Stallman committed
13
;; it under the terms of the GNU General Public License as published by
14 15
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
Richard M. Stallman's avatar
Richard M. Stallman committed
16 17 18 19 20 21 22

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
23
;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
Richard M. Stallman's avatar
Richard M. Stallman committed
24 25 26 27

;;; Commentary:

;; This game can be run in batch mode.  To do this, use:
28
;;    emacs -batch -l dunnet
Richard M. Stallman's avatar
Richard M. Stallman committed
29

30
;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Richard M. Stallman's avatar
Richard M. Stallman committed
31
;;;  The log file should be set for your system, and it must
32
;;;  be writable by all.
Richard M. Stallman's avatar
Richard M. Stallman committed
33

34 35
;;; Code:

Stephen Eglen's avatar
Stephen Eglen committed
36 37 38 39 40 41 42 43 44
(defgroup dunnet nil
  "Text adventure for Emacs."
  :prefix "dun-"
  :group 'games)

(defcustom dun-log-file "/usr/local/dunnet.score"
  "Name of file to store score information for dunnet."
  :type 'file
  :group 'dunnet)
Richard M. Stallman's avatar
Richard M. Stallman committed
45 46

;;;;
47
;;;; This section defines the globals that are used in dunnet.
Richard M. Stallman's avatar
Richard M. Stallman committed
48
;;;;
49 50
;;;; IMPORTANT
;;;; All globals which can change must be saved from 'save-game.  Add
Mark Oteiza's avatar
Mark Oteiza committed
51
;;;; all new globals to bottom of this section.
Richard M. Stallman's avatar
Richard M. Stallman committed
52

53 54 55 56 57 58 59 60 61 62 63 64 65
(defvar dun-visited '(27))
(defvar dun-current-room 1)
(defvar dun-exitf nil)
(defvar dun-badcd nil)
(defvar dun-computer nil)
(defvar dun-floppy nil)
(defvar dun-key-level 0)
(defvar dun-hole nil)
(defvar dun-correct-answer nil)
(defvar dun-lastdir 0)
(defvar dun-numsaves 0)
(defvar dun-jar nil)
(defvar dun-dead nil)
Mark Oteiza's avatar
Mark Oteiza committed
66
(defvar dun-room 0)
67 68 69 70 71 72
(defvar dun-numcmds 0)
(defvar dun-wizard nil)
(defvar dun-endgame-question nil)
(defvar dun-logged-in nil)
(defvar dungeon-mode 'dungeon)
(defvar dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
73 74 75
		       (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
		       (rlogin . dun-rlogin) (ssh . dun-rlogin)
		       (uncompress . dun-uncompress) (cat . dun-cat)))
Richard M. Stallman's avatar
Richard M. Stallman committed
76

77
(defvar dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
78 79 80
		      (exit . dun-dos-exit) (command . dun-dos-spawn)
		      (b: . dun-dos-invd) (c: . dun-dos-invd)
		      (a: . dun-dos-nil)))
Richard M. Stallman's avatar
Richard M. Stallman committed
81 82


83
(defvar dun-batch-mode nil)
Richard M. Stallman's avatar
Richard M. Stallman committed
84

85 86 87 88 89 90 91 92 93 94 95
(defvar dun-cdpath "/usr/toukmond")
(defvar dun-cdroom -10)
(defvar dun-uncompressed nil)
(defvar dun-ethernet t)
(defconst dun-restricted
  '(dun-room-objects dungeon-map dun-rooms
    dun-room-silents dun-combination))
(defvar dun-ftptype 'ascii)
(defvar dun-endgame nil)
(defvar dun-gottago t)
(defvar dun-black nil)
Richard M. Stallman's avatar
Richard M. Stallman committed
96

97
(defconst dun-rooms '(
Richard M. Stallman's avatar
Richard M. Stallman committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
	      (
"You are in the treasure room.  A door leads out to the north."
               "Treasure room"
	       )
	      (
"You are at a dead end of a dirt road.  The road goes to the east.
In the distance you can see that it will eventually fork off.  The
trees here are very tall royal palms, and they are spaced equidistant
from each other."
	       "Dead end"
	       )
	      (
"You are on the continuation of a dirt road.  There are more trees on
both sides of you.  The road continues to the east and west."
               "E/W Dirt road"
	       )
	      (
"You are at a fork of two passages, one to the northeast, and one to the
southeast.  The ground here seems very soft. You can also go back west."
               "Fork"
	       )
	      (
"You are on a northeast/southwest road."
               "NE/SW road"
	       )
	      (
"You are at the end of the road.  There is a building in front of you
to the northeast, and the road leads back to the southwest."
               "Building front"
	       )
	      (
"You are on a southeast/northwest road."
               "SE/NW road"
	       )
	      (
"You are standing at the end of a road.  A passage leads back to the
northwest."
               "Bear hangout"
	       )
	      (
"You are in the hallway of an old building.  There are rooms to the east
and west, and doors leading out to the north and south."
               "Old Building hallway"
	       )
	      (
"You are in a mailroom.  There are many bins where the mail is usually
kept.  The exit is to the west."
               "Mailroom"
	       )
	      (
"You are in a computer room.  It seems like most of the equipment has
been removed.  There is a VAX 11/780 in front of you, however, with
one of the cabinets wide open.  A sign on the front of the machine
151 152
says: This VAX is named ‘pokey’.  To type on the console, use the
‘type’ command.  The exit is to the east."
Richard M. Stallman's avatar
Richard M. Stallman committed
153 154 155 156 157 158 159 160 161
               "Computer room"
	       )
	      (
"You are in a meadow in the back of an old building.  A small path leads
to the west, and a door leads to the south."
               "Meadow"
	       )
	      (
"You are in a round, stone room with a door to the east.  There
162
is a sign on the wall that reads: ‘receiving room’."
Richard M. Stallman's avatar
Richard M. Stallman committed
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
               "Receiving room"
	       )
	      (
"You are at the south end of a hallway that leads to the north.  There
are rooms to the east and west."
               "Northbound Hallway"
	       )
	      (
"You are in a sauna.  There is nothing in the room except for a dial
on the wall.  A door leads out to west."
               "Sauna"
               )
	      (
"You are at the end of a north/south hallway.  You can go back to the south,
or off to a room to the east."
               "End of N/S Hallway"
	       )
	      (
"You are in an old weight room.  All of the equipment is either destroyed
or completely broken.  There is a door out to the west, and there is a ladder
leading down a hole in the floor."
               "Weight room"                 ;16
	       )
	      (
"You are in a maze of twisty little passages, all alike.
There is a button on the ground here."
               "Maze button room"
	       )
	      (
"You are in a maze of little twisty passages, all alike."
               "Maze"
	       )
	      (
"You are in a maze of thirsty little passages, all alike."
               "Maze"    ;19
	       )
	      (
"You are in a maze of twenty little passages, all alike."
               "Maze"
	       )
	      (
"You are in a daze of twisty little passages, all alike."
               "Maze"   ;21
	       )
	      (
"You are in a maze of twisty little cabbages, all alike."
               "Maze"   ;22
	       )
	      (
"You are in a reception area for a health and fitness center.  The place
appears to have been recently ransacked, and nothing is left.  There is
a door out to the south, and a crawlspace to the southeast."
               "Reception area"
	       )
	      (
"You are outside a large building to the north which used to be a health
and fitness center.  A road leads to the south."
               "Health Club front"
	       )
	      (
"You are at the north side of a lake.  On the other side you can see
a road which leads to a cave.  The water appears very deep."
               "Lakefront North"
	       )
	      (
"You are at the south side of a lake.  A road goes to the south."
               "Lakefront South"
	       )
	      (
"You are in a well-hidden area off to the side of a road.  Back to the
northeast through the brush you can see the bear hangout."
               "Hidden area"
	       )
	      (
"The entrance to a cave is to the south.  To the north, a road leads
towards a deep lake.  On the ground nearby there is a chute, with a sign
239
that says ‘put treasures here for points’."
Richard M. Stallman's avatar
Richard M. Stallman committed
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
               "Cave Entrance"                      ;28
	       )
	      (
"You are in a misty, humid room carved into a mountain.
To the north is the remains of a rockslide.  To the east, a small
passage leads away into the darkness."              ;29
               "Misty Room"
	       )
	      (
"You are in an east/west passageway.  The walls here are made of
multicolored rock and are quite beautiful."
               "Cave E/W passage"                   ;30
	       )
	      (
"You are at the junction of two passages. One goes north/south, and
the other goes west."
               "N/S/W Junction"                     ;31
	       )
	      (
"You are at the north end of a north/south passageway.  There are stairs
leading down from here.  There is also a door leading west."
               "North end of cave passage"         ;32
	       )
	      (
"You are at the south end of a north/south passageway.  There is a hole
in the floor here, into which you could probably fit."
               "South end of cave passage"         ;33
	       )
	      (
"You are in what appears to be a worker's bedroom.  There is a queen-
sized bed in the middle of the room, and a painting hanging on the
wall.  A door leads to another room to the south, and stairways
lead up and down."
               "Bedroom"                          ;34
	       )
	      (
"You are in a bathroom built for workers in the cave.  There is a
urinal hanging on the wall, and some exposed pipes on the opposite
wall where a sink used to be.  To the north is a bedroom."
               "Bathroom"        ;35
	       )
	      (
"This is a marker for the urinal.  User will not see this, but it
is a room that can contain objects."
               "Urinal"          ;36
	       )
	      (
"You are at the northeast end of a northeast/southwest passageway.
Stairs lead up out of sight."
Richard M. Stallman's avatar
Richard M. Stallman committed
289
               "NE end of NE/SW cave passage"       ;37
Richard M. Stallman's avatar
Richard M. Stallman committed
290 291 292
	       )
	      (
"You are at the junction of northeast/southwest and east/west passages."
Richard M. Stallman's avatar
Richard M. Stallman committed
293
               "NE/SW-E/W junction"                      ;38
Richard M. Stallman's avatar
Richard M. Stallman committed
294 295 296
	       )
	      (
"You are at the southwest end of a northeast/southwest passageway."
Richard M. Stallman's avatar
Richard M. Stallman committed
297
               "SW end of NE/SW cave passage"        ;39
Richard M. Stallman's avatar
Richard M. Stallman committed
298 299
	       )
	      (
Richard M. Stallman's avatar
Richard M. Stallman committed
300
"You are at the east end of an E/W passage.  There are stairs leading up
Richard M. Stallman's avatar
Richard M. Stallman committed
301
to a room above."
Richard M. Stallman's avatar
Richard M. Stallman committed
302
               "East end of E/W cave passage"    ;40
Richard M. Stallman's avatar
Richard M. Stallman committed
303 304
	       )
	      (
Richard M. Stallman's avatar
Richard M. Stallman committed
305
"You are at the west end of an E/W passage.  There is a hole on the ground
Richard M. Stallman's avatar
Richard M. Stallman committed
306
which leads down out of sight."
Richard M. Stallman's avatar
Richard M. Stallman committed
307
               "West end of E/W cave passage"    ;41
Richard M. Stallman's avatar
Richard M. Stallman committed
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
	       )
	      (
"You are in a room which is bare, except for a horseshoe shaped boulder
in the center.  Stairs lead down from here."     ;42
               "Horseshoe boulder room"
	       )
	      (
"You are in a room which is completely empty.  Doors lead out to the north
and east."
               "Empty room"                      ;43
	       )
	      (
"You are in an empty room.  Interestingly enough, the stones in this
room are painted blue.  Doors lead out to the east and south."  ;44
               "Blue room"
	       )
	      (
"You are in an empty room.  Interestingly enough, the stones in this
room are painted yellow.  Doors lead out to the south and west."    ;45
               "Yellow room"
	       )
	      (
"You are in an empty room.  Interestingly enough, the stones in this room
are painted red.  Doors lead out to the west and north."
               "Red room"                                 ;46
	       )
	      (
"You are in the middle of a long north/south hallway."     ;47
               "Long n/s hallway"
	       )
	      (
"You are 3/4 of the way towards the north end of a long north/south hallway."
               "3/4 north"                                ;48
	       )
	      (
"You are at the north end of a long north/south hallway.  There are stairs
leading upwards."
               "North end of long hallway"                 ;49
	       )
	      (
"You are 3/4 of the way towards the south end of a long north/south hallway."
               "3/4 south"                                 ;50
	       )
	      (
"You are at the south end of a long north/south hallway.  There is a hole
to the south."
               "South end of long hallway"                 ;51
	       )
	      (
"You are at a landing in a stairwell which continues up and down."
               "Stair landing"                             ;52
	       )
	      (
"You are at the continuation of an up/down staircase."
               "Up/down staircase"                         ;53
	       )
	      (
"You are at the top of a staircase leading down.  A crawlway leads off
to the northeast."
               "Top of staircase."                        ;54
	       )
	      (
"You are in a crawlway that leads northeast or southwest."
Richard M. Stallman's avatar
Richard M. Stallman committed
371
               "NE crawlway"                              ;55
Richard M. Stallman's avatar
Richard M. Stallman committed
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
	       )
	      (
"You are in a small crawlspace.  There is a hole in the ground here, and
a small passage back to the southwest."
               "Small crawlspace"                         ;56
	       )
	      (
"You are in the Gamma Computing Center.  An IBM 3090/600s is whirring
away in here.  There is an ethernet cable coming out of one of the units,
and going through the ceiling.  There is no console here on which you
could type."
               "Gamma computing center"                   ;57
	       )
	      (
"You are near the remains of a post office.  There is a mail drop on the
face of the building, but you cannot see where it leads.  A path leads
back to the east, and a road leads to the north."
               "Post office"                             ;58
	       )
	      (
"You are at the intersection of Main Street and Maple Ave.  Main street
runs north and south, and Maple Ave runs east off into the distance.
If you look north and east you can see many intersections, but all of
the buildings that used to stand here are gone.  Nothing remains except
street signs.
There is a road to the northwest leading to a gate that guards a building."
               "Main-Maple intersection"                       ;59
	       )
	      (
"You are at the intersection of Main Street and the west end of Oaktree Ave."
               "Main-Oaktree intersection"   ;60
	       )
	      (
"You are at the intersection of Main Street and the west end of Vermont Ave."
               "Main-Vermont intersection"  ;61
	       )
	      (
"You are at the north end of Main Street at the west end of Sycamore Ave." ;62
               "Main-Sycamore intersection"
	       )
	      (
"You are at the south end of First Street at Maple Ave." ;63
               "First-Maple intersection"
	       )
	      (
"You are at the intersection of First Street and Oaktree Ave."  ;64
               "First-Oaktree intersection"
	       )
	      (
"You are at the intersection of First Street and Vermont Ave."  ;65
               "First-Vermont intersection"
	       )
	      (
"You are at the north end of First Street at Sycamore Ave."  ;66
               "First-Sycamore intersection"
	       )
	      (
"You are at the south end of Second Street at Maple Ave."  ;67
               "Second-Maple intersection"
	       )
	      (
"You are at the intersection of Second Street and Oaktree Ave."  ;68
               "Second-Oaktree intersection"
	       )
	      (
"You are at the intersection of Second Street and Vermont Ave."  ;69
               "Second-Vermont intersection"
	       )
	      (
"You are at the north end of Second Street at Sycamore Ave."  ;70
               "Second-Sycamore intersection"
	       )
	      (
"You are at the south end of Third Street at Maple Ave."  ;71
               "Third-Maple intersection"
	       )
	      (
"You are at the intersection of Third Street and Oaktree Ave."  ;72
               "Third-Oaktree intersection"
	       )
	      (
"You are at the intersection of Third Street and Vermont Ave."  ;73
               "Third-Vermont intersection"
	       )
	      (
"You are at the north end of Third Street at Sycamore Ave."  ;74
               "Third-Sycamore intersection"
	       )
	      (
"You are at the south end of Fourth Street at Maple Ave."  ;75
               "Fourth-Maple intersection"
	       )
	      (
"You are at the intersection of Fourth Street and Oaktree Ave."  ;76
               "Fourth-Oaktree intersection"
	       )
	      (
"You are at the intersection of Fourth Street and Vermont Ave."  ;77
               "Fourth-Vermont intersection"
	       )
	      (
"You are at the north end of Fourth Street at Sycamore Ave."  ;78
               "Fourth-Sycamore intersection"
	       )
	      (
"You are at the south end of Fifth Street at the east end of Maple Ave."  ;79
               "Fifth-Maple intersection"
	       )
	      (
"You are at the intersection of Fifth Street and the east end of Oaktree Ave.
There is a cliff off to the east."
               "Fifth-Oaktree intersection"  ;80
	       )
	      (
"You are at the intersection of Fifth Street and the east end of Vermont Ave."
               "Fifth-Vermont intersection"  ;81
	       )
	      (
"You are at the north end of Fifth Street and the east end of Sycamore Ave."
               "Fifth-Sycamore intersection"  ;82
	       )
	      (
"You are in front of the Museum of Natural History.  A door leads into
the building to the north, and a road leads to the southeast."
               "Museum entrance"                  ;83
	       )
	      (
"You are in the main lobby for the Museum of Natural History.  In the center
of the room is the huge skeleton of a dinosaur.  Doors lead out to the
501
south and east."
Richard M. Stallman's avatar
Richard M. Stallman committed
502 503 504 505
               "Museum lobby"                     ;84
	       )
	      (
"You are in the geological display.  All of the objects that used to
506
be on display are missing.  There are rooms to the east, west, and
Richard M. Stallman's avatar
Richard M. Stallman committed
507 508 509 510 511 512 513 514 515 516 517
north."
               "Geological display"               ;85
	       )
	      (
"You are in the marine life area.  The room is filled with fish tanks,
which are filled with dead fish that have apparently died due to
starvation.  Doors lead out to the south and east."
               "Marine life area"                   ;86
	       )
	      (
"You are in some sort of maintenance room for the museum.  There is a
518
switch on the wall labeled ‘BL’.  There are doors to the west and north."
Richard M. Stallman's avatar
Richard M. Stallman committed
519 520 521 522
               "Maintenance room"                   ;87
	       )
	      (
"You are in a classroom where school children were taught about natural
523 524
history.  On the blackboard is written, ‘No children allowed downstairs.’
There is a door to the east with an ‘exit’ sign on it.  There is another
Richard M. Stallman's avatar
Richard M. Stallman committed
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
door to the west."
               "Classroom"                          ;88
	       )
	      (
"You are at the Vermont St. subway station.  A train is sitting here waiting."
               "Vermont station"                    ;89
	       )
	      (
"You are at the Museum subway stop.  A passage leads off to the north."
               "Museum station"                     ;90
	       )
	      (
"You are in a north/south tunnel."
               "N/S tunnel"                          ;91
	       )
	      (
"You are at the north end of a north/south tunnel.  Stairs lead up and
down from here.  There is a garbage disposal here."
Richard M. Stallman's avatar
Richard M. Stallman committed
543
               "North end of N/S tunnel"             ;92
Richard M. Stallman's avatar
Richard M. Stallman committed
544 545 546 547 548 549 550 551 552 553 554 555 556 557
               )
	      (
"You are at the top of some stairs near the subway station.  There is
a door to the west."
               "Top of subway stairs"           ;93
	       )
	      (
"You are at the bottom of some stairs near the subway station.  There is
a room to the northeast."
               "Bottom of subway stairs"       ;94
	       )
	      (
"You are in another computer room.  There is a computer in here larger
than you have ever seen.  It has no manufacturers name on it, but it
558
does have a sign that says: This machine's name is ‘endgame’.  The
Richard M. Stallman's avatar
Richard M. Stallman committed
559 560 561 562 563 564
exit is to the southwest.  There is no console here on which you could
type."
               "Endgame computer room"         ;95
	       )
	      (
"You are in a north/south hallway."
Richard M. Stallman's avatar
Richard M. Stallman committed
565
               "Endgame N/S hallway"           ;96
Richard M. Stallman's avatar
Richard M. Stallman committed
566 567 568
	       )
	      (
"You have reached a question room.  You must answer a question correctly in
569
order to get by.  Use the ‘answer’ command to answer the question."
Richard M. Stallman's avatar
Richard M. Stallman committed
570 571 572 573
               "Question room 1"              ;97
	       )
	      (
"You are in a north/south hallway."
Richard M. Stallman's avatar
Richard M. Stallman committed
574
               "Endgame N/S hallway"           ;98
Richard M. Stallman's avatar
Richard M. Stallman committed
575 576 577 578 579 580 581
	       )
	      (
"You are in a second question room."
               "Question room 2"               ;99
	       )
	      (
"You are in a north/south hallway."
Richard M. Stallman's avatar
Richard M. Stallman committed
582
               "Endgame N/S hallway"           ;100
Richard M. Stallman's avatar
Richard M. Stallman committed
583 584 585 586 587 588 589 590 591 592 593 594 595 596
	       )
	      (
"You are in a third question room."
               "Question room 3"               ;101
	       )
	      (
"You are in the endgame treasure room.  A door leads out to the north, and
a hallway leads to the south."
               "Endgame treasure room"         ;102
	       )
	      (
"You are in the winner's room.  A door leads back to the south."
               "Winner's room"                 ;103
	       )
597 598 599 600 601 602 603 604 605
	      (
"You have reached a dead end.  There is a PC on the floor here.  Above
it is a sign that reads:
          Type the ‘reset’ command to type on the PC.
A hole leads north."
               "PC area"                       ;104
               )
))

606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
(defconst dun-light-rooms
  '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 24 25 26 27 28 58 59
    60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    77 78 79 80 81 82 83))

(defconst dun-verblist
  '((die . dun-die) (ne . dun-ne) (north . dun-n)
    (south . dun-s) (east . dun-e) (west . dun-w)
    (u . dun-up) (d . dun-down) (i . dun-inven)
    (inventory . dun-inven) (look . dun-examine) (n . dun-n)
    (s . dun-s) (e . dun-e) (w . dun-w) (se . dun-se)
    (nw . dun-nw) (sw . dun-sw) (up . dun-up)
    (down . dun-down) (in . dun-in) (out . dun-out)
    (go . dun-go) (drop . dun-drop) (southeast . dun-se)
    (southwest . dun-sw) (northeast . dun-ne)
    (northwest . dun-nw) (save . dun-save-game)
    (restore . dun-restore) (long . dun-long) (dig . dun-dig)
    (shake . dun-shake) (wave . dun-shake)
    (examine . dun-examine) (describe . dun-examine)
    (climb . dun-climb) (eat . dun-eat) (put . dun-put)
    (type . dun-type)  (insert . dun-put)
    (score . dun-score) (help . dun-help) (quit . dun-quit)
    (read . dun-examine) (verbose . dun-long)
    (urinate . dun-piss) (piss . dun-piss)
    (flush . dun-flush) (sleep . dun-sleep) (lie . dun-sleep)
    (x . dun-examine) (break . dun-break) (drive . dun-drive)
    (board . dun-in) (enter . dun-in) (turn . dun-turn)
    (press . dun-press) (push . dun-press) (swim . dun-swim)
    (on . dun-in) (off . dun-out) (chop . dun-break)
    (switch . dun-press) (cut . dun-break) (exit . dun-out)
    (leave . dun-out) (reset . dun-power) (flick . dun-press)
    (superb . dun-superb) (answer . dun-answer)
    (throw . dun-drop) (l . dun-examine) (take . dun-take)
    (get . dun-take) (feed . dun-feed)))

(defvar dun-inbus nil)
(defvar dun-nomail nil)
(defconst dun-ignore '(the to at))
(defvar dun-mode 'moby)
(defvar dun-sauna-level 0)
646

647 648 649 650 651 652 653 654 655 656 657 658 659 660
(defconst dun-movement-alist
  '((north . 0)
    (south . 1)
    (east . 2)
    (west . 3)
    (northeast . 4)
    (southeast . 5)
    (northwest . 6)
    (southwest . 7)
    (up . 8)
    (down . 9)
    (in . 10)
    (out . 11))
  "Alist enumerating movement directions.")
661

662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
(defconst dungeon-map
  ;;  no  so  ea  we  ne  se  nw  sw  up  do  in  ot
  '(( 96  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;0
    ( -1  -1   2  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;1
    ( -1  -1   3   1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;2
    ( -1  -1  -1   2   4   6  -1  -1  -1  -1  -1  -1 ) ;3
    ( -1  -1  -1  -1   5  -1  -1   3  -1  -1  -1  -1 ) ;4
    ( -1  -1  -1  -1  255 -1  -1   4  -1  -1  255 -1 ) ;5
    ( -1  -1  -1  -1  -1   7   3  -1  -1  -1  -1  -1 ) ;6
    ( -1  -1  -1  -1  -1  255  6  27  -1  -1  -1  -1 ) ;7
    ( 255  5   9  10  -1  -1  -1   5  -1  -1  -1   5 ) ;8
    ( -1  -1  -1   8  -1  -1  -1  -1  -1  -1  -1  -1 ) ;9
    ( -1  -1   8  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;10
    ( -1   8  -1  58  -1  -1  -1  -1  -1  -1  -1  -1 ) ;11
    ( -1  -1  13  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;12
    ( 15  -1  14  12  -1  -1  -1  -1  -1  -1  -1  -1 ) ;13
    ( -1  -1  -1  13  -1  -1  -1  -1  -1  -1  -1  -1 ) ;14
    ( -1  13  16  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;15
    ( -1  -1  -1  15  -1  -1  -1  -1  -1  17  16  -1 ) ;16
    ( -1  -1  17  17  17  17 255  17 255  17  -1  -1 ) ;17
    ( 18  18  18  18  18  -1  18  18  19  18  -1  -1 ) ;18
    ( -1  18  18  19  19  20  19  19  -1  18  -1  -1 ) ;19
    ( -1  -1  -1  18  -1  -1  -1  -1  -1  21  -1  -1 ) ;20
    ( -1  -1  -1  -1  -1  20  22  -1  -1  -1  -1  -1 ) ;21
    ( 18  18  18  18  16  18  23  18  18  18  18  18 ) ;22
    ( -1 255  -1  -1  -1  19  -1  -1  -1  -1  -1  -1 ) ;23
    ( 23  25  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;24
    ( 24 255  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;25
    (255  28  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;26
    ( -1  -1  -1  -1   7  -1  -1  -1  -1  -1  -1  -1 ) ;27
    ( 26 255  -1  -1  -1  -1  -1  -1  -1  -1  255 -1 ) ;28
    ( -1  -1  30  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;29
    ( -1  -1  31  29  -1  -1  -1  -1  -1  -1  -1  -1 ) ;30
    ( 32  33  -1  30  -1  -1  -1  -1  -1  -1  -1  -1 ) ;31
    ( -1  31  -1  255 -1  -1  -1  -1  -1  34  -1  -1 ) ;32
    ( 31  -1  -1  -1  -1  -1  -1  -1  -1  35  -1  -1 ) ;33
    ( -1  35  -1  -1  -1  -1  -1  -1  32  37  -1  -1 ) ;34
    ( 34  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;35
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;36
    ( -1  -1  -1  -1  -1  -1  -1  38  34  -1  -1  -1 ) ;37
    ( -1  -1  40  41  37  -1  -1  39  -1  -1  -1  -1 ) ;38
    ( -1  -1  -1  -1  38  -1  -1  -1  -1  -1  -1  -1 ) ;39
    ( -1  -1  -1  38  -1  -1  -1  -1  42  -1  -1  -1 ) ;40
    ( -1  -1  38  -1  -1  -1  -1  -1  -1  43  -1  -1 ) ;41
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  40  -1  -1 ) ;42
    ( 44  -1  46  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;43
    ( -1  43  45  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;44
    ( -1  46  -1  44  -1  -1  -1  -1  -1  -1  -1  -1 ) ;45
    ( 45  -1  -1  43  -1  -1  -1  -1  -1  255 -1  -1 ) ;46
    ( 48  50  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;47
    ( 49  47  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;48
    ( -1  48  -1  -1  -1  -1  -1  -1  52  -1  -1  -1 ) ;49
    ( 47  51  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;50
    ( 50  104 -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;51
    ( -1  -1  -1  -1  -1  -1  -1  -1  53  49  -1  -1 ) ;52
    ( -1  -1  -1  -1  -1  -1  -1  -1  54  52  -1  -1 ) ;53
    ( -1  -1  -1  -1  55  -1  -1  -1  -1  53  -1  -1 ) ;54
    ( -1  -1  -1  -1  56  -1  -1  54  -1  -1  -1  54 ) ;55
    ( -1  -1  -1  -1  -1  -1  -1  55  -1  31  -1  -1 ) ;56
    ( -1  -1  32  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;57
    ( 59  -1  11  -1  -1  -1  -1  -1  -1  -1  255 255) ;58
    ( 60  58  63  -1  -1  -1  255 -1  -1  -1  255 255) ;59
    ( 61  59  64  -1  -1  -1  -1  -1  -1  -1  255 255) ;60
    ( 62  60  65  -1  -1  -1  -1  -1  -1  -1  255 255) ;61
    ( -1  61  66  -1  -1  -1  -1  -1  -1  -1  255 255) ;62
    ( 64  -1  67  59  -1  -1  -1  -1  -1  -1  255 255) ;63
    ( 65  63  68  60  -1  -1  -1  -1  -1  -1  255 255) ;64
    ( 66  64  69  61  -1  -1  -1  -1  -1  -1  255 255) ;65
    ( -1  65  70  62  -1  -1  -1  -1  -1  -1  255 255) ;66
    ( 68  -1  71  63  -1  -1  -1  -1  -1  -1  255 255) ;67
    ( 69  67  72  64  -1  -1  -1  -1  -1  -1  255 255) ;68
    ( 70  68  73  65  -1  -1  -1  -1  -1  -1  255 255) ;69
    ( -1  69  74  66  -1  -1  -1  -1  -1  -1  255 255) ;70
    ( 72  -1  75  67  -1  -1  -1  -1  -1  -1  255 255) ;71
    ( 73  71  76  68  -1  -1  -1  -1  -1  -1  255 255) ;72
    ( 74  72  77  69  -1  -1  -1  -1  -1  -1  255 255) ;73
    ( -1  73  78  70  -1  -1  -1  -1  -1  -1  255 255) ;74
    ( 76  -1  79  71  -1  -1  -1  -1  -1  -1  255 255) ;75
    ( 77  75  80  72  -1  -1  -1  -1  -1  -1  255 255) ;76
    ( 78  76  81  73  -1  -1  -1  -1  -1  -1  255 255) ;77
    ( -1  77  82  74  -1  -1  -1  -1  -1  -1  255 255) ;78
    ( 80  -1  -1  75  -1  -1  -1  -1  -1  -1  255 255) ;79
    ( 81  79  255 76  -1  -1  -1  -1  -1  -1  255 255) ;80
    ( 82  80  -1  77  -1  -1  -1  -1  -1  -1  255 255) ;81
    ( -1  81  -1  78  -1  -1  -1  -1  -1  -1  255 255) ;82
    ( 84  -1  -1  -1  -1  59  -1  -1  -1  -1  255 255) ;83
    ( -1  83  85  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;84
    ( 86  -1  87  84  -1  -1  -1  -1  -1  -1  -1  -1 ) ;85
    ( -1  85  88  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;86
    ( 88  -1  -1  85  -1  -1  -1  -1  -1  -1  -1  -1 ) ;87
    ( -1  87 255  86  -1  -1  -1  -1  -1  -1  -1  -1 ) ;88
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 255  -1 ) ;89
    ( 91  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;90
    ( 92  90  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;91
    ( -1  91  -1  -1  -1  -1  -1  -1  93  94  -1  -1 ) ;92
    ( -1  -1  -1  88  -1  -1  -1  -1  -1  92  -1  -1 ) ;93
    ( -1  -1  -1  -1  95  -1  -1  -1  92  -1  -1  -1 ) ;94
    ( -1  -1  -1  -1  -1  -1  -1  94  -1  -1  -1  -1 ) ;95
    ( 97   0  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;96
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;97
    ( 99  97  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;98
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;99
    ( 101 99  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;100
    ( -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;101
    ( 103 101 -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;102
    ( -1  102 -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ) ;103
    ( 51  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 ));104
  ;; no  so  ea  we  ne  se  nw  sw  up  do  in  ot
770 771 772 773
)


;;; How the user references *all* objects, permanent and regular.
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
(defconst dun-objnames
  '((shovel . 0)
    (lamp . 1)
    (cpu . 2) (board . 2) (card . 2) (chip . 2)
    (food . 3)
    (key . 4)
    (paper . 5) (slip . 5)
    (rms . 6) (statue . 6) (statuette . 6)  (stallman . 6)
    (diamond . 7)
    (weight . 8)
    (life . 9) (preserver . 9)
    (bracelet . 10) (emerald . 10)
    (gold . 11)
    (platinum . 12)
    (towel . 13) (beach . 13)
    (axe . 14)
    (silver . 15)
    (license . 16)
    (coins . 17)
    (egg . 18)
    (jar . 19)
    (bone . 20)
    (acid . 21) (nitric . 21)
    (glycerine . 22)
    (ruby . 23)
    (amethyst . 24)
    (mona . 25)
    (bill . 26)
    (floppy . 27) (disk . 27)

    (boulder . -1)
    (tree . -2) (trees . -2) (palm . -2)
    (bear . -3)
    (bin . -4) (bins . -4)
    (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5)
    (protoplasm . -6)
    (dial . -7)
    (button . -8)
    (chute . -9)
    (painting . -10)
    (bed . -11)
    (urinal . -12)
    (URINE . -13)
    (pipes . -14) (pipe . -14)
    (box . -15) (slit . -15)
    (cable . -16) (ethernet . -16)
    (mail . -17) (drop . -17)
    (bus . -18)
    (gate . -19)
    (cliff . -20)
    (skeleton . -21) (dinosaur . -21)
    (fish . -22)
    (tanks . -23) (tank . -23)
    (switch . -24)
    (blackboard . -25)
    (disposal . -26) (garbage . -26)
    (ladder . -27)
    (subway . -28) (train . -28)
    (pc . -29) (drive . -29) (coconut . -30) (coconuts . -30)
    (lake . -32) (water . -32)))
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848

(dolist (x dun-objnames)
  (let (name)
    (setq name (concat "obj-" (prin1-to-string (car x))))
    (eval (list 'defconst (intern name) (cdr x)))))

(defconst obj-special 255)

;;; The initial setup of what objects are in each room.
;;; Regular objects have whole numbers lower than 255.
;;; Objects that cannot be taken but might move and are
;;; described during room description are negative.
;;; Stuff that is described and might change are 255, and are
;;; handled specially by 'dun-describe-room.

849
(defvar dun-room-objects (list nil
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905

        (list obj-shovel)                     ;; treasure-room
        (list obj-boulder)                    ;; dead-end
        nil nil nil
        (list obj-food)                       ;; se-nw-road
        (list obj-bear)                       ;; bear-hangout
        nil nil
        (list obj-special)                    ;; computer-room
        (list obj-lamp obj-license obj-silver);; meadow
        nil nil
        (list obj-special)                    ;; sauna
        nil
        (list obj-weight obj-life)            ;; weight-room
        nil nil
        (list obj-rms obj-floppy)             ;; thirsty-maze
        nil nil nil nil nil nil nil
        (list obj-emerald)                    ;; hidden-area
        nil
        (list obj-gold)                       ;; misty-room
        nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
        (list obj-towel obj-special)          ;; red-room
        nil nil nil nil nil
        (list obj-box)                        ;; stair-landing
        nil nil nil
        (list obj-axe)                        ;; small-crawlspace
        nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
        nil nil nil nil nil
        (list obj-special)                    ;; fourth-vermont-intersection
        nil nil
        (list obj-coins)                      ;; fifth-oaktree-intersection
        nil
        (list obj-bus)                        ;; fifth-sycamore-intersection
        nil
        (list obj-bone)                       ;; museum-lobby
        nil
        (list obj-jar obj-special obj-ruby)   ;; marine-life-area
        (list obj-nitric)                     ;; maintenance-room
        (list obj-glycerine)                  ;; classroom
        nil nil nil nil nil
        (list obj-amethyst)                   ;; bottom-of-subway-stairs
        nil nil
        (list obj-special)                    ;; question-room-1
        nil
        (list obj-special)                    ;; question-room-2
        nil
        (list obj-special)                    ;; question-room-three
        nil
        (list obj-mona)                       ;; winner's-room
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil))

;;; These are objects in a room that are only described in the
;;; room description.  They are permanent.

906
(defconst dun-room-silents (list nil
907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949
        (list obj-tree obj-coconut)            ;; dead-end
        (list obj-tree obj-coconut)            ;; e-w-dirt-road
        nil nil nil nil nil nil
        (list obj-bin)                         ;; mailroom
        (list obj-computer)                    ;; computer-room
        nil nil nil
        (list obj-dial)                        ;; sauna
        nil
        (list obj-ladder)                      ;; weight-room
        (list obj-button obj-ladder)           ;; maze-button-room
        nil nil nil
        nil nil nil nil
	(list obj-lake)                        ;; lakefront-north
	(list obj-lake)                        ;; lakefront-south
	nil
        (list obj-chute)                       ;; cave-entrance
        nil nil nil nil nil
        (list obj-painting obj-bed)            ;; bedroom
        (list obj-urinal obj-pipes)            ;; bathroom
        nil nil nil nil nil nil
        (list obj-boulder)                     ;; horseshoe-boulder-room
        nil nil nil nil nil nil nil nil nil nil nil nil nil nil
        (list obj-computer obj-cable)          ;; gamma-computing-center
        (list obj-mail)                        ;; post-office
        (list obj-gate)                        ;; main-maple-intersection
        nil nil nil nil nil nil nil nil nil nil nil nil nil
        nil nil nil nil nil nil nil
        (list obj-cliff)                       ;; fifth-oaktree-intersection
        nil nil nil
        (list obj-dinosaur)                    ;; museum-lobby
        nil
        (list obj-fish obj-tanks)              ;; marine-life-area
        (list obj-switch)                      ;; maintenance-room
        (list obj-blackboard)                  ;; classroom
        (list obj-train)                       ;; vermont-station
        nil nil
        (list obj-disposal)                    ;; north-end-of-n-s-tunnel
        nil nil
        (list obj-computer)                    ;; endgame-computer-room
        nil nil nil nil nil nil nil nil
	(list obj-pc)                          ;; pc-area
	nil nil nil nil nil nil
))
950
(defvar dun-inventory '(1))
951 952 953 954

;;; Descriptions of objects, as they appear in the room description, and
;;; the inventory.

955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984
(defconst dun-objects
  '(("There is a shovel here." "A shovel")                ;0
    ("There is a lamp nearby." "A lamp")                  ;1
    ("There is a CPU card here." "A computer board")      ;2
    ("There is some food here." "Some food")              ;3
    ("There is a shiny brass key here." "A brass key")    ;4
    ("There is a slip of paper here." "A slip of paper")  ;5
    ("There is a wax statuette of Richard Stallman here." ;6
     "An RMS statuette")
    ("There is a shimmering diamond here." "A diamond")   ;7
    ("There is a 10 pound weight here." "A weight")       ;8
    ("There is a life preserver here." "A life preserver");9
    ("There is an emerald bracelet here." "A bracelet")   ;10
    ("There is a gold bar here." "A gold bar")            ;11
    ("There is a platinum bar here." "A platinum bar")    ;12
    ("There is a beach towel on the ground here." "A beach towel")
    ("There is an axe here." "An axe") ;14
    ("There is a silver bar here." "A silver bar")  ;15
    ("There is a bus driver's license here." "A license") ;16
    ("There are some valuable coins here." "Some valuable coins")
    ("There is a jewel-encrusted egg here." "A valuable egg") ;18
    ("There is a glass jar here." "A glass jar") ;19
    ("There is a dinosaur bone here." "A bone") ;20
    ("There is a packet of nitric acid here." "Some nitric acid")
    ("There is a packet of glycerine here." "Some glycerine") ;22
    ("There is a valuable ruby here." "A ruby") ;23
    ("There is a valuable amethyst here." "An amethyst") ;24
    ("The Mona Lisa is here." "The Mona Lisa") ;25
    ("There is a 100 dollar bill here." "A $100 bill") ;26
    ("There is a floppy disk here." "A floppy disk"))) ;27
985 986 987

;;; Weight of objects

988 989 990 991
(defconst dun-object-lbs
  '(2 1 1 1 1 0 2 2 10 3 1 1 1 0 1 1 0 1 1 1 1 0 0 2 2 1 0 0))
(defconst dun-object-pts
  '(0 0 0 0 0 0 0 10 0 0 10 10 10 0 0 10 0 10 10 0 0 0 0 10 10 10 10 0))
992 993 994


;;; Unix representation of objects.
995 996 997 998 999 1000
(defconst dun-objfiles
  '("shovel.o" "lamp.o" "cpu.o" "food.o" "key.o" "paper.o"
    "rms.o" "diamond.o" "weight.o" "preserver.o" "bracelet.o"
    "gold.o" "platinum.o" "towel.o" "axe.o" "silver.o" "license.o"
    "coins.o" "egg.o" "jar.o" "bone.o" "nitric.o" "glycerine.o"
    "ruby.o" "amethyst.o"))
1001 1002 1003 1004

;;; These are the descriptions for the negative numbered objects from
;;; dun-room-objects

1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018
(defconst dun-perm-objects
  '(nil
    ("There is a large boulder here.")
    nil
    ("There is a ferocious bear here!")
    nil nil
    ("There is a worthless pile of protoplasm here.")
    nil nil nil nil nil nil
    ("There is a strange smell in this room.")
    nil
    ("There is a box with a slit in it, bolted to the wall here.")
    nil nil
    ("There is a bus here.")
    nil nil nil))
1019 1020 1021 1022 1023


;;; These are the descriptions the user gets when regular objects are
;;; examined.

1024
(defconst dun-physobj-desc '(
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
"It is a normal shovel with a price tag attached that says $19.99."
"The lamp is hand-crafted by Geppetto."
"The CPU board has a VAX chip on it.  It seems to have
2 Megabytes of RAM onboard."
"It looks like some kind of meat.  Smells pretty bad."
nil
"The paper says: Don't forget to type ‘help’ for help.  Also, remember
this word: ‘worms’"
"The statuette is of the likeness of Richard Stallman, the author of the
famous EMACS editor.  You notice that he is not wearing any shoes."
nil
"You observe that the weight is heavy."
"It says S. S. Minnow."
1038
nil nil nil
1039
"It has a picture of snoopy on it."
1040
nil nil
1041 1042 1043 1044
"It has your picture on it!"
"They are old coins from the 19th century."
"It is a valuable Fabrege egg."
"It is a plain glass jar."
1045
nil nil nil nil nil))
1046 1047 1048 1049

;;; These are the descriptions the user gets when non-regular objects
;;; are examined.

1050 1051
(defconst dun-permobj-desc
  '(nil
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062
"It is just a boulder.  It cannot be moved."
"They are palm trees with a bountiful supply of coconuts in them."
"It looks like a grizzly to me."
"All of the bins are empty.  Looking closely you can see that there
are names written at the bottom of each bin, but most of them are
faded away so that you cannot read them.  You can only make out three
names:
                   Jeffrey Collier
                   Robert Toukmond
                   Thomas Stock
"
1063
nil
1064 1065
"It is just a garbled mess."
"The dial points to a temperature scale which has long since faded away."
1066
nil nil
1067 1068 1069 1070 1071 1072 1073 1074
"It is a velvet painting of Elvis Presley.  It seems to be nailed to the
wall, and you cannot move it."
"It is a queen sized bed, with a very firm mattress."
"The urinal is very clean compared with everything else in the cave.  There
isn't even any rust.  Upon close examination you realize that the drain at the
bottom is missing, and there is just a large hole leading down the
pipes into nowhere.  The hole is too small for a person to fit in.  The
flush handle is so clean that you can see your reflection in it."
1075
nil nil
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
"The box has a slit in the top of it, and on it, in sloppy handwriting, is
written: ‘For key upgrade, put key in here.’"
nil
"It says ‘express mail’ on it."
"It is a 35 passenger bus with the company name ‘mobytours’ on it."
"It is a large metal gate that is too big to climb over."
"It is a HIGH cliff."
"Unfortunately you do not know enough about dinosaurs to tell very much about
it.  It is very big, though."
"The fish look like they were once quite beautiful."
1086
nil nil nil nil
1087 1088
"It is a normal ladder that is permanently attached to the hole."
"It is a passenger train that is ready to go."
1089
"It is a personal computer that has only one floppy disk drive."))
1090

1091
(defconst dun-diggables
1092 1093 1094 1095 1096 1097
      (list nil nil nil (list obj-cpu) nil nil nil nil nil nil nil
		  nil nil nil nil nil nil nil nil nil nil      ;11-20
		  nil nil nil nil nil nil nil nil nil nil      ;21-30
		  nil nil nil nil nil nil nil nil nil nil      ;31-40
		  nil (list obj-platinum) nil nil nil nil nil nil nil nil))

Mark Oteiza's avatar
Mark Oteiza committed
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108
(defconst dun-room-shorts
  (let (res str)
    (dolist (x dun-rooms)
      (setq str (downcase (cadr x)))
      (push (mapconcat #'identity (split-string str "[ /]+") "-") res))
    (nreverse res)))

(let ((a 0))
  (dolist (x dun-room-shorts)
    (eval (list 'defconst (intern x) a))
    (setq a (+ a 1))))
1109

1110 1111 1112 1113
(defconst dun-endgame-questions
  '(("What is your password on the machine called ‘pokey’?" "robert")
    ("What password did you use during anonymous ftp to gamma?" "foo")
    ("Excluding the endgame, how many places are there where you can put
1114
treasures for points?" "4" "four")
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134
    ("What is your login name on the ‘endgame’ machine?" "toukmond")
    ("What is the nearest whole dollar to the price of the shovel?"
     "20" "twenty")
    ("What is the name of the bus company serving the town?" "mobytours")
    ("Give either of the two last names in the mailroom, other than your own."
     "collier" "stock")
    ("What cartoon character is on the towel?" "snoopy")
    ("What is the last name of the author of EMACS?" "stallman")
    ("How many megabytes of memory is on the CPU board for the Vax?" "2")
    ("Which street in town is named after a U.S. state?" "vermont")
    ("How many pounds did the weight weigh?" "ten" "10")
    ("Name the STREET which runs right over the subway stop."
     "fourth" "4" "4th")
    ("How many corners are there in town (excluding the one with the Post Office)?"
     "24" "twentyfour" "twenty-four")
    ("What type of bear was hiding your key?" "grizzly")
    ("Name either of the two objects you found by digging."
     "cpu" "card" "vax" "board" "platinum")
    ("What network protocol is used between pokey and gamma?"
     "tcp/ip" "ip" "tcp")))
Richard M. Stallman's avatar
Richard M. Stallman committed
1135

1136 1137
(defconst dun-combination (prin1-to-string (+ 100 (random 899))))

Mark Oteiza's avatar
Mark Oteiza committed
1138

1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
;;;; Mode definitions for interactive mode

(define-derived-mode dun-mode text-mode "Dungeon"
  "Major mode for running dunnet."
  (make-local-variable 'scroll-step)
  (setq scroll-step 2))

(defun dun-parse (_arg)
  "Function called when return is pressed in interactive mode to parse line."
  (interactive "*p")
  (beginning-of-line)
  (let ((beg (1+ (point)))
        line)
    (end-of-line)
    (if (and (not (= beg (point))) (not (< (point) beg))
             (string= ">" (buffer-substring (- beg 1) beg)))
        (progn
          (setq line (downcase (buffer-substring beg (point))))
          (princ line)
          (if (eq (dun-vparse dun-ignore dun-verblist line) -1)
              (dun-mprinc "I don't understand that.\n")))
    (goto-char (point-max))
    (dun-mprinc "\n")))
  (dun-messages))

(defun dun-messages ()
  (if dun-dead
      (text-mode)
Mark Oteiza's avatar
Mark Oteiza committed
1167
    (when (eq dungeon-mode 'dungeon)
Mark Oteiza's avatar
Mark Oteiza committed
1168
      (when (not (= dun-room dun-current-room))
Mark Oteiza's avatar
Mark Oteiza committed
1169
        (dun-describe-room dun-current-room)
Mark Oteiza's avatar
Mark Oteiza committed
1170
        (setq dun-room dun-current-room))
Mark Oteiza's avatar
Mark Oteiza committed
1171 1172
      (dun-fix-screen)
      (dun-mprinc ">"))))
1173 1174 1175 1176 1177 1178


;;;###autoload
(defun dunnet ()
  "Switch to *dungeon* buffer and start game."
  (interactive)
1179
  (pop-to-buffer-same-window "*dungeon*")
1180 1181
  (dun-mode)
  (setq dun-dead nil)
Mark Oteiza's avatar
Mark Oteiza committed
1182
  (setq dun-room 0)
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
  (dun-messages))

;;;;
;;;; This section contains all of the verbs and commands.
;;;;

;;; Give long description of room if haven't been there yet.  Otherwise
;;; short.  Also give long if we were called with negative room number.

(defun dun-describe-room (room)
  (if (and (not (member (abs room) dun-light-rooms))
	   (not (member obj-lamp dun-inventory))
	   (not (member obj-lamp (nth dun-current-room dun-room-objects))))
      (dun-mprincl "It is pitch dark.  You are likely to be eaten by a grue.")
    (dun-mprincl (cadr (nth (abs room) dun-rooms)))
    (if (and (and (or (member room dun-visited)
Mark Oteiza's avatar
Mark Oteiza committed
1199 1200
		      (string= dun-mode "dun-superb"))
                  (> room 0))
1201 1202 1203
	     (not (string= dun-mode "long")))
	nil
      (dun-mprinc (car (nth (abs room) dun-rooms)))
Mark Oteiza's avatar
Mark Oteiza committed
1204 1205 1206 1207
      (dun-mprinc "\n"))
    (when (and (not (string= dun-mode "long"))
               (not (member (abs room) dun-visited)))
      (setq dun-visited (append (list (abs room)) dun-visited)))
1208
    (dolist (xobjs (nth dun-current-room dun-room-objects))
Mark Oteiza's avatar
Mark Oteiza committed
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220
      (cond
       ((= xobjs obj-special)
        (dun-special-object))
       ((>= xobjs 0)
        (dun-mprincl (car (nth xobjs dun-objects))))
       ((not (and (= xobjs obj-bus) dun-inbus))
        (dun-mprincl (car (nth (abs xobjs) dun-perm-objects)))))
      (when (and (= xobjs obj-jar) dun-jar)
        (dun-mprincl "The jar contains:")
        (dolist (x dun-jar)
          (dun-mprinc "     ")
          (dun-mprincl (car (nth x dun-objects))))))
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324
    (if (and (member obj-bus (nth dun-current-room dun-room-objects)) dun-inbus)
	(dun-mprincl "You are on the bus."))))

;;; There is a special object in the room.  This object's description,
;;; or lack thereof, depends on certain conditions.

(defun dun-special-object ()
  (if (= dun-current-room computer-room)
      (if dun-computer
	  (dun-mprincl
"The panel lights are flashing in a seemingly organized pattern.")
	(dun-mprincl "The panel lights are steady and motionless.")))

  (if (and (= dun-current-room red-room)
	   (not (member obj-towel (nth red-room dun-room-objects))))
      (dun-mprincl "There is a hole in the floor here."))

  (if (and (= dun-current-room marine-life-area) dun-black)
      (dun-mprincl
"The room is lit by a black light, causing the fish, and some of
your objects, to give off an eerie glow."))
  (if (and (= dun-current-room fourth-vermont-intersection) dun-hole)
      (progn
	(if (not dun-inbus)
	    (progn
	      (dun-mprincl "You fall into a hole in the ground.")
	      (setq dun-current-room vermont-station)
	      (dun-describe-room vermont-station))
	  (progn
	    (dun-mprincl
"The bus falls down a hole in the ground and explodes.")
	    (dun-die "burning")))))

  (if (> dun-current-room endgame-computer-room)
      (progn
	(if (not dun-correct-answer)
	    (dun-endgame-question)
	  (dun-mprincl "Your question is:")
	  (dun-mprincl dun-endgame-question))))

  (if (= dun-current-room sauna)
      (progn
	(dun-mprincl (nth dun-sauna-level '(
"It is normal room temperature in here."
"It is luke warm in here."
"It is comfortably hot in here."
"It is refreshingly hot in here."
"You are dead now.")))
	(if (= dun-sauna-level 3)
	    (progn
	      (if (or (member obj-rms dun-inventory)
		      (member obj-rms (nth dun-current-room dun-room-objects)))
		  (progn
		    (dun-mprincl
"You notice the wax on your statuette beginning to melt, until it completely
melts off.  You are left with a beautiful diamond!")
		    (if (member obj-rms dun-inventory)
			(progn
			  (dun-remove-obj-from-inven obj-rms)
			  (setq dun-inventory (append dun-inventory
						      (list obj-diamond))))
		      (dun-remove-obj-from-room dun-current-room obj-rms)
		      (dun-replace dun-room-objects dun-current-room
				   (append (nth dun-current-room dun-room-objects)
					   (list obj-diamond))))))
	      (if (or (member obj-floppy dun-inventory)
		      (member obj-floppy (nth dun-current-room dun-room-objects)))
		  (progn
		    (dun-mprincl
"You notice your floppy disk beginning to melt.  As you grab for it, the
disk bursts into flames, and disintegrates.")
		    (dun-remove-obj-from-inven obj-floppy)
		    (dun-remove-obj-from-room dun-current-room obj-floppy))))))))


(defun dun-die (murderer)
  (dun-mprinc "\n")
  (if murderer
      (dun-mprincl "You are dead."))
  (dun-do-logfile 'dun-die murderer)
  (dun-score nil)
  (setq dun-dead t))

(defun dun-quit (_args)
  (dun-die nil))

;;; Print every object in player's inventory.  Special case for the jar,
;;; as we must also print what is in it.

(defun dun-inven (_args)
  (dun-mprinc "You currently have:")
  (dun-mprinc "\n")
  (dolist (curobj dun-inventory)
    (if curobj
	(progn
	  (dun-mprincl (cadr (nth curobj dun-objects)))
	  (if (and (= curobj obj-jar) dun-jar)
	      (progn
		(dun-mprincl "The jar contains:")
		(dolist (x dun-jar)
		  (dun-mprinc "     ")
		  (dun-mprincl (cadr (nth x dun-objects))))))))))

(defun dun-shake (obj)
Mark Oteiza's avatar
Mark Oteiza committed
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
  (let ((objnum (dun-objnum-from-args-std obj)))
    (when objnum
      (cond
       ((member objnum dun-inventory)
        ;; If shaking anything will do anything, put here.
        (dun-mprinc "Shaking ")
        (dun-mprinc (downcase (cadr (nth objnum dun-objects))))
        (dun-mprinc " seems to have no effect.")
        (dun-mprinc "\n"))
       ((and (not (member objnum (nth dun-current-room dun-room-silents)))
             (not (member objnum (nth dun-current-room dun-room-objects))))
        (dun-mprincl "I don't see that here."))
       ;; Shaking trees can be deadly
       ((= objnum obj-tree)
        (dun-mprinc
1340 1341 1342
 "You begin to shake a tree, and notice a coconut begin to fall from the air.
As you try to get your hand up to block it, you feel the impact as it lands
on your head.")
Mark Oteiza's avatar
Mark Oteiza committed
1343 1344 1345
        (dun-die "a coconut"))
       ((= objnum obj-bear)
        (dun-mprinc
1346
"As you go up to the bear, it removes your head and places it on the ground.")
Mark Oteiza's avatar
Mark Oteiza committed
1347 1348 1349
        (dun-die "a bear"))
       ((< objnum 0) (dun-mprincl "You cannot shake that."))
       (t (dun-mprincl "You don't have that."))))))
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370


(defun dun-drop (obj)
  (if dun-inbus
      (dun-mprincl "You can't drop anything while on the bus.")
  (let (objnum)
    (when (setq objnum (dun-objnum-from-args-std obj))
      (if (not (member objnum dun-inventory))
	  (dun-mprincl "You don't have that.")
	(progn
	  (dun-remove-obj-from-inven objnum)
	  (dun-replace dun-room-objects dun-current-room
		   (append (nth dun-current-room dun-room-objects)
			   (list objnum)))
	  (dun-mprincl "Done.")
	  (if (member objnum (list obj-food obj-weight obj-jar))
	      (dun-drop-check objnum))))))))

;;; Dropping certain things causes things to happen.

(defun dun-drop-check (objnum)
Mark Oteiza's avatar
Mark Oteiza committed
1371
  (if (and (= objnum obj-food) (= dun-room bear-hangout)
1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402
	   (member obj-bear (nth bear-hangout dun-room-objects)))
      (progn
	(dun-mprincl
"The bear takes the food and runs away with it. He left something behind.")
	(dun-remove-obj-from-room dun-current-room obj-bear)
	(dun-remove-obj-from-room dun-current-room obj-food)
	(dun-replace dun-room-objects dun-current-room
		 (append (nth dun-current-room dun-room-objects)
			 (list obj-key)))))

  (if (and (= objnum obj-jar) (member obj-nitric dun-jar)
	   (member obj-glycerine dun-jar))
      (progn
	(dun-mprincl
	 "As the jar impacts the ground it explodes into many pieces.")
	(setq dun-jar nil)
	(dun-remove-obj-from-room dun-current-room obj-jar)
	(if (= dun-current-room fourth-vermont-intersection)
	    (progn
	      (setq dun-hole t)
	      (setq dun-current-room vermont-station)
	      (dun-mprincl
"The explosion causes a hole to open up in the ground, which you fall
through.")))))

  (if (and (= objnum obj-weight) (= dun-current-room maze-button-room))
      (dun-mprincl "A passageway opens.")))

;;; Give long description of current room, or an object.

(defun dun-examine (obj)
Mark Oteiza's avatar
Mark Oteiza committed
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420
  (let ((objnum (dun-objnum-from-args obj)))
    (cond
     ((eq objnum obj-special)
      (dun-describe-room (* dun-current-room -1)))
     ((and (eq objnum obj-computer)
           (member obj-pc (nth dun-current-room dun-room-silents)))
      (dun-examine '("pc")))
     ((null objnum)
      (dun-mprincl "I don't know what that is."))
     ((and (not (member objnum (nth dun-current-room dun-room-objects)))
           (not (and (member obj-jar dun-inventory)
                     (member objnum dun-jar)))
           (not (member objnum (nth dun-current-room dun-room-silents)))
           (not (member objnum dun-inventory)))
      (dun-mprincl "I don't see that here."))
     ((>= objnum 0)
      (if (and (= objnum obj-bone)
               (= dun-current-room marine-life-area) dun-black)
1421 1422 1423
		    (dun-mprincl
"In this light you can see some writing on the bone.  It says:
For an explosive time, go to Fourth St. and Vermont.")
Mark Oteiza's avatar
Mark Oteiza committed
1424 1425 1426 1427 1428 1429
        (if (nth objnum dun-physobj-desc)
            (dun-mprincl (nth objnum dun-physobj-desc))
          (dun-mprincl "I see nothing special about that."))))
     ((nth (abs objnum) dun-permobj-desc)
      (dun-mprincl (nth (abs objnum) dun-permobj-desc)))
     (t (dun-mprincl "I see nothing special about that.")))))
1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450

(defun dun-take (obj)
    (setq obj (dun-firstword obj))
    (if (not obj)
	(dun-mprincl "You must supply an object.")
      (if (string= obj "all")
	  (let (gotsome)
	    (if dun-inbus
		(dun-mprincl "You can't take anything while on the bus.")
	      (setq gotsome nil)
	      (dolist (x (nth dun-current-room dun-room-objects))
		(if (and (>= x 0) (not (= x obj-special)))
		    (progn
		      (setq gotsome t)
		      (dun-mprinc (cadr (nth x dun-objects)))
		      (dun-mprinc ": ")
		      (dun-take-object x))))
	      (if (not gotsome)
		  (dun-mprincl "Nothing to take."))))
	(let (objnum)
	  (setq objnum (cdr (assq (intern obj) dun-objnames)))
Mark Oteiza's avatar
Mark Oteiza committed
1451 1452
	  (if (null objnum)
	      (dun-mprincl "I don't know what that is.")
1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486
	    (if (and dun-inbus (not (and (member objnum dun-jar)
					 (member obj-jar dun-inventory))))
		(dun-mprincl "You can't take anything while on the bus.")
	      (dun-take-object objnum)))))))

(defun dun-take-object (objnum)
  (if (and (member objnum dun-jar) (member obj-jar dun-inventory))
      (let (newjar)
	(dun-mprincl "You remove it from the jar.")
	(setq newjar nil)
	(dolist (x dun-jar)
	  (if (not (= x objnum))
	      (setq newjar (append newjar (list x)))))
	(setq dun-jar newjar)
	(setq dun-inventory (append dun-inventory (list objnum))))
    (if (not (member objnum (nth dun-current-room dun-room-objects)))
	(if (not (member objnum (nth dun-current-room dun-room-silents)))
	    (dun-mprinc "I do not see that here.")
	  (dun-try-take objnum))
      (if (>= objnum 0)
	  (progn
	    (if (and (car dun-inventory)
		     (> (+ (dun-inven-weight) (nth objnum dun-object-lbs)) 11))
		(dun-mprinc "Your load would be too heavy.")
	      (setq dun-inventory (append dun-inventory (list objnum)))
	      (dun-remove-obj-from-room dun-current-room objnum)
	      (dun-mprinc "Taken.  ")
	      (if (and (= objnum obj-towel) (= dun-current-room red-room))
		  (dun-mprinc
		   "Taking the towel reveals a hole in the floor."))))
	(dun-try-take objnum)))
    (dun-mprinc "\n")))

(defun dun-inven-weight ()
Mark Oteiza's avatar
Mark Oteiza committed
1487
  (let ((total 0))
1488 1489 1490
    (dolist (x dun-jar)
      (setq total (+ total (nth x dun-object-lbs))))
    (dolist (x dun-inventory)
Mark Oteiza's avatar
Mark Oteiza committed
1491 1492
      (setq total (+ total (nth x dun-object-lbs))))
    total))
1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534

;;; We try to take an object that is untakable.  Print a message
;;; depending on what it is.

(defun dun-try-take (_obj)
  (dun-mprinc "You cannot take that."))

(defun dun-dig (_args)
  (if dun-inbus
      (dun-mprincl "Digging here reveals nothing.")
  (if (not (member 0 dun-inventory))
      (dun-mprincl "You have nothing with which to dig.")
    (if (not (nth dun-current-room dun-diggables))
	(dun-mprincl "Digging here reveals nothing.")
      (dun-mprincl "I think you found something.")
      (dun-replace dun-room-objects dun-current-room
	       (append (nth dun-current-room dun-room-objects)
		       (nth dun-current-room dun-diggables)))
      (dun-replace dun-diggables dun-current-room nil)))))

(defun dun-climb (obj)
  (let (objnum)
    (setq objnum (dun-objnum-from-args obj))
    (cond ((not objnum)
	   (dun-mprincl "I don't know what that object is."))
	  ((and (not (eq objnum obj-special))
		(not (member objnum (nth dun-current-room dun-room-objects)))
		(not (member objnum (nth dun-current-room dun-room-silents)))
		(not (and (member objnum dun-jar) (member obj-jar dun-inventory