Function: dun-move
dun-move is a byte-compiled function defined in dunnet.el.gz.
Signature
(dun-move DIR)
Source Code
;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-move (dir)
;; Uses the dungeon-map to figure out where we are going. If the
;; requested direction yields 255, we know something special is
;; supposed to happen, or perhaps you can't go that way unless
;; certain conditions are met.
(if (and (not (member dun-current-room dun-light-rooms))
(not (member obj-lamp dun-inventory))
(not (member obj-lamp (nth dun-current-room dun-room-objects))))
(progn
(dun-mprinc
"You trip over a grue and fall into a pit and break every bone in your
body.")
(dun-die "a grue"))
(setq dir (dun-movement dir))
(let (newroom)
(setq newroom (nth dir (nth dun-current-room dungeon-map)))
(if (eq newroom -1)
(dun-mprincl "You can't go that way.")
(if (eq newroom 255)
(dun-special-move dir)
(setq dun-room -1)
(setq dun-lastdir dir)
(if dun-inbus
(progn
(if (or (< newroom 58) (> newroom 83))
(dun-mprincl "The bus cannot go this way.")
(dun-mprincl
"The bus lurches ahead and comes to a screeching halt.")
(dun-remove-obj-from-room dun-current-room obj-bus)
(setq dun-current-room newroom)
(dun-replace dun-room-objects newroom
(append (nth newroom dun-room-objects)
(list obj-bus)))))
(setq dun-current-room newroom)))))))