Function: dun-break

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

Signature

(dun-break OBJ)

Source Code

;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-break (obj)
  (if (not (member obj-axe dun-inventory))
      (dun-mprincl "You have nothing you can use to break things.")
    (let ((objnum (dun-objnum-from-args-std obj)))
      (when objnum
	(cond
         ((member objnum dun-inventory)
          (dun-mprincl
"You take the object in your hands and swing the axe.  Unfortunately, you miss
the object and slice off your hand.  You bleed to death.")
          (dun-die "an axe"))
         ((not (or (member objnum (nth dun-current-room dun-room-objects))
                   (member objnum
                           (nth dun-current-room dun-room-silents))))
          (dun-mprincl "I don't see that here."))
         ((= objnum obj-cable)
          (dun-mprincl
"As you break the ethernet cable, everything starts to blur.  You collapse
for a moment, then straighten yourself up.\n")
          (dun-replace dun-room-objects gamma-computing-center
                       (append
                        (nth gamma-computing-center dun-room-objects)
                        dun-inventory))
          (if (member obj-key dun-inventory)
              (progn
                (setq dun-inventory (list obj-key))
                (dun-remove-obj-from-room gamma-computing-center obj-key))
            (setq dun-inventory nil))
          (setq dun-current-room computer-room)
          (setq dun-ethernet nil)
          (dun-mprincl "Connection closed.")
          (dun-unix-interface))
         ((< objnum 0)
          (dun-mprincl "Your axe shatters into a million pieces.")
          (dun-remove-obj-from-inven obj-axe))
         (t
          (dun-mprincl "Your axe breaks it into a million pieces.")
          (dun-remove-obj-from-room dun-current-room objnum)))))))