Function: dun-drop-check

dun-drop-check is a byte-compiled function defined in dunnet.el.gz.

Signature

(dun-drop-check OBJNUM)

Documentation

Dropping certain things causes things to happen.

Source Code

;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-drop-check (objnum)
  "Dropping certain things causes things to happen."
  (cond
   ((and (= objnum obj-food) (= dun-room bear-hangout)
         (member obj-bear (nth bear-hangout dun-room-objects)))
    (dun-mprincl
"The bear takes the food and runs away with it. He left something behind.")
    (dun-remove-obj-from-room dun-current-room obj-bear)
    (dun-remove-obj-from-room dun-current-room obj-food)
    (dun-replace dun-room-objects dun-current-room
                 (append (nth dun-current-room dun-room-objects)
                         (list obj-key))))

   ((and (= objnum obj-jar) (member obj-nitric dun-jar)
         (member obj-glycerine dun-jar))
    (dun-mprincl "As the jar impacts the ground it explodes into many pieces.")
    (setq dun-jar nil)
    (dun-remove-obj-from-room dun-current-room obj-jar)
    (when (= dun-current-room fourth-vermont-intersection)
      (setq dun-hole t)
      (setq dun-current-room vermont-station)
      (dun-mprincl
"The explosion causes a hole to open up in the ground, which you fall
through.")))

   ((and (= objnum obj-weight) (= dun-current-room maze-button-room))
    (dun-mprincl "A passageway opens."))))