diff lisp/games/dunnet.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents b82b59fe008d
children b9518feda344
line wrap: on
line diff
--- a/lisp/games/dunnet.el	Mon Aug 13 09:00:04 2007 +0200
+++ b/lisp/games/dunnet.el	Mon Aug 13 09:02:59 2007 +0200
@@ -1,11 +1,10 @@
 ;;; dunnet.el --- Text adventure for Emacs
 
-;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
-
 ;; Author: Ron Schnell <ronnie@media.mit.edu>
 ;; Created: 25 Jul 1992
 ;; Version: 2.0
 ;; Keywords: games
+;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
 
 ;; This file is part of XEmacs.
 
@@ -20,11 +19,11 @@
 ;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
+;; along with XEmacs; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
-;;; Synched up with: FSF 19.34.
+;;; Synched up with: FSF 19.28.
 
 ;;; Commentary:
 
@@ -33,7 +32,7 @@
 
 ;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
 ;;;  The log file should be set for your system, and it must
-;;;  be writable by all.
+;;;  be writeable by all.
 
 
 (defvar dun-log-file "/usr/local/dunnet.score"
@@ -42,8 +41,7 @@
 (if nil
     (eval-and-compile (setq byte-compile-warnings nil)))
 
-(eval-when-compile
-  (require 'cl))
+(require 'cl)
 
 ;;;; Mode definitions for interactive mode
 
@@ -51,8 +49,6 @@
   "Major mode for running dunnet."
   (interactive)
   (text-mode)
-  (make-local-variable 'scroll-step)
-  (setq scroll-step 2)
   (use-local-map dungeon-mode-map)
   (setq major-mode 'dungeon-mode)
   (setq mode-name "Dungeon"))
@@ -429,22 +425,19 @@
 (defun dun-climb (obj)
   (let (objnum)
     (setq objnum (dun-objnum-from-args obj))
-    (cond ((null objnum)
-	   (dun-mprincl "I don't know that name."))
-	  ((and (not (eq objnum obj-special))
-		(not (member objnum (nth dun-current-room dun-room-objects)))
-		(not (member objnum (nth dun-current-room dun-room-silents)))
-		(not (member objnum dun-inventory)))
-	   (dun-mprincl "I don't see that here."))
-	  ((and (eq objnum obj-special)
-		(not (member obj-tree (nth dun-current-room dun-room-silents))))
-	   (dun-mprincl "There is nothing here to climb."))
-	  ((and (not (eq objnum obj-tree)) (not (eq objnum obj-special)))
-	   (dun-mprincl "You can't climb that."))
-	  (t
-	   (dun-mprincl
-	    "You manage to get about two feet up the tree and fall back down.  You
-notice that the tree is very unsteady.")))))
+    (if (and (not (= objnum obj-special))
+	     (not (member objnum (nth dun-current-room dun-room-objects)))
+	     (not (member objnum (nth dun-current-room dun-room-silents)))
+	     (not (member objnum dun-inventory)))
+	(dun-mprincl "I don't see that here.")
+      (if (and (= objnum obj-special)
+	       (not (member obj-tree (nth dun-current-room dun-room-silents))))
+	  (dun-mprincl "There is nothing here to climb.")
+	(if (and (not (= objnum obj-tree)) (not (= objnum obj-special)))
+	    (dun-mprincl "You can't climb that.")
+	  (dun-mprincl
+"You manage to get about two feet up the tree and fall back down.  You
+notice that the tree is very unsteady."))))))
 
 (defun dun-eat (obj)
   (let (objnum)
@@ -797,7 +790,7 @@
 (defun dun-sauna-heat ()
   (if (= dun-sauna-level 0)
       (dun-mprincl 
-       "The temperature has returned to normal room temperature."))
+       "The termperature has returned to normal room termperature."))
   (if (= dun-sauna-level 1)
       (dun-mprincl "It is now luke warm in here.  You begin to sweat."))
   (if (= dun-sauna-level 2)
@@ -1349,7 +1342,6 @@
 (defvar dungeon-mode-map nil)
 (setq dungeon-mode-map (make-sparse-keymap))
 (define-key dungeon-mode-map "\r" 'dun-parse)
-;; XEmacs
 (defvar dungeon-batch-map
   (let ((map (make-keymap))
         (n 32))
@@ -1928,7 +1920,7 @@
 		     (type . dun-type)  (insert . dun-put)
 		     (score . dun-score) (help . dun-help) (quit . dun-quit) 
 		     (read . dun-examine) (verbose . dun-long) 
-		     (urinate . dun-piss) (piss . dun-piss)	; censored
+		     (urinate . dun-piss) (piss . dun-piss)
 		     (flush . dun-flush) (sleep . dun-sleep) (lie . dun-sleep) 
 		     (x . dun-examine) (break . dun-break) (drive . dun-drive)
 		     (board . dun-in) (enter . dun-in) (turn . dun-turn)
@@ -2103,7 +2095,7 @@
 		 (floppy . 27) (disk . 27)
 		 
 		 (boulder . -1)
-		 (tree . -2) (trees . -2) (palm . -2) 
+		 (tree . -2) (trees . -2) 
 		 (bear . -3)
 		 (bin . -4) (bins . -4)
 		 (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5) 
@@ -2424,6 +2416,8 @@
 		  nil nil nil nil nil nil nil nil nil nil      ;31-40
 		  nil (list obj-platinum) nil nil nil nil nil nil nil nil))
 
+(setq scroll-step 2)
+
 (setq dun-room-shorts nil)
 (dolist (x dun-rooms)
   (setq dun-room-shorts  
@@ -2589,7 +2583,7 @@
 	(dun-mprincl "
 Welcome to Unix\n
 Please clean up your directories.  The filesystem is getting full.
-Our tcp/ip link to gamma is a little flaky, but seems to work.
+Our tcp/ip link to gamma is a little flakey, but seems to work.
 The current version of ftp can only send files from the current
 directory, and deletes them after they are sent!  Be careful.
 
@@ -2877,7 +2871,7 @@
 	      (dun-uexit nil))))))))
   
 (defun dun-cd (args)
-  (let (tcdpath tcdroom path-elements room-check)
+  (let (tcdpath tcdroom path-elemants room-check)
     (if (not (car args))
 	(dun-mprincl "Usage: cd <path>")
       (setq tcdpath dun-cdpath)
@@ -3336,5 +3330,3 @@
   (dun-mprinc "\n")
   (setq dun-batch-mode t)
   (dun-batch-loop))
-
-;;; dunnet.el ends here