projects
/
lifp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
upd advent.lisp so it works
[lifp.git]
/
verbs.lisp
diff --git
a/verbs.lisp
b/verbs.lisp
index 39c66af586b1db27c8ec5d8e37c6706183476cc9..dae175a5644a93a7833bd3569050444561a78563 100644
(file)
--- a/
verbs.lisp
+++ b/
verbs.lisp
@@
-205,7
+205,7
@@
\r
(defaction go-to (dir)
\r
(let ((destination (read-property *location* (property dir))))
\r
\r
(defaction go-to (dir)
\r
(let ((destination (read-property *location* (property dir))))
\r
- (if destination (exec go-to-dispatch (destination))
\r
+ (if destination (exec go-to-dispatch (destination)
:str t
)
\r
(if (provides *location* 'cant-go)
\r
(read-property *location* 'cant-go)
\r
"You can't go here."))))
\r
(if (provides *location* 'cant-go)
\r
(read-property *location* 'cant-go)
\r
"You can't go here."))))
\r
@@
-217,9
+217,10
@@
(go-to-room dest))
\r
\r
(defmethod go-to-dispatch ((dest door))
\r
(go-to-room dest))
\r
\r
(defmethod go-to-dispatch ((dest door))
\r
+ ;(format t "go-to-dispatch: ~a~%" dest)
\r
(unless (has dest :door) (return-from go-to-dispatch (call-next-method)))
\r
(unless (has dest :door) (return-from go-to-dispatch (call-next-method)))
\r
- (if (has dest :closed) (format nil "~a is closed." (the-name dest))
\r
- (run-action 'pass
*args*
)))
\r
+ (if (has dest :closed) (format nil "~a is closed." (the-name dest
:capital t
))
\r
+ (run-action 'pass
(list dest)
)))
\r
\r
(defaction pass (obj)
\r
"Something's wrong happened.")
\r
\r
(defaction pass (obj)
\r
"Something's wrong happened.")
\r
@@
-334,6
+335,9
@@
(defaction enter (what)
\r
"You can't enter that.")
\r
\r
(defaction enter (what)
\r
"You can't enter that.")
\r
\r
+(defmethod enter ((door door))
\r
+ (go-to-dispatch door))
\r
+
\r
(defaction climb (what)
\r
"You can't climb that.")
\r
\r
(defaction climb (what)
\r
"You can't climb that.")
\r
\r
@@
-375,7
+379,7
@@
(if (has obj :switchable)
\r
(progn
\r
(if (has obj :on)
\r
(if (has obj :switchable)
\r
(progn
\r
(if (has obj :on)
\r
- (format nil "~a is already on." (the-name obj))
\r
+ (format nil "~a is already on." (the-name obj
:capital t
))
\r
(progn (give obj :on)
\r
(when (run-action-after obj) "Done."))))
\r
(call-next-method)))
\r
(progn (give obj :on)
\r
(when (run-action-after obj) "Done."))))
\r
(call-next-method)))
\r
@@
-384,7
+388,7
@@
(if (has obj :switchable)
\r
(progn
\r
(if (hasnt obj :on)
\r
(if (has obj :switchable)
\r
(progn
\r
(if (hasnt obj :on)
\r
- (format nil "~a is already off." (the-name obj))
\r
+ (format nil "~a is already off." (the-name obj
:capital t
))
\r
(progn (give obj :~on)
\r
(when (run-action-after obj) "Done."))))
\r
(call-next-method)))
\r
(progn (give obj :~on)
\r
(when (run-action-after obj) "Done."))))
\r
(call-next-method)))
\r
@@
-451,7
+455,7
@@
(when (run-action-after obj)
\r
(format nil "You open ~a." (the-name obj))))
\r
"It's locked.")
\r
(when (run-action-after obj)
\r
(format nil "You open ~a." (the-name obj))))
\r
"It's locked.")
\r
- (format nil "~a is already open." (the-name obj))))
\r
+ (format nil "~a is already open." (the-name obj
:capital t
))))
\r
\r
(defaction close (obj)
\r
"You cannot close this.")
\r
\r
(defaction close (obj)
\r
"You cannot close this.")
\r
@@
-464,7
+468,7
@@
(give obj :closed)
\r
(when (run-action-after obj)
\r
(format nil "You close ~a." (the-name obj))))
\r
(give obj :closed)
\r
(when (run-action-after obj)
\r
(format nil "You close ~a." (the-name obj))))
\r
- (format nil "~a is already closed." (the-name obj))))
\r
+ (format nil "~a is already closed." (the-name obj
:capital t
))))
\r
\r
(defaction lock (obj key)
\r
"Not lockable.")
\r
\r
(defaction lock (obj key)
\r
"Not lockable.")
\r
@@
-475,9
+479,9
@@
(has obj :lockable))
\r
(return-from lock (call-next-method)))
\r
(if (has obj :locked)
\r
(has obj :lockable))
\r
(return-from lock (call-next-method)))
\r
(if (has obj :locked)
\r
- (format nil "~a is already locked." (the-name obj))
\r
+ (format nil "~a is already locked." (the-name obj
:capital t
))
\r
(if (hasnt obj :closed)
\r
(if (hasnt obj :closed)
\r
- (format nil "~a is not closed." (the-name obj))
\r
+ (format nil "~a is not closed." (the-name obj
:capital t
))
\r
(if (with-keys obj key)
\r
(progn
\r
(give obj :locked)
\r
(if (with-keys obj key)
\r
(progn
\r
(give obj :locked)
\r
@@
-495,9
+499,9
@@
(has obj :lockable))
\r
(return-from unlock (call-next-method)))
\r
(if (hasnt obj :locked)
\r
(has obj :lockable))
\r
(return-from unlock (call-next-method)))
\r
(if (hasnt obj :locked)
\r
- (format nil "~a is already unlocked." (the-name obj))
\r
+ (format nil "~a is already unlocked." (the-name obj
:capital t
))
\r
(if (hasnt obj :closed)
\r
(if (hasnt obj :closed)
\r
- (format nil "~a is not closed." (the-name obj))
\r
+ (format nil "~a is not closed." (the-name obj
:capital t
))
\r
(if (with-keys obj key)
\r
(progn
\r
(give obj :~locked)
\r
(if (with-keys obj key)
\r
(progn
\r
(give obj :~locked)
\r