diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 8468936..ac451d1 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -56,10 +56,7 @@ (defun store (player &optional arg) "Store a jar of honey in the larder." - (let ((base-descr "This is your larder, a wooden cupboard with 12 compartments for your honey jars.") - (num-list '("one jar" "two jars" "three jars" "four jars" "five jars" - "six jars" "seven jars" "eight jars" "nine jars" - "ten jars" "eleven jars" "twelve jars")) + (let ((base-descr "This is your larder, a wooden cupboard with twelve compartments for your honey jars.") (current-jars (get-state 'HONEY-JARS))) (unless current-jars (setf current-jars 0)) (if (member "Hunny" (player-item player) :test #'equalp) @@ -69,8 +66,8 @@ (incf current-jars) (save-state 'HONEY-JARS current-jars) (setf (item-description (get-game-object 'item "Cupboard")) - (concatenate 'string base-descr (string #\Newline) "It contains " - (nth (1- current-jars) num-list) " of honey.")) + (format nil "~A~AIt contains ~D jar~:P of honey." + base-descr #\newline current-jars)) (when (= current-jars 12) (sleep 2) (format t "~&Your larder is now full!") (sleep 2) (format t "~&You lock it and put the key in your pocket.") (sleep 2) @@ -113,29 +110,28 @@ (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) -(let ((lost-in NIL)) - (defun lost-in-the-forest (player place prob) - "Walking through a forest, it's easy to end up going in circles..." - (when (> prob (random 100)) - ;; Make sure all neighbouring places have the is-lost hook - (dolist (p (place-neighbour (get-game-object 'place place))) - (let ((p (get-game-object 'place p))) - (when (zerop (length (place-entry-hook p))) - (set-object-attribute p 'entry-hook "is-lost")))) - ;; Set the lost-in variable to the current place - (setf lost-in place))) +(defun lost-in-the-forest (player place prob) + "Walking through a forest, it's easy to end up going in circles..." + (when (> prob (random 100)) + ;; Make sure all neighbouring places have the is-lost hook + (dolist (p (place-neighbour (get-game-object 'place place))) + (let ((p (get-game-object 'place p))) + (when (zerop (length (place-entry-hook p))) + (set-object-attribute p 'entry-hook "is-lost")))) + ;; Set the lost-in variable to the current place + (save-state 'LOST-IN place))) - (defun is-lost (player) - "Return the player to where he started from" - (when lost-in - (clear-screen) - (format t "~&Suddenly, you are no longer sure you are walking in the right") - (format t "~&direction. Perhaps you should keep more to your left. Or to") - (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!~%~%Please press ENTER") - (read-line) - (goto player lost-in) - (setf lost-in NIL)))) +(defun is-lost (player) + "Return the player to where he started from" + (when (get-state 'LOST-IN) + (clear-screen) + (format t "~&Suddenly, you are no longer sure you are walking in the right") + (format t "~&direction. Perhaps you should keep more to your left. Or to") + (format t "~&your right? The trees all look the same here...") + (format t "~&You are walking in circles!~%~%Please press ENTER") + (read-line) + (goto player (get-state 'LOST-IN)) + (save-state 'LOST-IN NIL))) (defun misty-forest (player) "A wrapper function for lost-in-the-forest for the misty forest location" @@ -440,23 +436,22 @@ (defun daniel-says (player) "Leave a message for the real me" ;;Make sure we're on my server - (unless (or (equalp (first (load-text-file "/etc/hostname")) "Helios") + (unless (and (equalp (first (load-text-file "/etc/hostname")) "Turing") (y-or-n-p "~&~%Daniel has more to say to you. Do you want to hear it?")) (return-from daniel-says)) (setf msg "~%DANIEL: Hi there! This is the 'real' Daniel speaking now... Great to see that you've gotten so far in the game! I've spent two years and many, many hours getting it into shape, so I'm very happy to have other people actually using it :-) -~%If you happen to be playing on my server at the moment, you can actually +~%Since you happen to be playing on my server at the moment, you can actually leave me a message if you like. I'll definitely read it, and would very much appreciate any feedback!") (format t msg) (when (y-or-n-p "~&~%Leave Daniel a message?") - (format t "~&~%What is your name?") - (input-string name) (setf message (lisp-ed)) (unless (null message) (write-to-file message - (string-from-list (list "../" name ".msg") "") T) + (string-from-list (list "../" (world-player-name *world*) + ".msg") :sep "") T) (format t "~&Thank you very much :-)")))) diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 8468936..ac451d1 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -56,10 +56,7 @@ (defun store (player &optional arg) "Store a jar of honey in the larder." - (let ((base-descr "This is your larder, a wooden cupboard with 12 compartments for your honey jars.") - (num-list '("one jar" "two jars" "three jars" "four jars" "five jars" - "six jars" "seven jars" "eight jars" "nine jars" - "ten jars" "eleven jars" "twelve jars")) + (let ((base-descr "This is your larder, a wooden cupboard with twelve compartments for your honey jars.") (current-jars (get-state 'HONEY-JARS))) (unless current-jars (setf current-jars 0)) (if (member "Hunny" (player-item player) :test #'equalp) @@ -69,8 +66,8 @@ (incf current-jars) (save-state 'HONEY-JARS current-jars) (setf (item-description (get-game-object 'item "Cupboard")) - (concatenate 'string base-descr (string #\Newline) "It contains " - (nth (1- current-jars) num-list) " of honey.")) + (format nil "~A~AIt contains ~D jar~:P of honey." + base-descr #\newline current-jars)) (when (= current-jars 12) (sleep 2) (format t "~&Your larder is now full!") (sleep 2) (format t "~&You lock it and put the key in your pocket.") (sleep 2) @@ -113,29 +110,28 @@ (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) -(let ((lost-in NIL)) - (defun lost-in-the-forest (player place prob) - "Walking through a forest, it's easy to end up going in circles..." - (when (> prob (random 100)) - ;; Make sure all neighbouring places have the is-lost hook - (dolist (p (place-neighbour (get-game-object 'place place))) - (let ((p (get-game-object 'place p))) - (when (zerop (length (place-entry-hook p))) - (set-object-attribute p 'entry-hook "is-lost")))) - ;; Set the lost-in variable to the current place - (setf lost-in place))) +(defun lost-in-the-forest (player place prob) + "Walking through a forest, it's easy to end up going in circles..." + (when (> prob (random 100)) + ;; Make sure all neighbouring places have the is-lost hook + (dolist (p (place-neighbour (get-game-object 'place place))) + (let ((p (get-game-object 'place p))) + (when (zerop (length (place-entry-hook p))) + (set-object-attribute p 'entry-hook "is-lost")))) + ;; Set the lost-in variable to the current place + (save-state 'LOST-IN place))) - (defun is-lost (player) - "Return the player to where he started from" - (when lost-in - (clear-screen) - (format t "~&Suddenly, you are no longer sure you are walking in the right") - (format t "~&direction. Perhaps you should keep more to your left. Or to") - (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!~%~%Please press ENTER") - (read-line) - (goto player lost-in) - (setf lost-in NIL)))) +(defun is-lost (player) + "Return the player to where he started from" + (when (get-state 'LOST-IN) + (clear-screen) + (format t "~&Suddenly, you are no longer sure you are walking in the right") + (format t "~&direction. Perhaps you should keep more to your left. Or to") + (format t "~&your right? The trees all look the same here...") + (format t "~&You are walking in circles!~%~%Please press ENTER") + (read-line) + (goto player (get-state 'LOST-IN)) + (save-state 'LOST-IN NIL))) (defun misty-forest (player) "A wrapper function for lost-in-the-forest for the misty forest location" @@ -440,23 +436,22 @@ (defun daniel-says (player) "Leave a message for the real me" ;;Make sure we're on my server - (unless (or (equalp (first (load-text-file "/etc/hostname")) "Helios") + (unless (and (equalp (first (load-text-file "/etc/hostname")) "Turing") (y-or-n-p "~&~%Daniel has more to say to you. Do you want to hear it?")) (return-from daniel-says)) (setf msg "~%DANIEL: Hi there! This is the 'real' Daniel speaking now... Great to see that you've gotten so far in the game! I've spent two years and many, many hours getting it into shape, so I'm very happy to have other people actually using it :-) -~%If you happen to be playing on my server at the moment, you can actually +~%Since you happen to be playing on my server at the moment, you can actually leave me a message if you like. I'll definitely read it, and would very much appreciate any feedback!") (format t msg) (when (y-or-n-p "~&~%Leave Daniel a message?") - (format t "~&~%What is your name?") - (input-string name) (setf message (lisp-ed)) (unless (null message) (write-to-file message - (string-from-list (list "../" name ".msg") "") T) + (string-from-list (list "../" (world-player-name *world*) + ".msg") :sep "") T) (format t "~&Thank you very much :-)")))) diff --git a/doc/TODO b/doc/TODO index dba742a..0c9390d 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,38 +2,6 @@ LISP * fix (string-from-list) bug -* replace 'equip' with 'hold' -* indicate weapon strength ATL * add game end sequence -* fix Daniel's interaction hook -* add more clues - - -Game crashed when moving from Deep Forest -> Central woods, with message -' is not a number' - - -NOTES - -Honey pots: - 1. Pooh's home - 2. Pooh's branch - 3. Rabbit's house - 4. Rock by the Rapids - 5. Heffalump - 6. Kanga's quest - 7. Eeyore's quest - 8. Piglet's quest - 9. Owl's quest - 10. Thoughtful spot - 11. Bee tree - 12. Cave - -Quests: - 1. Find the tail - 2. Bring jacket - 3. Bring mushrooms - 4. Uncle's picture - 5. Find Woozle diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 8468936..ac451d1 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -56,10 +56,7 @@ (defun store (player &optional arg) "Store a jar of honey in the larder." - (let ((base-descr "This is your larder, a wooden cupboard with 12 compartments for your honey jars.") - (num-list '("one jar" "two jars" "three jars" "four jars" "five jars" - "six jars" "seven jars" "eight jars" "nine jars" - "ten jars" "eleven jars" "twelve jars")) + (let ((base-descr "This is your larder, a wooden cupboard with twelve compartments for your honey jars.") (current-jars (get-state 'HONEY-JARS))) (unless current-jars (setf current-jars 0)) (if (member "Hunny" (player-item player) :test #'equalp) @@ -69,8 +66,8 @@ (incf current-jars) (save-state 'HONEY-JARS current-jars) (setf (item-description (get-game-object 'item "Cupboard")) - (concatenate 'string base-descr (string #\Newline) "It contains " - (nth (1- current-jars) num-list) " of honey.")) + (format nil "~A~AIt contains ~D jar~:P of honey." + base-descr #\newline current-jars)) (when (= current-jars 12) (sleep 2) (format t "~&Your larder is now full!") (sleep 2) (format t "~&You lock it and put the key in your pocket.") (sleep 2) @@ -113,29 +110,28 @@ (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) -(let ((lost-in NIL)) - (defun lost-in-the-forest (player place prob) - "Walking through a forest, it's easy to end up going in circles..." - (when (> prob (random 100)) - ;; Make sure all neighbouring places have the is-lost hook - (dolist (p (place-neighbour (get-game-object 'place place))) - (let ((p (get-game-object 'place p))) - (when (zerop (length (place-entry-hook p))) - (set-object-attribute p 'entry-hook "is-lost")))) - ;; Set the lost-in variable to the current place - (setf lost-in place))) +(defun lost-in-the-forest (player place prob) + "Walking through a forest, it's easy to end up going in circles..." + (when (> prob (random 100)) + ;; Make sure all neighbouring places have the is-lost hook + (dolist (p (place-neighbour (get-game-object 'place place))) + (let ((p (get-game-object 'place p))) + (when (zerop (length (place-entry-hook p))) + (set-object-attribute p 'entry-hook "is-lost")))) + ;; Set the lost-in variable to the current place + (save-state 'LOST-IN place))) - (defun is-lost (player) - "Return the player to where he started from" - (when lost-in - (clear-screen) - (format t "~&Suddenly, you are no longer sure you are walking in the right") - (format t "~&direction. Perhaps you should keep more to your left. Or to") - (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!~%~%Please press ENTER") - (read-line) - (goto player lost-in) - (setf lost-in NIL)))) +(defun is-lost (player) + "Return the player to where he started from" + (when (get-state 'LOST-IN) + (clear-screen) + (format t "~&Suddenly, you are no longer sure you are walking in the right") + (format t "~&direction. Perhaps you should keep more to your left. Or to") + (format t "~&your right? The trees all look the same here...") + (format t "~&You are walking in circles!~%~%Please press ENTER") + (read-line) + (goto player (get-state 'LOST-IN)) + (save-state 'LOST-IN NIL))) (defun misty-forest (player) "A wrapper function for lost-in-the-forest for the misty forest location" @@ -440,23 +436,22 @@ (defun daniel-says (player) "Leave a message for the real me" ;;Make sure we're on my server - (unless (or (equalp (first (load-text-file "/etc/hostname")) "Helios") + (unless (and (equalp (first (load-text-file "/etc/hostname")) "Turing") (y-or-n-p "~&~%Daniel has more to say to you. Do you want to hear it?")) (return-from daniel-says)) (setf msg "~%DANIEL: Hi there! This is the 'real' Daniel speaking now... Great to see that you've gotten so far in the game! I've spent two years and many, many hours getting it into shape, so I'm very happy to have other people actually using it :-) -~%If you happen to be playing on my server at the moment, you can actually +~%Since you happen to be playing on my server at the moment, you can actually leave me a message if you like. I'll definitely read it, and would very much appreciate any feedback!") (format t msg) (when (y-or-n-p "~&~%Leave Daniel a message?") - (format t "~&~%What is your name?") - (input-string name) (setf message (lisp-ed)) (unless (null message) (write-to-file message - (string-from-list (list "../" name ".msg") "") T) + (string-from-list (list "../" (world-player-name *world*) + ".msg") :sep "") T) (format t "~&Thank you very much :-)")))) diff --git a/doc/TODO b/doc/TODO index dba742a..0c9390d 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,38 +2,6 @@ LISP * fix (string-from-list) bug -* replace 'equip' with 'hold' -* indicate weapon strength ATL * add game end sequence -* fix Daniel's interaction hook -* add more clues - - -Game crashed when moving from Deep Forest -> Central woods, with message -' is not a number' - - -NOTES - -Honey pots: - 1. Pooh's home - 2. Pooh's branch - 3. Rabbit's house - 4. Rock by the Rapids - 5. Heffalump - 6. Kanga's quest - 7. Eeyore's quest - 8. Piglet's quest - 9. Owl's quest - 10. Thoughtful spot - 11. Bee tree - 12. Cave - -Quests: - 1. Find the tail - 2. Bring jacket - 3. Bring mushrooms - 4. Uncle's picture - 5. Find Woozle diff --git a/doc/bugreport.txt b/doc/bugreport.txt index 7b7f5aa..00b2a30 100644 --- a/doc/bugreport.txt +++ b/doc/bugreport.txt @@ -4,7 +4,7 @@ * Erklärung gut, bis auf: Speichern und Laden des putty-Setups (Namen eingeben, speichern und drauf klicken zum laden). - -> TODO + -> FIXED * Wäre es sinnvoll über ‚quit‘ putty nicht komplett zu beenden, sondern nur aufs Atlantis-Hauptmenü zurückzuführen? -> Won't fix @@ -35,3 +35,10 @@ Liebe Grüße, Chris + + +06/11/2017: +Game crashed when moving from Deep Forest to Central woods, with message +' is not a number' +-> Could not reproduce +-> but see above! (Heisenbug?) diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 8468936..ac451d1 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -56,10 +56,7 @@ (defun store (player &optional arg) "Store a jar of honey in the larder." - (let ((base-descr "This is your larder, a wooden cupboard with 12 compartments for your honey jars.") - (num-list '("one jar" "two jars" "three jars" "four jars" "five jars" - "six jars" "seven jars" "eight jars" "nine jars" - "ten jars" "eleven jars" "twelve jars")) + (let ((base-descr "This is your larder, a wooden cupboard with twelve compartments for your honey jars.") (current-jars (get-state 'HONEY-JARS))) (unless current-jars (setf current-jars 0)) (if (member "Hunny" (player-item player) :test #'equalp) @@ -69,8 +66,8 @@ (incf current-jars) (save-state 'HONEY-JARS current-jars) (setf (item-description (get-game-object 'item "Cupboard")) - (concatenate 'string base-descr (string #\Newline) "It contains " - (nth (1- current-jars) num-list) " of honey.")) + (format nil "~A~AIt contains ~D jar~:P of honey." + base-descr #\newline current-jars)) (when (= current-jars 12) (sleep 2) (format t "~&Your larder is now full!") (sleep 2) (format t "~&You lock it and put the key in your pocket.") (sleep 2) @@ -113,29 +110,28 @@ (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) -(let ((lost-in NIL)) - (defun lost-in-the-forest (player place prob) - "Walking through a forest, it's easy to end up going in circles..." - (when (> prob (random 100)) - ;; Make sure all neighbouring places have the is-lost hook - (dolist (p (place-neighbour (get-game-object 'place place))) - (let ((p (get-game-object 'place p))) - (when (zerop (length (place-entry-hook p))) - (set-object-attribute p 'entry-hook "is-lost")))) - ;; Set the lost-in variable to the current place - (setf lost-in place))) +(defun lost-in-the-forest (player place prob) + "Walking through a forest, it's easy to end up going in circles..." + (when (> prob (random 100)) + ;; Make sure all neighbouring places have the is-lost hook + (dolist (p (place-neighbour (get-game-object 'place place))) + (let ((p (get-game-object 'place p))) + (when (zerop (length (place-entry-hook p))) + (set-object-attribute p 'entry-hook "is-lost")))) + ;; Set the lost-in variable to the current place + (save-state 'LOST-IN place))) - (defun is-lost (player) - "Return the player to where he started from" - (when lost-in - (clear-screen) - (format t "~&Suddenly, you are no longer sure you are walking in the right") - (format t "~&direction. Perhaps you should keep more to your left. Or to") - (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!~%~%Please press ENTER") - (read-line) - (goto player lost-in) - (setf lost-in NIL)))) +(defun is-lost (player) + "Return the player to where he started from" + (when (get-state 'LOST-IN) + (clear-screen) + (format t "~&Suddenly, you are no longer sure you are walking in the right") + (format t "~&direction. Perhaps you should keep more to your left. Or to") + (format t "~&your right? The trees all look the same here...") + (format t "~&You are walking in circles!~%~%Please press ENTER") + (read-line) + (goto player (get-state 'LOST-IN)) + (save-state 'LOST-IN NIL))) (defun misty-forest (player) "A wrapper function for lost-in-the-forest for the misty forest location" @@ -440,23 +436,22 @@ (defun daniel-says (player) "Leave a message for the real me" ;;Make sure we're on my server - (unless (or (equalp (first (load-text-file "/etc/hostname")) "Helios") + (unless (and (equalp (first (load-text-file "/etc/hostname")) "Turing") (y-or-n-p "~&~%Daniel has more to say to you. Do you want to hear it?")) (return-from daniel-says)) (setf msg "~%DANIEL: Hi there! This is the 'real' Daniel speaking now... Great to see that you've gotten so far in the game! I've spent two years and many, many hours getting it into shape, so I'm very happy to have other people actually using it :-) -~%If you happen to be playing on my server at the moment, you can actually +~%Since you happen to be playing on my server at the moment, you can actually leave me a message if you like. I'll definitely read it, and would very much appreciate any feedback!") (format t msg) (when (y-or-n-p "~&~%Leave Daniel a message?") - (format t "~&~%What is your name?") - (input-string name) (setf message (lisp-ed)) (unless (null message) (write-to-file message - (string-from-list (list "../" name ".msg") "") T) + (string-from-list (list "../" (world-player-name *world*) + ".msg") :sep "") T) (format t "~&Thank you very much :-)")))) diff --git a/doc/TODO b/doc/TODO index dba742a..0c9390d 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,38 +2,6 @@ LISP * fix (string-from-list) bug -* replace 'equip' with 'hold' -* indicate weapon strength ATL * add game end sequence -* fix Daniel's interaction hook -* add more clues - - -Game crashed when moving from Deep Forest -> Central woods, with message -' is not a number' - - -NOTES - -Honey pots: - 1. Pooh's home - 2. Pooh's branch - 3. Rabbit's house - 4. Rock by the Rapids - 5. Heffalump - 6. Kanga's quest - 7. Eeyore's quest - 8. Piglet's quest - 9. Owl's quest - 10. Thoughtful spot - 11. Bee tree - 12. Cave - -Quests: - 1. Find the tail - 2. Bring jacket - 3. Bring mushrooms - 4. Uncle's picture - 5. Find Woozle diff --git a/doc/bugreport.txt b/doc/bugreport.txt index 7b7f5aa..00b2a30 100644 --- a/doc/bugreport.txt +++ b/doc/bugreport.txt @@ -4,7 +4,7 @@ * Erklärung gut, bis auf: Speichern und Laden des putty-Setups (Namen eingeben, speichern und drauf klicken zum laden). - -> TODO + -> FIXED * Wäre es sinnvoll über ‚quit‘ putty nicht komplett zu beenden, sondern nur aufs Atlantis-Hauptmenü zurückzuführen? -> Won't fix @@ -35,3 +35,10 @@ Liebe Grüße, Chris + + +06/11/2017: +Game crashed when moving from Deep Forest to Central woods, with message +' is not a number' +-> Could not reproduce +-> but see above! (Heisenbug?) diff --git a/lisp/util.lisp b/lisp/util.lisp index 5876a76..cbb6b35 100644 --- a/lisp/util.lisp +++ b/lisp/util.lisp @@ -100,8 +100,9 @@ (cons (car (car assoc-list)) (keys (cdr assoc-list))))) ;; FIXME If (string-from-list) produces a string with linebreaks and is -;; used in conjunction with a (format t "~A") call, (format) will insert +;; used in conjunction with a (format t "~&xxx~A") call, (format) will insert ;; an additional newline before the returned string. WTH?! +;; (format) does this with any newline-containing string passed to it. ;; -> Appears to be a CLISP bug? Doesn't appear with SCBL... (defun string-from-list (lst &key (sep " - ") line-length line-sep) "Put all elements of lst into a single string, separated by sep" diff --git a/.gitignore b/.gitignore index 5ae2444..2a61c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.msg saves/* +ATL/Pooh/notes.txt \ No newline at end of file diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt index 3101aca..700df98 100644 --- a/ATL/Pooh/dialogue/clues.txt +++ b/ATL/Pooh/dialogue/clues.txt @@ -3,3 +3,10 @@ Have you ever had a picknick at the Thoughtful Spot? Or at the Rapids? A lot of your friends need help, and they all know you like honey as a reward. Seek and ye shall find! +It's a good idea to go armed - what if you meet a Heffalump? +Woozles are hard to catch, but it's worth the effort... +Don't forget to search - seek and you shall find! +You can make some very useful things in Christopher Robin's workshop. +Not all things are as they appear. +Seek and ye shall find! +If you're hurt, go and find Kanga. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4a87933..840d128 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -16,7 +16,7 @@ Perhaps you should refill it." define-item "Cupboard" - description "This is your larder, a wooden cupboard with 12 compartments for your honey jars. + description "This is your larder, a wooden cupboard with twelve compartments for your honey jars. All the slots are empty!" fixed diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 8468936..ac451d1 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -56,10 +56,7 @@ (defun store (player &optional arg) "Store a jar of honey in the larder." - (let ((base-descr "This is your larder, a wooden cupboard with 12 compartments for your honey jars.") - (num-list '("one jar" "two jars" "three jars" "four jars" "five jars" - "six jars" "seven jars" "eight jars" "nine jars" - "ten jars" "eleven jars" "twelve jars")) + (let ((base-descr "This is your larder, a wooden cupboard with twelve compartments for your honey jars.") (current-jars (get-state 'HONEY-JARS))) (unless current-jars (setf current-jars 0)) (if (member "Hunny" (player-item player) :test #'equalp) @@ -69,8 +66,8 @@ (incf current-jars) (save-state 'HONEY-JARS current-jars) (setf (item-description (get-game-object 'item "Cupboard")) - (concatenate 'string base-descr (string #\Newline) "It contains " - (nth (1- current-jars) num-list) " of honey.")) + (format nil "~A~AIt contains ~D jar~:P of honey." + base-descr #\newline current-jars)) (when (= current-jars 12) (sleep 2) (format t "~&Your larder is now full!") (sleep 2) (format t "~&You lock it and put the key in your pocket.") (sleep 2) @@ -113,29 +110,28 @@ (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) -(let ((lost-in NIL)) - (defun lost-in-the-forest (player place prob) - "Walking through a forest, it's easy to end up going in circles..." - (when (> prob (random 100)) - ;; Make sure all neighbouring places have the is-lost hook - (dolist (p (place-neighbour (get-game-object 'place place))) - (let ((p (get-game-object 'place p))) - (when (zerop (length (place-entry-hook p))) - (set-object-attribute p 'entry-hook "is-lost")))) - ;; Set the lost-in variable to the current place - (setf lost-in place))) +(defun lost-in-the-forest (player place prob) + "Walking through a forest, it's easy to end up going in circles..." + (when (> prob (random 100)) + ;; Make sure all neighbouring places have the is-lost hook + (dolist (p (place-neighbour (get-game-object 'place place))) + (let ((p (get-game-object 'place p))) + (when (zerop (length (place-entry-hook p))) + (set-object-attribute p 'entry-hook "is-lost")))) + ;; Set the lost-in variable to the current place + (save-state 'LOST-IN place))) - (defun is-lost (player) - "Return the player to where he started from" - (when lost-in - (clear-screen) - (format t "~&Suddenly, you are no longer sure you are walking in the right") - (format t "~&direction. Perhaps you should keep more to your left. Or to") - (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!~%~%Please press ENTER") - (read-line) - (goto player lost-in) - (setf lost-in NIL)))) +(defun is-lost (player) + "Return the player to where he started from" + (when (get-state 'LOST-IN) + (clear-screen) + (format t "~&Suddenly, you are no longer sure you are walking in the right") + (format t "~&direction. Perhaps you should keep more to your left. Or to") + (format t "~&your right? The trees all look the same here...") + (format t "~&You are walking in circles!~%~%Please press ENTER") + (read-line) + (goto player (get-state 'LOST-IN)) + (save-state 'LOST-IN NIL))) (defun misty-forest (player) "A wrapper function for lost-in-the-forest for the misty forest location" @@ -440,23 +436,22 @@ (defun daniel-says (player) "Leave a message for the real me" ;;Make sure we're on my server - (unless (or (equalp (first (load-text-file "/etc/hostname")) "Helios") + (unless (and (equalp (first (load-text-file "/etc/hostname")) "Turing") (y-or-n-p "~&~%Daniel has more to say to you. Do you want to hear it?")) (return-from daniel-says)) (setf msg "~%DANIEL: Hi there! This is the 'real' Daniel speaking now... Great to see that you've gotten so far in the game! I've spent two years and many, many hours getting it into shape, so I'm very happy to have other people actually using it :-) -~%If you happen to be playing on my server at the moment, you can actually +~%Since you happen to be playing on my server at the moment, you can actually leave me a message if you like. I'll definitely read it, and would very much appreciate any feedback!") (format t msg) (when (y-or-n-p "~&~%Leave Daniel a message?") - (format t "~&~%What is your name?") - (input-string name) (setf message (lisp-ed)) (unless (null message) (write-to-file message - (string-from-list (list "../" name ".msg") "") T) + (string-from-list (list "../" (world-player-name *world*) + ".msg") :sep "") T) (format t "~&Thank you very much :-)")))) diff --git a/doc/TODO b/doc/TODO index dba742a..0c9390d 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,38 +2,6 @@ LISP * fix (string-from-list) bug -* replace 'equip' with 'hold' -* indicate weapon strength ATL * add game end sequence -* fix Daniel's interaction hook -* add more clues - - -Game crashed when moving from Deep Forest -> Central woods, with message -' is not a number' - - -NOTES - -Honey pots: - 1. Pooh's home - 2. Pooh's branch - 3. Rabbit's house - 4. Rock by the Rapids - 5. Heffalump - 6. Kanga's quest - 7. Eeyore's quest - 8. Piglet's quest - 9. Owl's quest - 10. Thoughtful spot - 11. Bee tree - 12. Cave - -Quests: - 1. Find the tail - 2. Bring jacket - 3. Bring mushrooms - 4. Uncle's picture - 5. Find Woozle diff --git a/doc/bugreport.txt b/doc/bugreport.txt index 7b7f5aa..00b2a30 100644 --- a/doc/bugreport.txt +++ b/doc/bugreport.txt @@ -4,7 +4,7 @@ * Erklärung gut, bis auf: Speichern und Laden des putty-Setups (Namen eingeben, speichern und drauf klicken zum laden). - -> TODO + -> FIXED * Wäre es sinnvoll über ‚quit‘ putty nicht komplett zu beenden, sondern nur aufs Atlantis-Hauptmenü zurückzuführen? -> Won't fix @@ -35,3 +35,10 @@ Liebe Grüße, Chris + + +06/11/2017: +Game crashed when moving from Deep Forest to Central woods, with message +' is not a number' +-> Could not reproduce +-> but see above! (Heisenbug?) diff --git a/lisp/util.lisp b/lisp/util.lisp index 5876a76..cbb6b35 100644 --- a/lisp/util.lisp +++ b/lisp/util.lisp @@ -100,8 +100,9 @@ (cons (car (car assoc-list)) (keys (cdr assoc-list))))) ;; FIXME If (string-from-list) produces a string with linebreaks and is -;; used in conjunction with a (format t "~A") call, (format) will insert +;; used in conjunction with a (format t "~&xxx~A") call, (format) will insert ;; an additional newline before the returned string. WTH?! +;; (format) does this with any newline-containing string passed to it. ;; -> Appears to be a CLISP bug? Doesn't appear with SCBL... (defun string-from-list (lst &key (sep " - ") line-length line-sep) "Put all elements of lst into a single string, separated by sep" diff --git a/lisp/world.lisp b/lisp/world.lisp index 77bb22e..646f371 100644 --- a/lisp/world.lisp +++ b/lisp/world.lisp @@ -24,7 +24,6 @@ (monsters NIL) (npcs NIL) (items NIL) - (weapons NIL) (quests NIL) (extension-files NIL))