X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=verbs.lisp;h=5b090e6e9769ab15b3cec62695be9c8745500ca8;hb=2624b2069897898a92d247cab9781989df240110;hp=39c66af586b1db27c8ec5d8e37c6706183476cc9;hpb=447a18ccfc600c416a481266ecac28cd2ecd720f;p=lifp.git diff --git a/verbs.lisp b/verbs.lisp index 39c66af..5b090e6 100644 --- a/verbs.lisp +++ b/verbs.lisp @@ -218,7 +218,7 @@ (defmethod go-to-dispatch ((dest door)) (unless (has dest :door) (return-from go-to-dispatch (call-next-method))) - (if (has dest :closed) (format nil "~a is closed." (the-name dest)) + (if (has dest :closed) (format nil "~a is closed." (the-name dest :capital t)) (run-action 'pass *args*))) (defaction pass (obj) @@ -334,6 +334,9 @@ (defaction enter (what) "You can't enter that.") +(defmethod enter ((door door)) + (go-to-dispatch door)) + (defaction climb (what) "You can't climb that.") @@ -375,7 +378,7 @@ (if (has obj :switchable) (progn (if (has obj :on) - (format nil "~a is already on." (the-name obj)) + (format nil "~a is already on." (the-name obj :capital t)) (progn (give obj :on) (when (run-action-after obj) "Done.")))) (call-next-method))) @@ -384,7 +387,7 @@ (if (has obj :switchable) (progn (if (hasnt obj :on) - (format nil "~a is already off." (the-name obj)) + (format nil "~a is already off." (the-name obj :capital t)) (progn (give obj :~on) (when (run-action-after obj) "Done.")))) (call-next-method))) @@ -451,7 +454,7 @@ (when (run-action-after obj) (format nil "You open ~a." (the-name obj)))) "It's locked.") - (format nil "~a is already open." (the-name obj)))) + (format nil "~a is already open." (the-name obj :capital t)))) (defaction close (obj) "You cannot close this.") @@ -464,7 +467,7 @@ (give obj :closed) (when (run-action-after obj) (format nil "You close ~a." (the-name obj)))) - (format nil "~a is already closed." (the-name obj)))) + (format nil "~a is already closed." (the-name obj :capital t)))) (defaction lock (obj key) "Not lockable.") @@ -475,9 +478,9 @@ (has obj :lockable)) (return-from lock (call-next-method))) (if (has obj :locked) - (format nil "~a is already locked." (the-name obj)) + (format nil "~a is already locked." (the-name obj :capital t)) (if (hasnt obj :closed) - (format nil "~a is not closed." (the-name obj)) + (format nil "~a is not closed." (the-name obj :capital t)) (if (with-keys obj key) (progn (give obj :locked) @@ -495,9 +498,9 @@ (has obj :lockable)) (return-from unlock (call-next-method))) (if (hasnt obj :locked) - (format nil "~a is already unlocked." (the-name obj)) + (format nil "~a is already unlocked." (the-name obj :capital t)) (if (hasnt obj :closed) - (format nil "~a is not closed." (the-name obj)) + (format nil "~a is not closed." (the-name obj :capital t)) (if (with-keys obj key) (progn (give obj :~locked)