changeset 13076:b2191b493c1b

(dun-climb): Handle unknown object name. (dun-objnames): Add "palm" as alias for "tree".
author Richard M. Stallman <rms@gnu.org>
date Mon, 25 Sep 1995 18:20:30 +0000
parents 8a67628f4574
children 65092cab3f43
files lisp/play/dunnet.el
diffstat 1 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/dunnet.el	Mon Sep 25 14:55:02 1995 +0000
+++ b/lisp/play/dunnet.el	Mon Sep 25 18:20:30 1995 +0000
@@ -422,19 +422,22 @@
 (defun dun-climb (obj)
   (let (objnum)
     (setq objnum (dun-objnum-from-args obj))
-    (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."))))))
+    (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.")))))
 
 (defun dun-eat (obj)
   (let (objnum)
@@ -2096,7 +2099,7 @@
 		 (floppy . 27) (disk . 27)
 		 
 		 (boulder . -1)
-		 (tree . -2) (trees . -2) 
+		 (tree . -2) (trees . -2) (palm . -2) 
 		 (bear . -3)
 		 (bin . -4) (bins . -4)
 		 (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5)