(defvar dun-numsaves 0)
(defvar dun-jar nil)
(defvar dun-dead nil)
-(defvar room 0)
+(defvar dun-room 0)
(defvar dun-numcmds 0)
(defvar dun-wizard nil)
(defvar dun-endgame-question nil)
(if dun-dead
(text-mode)
(when (eq dungeon-mode 'dungeon)
- (when (not (= room dun-current-room))
+ (when (not (= dun-room dun-current-room))
(dun-describe-room dun-current-room)
- (setq room dun-current-room))
+ (setq dun-room dun-current-room))
(dun-fix-screen)
(dun-mprinc ">"))))
(switch-to-buffer "*dungeon*")
(dun-mode)
(setq dun-dead nil)
- (setq room 0)
+ (setq dun-room 0)
(dun-messages))
;;;;
(dun-mprincl "It is pitch dark. You are likely to be eaten by a grue.")
(dun-mprincl (cadr (nth (abs room) dun-rooms)))
(if (and (and (or (member room dun-visited)
- (string= dun-mode "dun-superb")) (> room 0))
+ (string= dun-mode "dun-superb"))
+ (> room 0))
(not (string= dun-mode "long")))
nil
(dun-mprinc (car (nth (abs room) dun-rooms)))
;;; Dropping certain things causes things to happen.
(defun dun-drop-check (objnum)
- (if (and (= objnum obj-food) (= room bear-hangout)
+ (if (and (= objnum obj-food) (= dun-room bear-hangout)
(member obj-bear (nth bear-hangout dun-room-objects)))
(progn
(dun-mprincl
(dun-mprinc "You can't go that way.\n")
(if (eq newroom 255)
(dun-special-move dir)
- (setq room -1)
+ (setq dun-room -1)
(setq dun-lastdir dir)
(if dun-inbus
(progn
(if (not (dun-load-d file))
(dun-mprincl "Could not load restore file.")
(dun-mprincl "Done.")
- (setq room 0)))))
+ (setq dun-room 0)))))
(defun dun-do-logfile (type how)
(dun-minsert how)
(dun-minsert " "))))
(dun-minsert "at ")
- (dun-minsert (cadr (nth (abs room) dun-rooms)))
+ (dun-minsert (cadr (nth (abs dun-room) dun-rooms)))
(dun-minsert ". score: ")
(if (> (dun-endgame-score) 0)
(dun-minsert (+ 90 (dun-endgame-score)))
(defun dun-batch-loop ()
(setq dun-dead nil)
- (setq room 0)
+ (setq dun-room 0)
(while (not dun-dead)
(if (eq dungeon-mode 'dungeon)
(progn
- (if (not (= room dun-current-room))
+ (if (not (= dun-room dun-current-room))
(progn
(dun-describe-room dun-current-room)
- (setq room dun-current-room)))
+ (setq dun-room dun-current-room)))
(dun-mprinc ">")
(setq line (downcase (dun-read-line)))
(if (eq (dun-vparse dun-ignore dun-verblist line) -1)