annotate lisp/play/dunnet.el @ 13907:c4f965637f22

(vip-startup-file): New variable. (vip-mode): Use `vip-startup-file' for the startup file name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Jan 1996 23:40:10 +0000
parents b2191b493c1b
children de80a367ca08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; dunnet.el --- Text adventure for Emacs
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 ;; Author: Ron Schnell <ronnie@media.mit.edu>
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 ;; Created: 25 Jul 1992
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Version: 2.0
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Keywords: games
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; any later version.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; This game can be run in batch mode. To do this, use:
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
28 ;; emacs -batch -l dunnet
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;;; The log file should be set for your system, and it must
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 ;;; be writeable by all.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
35 (defvar dun-log-file "/usr/local/dunnet.score"
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
36 "Name of file to store score information for dunnet.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 (if nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 (eval-and-compile (setq byte-compile-warnings nil)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 (require 'cl)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 ;;;; Mode definitions for interactive mode
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
45 (defun dun-mode ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
46 "Major mode for running dunnet."
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 (interactive)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 (text-mode)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 (use-local-map dungeon-mode-map)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 (setq major-mode 'dungeon-mode)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 (setq mode-name "Dungeon"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
53 (defun dun-parse (arg)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
54 "Function called when return is pressed in interactive mode to parse line."
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 (interactive "*p")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 (beginning-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 (setq beg (+ (point) 1))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 (end-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 (if (and (not (= beg (point))) (not (< (point) beg))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 (string= ">" (buffer-substring (- beg 1) beg)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 (setq line (downcase (buffer-substring beg (point))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 (princ line)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
64 (if (eq (dun-vparse dun-ignore dun-verblist line) -1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
65 (dun-mprinc "I don't understand that.\n")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
67 (dun-mprinc "\n"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
68 (dun-messages))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
70 (defun dun-messages ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
71 (if dun-dead
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 (text-mode)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 (if (eq dungeon-mode 'dungeon)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
75 (if (not (= room dun-current-room))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
77 (dun-describe-room dun-current-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
78 (setq room dun-current-room)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
79 (dun-fix-screen)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
80 (dun-mprinc ">")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 ;;;###autoload
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 (defun dunnet ()
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 "Switch to *dungeon* buffer and start game."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 (interactive)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 (switch-to-buffer "*dungeon*")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
88 (dun-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
89 (setq dun-dead nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 (setq room 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
91 (dun-messages))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 ;;;; This section contains all of the verbs and commands.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 ;;; Give long description of room if haven't been there yet. Otherwise
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 ;;; short. Also give long if we were called with negative room number.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
100 (defun dun-describe-room (room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
101 (if (and (not (member (abs room) dun-light-rooms))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
102 (not (member obj-lamp dun-inventory)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
103 (dun-mprincl "It is pitch dark. You are likely to be eaten by a grue.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
104 (dun-mprincl (cadr (nth (abs room) dun-rooms)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
105 (if (and (and (or (member room dun-visited)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
106 (string= dun-mode "dun-superb")) (> room 0))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
107 (not (string= dun-mode "long")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
109 (dun-mprinc (car (nth (abs room) dun-rooms)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
110 (dun-mprinc "\n"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
111 (if (not (string= dun-mode "long"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
112 (if (not (member (abs room) dun-visited))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
113 (setq dun-visited (append (list (abs room)) dun-visited))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
114 (dolist (xobjs (nth dun-current-room dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 (if (= xobjs obj-special)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
116 (dun-special-object)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 (if (>= xobjs 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
118 (dun-mprincl (car (nth xobjs dun-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
119 (if (not (and (= xobjs obj-bus) dun-inbus))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
121 (dun-mprincl (car (nth (abs xobjs) dun-perm-objects)))))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
122 (if (and (= xobjs obj-jar) dun-jar)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
124 (dun-mprincl "The jar contains:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
125 (dolist (x dun-jar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
126 (dun-mprinc " ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
127 (dun-mprincl (car (nth x dun-objects)))))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
128 (if (and (member obj-bus (nth dun-current-room dun-room-objects)) dun-inbus)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
129 (dun-mprincl "You are on the bus."))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 ;;; There is a special object in the room. This object's description,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 ;;; or lack thereof, depends on certain conditions.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
134 (defun dun-special-object ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
135 (if (= dun-current-room computer-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
136 (if dun-computer
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
137 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
138 "The panel lights are flashing in a seemingly organized pattern.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
139 (dun-mprincl "The panel lights are steady and motionless.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
141 (if (and (= dun-current-room red-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
142 (not (member obj-towel (nth red-room dun-room-objects))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
143 (dun-mprincl "There is a hole in the floor here."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
144
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
145 (if (and (= dun-current-room marine-life-area) dun-black)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
146 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 "The room is lit by a black light, causing the fish, and some of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 your objects, to give off an eerie glow."))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
149 (if (and (= dun-current-room fourth-vermont-intersection) dun-hole)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 (progn
4245
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
151 (if (not dun-inbus)
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
152 (progn
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
153 (dun-mprincl"You fall into a hole in the ground.")
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
154 (setq dun-current-room vermont-station)
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
155 (dun-describe-room vermont-station))
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
156 (progn
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
157 (dun-mprincl
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
158 "The bus falls down a hole in the ground and explodes.")
5988aab467cc entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 4193
diff changeset
159 (dun-die "burning")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
161 (if (> dun-current-room endgame-computer-room)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
163 (if (not dun-correct-answer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
164 (dun-endgame-question)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
165 (dun-mprincl "Your question is:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
166 (dun-mprincl dun-endgame-question))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
168 (if (= dun-current-room sauna)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
170 (dun-mprincl (nth dun-sauna-level '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 "It is normal room temperature in here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 "It is luke warm in here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 "It is comfortably hot in here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 "It is refreshingly hot in here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 "You are dead now.")))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
176 (if (and (= dun-sauna-level 3)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
177 (or (member obj-rms dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
178 (member obj-rms (nth dun-current-room dun-room-objects))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
180 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 "You notice the wax on your statuette beginning to melt, until it completely
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 melts off. You are left with a beautiful diamond!")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
183 (if (member obj-rms dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
185 (dun-remove-obj-from-inven obj-rms)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
186 (setq dun-inventory (append dun-inventory
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
187 (list obj-diamond))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
188 (dun-remove-obj-from-room dun-current-room obj-rms)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
189 (dun-replace dun-room-objects dun-current-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
190 (append (nth dun-current-room dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 (list obj-diamond))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
192 (if (member obj-floppy dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
194 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 "You notice your floppy disk beginning to melt. As you grab for it, the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 disk bursts into flames, and disintegrates.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
197 (dun-remove-obj-from-inven obj-floppy)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
198 (dun-remove-obj-from-room dun-current-room obj-floppy)))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
199 )))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
201 (defun dun-die (murderer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
202 (dun-mprinc "\n")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 (if murderer
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
204 (dun-mprincl "You are dead."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
205 (dun-do-logfile 'dun-die murderer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
206 (dun-score nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
207 (setq dun-dead t))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
209 (defun dun-quit (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
210 (dun-die nil))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 ;;; Print every object in player's inventory. Special case for the jar,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 ;;; as we must also print what is in it.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
215 (defun dun-inven (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
216 (dun-mprinc "You currently have:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
217 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
218 (dolist (curobj dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 (if curobj
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
221 (dun-mprincl (cadr (nth curobj dun-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
222 (if (and (= curobj obj-jar) dun-jar)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
224 (dun-mprincl "The jar contains:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
225 (dolist (x dun-jar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
226 (dun-mprinc " ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
227 (dun-mprincl (cadr (nth x dun-objects))))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
229 (defun dun-shake (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
231 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
232 (if (member objnum dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 ;;; If shaking anything will do anything, put here.
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
235 (dun-mprinc "Shaking ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
236 (dun-mprinc (downcase (cadr (nth objnum dun-objects))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
237 (dun-mprinc " seems to have no effect.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
238 (dun-mprinc "\n")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 )
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
240 (if (and (not (member objnum (nth dun-current-room dun-room-silents)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
241 (not (member objnum (nth dun-current-room dun-room-objects))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
242 (dun-mprincl "I don't see that here.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 ;;; Shaking trees can be deadly
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 (if (= objnum obj-tree)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
246 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 "You begin to shake a tree, and notice a coconut begin to fall from the air.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 As you try to get your hand up to block it, you feel the impact as it lands
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249 on your head.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
250 (dun-die "a coconut"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 (if (= objnum obj-bear)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
253 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 "As you go up to the bear, it removes your head and places it on the ground.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
255 (dun-die "a bear"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256 (if (< objnum 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
257 (dun-mprincl "You cannot shake that.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
258 (dun-mprincl "You don't have that.")))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
261 (defun dun-drop (obj)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
262 (if dun-inbus
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
263 (dun-mprincl "You can't drop anything while on the bus.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 (let (objnum ptr)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
265 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
266 (if (not (setq ptr (member objnum dun-inventory)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
267 (dun-mprincl "You don't have that.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
269 (dun-remove-obj-from-inven objnum)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
270 (dun-replace dun-room-objects dun-current-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
271 (append (nth dun-current-room dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (list objnum)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
273 (dun-mprincl "Done.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 (if (member objnum (list obj-food obj-weight obj-jar))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
275 (dun-drop-check objnum))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 ;;; Dropping certain things causes things to happen.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
279 (defun dun-drop-check (objnum)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 (if (and (= objnum obj-food) (= room bear-hangout)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
281 (member obj-bear (nth bear-hangout dun-room-objects)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
283 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 "The bear takes the food and runs away with it. He left something behind.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
285 (dun-remove-obj-from-room dun-current-room obj-bear)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
286 (dun-remove-obj-from-room dun-current-room obj-food)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
287 (dun-replace dun-room-objects dun-current-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
288 (append (nth dun-current-room dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 (list obj-key)))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
291 (if (and (= objnum obj-jar) (member obj-nitric dun-jar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
292 (member obj-glycerine dun-jar))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
294 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
295 "As the jar impacts the ground it explodes into many pieces.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
296 (setq dun-jar nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
297 (dun-remove-obj-from-room dun-current-room obj-jar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
298 (if (= dun-current-room fourth-vermont-intersection)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
300 (setq dun-hole t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
301 (setq dun-current-room vermont-station)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
302 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 "The explosion causes a hole to open up in the ground, which you fall
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 through.")))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
306 (if (and (= objnum obj-weight) (= dun-current-room maze-button-room))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
307 (dun-mprincl "A passageway opens.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309 ;;; Give long description of current room, or an object.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
311 (defun dun-examine (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
313 (setq objnum (dun-objnum-from-args obj))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 (if (eq objnum obj-special)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
315 (dun-describe-room (* dun-current-room -1))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 (if (and (eq objnum obj-computer)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
317 (member obj-pc (nth dun-current-room dun-room-silents)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
318 (dun-examine '("pc"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 (if (eq objnum nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
320 (dun-mprincl "I don't know what that is.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
321 (if (and (not (member objnum
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
322 (nth dun-current-room dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
323 (not (member objnum
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
324 (nth dun-current-room dun-room-silents)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
325 (not (member objnum dun-inventory)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
326 (dun-mprincl "I don't see that here.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 (if (>= objnum 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 (if (and (= objnum obj-bone)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
329 (= dun-current-room marine-life-area) dun-black)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
330 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 "In this light you can see some writing on the bone. It says:
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 For an explosive time, go to Fourth St. and Vermont.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
333 (if (nth objnum dun-physobj-desc)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
334 (dun-mprincl (nth objnum dun-physobj-desc))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
335 (dun-mprincl "I see nothing special about that.")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
336 (if (nth (abs objnum) dun-permobj-desc)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
338 (dun-mprincl (nth (abs objnum) dun-permobj-desc)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
339 (dun-mprincl "I see nothing special about that.")))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
341 (defun dun-take (obj)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
342 (if dun-inbus
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
343 (dun-mprincl "You can't take anything while on the bus.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
344 (setq obj (dun-firstword obj))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 (if (not obj)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
346 (dun-mprincl "You must supply an object.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 (if (string= obj "all")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 (let (gotsome)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 (setq gotsome nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
350 (dolist (x (nth dun-current-room dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 (if (and (>= x 0) (not (= x obj-special)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 (setq gotsome t)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
354 (dun-mprinc (cadr (nth x dun-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
355 (dun-mprinc ": ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
356 (dun-take-object x))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 (if (not gotsome)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
358 (dun-mprincl "Nothing to take.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
360 (setq objnum (cdr (assq (intern obj) dun-objnames)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 (if (eq objnum nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
363 (dun-mprinc "I don't know what that is.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
364 (dun-mprinc "\n"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
365 (dun-take-object objnum)))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
367 (defun dun-take-object (objnum)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
368 (if (and (member objnum dun-jar) (member obj-jar dun-inventory))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 (let (newjar)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
370 (dun-mprincl "You remove it from the jar.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 (setq newjar nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
372 (dolist (x dun-jar)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 (if (not (= x objnum))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 (setq newjar (append newjar (list x)))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
375 (setq dun-jar newjar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
376 (setq dun-inventory (append dun-inventory (list objnum))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
377 (if (not (member objnum (nth dun-current-room dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
378 (if (not (member objnum (nth dun-current-room dun-room-silents)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
379 (dun-mprinc "I do not see that here.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
380 (dun-try-take objnum))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
381 (if (>= objnum 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
382 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
383 (if (and (car dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
384 (> (+ (dun-inven-weight) (nth objnum dun-object-lbs)) 11))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
385 (dun-mprinc "Your load would be too heavy.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
386 (setq dun-inventory (append dun-inventory (list objnum)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
387 (dun-remove-obj-from-room dun-current-room objnum)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
388 (dun-mprinc "Taken. ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
389 (if (and (= objnum obj-towel) (= dun-current-room red-room))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
390 (dun-mprinc
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
391 "Taking the towel reveals a hole in the floor."))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
392 (dun-try-take objnum)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
393 (dun-mprinc "\n")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
395 (defun dun-inven-weight ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
396 (let (total)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397 (setq total 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
398 (dolist (x dun-jar)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
399 (setq total (+ total (nth x dun-object-lbs))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
400 (dolist (x dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
401 (setq total (+ total (nth x dun-object-lbs)))) total))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
402
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
403 ;;; We try to take an object that is untakable. Print a message
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 ;;; depending on what it is.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
406 (defun dun-try-take (obj)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
407 (dun-mprinc "You cannot take that."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
409 (defun dun-dig (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
410 (if dun-inbus
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
411 (dun-mprincl "You can't dig while on the bus.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
412 (if (not (member 0 dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
413 (dun-mprincl "You have nothing with which to dig.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
414 (if (not (nth dun-current-room dun-diggables))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
415 (dun-mprincl "Digging here reveals nothing.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
416 (dun-mprincl "I think you found something.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
417 (dun-replace dun-room-objects dun-current-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
418 (append (nth dun-current-room dun-room-objects)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
419 (nth dun-current-room dun-diggables)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
420 (dun-replace dun-diggables dun-current-room nil)))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
421
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
422 (defun dun-climb (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
423 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
424 (setq objnum (dun-objnum-from-args obj))
13076
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
425 (cond ((null objnum)
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
426 (dun-mprincl "I don't know that name."))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
427 ((and (not (eq objnum obj-special))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
428 (not (member objnum (nth dun-current-room dun-room-objects)))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
429 (not (member objnum (nth dun-current-room dun-room-silents)))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
430 (not (member objnum dun-inventory)))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
431 (dun-mprincl "I don't see that here."))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
432 ((and (eq objnum obj-special)
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
433 (not (member obj-tree (nth dun-current-room dun-room-silents))))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
434 (dun-mprincl "There is nothing here to climb."))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
435 ((and (not (eq objnum obj-tree)) (not (eq objnum obj-special)))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
436 (dun-mprincl "You can't climb that."))
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
437 (t
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
438 (dun-mprincl
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
439 "You manage to get about two feet up the tree and fall back down. You
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
440 notice that the tree is very unsteady.")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
441
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
442 (defun dun-eat (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
443 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
444 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
445 (if (not (member objnum dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
446 (dun-mprincl "You don't have that.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
447 (if (not (= objnum obj-food))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
448 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
449 (dun-mprinc "You forcefully shove ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
450 (dun-mprinc (downcase (cadr (nth objnum dun-objects))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
451 (dun-mprincl " down your throat, and start choking.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
452 (dun-die "choking"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
453 (dun-mprincl "That tasted horrible.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
454 (dun-remove-obj-from-inven obj-food))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
455
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
456 (defun dun-put (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
457 (if dun-inbus
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
458 (dun-mprincl "You can't do that while on the bus")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
459 (let (newargs objnum objnum2 obj)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
460 (setq newargs (dun-firstwordl args))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
461 (if (not newargs)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
462 (dun-mprincl "You must supply an object")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
463 (setq obj (intern (car newargs)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
464 (setq objnum (cdr (assq obj dun-objnames)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
465 (if (not objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
466 (dun-mprincl "I don't know what that object is.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
467 (if (not (member objnum dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
468 (dun-mprincl "You don't have that.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
469 (setq newargs (dun-firstwordl (cdr newargs)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
470 (setq newargs (dun-firstwordl (cdr newargs)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471 (if (not newargs)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
472 (dun-mprincl "You must supply an indirect object.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
473 (setq objnum2 (cdr (assq (intern (car newargs)) dun-objnames)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
474 (if (and (eq objnum2 obj-computer) (= dun-current-room pc-area))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475 (setq objnum2 obj-pc))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476 (if (not objnum2)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
477 (dun-mprincl "I don't know what that indirect object is.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
478 (if (and (not (member objnum2
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
479 (nth dun-current-room dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
480 (not (member objnum2
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
481 (nth dun-current-room dun-room-silents)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
482 (not (member objnum2 dun-inventory)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
483 (dun-mprincl "That indirect object is not here.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
484 (dun-put-objs objnum objnum2))))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
486 (defun dun-put-objs (obj1 obj2)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
487 (if (and (= obj2 obj-drop) (not dun-nomail))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
488 (setq obj2 obj-chute))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
489
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
490 (if (= obj2 obj-disposal) (setq obj2 obj-chute))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 (if (and (= obj1 obj-cpu) (= obj2 obj-computer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
494 (dun-remove-obj-from-inven obj-cpu)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
495 (setq dun-computer t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
496 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
497 "As you put the CPU board in the computer, it immediately springs to life.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
498 The lights start flashing, and the fans seem to startup."))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
499 (if (and (= obj1 obj-weight) (= obj2 obj-button))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
500 (dun-drop '("weight"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
501 (if (= obj2 obj-jar) ;; Put something in jar
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
502 (if (not (member obj1 (list obj-paper obj-diamond obj-emerald
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
503 obj-license obj-coins obj-egg
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
504 obj-nitric obj-glycerine)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
505 (dun-mprincl "That will not fit in the jar.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
506 (dun-remove-obj-from-inven obj1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
507 (setq dun-jar (append dun-jar (list obj1)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
508 (dun-mprincl "Done."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 (if (= obj2 obj-chute) ;; Put something in chute
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
511 (dun-remove-obj-from-inven obj1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
512 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513 "You hear it slide down the chute and off into the distance.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
514 (dun-put-objs-in-treas (list obj1)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
515 (if (= obj2 obj-box) ;; Put key in key box
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
516 (if (= obj1 obj-key)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
517 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
518 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
519 "As you drop the key, the box begins to shake. Finally it explodes
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
520 with a bang. The key seems to have vanished!")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
521 (dun-remove-obj-from-inven obj1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
522 (dun-replace dun-room-objects computer-room (append
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
523 (nth computer-room
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
524 dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
525 (list obj1)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
526 (dun-remove-obj-from-room dun-current-room obj-box)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
527 (setq dun-key-level (1+ dun-key-level)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
528 (dun-mprincl "You can't put that in the key box!"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
529
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
530 (if (and (= obj1 obj-floppy) (= obj2 obj-pc))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
531 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
532 (setq dun-floppy t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
533 (dun-remove-obj-from-inven obj1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
534 (dun-mprincl "Done."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
535
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
536 (if (= obj2 obj-urinal) ;; Put object in urinal
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
537 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
538 (dun-remove-obj-from-inven obj1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
539 (dun-replace dun-room-objects urinal (append
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
540 (nth urinal dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
541 (list obj1)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
542 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
543 "You hear it plop down in some water below."))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
544 (if (= obj2 obj-mail)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
545 (dun-mprincl "The mail chute is locked.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
546 (if (member obj1 dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
547 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
548 "I don't know how to combine those objects. Perhaps you should
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
549 just try dropping it.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
550 (dun-mprincl"You can't put that there.")))))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
551
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
552 (defun dun-type (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
553 (if (not (= dun-current-room computer-room))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
554 (dun-mprincl "There is nothing here on which you could type.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
555 (if (not dun-computer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
556 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557 "You type on the keyboard, but your characters do not even echo.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
558 (dun-unix-interface))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
559
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560 ;;; Various movement directions
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
562 (defun dun-n (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
563 (dun-move north))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
564
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
565 (defun dun-s (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
566 (dun-move south))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
568 (defun dun-e (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
569 (dun-move east))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
570
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
571 (defun dun-w (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
572 (dun-move west))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
573
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
574 (defun dun-ne (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
575 (dun-move northeast))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
577 (defun dun-se (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
578 (dun-move southeast))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
579
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
580 (defun dun-nw (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
581 (dun-move northwest))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
582
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
583 (defun dun-sw (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
584 (dun-move southwest))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
586 (defun dun-up (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
587 (dun-move up))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
588
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
589 (defun dun-down (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
590 (dun-move down))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
592 (defun dun-in (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
593 (dun-move in))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
595 (defun dun-out (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
596 (dun-move out))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
597
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
598 (defun dun-go (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
599 (if (or (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
600 (eq (dun-doverb dun-ignore dun-verblist (car args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
601 (cdr (cdr args))) -1))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
602 (dun-mprinc "I don't understand where you want me to go.\n")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
603
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604 ;;; Uses the dungeon-map to figure out where we are going. If the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
605 ;;; requested direction yields 255, we know something special is
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
606 ;;; supposed to happen, or perhaps you can't go that way unless
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
607 ;;; certain conditions are met.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
608
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
609 (defun dun-move (dir)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
610 (if (and (not (member dun-current-room dun-light-rooms))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
611 (not (member obj-lamp dun-inventory)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
613 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
614 "You trip over a grue and fall into a pit and break every bone in your
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
615 body.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
616 (dun-die "a grue"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
617 (let (newroom)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
618 (setq newroom (nth dir (nth dun-current-room dungeon-map)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
619 (if (eq newroom -1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
620 (dun-mprinc "You can't go that way.\n")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 (if (eq newroom 255)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
622 (dun-special-move dir)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623 (setq room -1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
624 (setq dun-lastdir dir)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
625 (if dun-inbus
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 (if (or (< newroom 58) (> newroom 83))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
628 (dun-mprincl "The bus cannot go this way.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
629 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
630 "The bus lurches ahead and comes to a screeching halt.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
631 (dun-remove-obj-from-room dun-current-room obj-bus)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
632 (setq dun-current-room newroom)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
633 (dun-replace dun-room-objects newroom
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
634 (append (nth newroom dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635 (list obj-bus)))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
636 (setq dun-current-room newroom)))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
638 ;;; Movement in this direction causes something special to happen if the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639 ;;; right conditions exist. It may be that you can't go this way unless
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
640 ;;; you have a key, or a passage has been opened.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
642 ;;; coding note: Each check of the current room is on the same 'if' level,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 ;;; i.e. there aren't else's. If two rooms next to each other have
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
644 ;;; specials, and they are connected by specials, this could cause
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
645 ;;; a problem. Be careful when adding them to consider this, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
646 ;;; perhaps use else's.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
647
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
648 (defun dun-special-move (dir)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
649 (if (= dun-current-room building-front)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
650 (if (not (member obj-key dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
651 (dun-mprincl "You don't have a key that can open this door.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
652 (setq dun-current-room old-building-hallway))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
653 (if (= dun-current-room north-end-of-cave-passage)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
654 (let (combo)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
655 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
656 "You must type a 3 digit combination code to enter this room.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
657 (dun-mprinc "Enter it here: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
658 (setq combo (dun-read-line))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
659 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
660 (dun-mprinc "\n"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
661 (if (string= combo dun-combination)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
662 (setq dun-current-room gamma-computing-center)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
663 (dun-mprincl "Sorry, that combination is incorrect."))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
664
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
665 (if (= dun-current-room bear-hangout)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
666 (if (member obj-bear (nth bear-hangout dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
667 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
668 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
669 "The bear is very annoyed that you would be so presumptuous as to try
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670 and walk right by it. He tells you so by tearing your head off.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
671 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
672 (dun-die "a bear"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
673 (dun-mprincl "You can't go that way.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
674
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
675 (if (= dun-current-room vermont-station)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
676 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
677 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
678 "As you board the train it immediately leaves the station. It is a very
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679 bumpy ride. It is shaking from side to side, and up and down. You
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 sit down in one of the chairs in order to be more comfortable.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
681 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682 "\nFinally the train comes to a sudden stop, and the doors open, and some
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683 force throws you out. The train speeds away.\n")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
684 (setq dun-current-room museum-station)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
685
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
686 (if (= dun-current-room old-building-hallway)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
687 (if (and (member obj-key dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
688 (> dun-key-level 0))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
689 (setq dun-current-room meadow)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
690 (dun-mprincl "You don't have a key that can open this door.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
692 (if (and (= dun-current-room maze-button-room) (= dir northwest))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
693 (if (member obj-weight (nth maze-button-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
694 (setq dun-current-room 18)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
695 (dun-mprincl "You can't go that way.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
696
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
697 (if (and (= dun-current-room maze-button-room) (= dir up))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
698 (if (member obj-weight (nth maze-button-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
699 (dun-mprincl "You can't go that way.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
700 (setq dun-current-room weight-room)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
701
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
702 (if (= dun-current-room classroom)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
703 (dun-mprincl "The door is locked."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
704
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
705 (if (or (= dun-current-room lakefront-north)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
706 (= dun-current-room lakefront-south))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
707 (dun-swim nil))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
708
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
709 (if (= dun-current-room reception-area)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
710 (if (not (= dun-sauna-level 3))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
711 (setq dun-current-room health-club-front)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
712 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713 "As you exit the building, you notice some flames coming out of one of the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714 windows. Suddenly, the building explodes in a huge ball of fire. The flames
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715 engulf you, and you burn to death.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
716 (dun-die "burning")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
718 (if (= dun-current-room red-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
719 (if (not (member obj-towel (nth red-room dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
720 (setq dun-current-room long-n-s-hallway)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
721 (dun-mprincl "You can't go that way.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
723 (if (and (> dir down) (> dun-current-room gamma-computing-center)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
724 (< dun-current-room museum-lobby))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
725 (if (not (member obj-bus (nth dun-current-room dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
726 (dun-mprincl "You can't go that way.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
727 (if (= dir in)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
728 (if (member obj-license dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
729 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
730 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
731 "You board the bus and get in the driver's seat.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
732 (setq dun-nomail t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
733 (setq dun-inbus t))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
734 (dun-mprincl "You are not licensed for this type of vehicle."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
735 (dun-mprincl "You hop off the bus.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
736 (setq dun-inbus nil)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
737 (if (= dun-current-room fifth-oaktree-intersection)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
738 (if (not dun-inbus)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
739 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
740 (dun-mprincl "You fall down the cliff and land on your head.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
741 (dun-die "a cliff"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
742 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743 "The bus flies off the cliff, and plunges to the bottom, where it explodes.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
744 (dun-die "a bus accident")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
745 (if (= dun-current-room main-maple-intersection)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
747 (if (not dun-inbus)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
748 (dun-mprincl "The gate will not open.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
749 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 "As the bus approaches, the gate opens and you drive through.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
751 (dun-remove-obj-from-room main-maple-intersection obj-bus)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
752 (dun-replace dun-room-objects museum-entrance
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
753 (append (nth museum-entrance dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 (list obj-bus)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
755 (setq dun-current-room museum-entrance)))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
756 (if (= dun-current-room cave-entrance)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
757 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
758 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
759 "As you enter the room you hear a rumbling noise. You look back to see
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
760 huge rocks sliding down from the ceiling, and blocking your way out.\n")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
761 (setq dun-current-room misty-room)))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
763 (defun dun-long (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
764 (setq dun-mode "long"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
766 (defun dun-turn (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
767 (let (objnum direction)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
768 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
769 (if (not (or (member objnum (nth dun-current-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
770 (member objnum (nth dun-current-room dun-room-silents))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
771 (dun-mprincl "I don't see that here.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
772 (if (not (= objnum obj-dial))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
773 (dun-mprincl "You can't turn that.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
774 (setq direction (dun-firstword (cdr obj)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
775 (if (or (not direction)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
776 (not (or (string= direction "clockwise")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
777 (string= direction "counterclockwise"))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
778 (dun-mprincl "You must indicate clockwise or counterclockwise.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
779 (if (string= direction "clockwise")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
780 (setq dun-sauna-level (+ dun-sauna-level 1))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
781 (setq dun-sauna-level (- dun-sauna-level 1)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
782
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
783 (if (< dun-sauna-level 0)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
784 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
785 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
786 "The dial will not turn further in that direction.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
787 (setq dun-sauna-level 0))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
788 (dun-sauna-heat))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
789
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
790 (defun dun-sauna-heat ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
791 (if (= dun-sauna-level 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
792 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
793 "The termperature has returned to normal room termperature."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
794 (if (= dun-sauna-level 1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
795 (dun-mprincl "It is now luke warm in here. You begin to sweat."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
796 (if (= dun-sauna-level 2)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
797 (dun-mprincl "It is pretty hot in here. It is still very comfortable."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
798 (if (= dun-sauna-level 3)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
799 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
800 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
801 "It is now very hot. There is something very refreshing about this.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
802 (if (or (member obj-rms dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
803 (member obj-rms (nth dun-current-room dun-room-objects)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
804 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
805 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
806 "You notice the wax on your statuette beginning to melt, until it completely
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
807 melts off. You are left with a beautiful diamond!")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
808 (if (member obj-rms dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
809 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
810 (dun-remove-obj-from-inven obj-rms)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
811 (setq dun-inventory (append dun-inventory
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
812 (list obj-diamond))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
813 (dun-remove-obj-from-room dun-current-room obj-rms)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
814 (dun-replace dun-room-objects dun-current-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
815 (append (nth dun-current-room dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
816 (list obj-diamond))))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
817 (if (or (member obj-floppy dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
818 (member obj-floppy (nth dun-current-room dun-room-objects)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
819 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
820 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821 "You notice your floppy disk beginning to melt. As you grab for it, the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822 disk bursts into flames, and disintegrates.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
823 (if (member obj-floppy dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
824 (dun-remove-obj-from-inven obj-floppy)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
825 (dun-remove-obj-from-room dun-current-room obj-floppy))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
826
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
827 (if (= dun-sauna-level 4)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
828 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
829 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830 "As the dial clicks into place, you immediately burst into flames.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
831 (dun-die "burning"))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
833 (defun dun-press (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
834 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
835 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
836 (if (not (or (member objnum (nth dun-current-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
837 (member objnum (nth dun-current-room dun-room-silents))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
838 (dun-mprincl "I don't see that here.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
839 (if (not (member objnum (list obj-button obj-switch)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
841 (dun-mprinc "You can't ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
842 (dun-mprinc (car line-list))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
843 (dun-mprincl " that."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844 (if (= objnum obj-button)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
845 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 "As you press the button, you notice a passageway open up, but
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
847 as you release it, the passageway closes."))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
848 (if (= objnum obj-switch)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
849 (if dun-black
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
851 (dun-mprincl "The button is now in the off position.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
852 (setq dun-black nil))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
853 (dun-mprincl "The button is now in the on position.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
854 (setq dun-black t))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
856 (defun dun-swim (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
857 (if (not (member dun-current-room (list lakefront-north lakefront-south)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
858 (dun-mprincl "I see no water!")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
859 (if (not (member obj-life dun-inventory))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
861 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 "You dive in the water, and at first notice it is quite cold. You then
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863 start to get used to it as you realize that you never really learned how
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 to swim.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
865 (dun-die "drowning"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
866 (if (= dun-current-room lakefront-north)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
867 (setq dun-current-room lakefront-south)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
868 (setq dun-current-room lakefront-north)))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
871 (defun dun-score (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
872 (if (not dun-endgame)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
873 (let (total)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
874 (setq total (dun-reg-score))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
875 (dun-mprinc "You have scored ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
876 (dun-mprinc total)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
877 (dun-mprincl " out of a possible 90 points.") total)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
878 (dun-mprinc "You have scored ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
879 (dun-mprinc (dun-endgame-score))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
880 (dun-mprincl " endgame points out of a possible 110.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
881 (if (= (dun-endgame-score) 110)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
882 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 "\n\nCongratulations. You have won. The wizard password is 'moby'"))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
885 (defun dun-help (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
886 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 "Welcome to dunnet (2.0), by Ron Schnell (ronnie@media.mit.edu).
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 Here is some useful information (read carefully because there are one
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
889 or more clues in here):
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
890 - If you have a key that can open a door, you do not need to explicitly
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 open it. You may just use 'in' or walk in the direction of the door.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893 - If you have a lamp, it is always lit.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
894
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895 - You will not get any points until you manage to get treasures to a certain
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
896 place. Simply finding the treasures is not good enough. There is more
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
897 than one way to get a treasure to the special place. It is also
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
898 important that the objects get to the special place *unharmed* and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
899 *untarnished*. You can tell if you have successfully transported the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
900 object by looking at your score, as it changes immediately. Note that
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
901 an object can become harmed even after you have received points for it.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
902 If this happens, your score will decrease, and in many cases you can never
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903 get credit for it again.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
904
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
905 - You can save your game with the 'save' command, and use restore it
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
906 with the 'restore' command.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
907
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
908 - There are no limits on lengths of object names.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
909
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
910 - Directions are: north,south,east,west,northeast,southeast,northwest,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
911 southwest,up,down,in,out.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
912
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
913 - These can be abbreviated: n,s,e,w,ne,se,nw,sw,u,d,in,out.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
914
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
915 - If you go down a hole in the floor without an aid such as a ladder,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
916 you probably won't be able to get back up the way you came, if at all.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
917
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
918 - To run this game in batch mode (no emacs window), use:
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
919 emacs -batch -l dunnet
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
920
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
921 If you have questions or comments, please contact ronnie@media.mit.edu."))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
922
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
923 (defun dun-flush (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
924 (if (not (= dun-current-room bathroom))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
925 (dun-mprincl "I see nothing to flush.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
926 (dun-mprincl "Whoooosh!!")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
927 (dun-put-objs-in-treas (nth urinal dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
928 (dun-replace dun-room-objects urinal nil)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
930 (defun dun-piss (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
931 (if (not (= dun-current-room bathroom))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
932 (dun-mprincl "You can't do that here, don't even bother trying.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
933 (if (not dun-gottago)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
934 (dun-mprincl "I'm afraid you don't have to go now.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
935 (dun-mprincl "That was refreshing.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
936 (setq dun-gottago nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
937 (dun-replace dun-room-objects urinal (append
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
938 (nth urinal dun-room-objects)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
939 (list obj-URINE))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
940
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
941
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
942 (defun dun-sleep (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
943 (if (not (= dun-current-room bedroom))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
944 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945 "You try to go to sleep while standing up here, but can't seem to do it.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
946 (setq dun-gottago t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
947 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948 "As soon as you start to doze off you begin dreaming. You see images of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949 workers digging caves, slaving in the humid heat. Then you see yourself
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 as one of these workers. While no one is looking, you leave the group
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
951 and walk into a room. The room is bare except for a horseshoe
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
952 shaped piece of stone in the center. You see yourself digging a hole in
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953 the ground, then putting some kind of treasure in it, and filling the hole
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
954 with dirt again. After this, you immediately wake up.")))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
955
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
956 (defun dun-break (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
957 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
958 (if (not (member obj-axe dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
959 (dun-mprincl "You have nothing you can use to break things.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
960 (when (setq objnum (dun-objnum-from-args-std obj))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
961 (if (member objnum dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
962 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
963 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
964 "You take the object in your hands and swing the axe. Unfortunately, you miss
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
965 the object and slice off your hand. You bleed to death.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
966 (dun-die "an axe"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
967 (if (not (or (member objnum (nth dun-current-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
968 (member objnum
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
969 (nth dun-current-room dun-room-silents))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
970 (dun-mprincl "I don't see that here.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
971 (if (= objnum obj-cable)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
972 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
973 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974 "As you break the ethernet cable, everything starts to blur. You collapse
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
975 for a moment, then straighten yourself up.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
976 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
977 (dun-replace dun-room-objects gamma-computing-center
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
978 (append
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
979 (nth gamma-computing-center dun-room-objects)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
980 dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
981 (if (member obj-key dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
982 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
983 (setq dun-inventory (list obj-key))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
984 (dun-remove-obj-from-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
985 gamma-computing-center obj-key))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
986 (setq dun-inventory nil))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
987 (setq dun-current-room computer-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
988 (setq dun-ethernet nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
989 (dun-mprincl "Connection closed.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
990 (dun-unix-interface))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
991 (if (< objnum 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
992 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
993 (dun-mprincl "Your axe shatters into a million pieces.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
994 (dun-remove-obj-from-inven obj-axe))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
995 (dun-mprincl "Your axe breaks it into a million pieces.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
996 (dun-remove-obj-from-room dun-current-room objnum)))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
997
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
998 (defun dun-drive (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
999 (if (not dun-inbus)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1000 (dun-mprincl "You cannot drive when you aren't in a vehicle.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1001 (dun-mprincl "To drive while you are in the bus, just give a direction.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1002
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1003 (defun dun-superb (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1004 (setq dun-mode 'dun-superb))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1005
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1006 (defun dun-reg-score ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1007 (let (total)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1008 (setq total 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1009 (dolist (x (nth treasure-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1010 (setq total (+ total (nth x dun-object-pts))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1011 (if (member obj-URINE (nth treasure-room dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1012 (setq total 0)) total))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1013
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1014 (defun dun-endgame-score ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1015 (let (total)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1016 (setq total 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1017 (dolist (x (nth endgame-treasure-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1018 (setq total (+ total (nth x dun-object-pts)))) total))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1019
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1020 (defun dun-answer (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1021 (if (not dun-correct-answer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1022 (dun-mprincl "I don't believe anyone asked you anything.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1023 (setq args (car args))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1024 (if (not args)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1025 (dun-mprincl "You must give the answer on the same line.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1026 (if (dun-members args dun-correct-answer)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1027 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1028 (dun-mprincl "Correct.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1029 (if (= dun-lastdir 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1030 (setq dun-current-room (1+ dun-current-room))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1031 (setq dun-current-room (- dun-current-room 1)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1032 (setq dun-correct-answer nil))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1033 (dun-mprincl "That answer is incorrect.")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1034
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1035 (defun dun-endgame-question ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1036 (if (not dun-endgame-questions)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1037 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1038 (dun-mprincl "Your question is:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1039 (dun-mprincl "No more questions, just do 'answer foo'.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1040 (setq dun-correct-answer '("foo")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1041 (let (which i newques)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1042 (setq i 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1043 (setq newques nil)
4403
2d6328c324cd (dun-endgame-question, tcom, tloc):
Paul Eggert <eggert@twinsun.com>
parents: 4245
diff changeset
1044 (setq which (random (length dun-endgame-questions)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1045 (dun-mprincl "Your question is:")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1046 (dun-mprincl (setq dun-endgame-question (car
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1047 (nth which
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1048 dun-endgame-questions))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1049 (setq dun-correct-answer (cdr (nth which dun-endgame-questions)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1050 (while (< i which)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1051 (setq newques (append newques (list (nth i dun-endgame-questions))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1052 (setq i (1+ i)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1053 (setq i (1+ which))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1054 (while (< i (length dun-endgame-questions))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1055 (setq newques (append newques (list (nth i dun-endgame-questions))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1056 (setq i (1+ i)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1057 (setq dun-endgame-questions newques))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1058
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1059 (defun dun-power (args)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1060 (if (not (= dun-current-room pc-area))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1061 (dun-mprincl "That operation is not applicable here.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1062 (if (not dun-floppy)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1063 (dun-dos-no-disk)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1064 (dun-dos-interface))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1065
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1066 (defun dun-feed (args)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1067 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1068 (when (setq objnum (dun-objnum-from-args-std args))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1069 (if (and (= objnum obj-bear)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1070 (member obj-bear (nth dun-current-room dun-room-objects)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1071 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1072 (if (not (member obj-food dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1073 (dun-mprincl "You have nothing with which to feed it.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1074 (dun-drop '("food"))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1075 (if (not (or (member objnum (nth dun-current-room dun-room-objects))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1076 (member objnum dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1077 (member objnum (nth dun-current-room dun-room-silents))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1078 (dun-mprincl "I don't see that here.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1079 (dun-mprincl "You cannot feed that."))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1080
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1081
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1082 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1083 ;;;; This section defines various utility functions used
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1084 ;;;; by dunnet.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1085 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1086
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1087
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1088 ;;; Function which takes a verb and a list of other words. Calls proper
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1089 ;;; function associated with the verb, and passes along the other words.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1090
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1091 (defun dun-doverb (dun-ignore dun-verblist verb rest)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1092 (if (not verb)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1093 nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1094 (if (member (intern verb) dun-ignore)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1095 (if (not (car rest)) -1
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1096 (dun-doverb dun-ignore dun-verblist (car rest) (cdr rest)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1097 (if (not (cdr (assq (intern verb) dun-verblist))) -1
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1098 (setq dun-numcmds (1+ dun-numcmds))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1099 (eval (list (cdr (assq (intern verb) dun-verblist)) (quote rest)))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1100
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1101
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1102 ;;; Function to take a string and change it into a list of lowercase words.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1103
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1104 (defun dun-listify-string (strin)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1105 (let (pos ret-list end-pos)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1106 (setq pos 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1107 (setq ret-list nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1108 (while (setq end-pos (string-match "[ ,:;]" (substring strin pos)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1109 (setq end-pos (+ end-pos pos))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1110 (if (not (= end-pos pos))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111 (setq ret-list (append ret-list (list
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1112 (downcase
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1113 (substring strin pos end-pos))))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1114 (setq pos (+ end-pos 1))) ret-list))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1115
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1116 (defun dun-listify-string2 (strin)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1117 (let (pos ret-list end-pos)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1118 (setq pos 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1119 (setq ret-list nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1120 (while (setq end-pos (string-match " " (substring strin pos)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1121 (setq end-pos (+ end-pos pos))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1122 (if (not (= end-pos pos))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1123 (setq ret-list (append ret-list (list
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1124 (downcase
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1125 (substring strin pos end-pos))))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1126 (setq pos (+ end-pos 1))) ret-list))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1127
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1128 (defun dun-replace (list n number)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1129 (rplaca (nthcdr n list) number))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1130
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1131
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1132 ;;; Get the first non-ignored word from a list.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1133
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1134 (defun dun-firstword (list)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1135 (if (not (car list))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1136 nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1137 (while (and list (member (intern (car list)) dun-ignore))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1138 (setq list (cdr list)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1139 (car list)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1140
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1141 (defun dun-firstwordl (list)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1142 (if (not (car list))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1143 nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1144 (while (and list (member (intern (car list)) dun-ignore))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1145 (setq list (cdr list)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1146 list))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1147
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1148 ;;; parse a line passed in as a string Call the proper verb with the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1149 ;;; rest of the line passed in as a list.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1150
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1151 (defun dun-vparse (dun-ignore dun-verblist line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1152 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1153 (setq line-list (dun-listify-string (concat line " ")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1154 (dun-doverb dun-ignore dun-verblist (car line-list) (cdr line-list)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1155
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1156 (defun dun-parse2 (dun-ignore dun-verblist line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1157 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1158 (setq line-list (dun-listify-string2 (concat line " ")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1159 (dun-doverb dun-ignore dun-verblist (car line-list) (cdr line-list)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1160
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1161 ;;; Read a line, in window mode
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1162
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1163 (defun dun-read-line ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1164 (let (line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1165 (setq line (read-string ""))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1166 (dun-mprinc line) line))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1167
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1168 ;;; Insert something into the window buffer
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1169
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1170 (defun dun-minsert (string)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1171 (if (stringp string)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1172 (insert string)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1173 (insert (prin1-to-string string))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1174
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1175 ;;; Print something out, in window mode
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1176
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1177 (defun dun-mprinc (string)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1178 (if (stringp string)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1179 (insert string)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1180 (insert (prin1-to-string string))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1181
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1182 ;;; In window mode, keep screen from jumping by keeping last line at
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1183 ;;; the bottom of the screen.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1184
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1185 (defun dun-fix-screen ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1186 (interactive)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1187 (forward-line (- 0 (- (window-height) 2 )))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1188 (set-window-start (selected-window) (point))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1189 (end-of-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1190
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1191 ;;; Insert something into the buffer, followed by newline.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1192
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1193 (defun dun-minsertl (string)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1194 (dun-minsert string)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1195 (dun-minsert "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1196
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1197 ;;; Print something, followed by a newline.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1198
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1199 (defun dun-mprincl (string)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1200 (dun-mprinc string)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1201 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1202
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1203 ;;; Function which will get an object number given the list of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1204 ;;; words in the command, except for the verb.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1205
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1206 (defun dun-objnum-from-args (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1207 (let (objnum)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1208 (setq obj (dun-firstword obj))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1209 (if (not obj)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1210 obj-special
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1211 (setq objnum (cdr (assq (intern obj) dun-objnames))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1212
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1213 (defun dun-objnum-from-args-std (obj)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1214 (let (result)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1215 (if (eq (setq result (dun-objnum-from-args obj)) obj-special)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1216 (dun-mprincl "You must supply an object."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1217 (if (eq result nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1218 (dun-mprincl "I don't know what that is."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1219 (if (eq result obj-special)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1220 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1221 result)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1222
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1223 ;;; Take a short room description, and change spaces and slashes to dashes.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1224
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1225 (defun dun-space-to-hyphen (string)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1226 (let (space)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1227 (if (setq space (string-match "[ /]" string))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1228 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1229 (setq string (concat (substring string 0 space) "-"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1230 (substring string (1+ space))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1231 (dun-space-to-hyphen string))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1232 string)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1233
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1234 ;;; Given a unix style pathname, build a list of path components (recursive)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1235
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1236 (defun dun-get-path (dirstring startlist)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1237 (let (slash pos)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1238 (if (= (length dirstring) 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1239 startlist
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1240 (if (string= (substring dirstring 0 1) "/")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1241 (dun-get-path (substring dirstring 1) (append startlist (list "/")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1242 (if (not (setq slash (string-match "/" dirstring)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1243 (append startlist (list dirstring))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1244 (dun-get-path (substring dirstring (1+ slash))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1245 (append startlist
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1246 (list (substring dirstring 0 slash)))))))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1247
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1248
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1249 ;;; Is a string a member of a string list?
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1250
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1251 (defun dun-members (string string-list)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1252 (let (found)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1253 (setq found nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1254 (dolist (x string-list)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1255 (if (string= x string)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1256 (setq found t))) found))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1257
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1258 ;;; Function to put objects in the treasure room. Also prints current
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1259 ;;; score to let user know he has scored.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1260
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1261 (defun dun-put-objs-in-treas (objlist)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1262 (let (oscore newscore)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1263 (setq oscore (dun-reg-score))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1264 (dun-replace dun-room-objects 0 (append (nth 0 dun-room-objects) objlist))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1265 (setq newscore (dun-reg-score))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1266 (if (not (= oscore newscore))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1267 (dun-score nil))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1268
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1269 ;;; Load an encrypted file, and eval it.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1270
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1271 (defun dun-load-d (filename)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1272 (let (old-buffer result)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1273 (setq result t)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1274 (setq old-buffer (current-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1275 (switch-to-buffer (get-buffer-create "*loadc*"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1276 (erase-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1277 (condition-case nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1278 (insert-file-contents filename)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1279 (error (setq result nil)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1280 (unless (not result)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1281 (condition-case nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1282 (dun-rot13)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1283 (error (yank)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1284 (eval-current-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1285 (kill-buffer (current-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1286 (switch-to-buffer old-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1287 result))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1288
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1289 ;;; Functions to remove an object either from a room, or from inventory.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1290
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1291 (defun dun-remove-obj-from-room (room objnum)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1292 (let (newroom)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1293 (setq newroom nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1294 (dolist (x (nth room dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1295 (if (not (= x objnum))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1296 (setq newroom (append newroom (list x)))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1297 (rplaca (nthcdr room dun-room-objects) newroom)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1298
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1299 (defun dun-remove-obj-from-inven (objnum)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1300 (let (new-inven)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1301 (setq new-inven nil)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1302 (dolist (x dun-inventory)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1303 (if (not (= x objnum))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1304 (setq new-inven (append new-inven (list x)))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1305 (setq dun-inventory new-inven)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1306
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1307
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1308 (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1309 (setq dun-translate-table (make-vector 256 0))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1310 (while (< i 256)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1311 (aset dun-translate-table i i)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1312 (setq i (1+ i)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1313 (setq lower (concat lower lower))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1314 (setq upper (upcase lower))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1315 (setq i 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1316 (while (< i 26)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1317 (aset dun-translate-table (+ ?a i) (aref lower (+ i 13)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1318 (aset dun-translate-table (+ ?A i) (aref upper (+ i 13)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1319 (setq i (1+ i))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1320
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1321 (defun dun-rot13 ()
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1322 (let (str len (i 0))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1323 (setq str (buffer-substring (point-min) (point-max)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1324 (setq len (length str))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1325 (while (< i len)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1326 (aset str i (aref dun-translate-table (aref str i)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1327 (setq i (1+ i)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1328 (erase-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1329 (insert str)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1330
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1331 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1332 ;;;; This section defines the globals that are used in dunnet.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1333 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1334 ;;;; IMPORTANT
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1335 ;;;; All globals which can change must be saved from 'save-game. Add
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1336 ;;;; all new globals to bottom of file.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1337
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1338 (setq dun-visited '(27))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1339 (setq dun-current-room 1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1340 (setq dun-exitf nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1341 (setq dun-badcd nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1342 (defvar dungeon-mode-map nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1343 (setq dungeon-mode-map (make-sparse-keymap))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1344 (define-key dungeon-mode-map "\r" 'dun-parse)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1345 (defvar dungeon-batch-map (make-keymap))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1346 (if (string= (substring emacs-version 0 2) "18")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1347 (let (n)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1348 (setq n 32)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1349 (while (< 0 (setq n (- n 1)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1350 (aset dungeon-batch-map n 'dungeon-nil)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1351 (let (n)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1352 (setq n 32)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1353 (while (< 0 (setq n (- n 1)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1354 (aset (car (cdr dungeon-batch-map)) n 'dungeon-nil))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1355 (define-key dungeon-batch-map "\r" 'exit-minibuffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1356 (define-key dungeon-batch-map "\n" 'exit-minibuffer)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1357 (setq dun-computer nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1358 (setq dun-floppy nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1359 (setq dun-key-level 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1360 (setq dun-hole nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1361 (setq dun-correct-answer nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1362 (setq dun-lastdir 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1363 (setq dun-numsaves 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1364 (setq dun-jar nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1365 (setq dun-dead nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1366 (setq room 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1367 (setq dun-numcmds 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1368 (setq dun-wizard nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1369 (setq dun-endgame-question nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1370 (setq dun-logged-in nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1371 (setq dungeon-mode 'dungeon)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1372 (setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1373 (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1374 (rlogin . dun-rlogin) (uncompress . dun-uncompress)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1375 (cat . dun-cat) (zippy . dun-zippy)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1376
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1377 (setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1378 (exit . dun-dos-exit) (command . dun-dos-spawn)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1379 (b: . dun-dos-invd) (c: . dun-dos-invd)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1380 (a: . dun-dos-nil)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1381
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1382
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1383 (setq dun-batch-mode nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1384
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1385 (setq dun-cdpath "/usr/toukmond")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1386 (setq dun-cdroom -10)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1387 (setq dun-uncompressed nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1388 (setq dun-ethernet t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1389 (setq dun-restricted
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1390 '(dun-room-objects dungeon-map dun-rooms
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1391 dun-room-silents dun-combination))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1392 (setq dun-ftptype 'ascii)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1393 (setq dun-endgame nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1394 (setq dun-gottago t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1395 (setq dun-black nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1396
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1397 (setq dun-rooms '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1398 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1399 "You are in the treasure room. A door leads out to the north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1400 "Treasure room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1401 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1402 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1403 "You are at a dead end of a dirt road. The road goes to the east.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1404 In the distance you can see that it will eventually fork off. The
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1405 trees here are very tall royal palms, and they are spaced equidistant
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1406 from each other."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1407 "Dead end"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1408 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1409 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1410 "You are on the continuation of a dirt road. There are more trees on
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1411 both sides of you. The road continues to the east and west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1412 "E/W Dirt road"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1413 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1414 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1415 "You are at a fork of two passages, one to the northeast, and one to the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1416 southeast. The ground here seems very soft. You can also go back west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1417 "Fork"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1418 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1419 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1420 "You are on a northeast/southwest road."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1421 "NE/SW road"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1422 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1423 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1424 "You are at the end of the road. There is a building in front of you
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1425 to the northeast, and the road leads back to the southwest."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1426 "Building front"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1427 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1428 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1429 "You are on a southeast/northwest road."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1430 "SE/NW road"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1431 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1432 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1433 "You are standing at the end of a road. A passage leads back to the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1434 northwest."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1435 "Bear hangout"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1436 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1437 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1438 "You are in the hallway of an old building. There are rooms to the east
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1439 and west, and doors leading out to the north and south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1440 "Old Building hallway"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1441 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1442 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1443 "You are in a mailroom. There are many bins where the mail is usually
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1444 kept. The exit is to the west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1445 "Mailroom"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1446 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1447 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1448 "You are in a computer room. It seems like most of the equipment has
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1449 been removed. There is a VAX 11/780 in front of you, however, with
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1450 one of the cabinets wide open. A sign on the front of the machine
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1451 says: This VAX is named 'pokey'. To type on the console, use the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1452 'type' command. The exit is to the east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1453 "Computer room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1454 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1455 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1456 "You are in a meadow in the back of an old building. A small path leads
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1457 to the west, and a door leads to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1458 "Meadow"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1459 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1460 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1461 "You are in a round, stone room with a door to the east. There
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1462 is a sign on the wall that reads: 'receiving room'."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1463 "Receiving room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1464 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1465 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1466 "You are at the south end of a hallway that leads to the north. There
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1467 are rooms to the east and west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1468 "Northbound Hallway"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1469 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1470 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1471 "You are in a sauna. There is nothing in the room except for a dial
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1472 on the wall. A door leads out to west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1473 "Sauna"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1474 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1475 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1476 "You are at the end of a north/south hallway. You can go back to the south,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1477 or off to a room to the east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1478 "End of N/S Hallway"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1479 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1480 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1481 "You are in an old weight room. All of the equipment is either destroyed
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1482 or completely broken. There is a door out to the west, and there is a ladder
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1483 leading down a hole in the floor."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1484 "Weight room" ;16
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1485 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1486 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1487 "You are in a maze of twisty little passages, all alike.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1488 There is a button on the ground here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1489 "Maze button room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1490 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1491 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1492 "You are in a maze of little twisty passages, all alike."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1493 "Maze"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1494 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1495 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1496 "You are in a maze of thirsty little passages, all alike."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1497 "Maze" ;19
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1498 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1499 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1500 "You are in a maze of twenty little passages, all alike."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1501 "Maze"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1502 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1503 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1504 "You are in a daze of twisty little passages, all alike."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1505 "Maze" ;21
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1506 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1507 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1508 "You are in a maze of twisty little cabbages, all alike."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1509 "Maze" ;22
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1510 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1511 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1512 "You are in a reception area for a health and fitness center. The place
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1513 appears to have been recently ransacked, and nothing is left. There is
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1514 a door out to the south, and a crawlspace to the southeast."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1515 "Reception area"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1516 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1517 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1518 "You are outside a large building to the north which used to be a health
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1519 and fitness center. A road leads to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1520 "Health Club front"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1521 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1522 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1523 "You are at the north side of a lake. On the other side you can see
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1524 a road which leads to a cave. The water appears very deep."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1525 "Lakefront North"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1526 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1527 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1528 "You are at the south side of a lake. A road goes to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1529 "Lakefront South"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1530 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1531 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1532 "You are in a well-hidden area off to the side of a road. Back to the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1533 northeast through the brush you can see the bear hangout."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1534 "Hidden area"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1535 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1536 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1537 "The entrance to a cave is to the south. To the north, a road leads
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1538 towards a deep lake. On the ground nearby there is a chute, with a sign
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1539 that says 'put treasures here for points'."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1540 "Cave Entrance" ;28
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1541 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1542 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1543 "You are in a misty, humid room carved into a mountain.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1544 To the north is the remains of a rockslide. To the east, a small
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1545 passage leads away into the darkness." ;29
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1546 "Misty Room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1547 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1548 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1549 "You are in an east/west passageway. The walls here are made of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1550 multicolored rock and are quite beautiful."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1551 "Cave E/W passage" ;30
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1552 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1553 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1554 "You are at the junction of two passages. One goes north/south, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1555 the other goes west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1556 "N/S/W Junction" ;31
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1557 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1558 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1559 "You are at the north end of a north/south passageway. There are stairs
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1560 leading down from here. There is also a door leading west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1561 "North end of cave passage" ;32
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1562 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1563 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1564 "You are at the south end of a north/south passageway. There is a hole
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1565 in the floor here, into which you could probably fit."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1566 "South end of cave passage" ;33
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1567 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1568 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1569 "You are in what appears to be a worker's bedroom. There is a queen-
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1570 sized bed in the middle of the room, and a painting hanging on the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1571 wall. A door leads to another room to the south, and stairways
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1572 lead up and down."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1573 "Bedroom" ;34
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1574 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1575 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1576 "You are in a bathroom built for workers in the cave. There is a
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1577 urinal hanging on the wall, and some exposed pipes on the opposite
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1578 wall where a sink used to be. To the north is a bedroom."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1579 "Bathroom" ;35
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1580 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1581 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1582 "This is a marker for the urinal. User will not see this, but it
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1583 is a room that can contain objects."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1584 "Urinal" ;36
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1585 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1586 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1587 "You are at the northeast end of a northeast/southwest passageway.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1588 Stairs lead up out of sight."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1589 "Ne end of ne/sw cave passage" ;37
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1590 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1591 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1592 "You are at the junction of northeast/southwest and east/west passages."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1593 "Ne/sw-e/w junction" ;38
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1594 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1595 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1596 "You are at the southwest end of a northeast/southwest passageway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1597 "Sw end of ne/sw cave passage" ;39
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1598 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1599 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1600 "You are at the east end of an e/w passage. There are stairs leading up
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1601 to a room above."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1602 "East end of e/w cave passage" ;40
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1603 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1604 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1605 "You are at the west end of an e/w passage. There is a hole on the ground
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1606 which leads down out of sight."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1607 "West end of e/w cave passage" ;41
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1608 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1609 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1610 "You are in a room which is bare, except for a horseshoe shaped boulder
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1611 in the center. Stairs lead down from here." ;42
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1612 "Horseshoe boulder room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1613 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1614 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1615 "You are in a room which is completely empty. Doors lead out to the north
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1616 and east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1617 "Empty room" ;43
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1618 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1619 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1620 "You are in an empty room. Interestingly enough, the stones in this
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1621 room are painted blue. Doors lead out to the east and south." ;44
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1622 "Blue room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1623 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1624 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1625 "You are in an empty room. Interestingly enough, the stones in this
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1626 room are painted yellow. Doors lead out to the south and west." ;45
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1627 "Yellow room"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1628 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1629 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1630 "You are in an empty room. Interestingly enough, the stones in this room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1631 are painted red. Doors lead out to the west and north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1632 "Red room" ;46
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1633 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1634 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1635 "You are in the middle of a long north/south hallway." ;47
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1636 "Long n/s hallway"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1637 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1638 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1639 "You are 3/4 of the way towards the north end of a long north/south hallway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1640 "3/4 north" ;48
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1641 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1642 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1643 "You are at the north end of a long north/south hallway. There are stairs
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1644 leading upwards."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1645 "North end of long hallway" ;49
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1646 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1647 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1648 "You are 3/4 of the way towards the south end of a long north/south hallway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1649 "3/4 south" ;50
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1650 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1651 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1652 "You are at the south end of a long north/south hallway. There is a hole
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1653 to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1654 "South end of long hallway" ;51
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1655 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1656 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1657 "You are at a landing in a stairwell which continues up and down."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1658 "Stair landing" ;52
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1659 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1660 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1661 "You are at the continuation of an up/down staircase."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1662 "Up/down staircase" ;53
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1663 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1664 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1665 "You are at the top of a staircase leading down. A crawlway leads off
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1666 to the northeast."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1667 "Top of staircase." ;54
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1668 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1669 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1670 "You are in a crawlway that leads northeast or southwest."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1671 "Ne crawlway" ;55
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1672 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1673 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1674 "You are in a small crawlspace. There is a hole in the ground here, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1675 a small passage back to the southwest."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1676 "Small crawlspace" ;56
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1677 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1678 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1679 "You are in the Gamma Computing Center. An IBM 3090/600s is whirring
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1680 away in here. There is an ethernet cable coming out of one of the units,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1681 and going through the ceiling. There is no console here on which you
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1682 could type."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1683 "Gamma computing center" ;57
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1684 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1685 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1686 "You are near the remains of a post office. There is a mail drop on the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1687 face of the building, but you cannot see where it leads. A path leads
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1688 back to the east, and a road leads to the north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1689 "Post office" ;58
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1690 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1691 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1692 "You are at the intersection of Main Street and Maple Ave. Main street
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1693 runs north and south, and Maple Ave runs east off into the distance.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1694 If you look north and east you can see many intersections, but all of
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1695 the buildings that used to stand here are gone. Nothing remains except
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1696 street signs.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1697 There is a road to the northwest leading to a gate that guards a building."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1698 "Main-Maple intersection" ;59
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1699 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1700 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1701 "You are at the intersection of Main Street and the west end of Oaktree Ave."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1702 "Main-Oaktree intersection" ;60
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1703 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1704 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1705 "You are at the intersection of Main Street and the west end of Vermont Ave."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1706 "Main-Vermont intersection" ;61
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1707 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1708 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1709 "You are at the north end of Main Street at the west end of Sycamore Ave." ;62
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1710 "Main-Sycamore intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1711 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1712 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1713 "You are at the south end of First Street at Maple Ave." ;63
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1714 "First-Maple intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1715 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1716 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1717 "You are at the intersection of First Street and Oaktree Ave." ;64
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1718 "First-Oaktree intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1719 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1720 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1721 "You are at the intersection of First Street and Vermont Ave." ;65
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1722 "First-Vermont intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1723 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1724 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1725 "You are at the north end of First Street at Sycamore Ave." ;66
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1726 "First-Sycamore intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1727 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1728 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1729 "You are at the south end of Second Street at Maple Ave." ;67
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1730 "Second-Maple intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1731 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1732 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1733 "You are at the intersection of Second Street and Oaktree Ave." ;68
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1734 "Second-Oaktree intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1735 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1736 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1737 "You are at the intersection of Second Street and Vermont Ave." ;69
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1738 "Second-Vermont intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1739 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1740 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1741 "You are at the north end of Second Street at Sycamore Ave." ;70
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1742 "Second-Sycamore intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1743 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1744 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1745 "You are at the south end of Third Street at Maple Ave." ;71
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1746 "Third-Maple intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1747 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1748 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1749 "You are at the intersection of Third Street and Oaktree Ave." ;72
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1750 "Third-Oaktree intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1751 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1752 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1753 "You are at the intersection of Third Street and Vermont Ave." ;73
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1754 "Third-Vermont intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1755 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1756 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1757 "You are at the north end of Third Street at Sycamore Ave." ;74
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1758 "Third-Sycamore intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1759 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1760 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1761 "You are at the south end of Fourth Street at Maple Ave." ;75
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1762 "Fourth-Maple intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1763 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1764 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1765 "You are at the intersection of Fourth Street and Oaktree Ave." ;76
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1766 "Fourth-Oaktree intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1767 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1768 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1769 "You are at the intersection of Fourth Street and Vermont Ave." ;77
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1770 "Fourth-Vermont intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1771 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1772 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1773 "You are at the north end of Fourth Street at Sycamore Ave." ;78
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1774 "Fourth-Sycamore intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1775 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1776 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1777 "You are at the south end of Fifth Street at the east end of Maple Ave." ;79
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1778 "Fifth-Maple intersection"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1779 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1780 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1781 "You are at the intersection of Fifth Street and the east end of Oaktree Ave.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1782 There is a cliff off to the east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1783 "Fifth-Oaktree intersection" ;80
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1784 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1785 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1786 "You are at the intersection of Fifth Street and the east end of Vermont Ave."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1787 "Fifth-Vermont intersection" ;81
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1788 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1789 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1790 "You are at the north end of Fifth Street and the east end of Sycamore Ave."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1791 "Fifth-Sycamore intersection" ;82
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1792 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1793 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1794 "You are in front of the Museum of Natural History. A door leads into
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1795 the building to the north, and a road leads to the southeast."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1796 "Museum entrance" ;83
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1797 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1798 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1799 "You are in the main lobby for the Museum of Natural History. In the center
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1800 of the room is the huge skeleton of a dinosaur. Doors lead out to the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1801 south and east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1802 "Museum lobby" ;84
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1803 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1804 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1805 "You are in the geological display. All of the objects that used to
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1806 be on display are missing. There are rooms to the east, west, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1807 north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1808 "Geological display" ;85
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1809 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1810 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1811 "You are in the marine life area. The room is filled with fish tanks,
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1812 which are filled with dead fish that have apparently died due to
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1813 starvation. Doors lead out to the south and east."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1814 "Marine life area" ;86
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1815 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1816 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1817 "You are in some sort of maintenance room for the museum. There is a
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1818 switch on the wall labeled 'BL'. There are doors to the west and north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1819 "Maintenance room" ;87
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1820 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1821 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1822 "You are in a classroom where school children were taught about natural
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1823 history. On the blackboard is written, 'No children allowed downstairs.'
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1824 There is a door to the east with an 'exit' sign on it. There is another
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1825 door to the west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1826 "Classroom" ;88
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1827 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1828 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1829 "You are at the Vermont St. subway station. A train is sitting here waiting."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1830 "Vermont station" ;89
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1831 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1832 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1833 "You are at the Museum subway stop. A passage leads off to the north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1834 "Museum station" ;90
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1835 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1836 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1837 "You are in a north/south tunnel."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1838 "N/S tunnel" ;91
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1839 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1840 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1841 "You are at the north end of a north/south tunnel. Stairs lead up and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1842 down from here. There is a garbage disposal here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1843 "North end of n/s tunnel" ;92
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1844 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1845 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1846 "You are at the top of some stairs near the subway station. There is
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1847 a door to the west."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1848 "Top of subway stairs" ;93
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1849 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1850 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1851 "You are at the bottom of some stairs near the subway station. There is
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1852 a room to the northeast."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1853 "Bottom of subway stairs" ;94
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1854 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1855 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1856 "You are in another computer room. There is a computer in here larger
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1857 than you have ever seen. It has no manufacturers name on it, but it
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1858 does have a sign that says: This machine's name is 'endgame'. The
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1859 exit is to the southwest. There is no console here on which you could
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1860 type."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1861 "Endgame computer room" ;95
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1862 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1863 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1864 "You are in a north/south hallway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1865 "Endgame n/s hallway" ;96
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1866 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1867 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1868 "You have reached a question room. You must answer a question correctly in
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1869 order to get by. Use the 'answer' command to answer the question."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1870 "Question room 1" ;97
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1871 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1872 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1873 "You are in a north/south hallway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1874 "Endgame n/s hallway" ;98
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1875 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1876 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1877 "You are in a second question room."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1878 "Question room 2" ;99
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1879 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1880 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1881 "You are in a north/south hallway."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1882 "Endgame n/s hallway" ;100
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1883 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1884 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1885 "You are in a third question room."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1886 "Question room 3" ;101
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1887 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1888 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1889 "You are in the endgame treasure room. A door leads out to the north, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1890 a hallway leads to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1891 "Endgame treasure room" ;102
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1892 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1893 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1894 "You are in the winner's room. A door leads back to the south."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1895 "Winner's room" ;103
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1896 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1897 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1898 "You have reached a dead end. There is a PC on the floor here. Above
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1899 it is a sign that reads:
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1900 Type the 'reset' command to type on the PC.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1901 A hole leads north."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1902 "PC area" ;104
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1903 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1904 ))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1905
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1906 (setq dun-light-rooms '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 24 25 26 27 28 58 59
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1907 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1908 77 78 79 80 81 82 83))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1909
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1910 (setq dun-verblist '((die . dun-die) (ne . dun-ne) (north . dun-n)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1911 (south . dun-s) (east . dun-e) (west . dun-w)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1912 (u . dun-up) (d . dun-down) (i . dun-inven)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1913 (inventory . dun-inven) (look . dun-examine) (n . dun-n)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1914 (s . dun-s) (e . dun-e) (w . dun-w) (se . dun-se)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1915 (nw . dun-nw) (sw . dun-sw) (up . dun-up)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1916 (down . dun-down) (in . dun-in) (out . dun-out)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1917 (go . dun-go) (drop . dun-drop) (southeast . dun-se)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1918 (southwest . dun-sw) (northeast . dun-ne)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1919 (northwest . dun-nw) (save . dun-save-game)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1920 (restore . dun-restore) (long . dun-long) (dig . dun-dig)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1921 (shake . dun-shake) (wave . dun-shake)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1922 (examine . dun-examine) (describe . dun-examine)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1923 (climb . dun-climb) (eat . dun-eat) (put . dun-put)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1924 (type . dun-type) (insert . dun-put)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1925 (score . dun-score) (help . dun-help) (quit . dun-quit)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1926 (read . dun-examine) (verbose . dun-long)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1927 (urinate . dun-piss) (piss . dun-piss)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1928 (flush . dun-flush) (sleep . dun-sleep) (lie . dun-sleep)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1929 (x . dun-examine) (break . dun-break) (drive . dun-drive)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1930 (board . dun-in) (enter . dun-in) (turn . dun-turn)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1931 (press . dun-press) (push . dun-press) (swim . dun-swim)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1932 (on . dun-in) (off . dun-out) (chop . dun-break)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1933 (switch . dun-press) (cut . dun-break) (exit . dun-out)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1934 (leave . dun-out) (reset . dun-power) (flick . dun-press)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1935 (superb . dun-superb) (answer . dun-answer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1936 (throw . dun-drop) (l . dun-examine) (take . dun-take)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1937 (get . dun-take) (feed . dun-feed)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1938
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1939 (setq dun-inbus nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1940 (setq dun-nomail nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1941 (setq dun-ignore '(the to at))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1942 (setq dun-mode 'moby)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
1943 (setq dun-sauna-level 0)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1944
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1945 (defconst north 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1946 (defconst south 1)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1947 (defconst east 2)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1948 (defconst west 3)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1949 (defconst northeast 4)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1950 (defconst southeast 5)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1951 (defconst northwest 6)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1952 (defconst southwest 7)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1953 (defconst up 8)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1954 (defconst down 9)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1955 (defconst in 10)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1956 (defconst out 11)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1957
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1958 (setq dungeon-map '(
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1959 ; no so ea we ne se nw sw up do in ot
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1960 ( 96 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;0
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1961 ( -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;1
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1962 ( -1 -1 3 1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;2
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1963 ( -1 -1 -1 2 4 6 -1 -1 -1 -1 -1 -1 ) ;3
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1964 ( -1 -1 -1 -1 5 -1 -1 3 -1 -1 -1 -1 ) ;4
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1965 ( -1 -1 -1 -1 255 -1 -1 4 -1 -1 255 -1 ) ;5
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1966 ( -1 -1 -1 -1 -1 7 3 -1 -1 -1 -1 -1 ) ;6
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1967 ( -1 -1 -1 -1 -1 255 6 27 -1 -1 -1 -1 ) ;7
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1968 ( 255 5 9 10 -1 -1 -1 5 -1 -1 -1 5 ) ;8
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1969 ( -1 -1 -1 8 -1 -1 -1 -1 -1 -1 -1 -1 ) ;9
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1970 ( -1 -1 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;10
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1971 ( -1 8 -1 58 -1 -1 -1 -1 -1 -1 -1 -1 ) ;11
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1972 ( -1 -1 13 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;12
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1973 ( 15 -1 14 12 -1 -1 -1 -1 -1 -1 -1 -1 ) ;13
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1974 ( -1 -1 -1 13 -1 -1 -1 -1 -1 -1 -1 -1 ) ;14
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1975 ( -1 13 16 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;15
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1976 ( -1 -1 -1 15 -1 -1 -1 -1 -1 17 16 -1 ) ;16
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1977 ( -1 -1 17 17 17 17 255 17 255 17 -1 -1 ) ;17
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1978 ( 18 18 18 18 18 -1 18 18 19 18 -1 -1 ) ;18
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1979 ( -1 18 18 19 19 20 19 19 -1 18 -1 -1 ) ;19
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1980 ( -1 -1 -1 18 -1 -1 -1 -1 -1 21 -1 -1 ) ;20
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1981 ( -1 -1 -1 -1 -1 20 22 -1 -1 -1 -1 -1 ) ;21
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1982 ( 18 18 18 18 16 18 23 18 18 18 18 18 ) ;22
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1983 ( -1 255 -1 -1 -1 19 -1 -1 -1 -1 -1 -1 ) ;23
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1984 ( 23 25 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;24
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1985 ( 24 255 -1 -1 -1 -1 -1 -1 -1 -1 255 -1 ) ;25
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1986 (255 28 -1 -1 -1 -1 -1 -1 -1 -1 255 -1 ) ;26
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1987 ( -1 -1 -1 -1 7 -1 -1 -1 -1 -1 -1 -1 ) ;27
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1988 ( 26 255 -1 -1 -1 -1 -1 -1 -1 -1 255 -1 ) ;28
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1989 ( -1 -1 30 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;29
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1990 ( -1 -1 31 29 -1 -1 -1 -1 -1 -1 -1 -1 ) ;30
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1991 ( 32 33 -1 30 -1 -1 -1 -1 -1 -1 -1 -1 ) ;31
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1992 ( -1 31 -1 255 -1 -1 -1 -1 -1 34 -1 -1 ) ;32
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1993 ( 31 -1 -1 -1 -1 -1 -1 -1 -1 35 -1 -1 ) ;33
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1994 ( -1 35 -1 -1 -1 -1 -1 -1 32 37 -1 -1 ) ;34
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1995 ( 34 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;35
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1996 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;36
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1997 ( -1 -1 -1 -1 -1 -1 -1 38 34 -1 -1 -1 ) ;37
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1998 ( -1 -1 40 41 37 -1 -1 39 -1 -1 -1 -1 ) ;38
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1999 ( -1 -1 -1 -1 38 -1 -1 -1 -1 -1 -1 -1 ) ;39
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2000 ( -1 -1 -1 38 -1 -1 -1 -1 42 -1 -1 -1 ) ;40
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2001 ( -1 -1 38 -1 -1 -1 -1 -1 -1 43 -1 -1 ) ;41
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2002 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 40 -1 -1 ) ;42
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2003 ( 44 -1 46 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;43
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2004 ( -1 43 45 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;44
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2005 ( -1 46 -1 44 -1 -1 -1 -1 -1 -1 -1 -1 ) ;45
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2006 ( 45 -1 -1 43 -1 -1 -1 -1 -1 255 -1 -1 ) ;46
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2007 ( 48 50 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;47
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2008 ( 49 47 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;48
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2009 ( -1 48 -1 -1 -1 -1 -1 -1 52 -1 -1 -1 ) ;49
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2010 ( 47 51 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;50
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2011 ( 50 104 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;51
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2012 ( -1 -1 -1 -1 -1 -1 -1 -1 53 49 -1 -1 ) ;52
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2013 ( -1 -1 -1 -1 -1 -1 -1 -1 54 52 -1 -1 ) ;53
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2014 ( -1 -1 -1 -1 55 -1 -1 -1 -1 53 -1 -1 ) ;54
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2015 ( -1 -1 -1 -1 56 -1 -1 54 -1 -1 -1 54 ) ;55
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2016 ( -1 -1 -1 -1 -1 -1 -1 55 -1 31 -1 -1 ) ;56
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2017 ( -1 -1 32 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;57
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2018 ( 59 -1 11 -1 -1 -1 -1 -1 -1 -1 255 255) ;58
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2019 ( 60 58 63 -1 -1 -1 255 -1 -1 -1 255 255) ;59
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2020 ( 61 59 64 -1 -1 -1 -1 -1 -1 -1 255 255) ;60
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2021 ( 62 60 65 -1 -1 -1 -1 -1 -1 -1 255 255) ;61
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2022 ( -1 61 66 -1 -1 -1 -1 -1 -1 -1 255 255) ;62
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2023 ( 64 -1 67 59 -1 -1 -1 -1 -1 -1 255 255) ;63
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2024 ( 65 63 68 60 -1 -1 -1 -1 -1 -1 255 255) ;64
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2025 ( 66 64 69 61 -1 -1 -1 -1 -1 -1 255 255) ;65
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2026 ( -1 65 70 62 -1 -1 -1 -1 -1 -1 255 255) ;66
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2027 ( 68 -1 71 63 -1 -1 -1 -1 -1 -1 255 255) ;67
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2028 ( 69 67 72 64 -1 -1 -1 -1 -1 -1 255 255) ;68
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2029 ( 70 68 73 65 -1 -1 -1 -1 -1 -1 255 255) ;69
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2030 ( -1 69 74 66 -1 -1 -1 -1 -1 -1 255 255) ;70
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2031 ( 72 -1 75 67 -1 -1 -1 -1 -1 -1 255 255) ;71
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2032 ( 73 71 76 68 -1 -1 -1 -1 -1 -1 255 255) ;72
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2033 ( 74 72 77 69 -1 -1 -1 -1 -1 -1 255 255) ;73
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2034 ( -1 73 78 70 -1 -1 -1 -1 -1 -1 255 255) ;74
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2035 ( 76 -1 79 71 -1 -1 -1 -1 -1 -1 255 255) ;75
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2036 ( 77 75 80 72 -1 -1 -1 -1 -1 -1 255 255) ;76
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2037 ( 78 76 81 73 -1 -1 -1 -1 -1 -1 255 255) ;77
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2038 ( -1 77 82 74 -1 -1 -1 -1 -1 -1 255 255) ;78
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2039 ( 80 -1 -1 75 -1 -1 -1 -1 -1 -1 255 255) ;79
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2040 ( 81 79 255 76 -1 -1 -1 -1 -1 -1 255 255) ;80
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2041 ( 82 80 -1 77 -1 -1 -1 -1 -1 -1 255 255) ;81
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2042 ( -1 81 -1 78 -1 -1 -1 -1 -1 -1 255 255) ;82
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2043 ( 84 -1 -1 -1 -1 59 -1 -1 -1 -1 255 255) ;83
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2044 ( -1 83 85 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;84
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2045 ( 86 -1 87 84 -1 -1 -1 -1 -1 -1 -1 -1 ) ;85
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2046 ( -1 85 88 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;86
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2047 ( 88 -1 -1 85 -1 -1 -1 -1 -1 -1 -1 -1 ) ;87
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2048 ( -1 87 255 86 -1 -1 -1 -1 -1 -1 -1 -1 ) ;88
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2049 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 -1 ) ;89
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2050 ( 91 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;90
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2051 ( 92 90 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;91
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2052 ( -1 91 -1 -1 -1 -1 -1 -1 93 94 -1 -1 ) ;92
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2053 ( -1 -1 -1 88 -1 -1 -1 -1 -1 92 -1 -1 ) ;93
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2054 ( -1 -1 -1 -1 95 -1 -1 -1 92 -1 -1 -1 ) ;94
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2055 ( -1 -1 -1 -1 -1 -1 -1 94 -1 -1 -1 -1 ) ;95
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2056 ( 97 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;96
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2057 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;97
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2058 ( 99 97 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;98
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2059 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;99
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2060 ( 101 99 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;100
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2061 ( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;101
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2062 ( 103 101 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;102
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2063 ( -1 102 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;103
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2064 ( 51 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;104
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2065 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2066 ; no so ea we ne se nw sw up do in ot
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2067 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2068
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2069
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2070 ;;; How the user references *all* objects, permanent and regular.
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2071 (setq dun-objnames '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2072 (shovel . 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2073 (lamp . 1)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2074 (cpu . 2) (board . 2) (card . 2)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2075 (food . 3)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2076 (key . 4)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2077 (paper . 5)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2078 (rms . 6) (statue . 6) (statuette . 6) (stallman . 6)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2079 (diamond . 7)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2080 (weight . 8)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2081 (life . 9) (preserver . 9)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2082 (bracelet . 10) (emerald . 10)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2083 (gold . 11)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2084 (platinum . 12)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2085 (towel . 13) (beach . 13)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2086 (axe . 14)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2087 (silver . 15)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2088 (license . 16)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2089 (coins . 17)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2090 (egg . 18)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2091 (jar . 19)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2092 (bone . 20)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2093 (acid . 21) (nitric . 21)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2094 (glycerine . 22)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2095 (ruby . 23)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2096 (amethyst . 24)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2097 (mona . 25)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2098 (bill . 26)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2099 (floppy . 27) (disk . 27)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2100
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2101 (boulder . -1)
13076
b2191b493c1b (dun-climb): Handle unknown object name.
Richard M. Stallman <rms@gnu.org>
parents: 4697
diff changeset
2102 (tree . -2) (trees . -2) (palm . -2)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2103 (bear . -3)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2104 (bin . -4) (bins . -4)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2105 (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2106 (protoplasm . -6)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2107 (dial . -7)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2108 (button . -8)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2109 (chute . -9)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2110 (painting . -10)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2111 (bed . -11)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2112 (urinal . -12)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2113 (URINE . -13)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2114 (pipes . -14) (pipe . -14)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2115 (box . -15) (slit . -15)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2116 (cable . -16) (ethernet . -16)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2117 (mail . -17) (drop . -17)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2118 (bus . -18)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2119 (gate . -19)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2120 (cliff . -20)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2121 (skeleton . -21) (dinosaur . -21)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2122 (fish . -22)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2123 (tanks . -23)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2124 (switch . -24)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2125 (blackboard . -25)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2126 (disposal . -26) (garbage . -26)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2127 (ladder . -27)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2128 (subway . -28) (train . -28)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2129 (pc . -29) (drive . -29)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2130 ))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2131
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2132 (dolist (x dun-objnames)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2133 (let (name)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2134 (setq name (concat "obj-" (prin1-to-string (car x))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2135 (eval (list 'defconst (intern name) (cdr x)))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2136
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2137 (defconst obj-special 255)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2138
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2139 ;;; The initial setup of what objects are in each room.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2140 ;;; Regular objects have whole numbers lower than 255.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2141 ;;; Objects that cannot be taken but might move and are
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2142 ;;; described during room description are negative.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2143 ;;; Stuff that is described and might change are 255, and are
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2144 ;;; handled specially by 'dun-describe-room.
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2145
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2146 (setq dun-room-objects (list nil
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2147
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2148 (list obj-shovel) ;; treasure-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2149 (list obj-boulder) ;; dead-end
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2150 nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2151 (list obj-food) ;; se-nw-road
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2152 (list obj-bear) ;; bear-hangout
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2153 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2154 (list obj-special) ;; computer-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2155 (list obj-lamp obj-license obj-silver);; meadow
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2156 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2157 (list obj-special) ;; sauna
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2158 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2159 (list obj-weight obj-life) ;; weight-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2160 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2161 (list obj-rms obj-floppy) ;; thirsty-maze
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2162 nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2163 (list obj-emerald) ;; hidden-area
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2164 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2165 (list obj-gold) ;; misty-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2166 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2167 (list obj-towel obj-special) ;; red-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2168 nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2169 (list obj-box) ;; stair-landing
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2170 nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2171 (list obj-axe) ;; smal-crawlspace
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2172 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2173 nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2174 (list obj-special) ;; fourth-vermont-intersection
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2175 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2176 (list obj-coins) ;; fifth-oaktree-intersection
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2177 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2178 (list obj-bus) ;; fifth-sycamore-intersection
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2179 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2180 (list obj-bone) ;; museum-lobby
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2181 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2182 (list obj-jar obj-special obj-ruby) ;; marine-life-area
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2183 (list obj-nitric) ;; maintenance-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2184 (list obj-glycerine) ;; classroom
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2185 nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2186 (list obj-amethyst) ;; bottom-of-subway-stairs
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2187 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2188 (list obj-special) ;; question-room-1
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2189 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2190 (list obj-special) ;; question-room-2
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2191 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2192 (list obj-special) ;; question-room-three
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2193 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2194 (list obj-mona) ;; winner's-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2195 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2196 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2197 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2198 nil))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2199
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2200 ;;; These are objects in a room that are only described in the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2201 ;;; room description. They are permanent.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2202
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2203 (setq dun-room-silents (list nil
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2204 (list obj-tree) ;; dead-end
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2205 (list obj-tree) ;; e-w-dirt-road
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2206 nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2207 (list obj-bin) ;; mailroom
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2208 (list obj-computer) ;; computer-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2209 nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2210 (list obj-dial) ;; sauna
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2211 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2212 (list obj-ladder) ;; weight-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2213 (list obj-button obj-ladder) ;; maze-button-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2214 nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2215 nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2216 (list obj-chute) ;; cave-entrance
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2217 nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2218 (list obj-painting obj-bed) ;; bedroom
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2219 (list obj-urinal obj-pipes) ;; bathroom
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2220 nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2221 (list obj-boulder) ;; horseshoe-boulder-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2222 nil nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2223 (list obj-computer obj-cable) ;; gamma-computing-center
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2224 (list obj-mail) ;; post-office
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2225 (list obj-gate) ;; main-maple-intersection
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2226 nil nil nil nil nil nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2227 nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2228 (list obj-cliff) ;; fifth-oaktree-intersection
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2229 nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2230 (list obj-dinosaur) ;; museum-lobby
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2231 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2232 (list obj-fish obj-tanks) ;; marine-life-area
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2233 (list obj-switch) ;; maintenance-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2234 (list obj-blackboard) ;; classroom
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2235 (list obj-train) ;; vermont-station
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2236 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2237 (list obj-disposal) ;; north-end-of-n-s-tunnel
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2238 nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2239 (list obj-computer) ;; endgame-computer-room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2240 nil nil nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2241 (list obj-pc) ;; pc-area
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2242 nil nil nil nil nil nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2243 ))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2244 (setq dun-inventory '(1))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2245
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2246 ;;; Descriptions of objects, as they appear in the room description, and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2247 ;;; the inventory.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2248
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2249 (setq dun-objects '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2250 ("There is a shovel here." "A shovel") ;0
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2251 ("There is a lamp nearby." "A lamp") ;1
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2252 ("There is a CPU card here." "A computer board") ;2
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2253 ("There is some food here." "Some food") ;3
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2254 ("There is a shiny brass key here." "A brass key") ;4
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2255 ("There is a slip of paper here." "A slip of paper") ;5
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2256 ("There is a wax statuette of Richard Stallman here." ;6
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2257 "An RMS statuette")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2258 ("There is a shimmering diamond here." "A diamond") ;7
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2259 ("There is a 10 pound weight here." "A weight") ;8
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2260 ("There is a life preserver here." "A life preserver");9
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2261 ("There is an emerald bracelet here." "A bracelet") ;10
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2262 ("There is a gold bar here." "A gold bar") ;11
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2263 ("There is a platinum bar here." "A platinum bar") ;12
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2264 ("There is a beach towel on the ground here." "A beach towel")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2265 ("There is an axe here." "An axe") ;14
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2266 ("There is a silver bar here." "A silver bar") ;15
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2267 ("There is a bus driver's license here." "A license") ;16
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2268 ("There are some valuable coins here." "Some valuable coins")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2269 ("There is a jewel-encrusted egg here." "A valuable egg") ;18
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2270 ("There is a glass jar here." "A glass jar") ;19
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2271 ("There is a dinosaur bone here." "A bone") ;20
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2272 ("There is a packet of nitric acid here." "Some nitric acid")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2273 ("There is a packet of glycerine here." "Some glycerine") ;22
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2274 ("There is a valuable ruby here." "A ruby") ;23
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2275 ("There is a valuable amethyst here." "An amethyst") ;24
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2276 ("The Mona Lisa is here." "The Mona Lisa") ;25
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2277 ("There is a 100 dollar bill here." "A $100 bill") ;26
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2278 ("There is a floppy disk here." "A floppy disk") ;27
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2279 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2280 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2281
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2282 ;;; Weight of objects
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2283
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2284 (setq dun-object-lbs
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2285 '(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))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2286 (setq dun-object-pts
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2287 '(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))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2288
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2289
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2290 ;;; Unix representation of objects.
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2291 (setq dun-objfiles '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2292 "shovel.o" "lamp.o" "cpu.o" "food.o" "key.o" "paper.o"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2293 "rms.o" "diamond.o" "weight.o" "preserver.o" "bracelet.o"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2294 "gold.o" "platinum.o" "towel.o" "axe.o" "silver.o" "license.o"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2295 "coins.o" "egg.o" "jar.o" "bone.o" "nitric.o" "glycerine.o"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2296 "ruby.o" "amethyst.o"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2297 ))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2298
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2299 ;;; These are the descriptions for the negative numbered objects from
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2300 ;;; dun-room-objects
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2301
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2302 (setq dun-perm-objects '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2303 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2304 ("There is a large boulder here.")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2305 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2306 ("There is a ferocious bear here!")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2307 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2308 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2309 ("There is a worthless pile of protoplasm here.")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2310 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2311 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2312 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2313 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2314 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2315 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2316 ("There is a strange smell in this room.")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2317 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2318 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2319 "There is a box with a slit in it, bolted to the wall here."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2320 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2321 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2322 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2323 ("There is a bus here.")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2324 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2325 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2326 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2327 ))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2328
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2329
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2330 ;;; These are the descriptions the user gets when regular objects are
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2331 ;;; examined.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2332
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2333 (setq dun-physobj-desc '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2334 "It is a normal shovel with a price tag attached that says $19.99."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2335 "The lamp is hand-crafted by Geppetto."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2336 "The CPU board has a VAX chip on it. It seems to have
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2337 2 Megabytes of RAM onboard."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2338 "It looks like some kind of meat. Smells pretty bad."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2339 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2340 "The paper says: Don't forget to type 'help' for help. Also, remember
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2341 this word: 'worms'"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2342 "The statuette is of the likeness of Richard Stallman, the author of the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2343 famous EMACS editor. You notice that he is not wearing any shoes."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2344 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2345 "You observe that the weight is heavy."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2346 "It says S. S. Minnow."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2347 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2348 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2349 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2350 "It has a picture of snoopy on it."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2351 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2352 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2353 "It has your picture on it!"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2354 "They are old coins from the 19th century."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2355 "It is a valuable Fabrege egg."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2356 "It is a a plain glass jar."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2357 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2358 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2359 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2360 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2361 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2362 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2363 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2364
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2365 ;;; These are the descriptions the user gets when non-regular objects
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2366 ;;; are examined.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2367
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2368 (setq dun-permobj-desc '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2369 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2370 "It is just a boulder. It cannot be moved."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2371 "They are palm trees with a bountiful supply of coconuts in them."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2372 "It looks like a grizzly to me."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2373 "All of the bins are empty. Looking closely you can see that there
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2374 are names written at the bottom of each bin, but most of them are
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2375 faded away so that you cannot read them. You can only make out three
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2376 names:
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2377 Jeffrey Collier
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2378 Robert Toukmond
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2379 Thomas Stock
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2380 "
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2381 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2382 "It is just a garbled mess."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2383 "The dial points to a temperature scale which has long since faded away."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2384 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2385 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2386 "It is a velvet painting of Elvis Presly. It seems to be nailed to the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2387 wall, and you cannot move it."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2388 "It is a queen sized bed, with a very firm mattress."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2389 "The urinal is very clean compared with everything else in the cave. There
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2390 isn't even any rust. Upon close examination you realize that the drain at the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2391 bottom is missing, and there is just a large hole leading down the
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2392 pipes into nowhere. The hole is too small for a person to fit in. The
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2393 flush handle is so clean that you can see your reflection in it."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2394 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2395 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2396 "The box has a slit in the top of it, and on it, in sloppy handwriting, is
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2397 written: 'For key upgrade, put key in here.'"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2398 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2399 "It says 'express mail' on it."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2400 "It is a 35 passenger bus with the company name 'mobytours' on it."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2401 "It is a large metal gate that is too big to climb over."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2402 "It is a HIGH cliff."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2403 "Unfortunately you do not know enough about dinosaurs to tell very much about
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2404 it. It is very big, though."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2405 "The fish look like they were once quite beautiful."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2406 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2407 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2408 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2409 nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2410 "It is a normal ladder that is permanently attached to the hole."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2411 "It is a passenger train that is ready to go."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2412 "It is a personal computer that has only one floppy disk drive."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2413 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2414 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2415
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2416 (setq dun-diggables
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2417 (list nil nil nil (list obj-cpu) nil nil nil nil nil nil nil
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2418 nil nil nil nil nil nil nil nil nil nil ;11-20
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2419 nil nil nil nil nil nil nil nil nil nil ;21-30
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2420 nil nil nil nil nil nil nil nil nil nil ;31-40
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2421 nil (list obj-platinum) nil nil nil nil nil nil nil nil))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2422
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2423 (setq scroll-step 2)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2424
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2425 (setq dun-room-shorts nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2426 (dolist (x dun-rooms)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2427 (setq dun-room-shorts
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2428 (append dun-room-shorts (list (downcase
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2429 (dun-space-to-hyphen
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2430 (cadr x)))))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2431
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2432 (setq dun-endgame-questions '(
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2433 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2434 "What is your password on the machine called 'pokey'?" "robert")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2435 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2436 "What password did you use during anonymous ftp to gamma?" "foo")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2437 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2438 "Excluding the endgame, how many places are there where you can put
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2439 treasures for points?" "4" "four")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2440 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2441 "What is your login name on the 'endgame' machine?" "toukmond"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2442 )
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2443 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2444 "What is the nearest whole dollar to the price of the shovel?" "20" "twenty")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2445 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2446 "What is the name of the bus company serving the town?" "mobytours")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2447 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2448 "Give either of the two last names in the mailroom, other than your own."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2449 "collier" "stock")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2450 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2451 "What cartoon character is on the towel?" "snoopy")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2452 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2453 "What is the last name of the author of EMACS?" "stallman")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2454 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2455 "How many megabytes of memory is on the CPU board for the Vax?" "2")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2456 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2457 "Which street in town is named after a U.S. state?" "vermont")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2458 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2459 "How many pounds did the weight weigh?" "ten" "10")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2460 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2461 "Name the STREET which runs right over the subway stop." "fourth" "4" "4th")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2462 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2463 "How many corners are there in town (excluding the one with the Post Office)?"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2464 "24" "twentyfour" "twenty-four")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2465 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2466 "What type of bear was hiding your key?" "grizzly")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2467 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2468 "Name either of the two objects you found by digging." "cpu" "card" "vax"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2469 "board" "platinum")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2470 (
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2471 "What network protocol is used between pokey and gamma?" "tcp/ip" "ip" "tcp")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2472 ))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2473
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2474 (let (a)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2475 (setq a 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2476 (dolist (x dun-room-shorts)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2477 (eval (list 'defconst (intern x) a))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2478 (setq a (+ a 1))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2479
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2480
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2481
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2482 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2483 ;;;; This section defines the UNIX emulation functions for dunnet.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2484 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2485
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2486 (defun dun-unix-parse (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2487 (interactive "*p")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2488 (beginning-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2489 (let (beg esign)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2490 (setq beg (+ (point) 2))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2491 (end-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2492 (if (and (not (= beg (point)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2493 (string= "$" (buffer-substring (- beg 2) (- beg 1))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2494 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2495 (setq line (downcase (buffer-substring beg (point))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2496 (princ line)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2497 (if (eq (dun-parse2 nil dun-unix-verbs line) -1)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2498 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2499 (if (setq esign (string-match "=" line))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2500 (dun-doassign line esign)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2501 (dun-mprinc (car line-list))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2502 (dun-mprincl ": not found.")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2503 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2504 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2505 (if (eq dungeon-mode 'unix)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2506 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2507 (dun-fix-screen)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2508 (dun-mprinc "$ ")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2509
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2510 (defun dun-doassign (line esign)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2511 (if (not dun-wizard)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2512 (let (passwd)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2513 (dun-mprinc "Enter wizard password: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2514 (setq passwd (dun-read-line))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2515 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2516 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2517 (if (string= passwd "moby")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2518 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2519 (setq dun-wizard t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2520 (dun-doassign line esign))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2521 (dun-mprincl "Incorrect.")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2522
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2523 (let (varname epoint afterq i value)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2524 (setq varname (substring line 0 esign))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2525 (if (not (setq epoint (string-match ")" line)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2526 (if (string= (substring line (1+ esign) (+ esign 2))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2527 "\"")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2528 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2529 (setq afterq (substring line (+ esign 2)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2530 (setq epoint (+
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2531 (string-match "\"" afterq)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2532 (+ esign 3))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2533
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2534 (if (not (setq epoint (string-match " " line)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2535 (setq epoint (length line))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2536 (setq epoint (1+ epoint))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2537 (while (and
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2538 (not (= epoint (length line)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2539 (setq i (string-match ")" (substring line epoint))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2540 (setq epoint (+ epoint i 1))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2541 (setq value (substring line (1+ esign) epoint))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2542 (dun-eval varname value))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2543
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2544 (defun dun-eval (varname value)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2545 (let (eval-error)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2546 (switch-to-buffer (get-buffer-create "*dungeon-eval*"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2547 (erase-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2548 (insert "(setq ")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2549 (insert varname)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2550 (insert " ")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2551 (insert value)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2552 (insert ")")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2553 (setq eval-error nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2554 (condition-case nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2555 (eval-current-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2556 (error (setq eval-error t)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2557 (kill-buffer (current-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2558 (switch-to-buffer "*dungeon*")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2559 (if eval-error
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2560 (dun-mprincl "Invalid syntax."))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2561
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2562
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2563 (defun dun-unix-interface ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2564 (dun-login)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2565 (if dun-logged-in
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2566 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2567 (setq dungeon-mode 'unix)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2568 (define-key dungeon-mode-map "\r" 'dun-unix-parse)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2569 (dun-mprinc "$ "))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2570
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2571 (defun dun-login ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2572 (let (tries username password)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2573 (setq tries 4)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2574 (while (and (not dun-logged-in) (> (setq tries (- tries 1)) 0))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2575 (dun-mprinc "\n\nUNIX System V, Release 2.2 (pokey)\n\nlogin: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2576 (setq username (dun-read-line))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2577 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2578 (dun-mprinc "\n"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2579 (dun-mprinc "password: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2580 (setq password (dun-read-line))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2581 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2582 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2583 (if (or (not (string= username "toukmond"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2584 (not (string= password "robert")))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2585 (dun-mprincl "login incorrect")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2586 (setq dun-logged-in t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2587 (dun-mprincl "
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2588 Welcome to Unix\n
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2589 Please clean up your directories. The filesystem is getting full.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2590 Our tcp/ip link to gamma is a little flakey, but seems to work.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2591 The current version of ftp can only send files from the current
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2592 directory, and deletes them after they are sent! Be careful.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2593
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2594 Note: Restricted bourne shell in use.\n")))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2595 (setq dungeon-mode 'dungeon)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2596
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2597 (defun dun-ls (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2598 (if (car args)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2599 (let (ocdpath ocdroom)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2600 (setq ocdpath dun-cdpath)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2601 (setq ocdroom dun-cdroom)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2602 (if (not (eq (dun-cd args) -2))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2603 (dun-ls nil))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2604 (setq dun-cdpath ocdpath)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2605 (setq dun-cdroom ocdroom))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2606 (if (= dun-cdroom -10)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2607 (dun-ls-inven))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2608 (if (= dun-cdroom -2)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2609 (dun-ls-rooms))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2610 (if (= dun-cdroom -3)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2611 (dun-ls-root))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2612 (if (= dun-cdroom -4)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2613 (dun-ls-usr))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2614 (if (> dun-cdroom 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2615 (dun-ls-room))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2616
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2617 (defun dun-ls-root ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2618 (dun-mprincl "total 4
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2619 drwxr-xr-x 3 root staff 512 Jan 1 1970 .
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2620 drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2621 drwxr-xr-x 3 root staff 2048 Jan 1 1970 usr
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2622 drwxr-xr-x 3 root staff 2048 Jan 1 1970 rooms"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2623
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2624 (defun dun-ls-usr ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2625 (dun-mprincl "total 4
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2626 drwxr-xr-x 3 root staff 512 Jan 1 1970 .
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2627 drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2628 drwxr-xr-x 3 toukmond restricted 512 Jan 1 1970 toukmond"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2629
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2630 (defun dun-ls-rooms ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2631 (dun-mprincl "total 16
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2632 drwxr-xr-x 3 root staff 512 Jan 1 1970 .
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2633 drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2634 (dolist (x dun-visited)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2635 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2636 "drwxr-xr-x 3 root staff 512 Jan 1 1970 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2637 (dun-mprincl (nth x dun-room-shorts))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2638
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2639 (defun dun-ls-room ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2640 (dun-mprincl "total 4
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2641 drwxr-xr-x 3 root staff 512 Jan 1 1970 .
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2642 drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2643 -rwxr-xr-x 3 root staff 2048 Jan 1 1970 description")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2644 (dolist (x (nth dun-cdroom dun-room-objects))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2645 (if (and (>= x 0) (not (= x 255)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2646 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2647 (dun-mprinc "-rwxr-xr-x 1 toukmond restricted 0 Jan 1 1970 ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2648 (dun-mprincl (nth x dun-objfiles))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2649
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2650 (defun dun-ls-inven ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2651 (dun-mprinc "total 467
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2652 drwxr-xr-x 3 toukmond restricted 512 Jan 1 1970 .
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2653 drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2654 (dolist (x dun-unix-verbs)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2655 (if (not (eq (car x) 'IMPOSSIBLE))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2656 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2657 (dun-mprinc"
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2658 -rwxr-xr-x 1 toukmond restricted 10423 Jan 1 1970 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2659 (dun-mprinc (car x)))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2660 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2661 (if (not dun-uncompressed)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2662 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2663 "-rwxr-xr-x 1 toukmond restricted 0 Jan 1 1970 paper.o.Z"))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2664 (dolist (x dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2665 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2666 "-rwxr-xr-x 1 toukmond restricted 0 Jan 1 1970 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2667 (dun-mprincl (nth x dun-objfiles))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2668
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2669 (defun dun-echo (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2670 (let (nomore var)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2671 (setq nomore nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2672 (dolist (x args)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2673 (if (not nomore)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2674 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2675 (if (not (string= (substring x 0 1) "$"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2676 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2677 (dun-mprinc x)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2678 (dun-mprinc " "))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2679 (setq var (intern (substring x 1)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2680 (if (not (boundp var))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2681 (dun-mprinc " ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2682 (if (member var dun-restricted)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2683 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2684 (dun-mprinc var)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2685 (dun-mprinc ": Permission denied")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2686 (setq nomore t))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2687 (eval (list 'dun-mprinc var))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2688 (dun-mprinc " ")))))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2689 (dun-mprinc "\n")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2690
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2691
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2692 (defun dun-ftp (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2693 (let (host username passwd ident newlist)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2694 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2695 (dun-mprincl "ftp: hostname required on command line.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2696 (setq host (intern (car args)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2697 (if (not (member host '(gamma dun-endgame)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2698 (dun-mprincl "ftp: Unknown host.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2699 (if (eq host 'dun-endgame)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2700 (dun-mprincl "ftp: connection to endgame not allowed")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2701 (if (not dun-ethernet)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2702 (dun-mprincl "ftp: host not responding.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2703 (dun-mprincl "Connected to gamma. FTP ver 0.9 00:00:00 01/01/70")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2704 (dun-mprinc "Username: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2705 (setq username (dun-read-line))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2706 (if (string= username "toukmond")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2707 (if dun-batch-mode
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2708 (dun-mprincl "toukmond ftp access not allowed.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2709 (dun-mprincl "\ntoukmond ftp access not allowed."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2710 (if (string= username "anonymous")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2711 (if dun-batch-mode
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2712 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2713 "Guest login okay, send your user ident as password.")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2714 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2715 "\nGuest login okay, send your user ident as password."))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2716 (if dun-batch-mode
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2717 (dun-mprinc "Password required for ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2718 (dun-mprinc "\nPassword required for "))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2719 (dun-mprincl username))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2720 (dun-mprinc "Password: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2721 (setq ident (dun-read-line))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2722 (if (not (string= username "anonymous"))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2723 (if dun-batch-mode
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2724 (dun-mprincl "Login failed.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2725 (dun-mprincl "\nLogin failed."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2726 (if dun-batch-mode
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2727 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2728 "Guest login okay, user access restrictions apply.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2729 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2730 "\nGuest login okay, user access restrictions apply."))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2731 (dun-ftp-commands)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2732 (setq newlist
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2733 '("What password did you use during anonymous ftp to gamma?"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2734 (setq newlist (append newlist (list ident)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2735 (rplaca (nthcdr 1 dun-endgame-questions) newlist)))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2736
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2737 (defun dun-ftp-commands ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2738 (setq dun-exitf nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2739 (let (line)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2740 (while (not dun-exitf)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2741 (dun-mprinc "ftp> ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2742 (setq line (dun-read-line))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2743 (if
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2744 (eq
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2745 (dun-parse2 nil
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2746 '((type . dun-ftptype) (binary . dun-bin) (bin . dun-bin)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2747 (send . dun-send) (put . dun-send) (quit . dun-ftpquit)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2748 (help . dun-ftphelp)(ascii . dun-fascii)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2749 ) line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2750 -1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2751 (dun-mprincl "No such command. Try help.")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2752 (setq dun-ftptype 'ascii)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2753
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2754 (defun dun-ftptype (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2755 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2756 (dun-mprincl "Usage: type [binary | ascii]")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2757 (setq args (intern (car args)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2758 (if (eq args 'binary)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2759 (dun-bin nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2760 (if (eq args 'ascii)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2761 (dun-fascii 'nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2762 (dun-mprincl "Unknown type.")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2763
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2764 (defun dun-bin (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2765 (dun-mprincl "Type set to binary.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2766 (setq dun-ftptype 'binary))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2767
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2768 (defun dun-fascii (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2769 (dun-mprincl "Type set to ascii.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2770 (setq dun-ftptype 'ascii))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2771
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2772 (defun dun-ftpquit (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2773 (setq dun-exitf t))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2774
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2775 (defun dun-send (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2776 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2777 (dun-mprincl "Usage: send <filename>")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2778 (setq args (car args))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2779 (let (counter foo)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2780 (setq foo nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2781 (setq counter 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2782
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2783 ;;; User can send commands! Stupid user.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2784
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2785
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2786 (if (assq (intern args) dun-unix-verbs)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2787 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2788 (rplaca (assq (intern args) dun-unix-verbs) 'IMPOSSIBLE)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2789 (dun-mprinc "Sending ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2790 (dun-mprinc dun-ftptype)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2791 (dun-mprinc " file for ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2792 (dun-mprincl args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2793 (dun-mprincl "Transfer complete."))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2794
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2795 (dolist (x dun-objfiles)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2796 (if (string= args x)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2797 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2798 (if (not (member counter dun-inventory))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2799 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2800 (dun-mprincl "No such file.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2801 (setq foo t))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2802 (dun-mprinc "Sending ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2803 (dun-mprinc dun-ftptype)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2804 (dun-mprinc " file for ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2805 (dun-mprinc (downcase (cadr (nth counter dun-objects))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2806 (dun-mprincl ", (0 bytes)")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2807 (if (not (eq dun-ftptype 'binary))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2808 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2809 (if (not (member obj-protoplasm
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2810 (nth receiving-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2811 dun-room-objects)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2812 (dun-replace dun-room-objects receiving-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2813 (append (nth receiving-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2814 dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2815 (list obj-protoplasm))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2816 (dun-remove-obj-from-inven counter))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2817 (dun-remove-obj-from-inven counter)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2818 (dun-replace dun-room-objects receiving-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2819 (append (nth receiving-room dun-room-objects)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2820 (list counter))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2821 (setq foo t)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2822 (dun-mprincl "Transfer complete."))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2823 (setq counter (+ 1 counter)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2824 (if (not foo)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2825 (dun-mprincl "No such file."))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2826
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2827 (defun dun-ftphelp (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2828 (dun-mprincl
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2829 "Possible commands are:\nsend quit type ascii binary help"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2830
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2831 (defun dun-uexit (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2832 (setq dungeon-mode 'dungeon)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2833 (dun-mprincl "\nYou step back from the console.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2834 (define-key dungeon-mode-map "\r" 'dun-parse)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2835 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2836 (dun-messages)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2837
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2838 (defun dun-pwd (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2839 (dun-mprincl dun-cdpath))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2840
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2841 (defun dun-uncompress (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2842 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2843 (dun-mprincl "Usage: uncompress <filename>")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2844 (setq args (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2845 (if (or dun-uncompressed
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2846 (and (not (string= args "paper.o"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2847 (not (string= args "paper.o.z"))))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2848 (dun-mprincl "Uncompress command failed.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2849 (setq dun-uncompressed t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2850 (setq dun-inventory (append dun-inventory (list obj-paper))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2851
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2852 (defun dun-rlogin (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2853 (let (passwd)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2854 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2855 (dun-mprincl "Usage: rlogin <hostname>")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2856 (setq args (car args))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2857 (if (string= args "endgame")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2858 (dun-rlogin-endgame)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2859 (if (not (string= args "gamma"))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2860 (dun-mprincl "No such host.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2861 (if (not dun-ethernet)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2862 (dun-mprincl "Host not responding.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2863 (dun-mprinc "Password: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2864 (setq passwd (dun-read-line))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2865 (if (not (string= passwd "worms"))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2866 (dun-mprincl "\nlogin incorrect")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2867 (dun-mprinc
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2868 "\nYou begin to feel strange for a moment, and you lose your items."
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2869 )
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2870 (dun-replace dun-room-objects computer-room
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2871 (append (nth computer-room dun-room-objects)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2872 dun-inventory))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2873 (setq dun-inventory nil)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2874 (setq dun-current-room receiving-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2875 (dun-uexit nil))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2876
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2877 (defun dun-cd (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2878 (let (tcdpath tcdroom path-elemants room-check)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2879 (if (not (car args))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2880 (dun-mprincl "Usage: cd <path>")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2881 (setq tcdpath dun-cdpath)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2882 (setq tcdroom dun-cdroom)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2883 (setq dun-badcd nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2884 (condition-case nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2885 (setq path-elements (dun-get-path (car args) nil))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2886 (error (dun-mprincl "Invalid path.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2887 (setq dun-badcd t)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2888 (dolist (pe path-elements)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2889 (unless dun-badcd
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2890 (if (not (string= pe "."))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2891 (if (string= pe "..")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2892 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2893 (if (> tcdroom 0) ;In a room
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2894 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2895 (setq tcdpath "/rooms")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2896 (setq tcdroom -2))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2897 ;In /rooms,/usr,root
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2898 (if (or
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2899 (= tcdroom -2) (= tcdroom -4)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2900 (= tcdroom -3))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2901 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2902 (setq tcdpath "/")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2903 (setq tcdroom -3))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2904 (if (= tcdroom -10) ;In /usr/toukmond
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2905 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2906 (setq tcdpath "/usr")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2907 (setq tcdroom -4))))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2908 (if (string= pe "/")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2909 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2910 (setq tcdpath "/")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2911 (setq tcdroom -3))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2912 (if (= tcdroom -4)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2913 (if (string= pe "toukmond")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2914 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2915 (setq tcdpath "/usr/toukmond")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2916 (setq tcdroom -10))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2917 (dun-nosuchdir))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2918 (if (= tcdroom -10)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2919 (dun-nosuchdir)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2920 (if (> tcdroom 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2921 (dun-nosuchdir)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2922 (if (= tcdroom -3)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2923 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2924 (if (string= pe "rooms")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2925 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2926 (setq tcdpath "/rooms")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2927 (setq tcdroom -2))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2928 (if (string= pe "usr")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2929 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2930 (setq tcdpath "/usr")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2931 (setq tcdroom -4))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2932 (dun-nosuchdir))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2933 (if (= tcdroom -2)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2934 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2935 (dolist (x dun-visited)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2936 (setq room-check
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2937 (nth x
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2938 dun-room-shorts))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2939 (if (string= room-check pe)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2940 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2941 (setq tcdpath
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2942 (concat "/rooms/" room-check))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2943 (setq tcdroom x))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2944 (if (= tcdroom -2)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2945 (dun-nosuchdir)))))))))))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2946 (if (not dun-badcd)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2947 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2948 (setq dun-cdpath tcdpath)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2949 (setq dun-cdroom tcdroom)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2950 0)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2951 -2))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2952
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2953 (defun dun-nosuchdir ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2954 (dun-mprincl "No such directory.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2955 (setq dun-badcd t))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2956
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2957 (defun dun-cat (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2958 (let (doto checklist)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2959 (if (not (setq args (car args)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2960 (dun-mprincl "Usage: cat <ascii-file-name>")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2961 (if (string-match "/" args)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2962 (dun-mprincl "cat: only files in current directory allowed.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2963 (if (and (> dun-cdroom 0) (string= args "description"))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2964 (dun-mprincl (car (nth dun-cdroom dun-rooms)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2965 (if (setq doto (string-match "\\.o" args))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2966 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2967 (if (= dun-cdroom -10)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2968 (setq checklist dun-inventory)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2969 (setq checklist (nth dun-cdroom dun-room-objects)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2970 (if (not (member (cdr
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2971 (assq (intern
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2972 (substring args 0 doto))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2973 dun-objnames))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2974 checklist))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2975 (dun-mprincl "File not found.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2976 (dun-mprincl "Ascii files only.")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2977 (if (assq (intern args) dun-unix-verbs)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2978 (dun-mprincl "Ascii files only.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2979 (dun-mprincl "File not found."))))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2980
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2981 (defun dun-zippy (args)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2982 (dun-mprincl (yow)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2983
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2984 (defun dun-rlogin-endgame ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2985 (if (not (= (dun-score nil) 90))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2986 (dun-mprincl
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2987 "You have not achieved enough points to connect to endgame.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2988 (dun-mprincl"\nWelcome to the endgame. You are a truly noble adventurer.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2989 (setq dun-current-room treasure-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2990 (setq dun-endgame t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2991 (dun-replace dun-room-objects endgame-treasure-room (list obj-bill))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2992 (dun-uexit nil)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2993
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2994
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2995 (random t)
4403
2d6328c324cd (dun-endgame-question, tcom, tloc):
Paul Eggert <eggert@twinsun.com>
parents: 4245
diff changeset
2996 (setq tloc (+ 60 (random 18)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2997 (dun-replace dun-room-objects tloc
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2998 (append (nth tloc dun-room-objects) (list 18)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
2999
4403
2d6328c324cd (dun-endgame-question, tcom, tloc):
Paul Eggert <eggert@twinsun.com>
parents: 4245
diff changeset
3000 (setq tcomb (+ 100 (random 899)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3001 (setq dun-combination (prin1-to-string tcomb))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3002
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3003 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3004 ;;;; This section defines the DOS emulation functions for dunnet
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3005 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3006
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3007 (defun dun-dos-parse (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3008 (interactive "*p")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3009 (beginning-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3010 (let (beg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3011 (setq beg (+ (point) 3))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3012 (end-of-line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3013 (if (not (= beg (point)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3014 (let (line)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3015 (setq line (downcase (buffer-substring beg (point))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3016 (princ line)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3017 (if (eq (dun-parse2 nil dun-dos-verbs line) -1)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3018 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3019 (sleep-for 1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3020 (dun-mprincl "Bad command or file name"))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3021 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3022 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3023 (if (eq dungeon-mode 'dos)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3024 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3025 (dun-fix-screen)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3026 (dun-dos-prompt)))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3027
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3028 (defun dun-dos-interface ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3029 (dun-dos-boot-msg)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3030 (setq dungeon-mode 'dos)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3031 (define-key dungeon-mode-map "\r" 'dun-dos-parse)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3032 (dun-dos-prompt))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3033
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3034 (defun dun-dos-type (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3035 (sleep-for 2)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3036 (if (setq args (car args))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3037 (if (string= args "foo.txt")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3038 (dun-dos-show-combination)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3039 (if (string= args "command.com")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3040 (dun-mprincl "Cannot type binary files")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3041 (dun-mprinc "File not found - ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3042 (dun-mprincl (upcase args))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3043 (dun-mprincl "Must supply file name")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3044
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3045 (defun dun-dos-invd (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3046 (sleep-for 1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3047 (dun-mprincl "Invalid drive specification"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3048
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3049 (defun dun-dos-dir (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3050 (sleep-for 1)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3051 (if (or (not (setq args (car args))) (string= args "\\"))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3052 (dun-mprincl "
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3053 Volume in drive A is FOO
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3054 Volume Serial Number is 1A16-08C9
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3055 Directory of A:\\
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3056
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3057 COMMAND COM 47845 04-09-91 2:00a
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3058 FOO TXT 40 01-20-93 1:01a
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3059 2 file(s) 47845 bytes
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3060 1065280 bytes free
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3061 ")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3062 (dun-mprincl "
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3063 Volume in drive A is FOO
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3064 Volume Serial Number is 1A16-08C9
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3065 Directory of A:\\
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3066
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3067 File not found")))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3068
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3069
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3070 (defun dun-dos-prompt ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3071 (dun-mprinc "A> "))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3072
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3073 (defun dun-dos-boot-msg ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3074 (sleep-for 3)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3075 (dun-mprinc "Current time is ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3076 (dun-mprincl (substring (current-time-string) 12 20))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3077 (dun-mprinc "Enter new time: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3078 (dun-read-line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3079 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3080 (dun-mprinc "\n")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3081
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3082 (defun dun-dos-spawn (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3083 (sleep-for 1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3084 (dun-mprincl "Cannot spawn subshell"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3085
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3086 (defun dun-dos-exit (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3087 (setq dungeon-mode 'dungeon)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3088 (dun-mprincl "\nYou power down the machine and step back.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3089 (define-key dungeon-mode-map "\r" 'dun-parse)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3090 (if (not dun-batch-mode)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3091 (dun-messages)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3092
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3093 (defun dun-dos-no-disk ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3094 (sleep-for 3)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3095 (dun-mprincl "Boot sector not found"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3096
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3097
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3098 (defun dun-dos-show-combination ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3099 (sleep-for 2)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3100 (dun-mprinc "\nThe combination is ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3101 (dun-mprinc dun-combination)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3102 (dun-mprinc ".\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3103
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3104 (defun dun-dos-nil (args))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3105
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3106
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3107 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3108 ;;;; This section defines the save and restore game functions for dunnet.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3109 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3110
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3111 (defun dun-save-game (filename)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3112 (if (not (setq filename (car filename)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3113 (dun-mprincl "You must supply a filename for the save.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3114 (if (file-exists-p filename)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3115 (delete-file filename))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3116 (setq dun-numsaves (1+ dun-numsaves))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3117 (dun-make-save-buffer)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3118 (dun-save-val "dun-current-room")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3119 (dun-save-val "dun-computer")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3120 (dun-save-val "dun-combination")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3121 (dun-save-val "dun-visited")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3122 (dun-save-val "dun-diggables")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3123 (dun-save-val "dun-key-level")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3124 (dun-save-val "dun-floppy")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3125 (dun-save-val "dun-numsaves")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3126 (dun-save-val "dun-numcmds")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3127 (dun-save-val "dun-logged-in")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3128 (dun-save-val "dungeon-mode")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3129 (dun-save-val "dun-jar")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3130 (dun-save-val "dun-lastdir")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3131 (dun-save-val "dun-black")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3132 (dun-save-val "dun-nomail")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3133 (dun-save-val "dun-unix-verbs")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3134 (dun-save-val "dun-hole")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3135 (dun-save-val "dun-uncompressed")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3136 (dun-save-val "dun-ethernet")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3137 (dun-save-val "dun-sauna-level")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3138 (dun-save-val "dun-room-objects")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3139 (dun-save-val "dun-room-silents")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3140 (dun-save-val "dun-inventory")
4697
7e513df4d806 (dun-save-game): Use correct name of endgame question.
Richard M. Stallman <rms@gnu.org>
parents: 4403
diff changeset
3141 (dun-save-val "dun-endgame-questions")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3142 (dun-save-val "dun-endgame")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3143 (dun-save-val "dun-cdroom")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3144 (dun-save-val "dun-cdpath")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3145 (dun-save-val "dun-correct-answer")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3146 (dun-save-val "dun-inbus")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3147 (if (dun-compile-save-out filename)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3148 (dun-mprincl "Error saving to file.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3149 (dun-do-logfile 'save nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3150 (switch-to-buffer "*dungeon*")
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3151 (princ "")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3152 (dun-mprincl "Done."))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3153
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3154 (defun dun-make-save-buffer ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3155 (switch-to-buffer (get-buffer-create "*save-dungeon*"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3156 (erase-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3157
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3158 (defun dun-compile-save-out (filename)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3159 (let (ferror)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3160 (setq ferror nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3161 (condition-case nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3162 (dun-rot13)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3163 (error (setq ferror t)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3164 (if (not ferror)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3165 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3166 (goto-char (point-min))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3167 (condition-case nil
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3168 (write-region 1 (point-max) filename nil 1)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3169 (error (setq ferror t)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3170 (kill-buffer (current-buffer))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3171 ferror))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3172
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3173
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3174 (defun dun-save-val (varname)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3175 (let (value)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3176 (setq varname (intern varname))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3177 (setq value (eval varname))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3178 (dun-minsert "(setq ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3179 (dun-minsert varname)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3180 (dun-minsert " ")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3181 (if (or (listp value)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3182 (symbolp value))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3183 (dun-minsert "'"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3184 (if (stringp value)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3185 (dun-minsert "\""))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3186 (dun-minsert value)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3187 (if (stringp value)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3188 (dun-minsert "\""))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3189 (dun-minsertl ")")))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3190
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3191
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3192 (defun dun-restore (args)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3193 (let (file)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3194 (if (not (setq file (car args)))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3195 (dun-mprincl "You must supply a filename.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3196 (if (not (dun-load-d file))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3197 (dun-mprincl "Could not load restore file.")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3198 (dun-mprincl "Done.")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3199 (setq room 0)))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3200
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3201
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3202 (defun dun-do-logfile (type how)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3203 (let (ferror newscore)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3204 (setq ferror nil)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3205 (switch-to-buffer (get-buffer-create "*score*"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3206 (erase-buffer)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3207 (condition-case nil
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3208 (insert-file-contents dun-log-file)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3209 (error (setq ferror t)))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3210 (unless ferror
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3211 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3212 (dun-minsert (current-time-string))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3213 (dun-minsert " ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3214 (dun-minsert (user-login-name))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3215 (dun-minsert " ")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3216 (if (eq type 'save)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3217 (dun-minsert "saved ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3218 (if (= (dun-endgame-score) 110)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3219 (dun-minsert "won ")
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3220 (if (not how)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3221 (dun-minsert "quit ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3222 (dun-minsert "killed by ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3223 (dun-minsert how)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3224 (dun-minsert " "))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3225 (dun-minsert "at ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3226 (dun-minsert (cadr (nth (abs room) dun-rooms)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3227 (dun-minsert ". score: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3228 (if (> (dun-endgame-score) 0)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3229 (dun-minsert (setq newscore (+ 90 (dun-endgame-score))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3230 (dun-minsert (setq newscore (dun-reg-score))))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3231 (dun-minsert " saves: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3232 (dun-minsert dun-numsaves)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3233 (dun-minsert " commands: ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3234 (dun-minsert dun-numcmds)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3235 (dun-minsert "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3236 (write-region 1 (point-max) dun-log-file nil 1))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3237 (kill-buffer (current-buffer))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3238
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3239
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3240 ;;;;
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3241 ;;;; These are functions, and function re-definitions so that dungeon can
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3242 ;;;; be run in batch mode.
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3243
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3244
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3245 (defun dun-batch-mprinc (arg)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3246 (if (stringp arg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3247 (send-string-to-terminal arg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3248 (send-string-to-terminal (prin1-to-string arg))))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3249
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3250
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3251 (defun dun-batch-mprincl (arg)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3252 (if (stringp arg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3253 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3254 (send-string-to-terminal arg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3255 (send-string-to-terminal "\n"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3256 (send-string-to-terminal (prin1-to-string arg))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3257 (send-string-to-terminal "\n")))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3258
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3259 (defun dun-batch-parse (dun-ignore dun-verblist line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3260 (setq line-list (dun-listify-string (concat line " ")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3261 (dun-doverb dun-ignore dun-verblist (car line-list) (cdr line-list)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3262
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3263 (defun dun-batch-parse2 (dun-ignore dun-verblist line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3264 (setq line-list (dun-listify-string2 (concat line " ")))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3265 (dun-doverb dun-ignore dun-verblist (car line-list) (cdr line-list)))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3266
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3267 (defun dun-batch-read-line ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3268 (read-from-minibuffer "" nil dungeon-batch-map))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3269
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3270
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3271 (defun dun-batch-loop ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3272 (setq dun-dead nil)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3273 (setq room 0)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3274 (while (not dun-dead)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3275 (if (eq dungeon-mode 'dungeon)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3276 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3277 (if (not (= room dun-current-room))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3278 (progn
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3279 (dun-describe-room dun-current-room)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3280 (setq room dun-current-room)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3281 (dun-mprinc ">")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3282 (setq line (downcase (dun-read-line)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3283 (if (eq (dun-vparse dun-ignore dun-verblist line) -1)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3284 (dun-mprinc "I don't understand that.\n"))))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3285
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3286 (defun dun-batch-dos-interface ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3287 (dun-dos-boot-msg)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3288 (setq dungeon-mode 'dos)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3289 (while (eq dungeon-mode 'dos)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3290 (dun-dos-prompt)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3291 (setq line (downcase (dun-read-line)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3292 (if (eq (dun-parse2 nil dun-dos-verbs line) -1)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3293 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3294 (sleep-for 1)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3295 (dun-mprincl "Bad command or file name"))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3296 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3297 (dun-mprinc "\n"))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3298
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3299 (defun dun-batch-unix-interface ()
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3300 (dun-login)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3301 (if dun-logged-in
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3302 (progn
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3303 (setq dungeon-mode 'unix)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3304 (while (eq dungeon-mode 'unix)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3305 (dun-mprinc "$ ")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3306 (setq line (downcase (dun-read-line)))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3307 (if (eq (dun-parse2 nil dun-unix-verbs line) -1)
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3308 (let (esign)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3309 (if (setq esign (string-match "=" line))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3310 (dun-doassign line esign)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3311 (dun-mprinc (car line-list))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3312 (dun-mprincl ": not found.")))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3313 (goto-char (point-max))
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3314 (dun-mprinc "\n"))))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3315
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3316 (defun dungeon-nil (arg)
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3317 "noop"
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3318 (interactive "*p"))
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3319
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3320 (defun dun-batch-dungeon ()
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3321 (load "dun-batch")
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3322 (setq dun-visited '(27))
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3323 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3324 (dun-batch-loop))
4033
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3325
431bc7d22c70 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3326 (unless (not noninteractive)
4075
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3327 (fset 'dun-mprinc 'dun-batch-mprinc)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3328 (fset 'dun-mprincl 'dun-batch-mprincl)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3329 (fset 'dun-vparse 'dun-batch-parse)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3330 (fset 'dun-parse2 'dun-batch-parse2)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3331 (fset 'dun-read-line 'dun-batch-read-line)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3332 (fset 'dun-dos-interface 'dun-batch-dos-interface)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3333 (fset 'dun-unix-interface 'dun-batch-unix-interface)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3334 (dun-mprinc "\n")
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3335 (setq dun-batch-mode t)
3a8e54f78c54 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4033
diff changeset
3336 (dun-batch-loop))
4193
97649642e730 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4075
diff changeset
3337
97649642e730 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 4075
diff changeset
3338