Function: dun-special-move
dun-special-move is a byte-compiled function defined in dunnet.el.gz.
Signature
(dun-special-move DIR)
Source Code
;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-special-move (dir)
;; Movement in this direction causes something special to happen if the
;; right conditions exist. It may be that you can't go this way unless
;; you have a key, or a passage has been opened.
;; coding note: Each check of the current room is on the same 'if' level,
;; i.e. there aren't else's. If two rooms next to each other have
;; specials, and they are connected by specials, this could cause
;; a problem. Be careful when adding them to consider this, and
;; perhaps use else's.
(if (= dun-current-room building-front)
(if (not (member obj-key dun-inventory))
(dun-mprincl "You don't have a key that can open this door.")
(setq dun-current-room old-building-hallway))
(if (= dun-current-room north-end-of-cave-passage)
(let (combo)
(dun-mprincl
"You must type a 3 digit combination code to enter this room.")
(dun-mprinc "Enter it here: ")
(setq combo (dun-read-line))
(if (not dun-batch-mode)
(dun-mprinc "\n"))
(if (string= combo dun-combination)
(setq dun-current-room gamma-computing-center)
(dun-mprincl "Sorry, that combination is incorrect."))))
(if (= dun-current-room bear-hangout)
(if (member obj-bear (nth bear-hangout dun-room-objects))
(progn
(dun-mprinc
"The bear is very annoyed that you would be so presumptuous as to try
and walk right by it. He tells you so by tearing your head off.
")
(dun-die "a bear"))
(dun-mprincl "You can't go that way.")))
(if (= dun-current-room vermont-station)
(progn
(dun-mprincl
"As you board the train it immediately leaves the station. It is a very
bumpy ride. It is shaking from side to side, and up and down. You
sit down in one of the chairs in order to be more comfortable.")
(dun-mprincl
"\nFinally the train comes to a sudden stop, and the doors open, and some
force throws you out. The train speeds away.\n")
(setq dun-current-room museum-station)))
(if (= dun-current-room old-building-hallway)
(if (and (member obj-key dun-inventory)
(> dun-key-level 0))
(setq dun-current-room meadow)
(dun-mprincl "You don't have a key that can open this door.")))
(if (and (= dun-current-room maze-button-room)
(= dir (dun-movement 'northwest)))
(if (member obj-weight (nth maze-button-room dun-room-objects))
(setq dun-current-room 18)
(dun-mprincl "You can't go that way.")))
(if (and (= dun-current-room maze-button-room)
(= dir (dun-movement 'up)))
(if (member obj-weight (nth maze-button-room dun-room-objects))
(dun-mprincl "You can't go that way.")
(setq dun-current-room weight-room)))
(if (= dun-current-room classroom)
(dun-mprincl "The door is locked."))
(if (or (= dun-current-room lakefront-north)
(= dun-current-room lakefront-south))
(dun-swim nil))
(if (= dun-current-room reception-area)
(if (not (= dun-sauna-level 3))
(setq dun-current-room health-club-front)
(dun-mprincl
"As you exit the building, you notice some flames coming out of one of the
windows. Suddenly, the building explodes in a huge ball of fire. The flames
engulf you, and you burn to death.")
(dun-die "burning")))
(if (= dun-current-room red-room)
(if (not (member obj-towel (nth red-room dun-room-objects)))
(setq dun-current-room long-n-s-hallway)
(dun-mprincl "You can't go that way.")))
(if (and (> dir (dun-movement 'down))
(> dun-current-room gamma-computing-center)
(< dun-current-room museum-lobby))
(if (not (member obj-bus (nth dun-current-room dun-room-objects)))
(dun-mprincl "You can't go that way.")
(if (= dir (dun-movement 'in))
(if dun-inbus
(dun-mprincl
"You are already in the bus!")
(if (member obj-license dun-inventory)
(progn
(dun-mprincl
"You board the bus and get in the driver's seat.")
(setq dun-nomail t)
(setq dun-inbus t))
(dun-mprincl "You are not licensed for this type of vehicle.")))
(if (not dun-inbus)
(dun-mprincl "You are already off the bus!")
(dun-mprincl "You hop off the bus.")
(setq dun-inbus nil))))
(if (= dun-current-room fifth-oaktree-intersection)
(if (not dun-inbus)
(progn
(dun-mprincl "You fall down the cliff and land on your head.")
(dun-die "a cliff"))
(dun-mprincl
"The bus flies off the cliff, and plunges to the bottom, where it explodes.")
(dun-die "a bus accident")))
(if (= dun-current-room main-maple-intersection)
(progn
(if (not dun-inbus)
(dun-mprincl "The gate will not open.")
(dun-mprincl
"As the bus approaches, the gate opens and you drive through.")
(dun-remove-obj-from-room main-maple-intersection obj-bus)
(dun-replace dun-room-objects museum-entrance
(append (nth museum-entrance dun-room-objects)
(list obj-bus)))
(setq dun-current-room museum-entrance)))))
(if (= dun-current-room cave-entrance)
(progn
(dun-mprincl
"As you enter the room you hear a rumbling noise. You look back to see
huge rocks sliding down from the ceiling, and blocking your way out.\n")
(setq dun-current-room misty-room)))))