diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 2e53b6b..9e50fac 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -265,6 +265,7 @@ item "North Pole" item "Rock" item "Stone" + hidden "Hunny" neighbour "Northern woods" neighbour "Misty forest" neighbour "Stream" @@ -279,8 +280,13 @@ entry-hook "stream-current" define-place "Christopher Robin's house" - description "TODO" + description "Christopher Robin is your best friend. What a shame he lives so + far away from your home! This is his house, built into an old + chestnut tree. It has a lovely green door, which unfortunately + appears to be shut just now. You wonder where he is?" neighbour "Eastern woods" + item "Balloon" + item "Balloon" define-place "Owl's porch" description "TODO" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 2e53b6b..9e50fac 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -265,6 +265,7 @@ item "North Pole" item "Rock" item "Stone" + hidden "Hunny" neighbour "Northern woods" neighbour "Misty forest" neighbour "Stream" @@ -279,8 +280,13 @@ entry-hook "stream-current" define-place "Christopher Robin's house" - description "TODO" + description "Christopher Robin is your best friend. What a shame he lives so + far away from your home! This is his house, built into an old + chestnut tree. It has a lovely green door, which unfortunately + appears to be shut just now. You wonder where he is?" neighbour "Eastern woods" + item "Balloon" + item "Balloon" define-place "Owl's porch" description "TODO" diff --git a/doc/COMMANDS b/doc/COMMANDS index 8fc16ec..c7ef700 100644 --- a/doc/COMMANDS +++ b/doc/COMMANDS @@ -5,13 +5,14 @@ clear - Clear the screen look [here] - Describe the current location look - Show a description of this entity +look around - Search for hidden items look me - Describe your character inventory - Same as 'look me' goto - Go to a neighbouring location take - Pick up an item lying around drop - Drop the item talk [to] - Talk to an NPC -seek - Search for hidden items +seek - Same as 'look around' equip - Equip this item as your weapon attack - Fight a monster diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 2e53b6b..9e50fac 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -265,6 +265,7 @@ item "North Pole" item "Rock" item "Stone" + hidden "Hunny" neighbour "Northern woods" neighbour "Misty forest" neighbour "Stream" @@ -279,8 +280,13 @@ entry-hook "stream-current" define-place "Christopher Robin's house" - description "TODO" + description "Christopher Robin is your best friend. What a shame he lives so + far away from your home! This is his house, built into an old + chestnut tree. It has a lovely green door, which unfortunately + appears to be shut just now. You wonder where he is?" neighbour "Eastern woods" + item "Balloon" + item "Balloon" define-place "Owl's porch" description "TODO" diff --git a/doc/COMMANDS b/doc/COMMANDS index 8fc16ec..c7ef700 100644 --- a/doc/COMMANDS +++ b/doc/COMMANDS @@ -5,13 +5,14 @@ clear - Clear the screen look [here] - Describe the current location look - Show a description of this entity +look around - Search for hidden items look me - Describe your character inventory - Same as 'look me' goto - Go to a neighbouring location take - Pick up an item lying around drop - Drop the item talk [to] - Talk to an NPC -seek - Search for hidden items +seek - Same as 'look around' equip - Equip this item as your weapon attack - Fight a monster diff --git a/doc/PLAYING b/doc/PLAYING index 148ccdd..64bb789 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -94,15 +94,15 @@ look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location - with "look here". + with "look here". Finally, "look around" is an alias for "seek". goto - The second most important command in Atlantis. With "goto" you can change your location to a neighbouring place. Enter the name of the place you wish to go to after the actual command (e.g. goto Kitchen). -search - Some rooms contain hidden items. To find them, you first need to search - the room. When you do so, you have a 50% chance of finding a hidden - object. +seek - Some rooms contain hidden items. To find them, you first need to search + the room. When you do so, you have a 66% chance of finding a hidden + object. Don't forget to do this once in a while! take - This command is used to pick up an item. Most items in the game can be picked up, many are useful. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 2e53b6b..9e50fac 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -265,6 +265,7 @@ item "North Pole" item "Rock" item "Stone" + hidden "Hunny" neighbour "Northern woods" neighbour "Misty forest" neighbour "Stream" @@ -279,8 +280,13 @@ entry-hook "stream-current" define-place "Christopher Robin's house" - description "TODO" + description "Christopher Robin is your best friend. What a shame he lives so + far away from your home! This is his house, built into an old + chestnut tree. It has a lovely green door, which unfortunately + appears to be shut just now. You wonder where he is?" neighbour "Eastern woods" + item "Balloon" + item "Balloon" define-place "Owl's porch" description "TODO" diff --git a/doc/COMMANDS b/doc/COMMANDS index 8fc16ec..c7ef700 100644 --- a/doc/COMMANDS +++ b/doc/COMMANDS @@ -5,13 +5,14 @@ clear - Clear the screen look [here] - Describe the current location look - Show a description of this entity +look around - Search for hidden items look me - Describe your character inventory - Same as 'look me' goto - Go to a neighbouring location take - Pick up an item lying around drop - Drop the item talk [to] - Talk to an NPC -seek - Search for hidden items +seek - Same as 'look around' equip - Equip this item as your weapon attack - Fight a monster diff --git a/doc/PLAYING b/doc/PLAYING index 148ccdd..64bb789 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -94,15 +94,15 @@ look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location - with "look here". + with "look here". Finally, "look around" is an alias for "seek". goto - The second most important command in Atlantis. With "goto" you can change your location to a neighbouring place. Enter the name of the place you wish to go to after the actual command (e.g. goto Kitchen). -search - Some rooms contain hidden items. To find them, you first need to search - the room. When you do so, you have a 50% chance of finding a hidden - object. +seek - Some rooms contain hidden items. To find them, you first need to search + the room. When you do so, you have a 66% chance of finding a hidden + object. Don't forget to do this once in a while! take - This command is used to pick up an item. Most items in the game can be picked up, many are useful. diff --git a/doc/TODO b/doc/TODO index 62912fb..ffe9145 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,13 +2,10 @@ LISP * update Helios guide (include bug reporting with 'archive') -* split ui.lisp into two modules (one for interaction functions) +* fix (string-from-list) bug ATL -* fix commands that break after reloading game -* introduce honour roll * fill in missing place descriptions -* integrate the quests to lead the player through the game NOTES diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index fbf59ed..f112b09 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -87,7 +87,12 @@ for: a moat, four walls, strong towers - even small windows! Somebody must have put a lot of effort into building this." fixed - + +define-item "Balloon" + description "A bright red balloon, it must have been left over from our + last birthday party. Can you blow it up?" + command "blow" + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -162,7 +167,7 @@ define-item "Tracks" description "The tracks look a lot like bear tracks, but you know you haven't been here for quite a long time. Maybe they are woozle tracks - after all?" + after all? Are there woozles nearby?" fixed define-item "Grandfather's cane" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index e92db3a..82d5681 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -10,9 +10,10 @@ (defun eat (player &optional arg) "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ((equalp arg "berries") (eat-berries)) - ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey)) - ((member arg '("extract of malt" "extract" "malt") :test #'equalp) (eat-malt)) + ((equalp arg "berries") (eat-berries player)) + ((or (equalp arg "hunny") (equalp arg "honey")) (eat-honey player)) + ((member arg '("extract of malt" "extract" "malt") :test #'equalp) + (eat-malt player)) (T (format t "~&You can't eat that!")))) (defun eat-berries (player) @@ -71,8 +72,9 @@ "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) (format t "~&KANGA: Oh my dear, you look hurt! Here, let me take care of you.") - (sleep 1) + (sleep 2) (format t "~&~%Kanga bandages your wounds. You feel better.") + (sleep 2) (setf (player-health player) (player-max-health player)))) (defun bouncy-tigger (player) @@ -187,19 +189,19 @@ "Make sure you've climbed down before leaving the bee tree." (when climbed (climb-down player) (pause 4)))) -(let ((honey-found NIL)) - (defun climb-rock (player &optional arg) - "Climb the rock at the rapids" - (if (> 33 (random 100)) - (progn (format t "~&You slip!") - (sleep 3) - (goto player "Stream")) - (progn (format t "~&You clamber up on the rock.") - (unless honey-found ;;FIXME fails when a saved game is loaded again + +(defun climb-rock (player &optional arg) + "Climb the rock at the rapids" + (if (> 33 (random 100)) + (progn (format t "~&You slip!") + (sleep 3) + (goto player "Stream")) + (progn (format t "~&You clamber up on the rock.") + (let ((place (get-game-object 'place (player-place player)))) + (when (member "Hunny" (place-hidden place) :test #'equalp) (format t "~&You find a pot of honey!") - (set-object-attribute (get-game-object 'place (player-place player)) - 'item "Hunny") - (setf honey-found T)))))) + (set-object-attribute place 'item "Hunny") + (remove-object-attribute place 'hidden "Hunny")))))) (defun stream-current (player &optional arg) "The stream sweeps the player on into the Floody place." @@ -220,19 +222,22 @@ (let ((sandcastle 0)) (defun build-sandcastle () "The player builds a sandcastle at the sandy pit." - (case sandcastle - (0 (format t "~&You decide to build a sandcastle!") - (symbol-macrolet ((description (place-description (get-game-object 'place "Sandy pit")))) - (setf description (string-from-list (list description "Somebody has been building a sandcastle here.") - :sep #\newline)))) - (20 (format t "~&You dig a large moat and erect the walls.")) - (40 (format t "~&You build four towers, one at each corner.")) - (60 (format t "~&You pile up sand for a big strong keep in the center.")) - (80 (format t "~&You decorate the castle, adding pretty little details.")) - (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") - (set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")) - (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 120) (incf sandcastle 20)))) + (let ((place (get-game-object 'place "Sandy pit"))) + (when (member "Sandcastle" (place-item place) :test #'equalp) + (format t "~&You've already built a sandcastle here! And a fine one it is too...") + (return-from build-sandcastle)) + (case sandcastle + (0 (format t "~&You decide to build a sandcastle!") + (setf (place-description place) + (concatenate 'string (place-description place) + "Somebody has been building a sandcastle here." #\newline))) + (20 (format t "~&You dig a large moat and erect the walls.")) + (40 (format t "~&You build four towers, one at each corner.")) + (60 (format t "~&You pile up sand for a big strong keep in the center.")) + (80 (format t "~&You decorate the castle, adding pretty little details.")) + (100 (format t "~&You stand back and admire your handiwork. What a fine castle!") + (set-object-attribute place 'item "Sandcastle"))) + (unless (= sandcastle 100) (incf sandcastle 20))))) (let ((score 0)) (defun poohsticks (player) @@ -251,6 +256,32 @@ (progn (incf score) (format t "~&You win! Your score is now ~A." score)) (progn (decf score) (format t "~&You lose! Your score is now ~A." score))))))) +(defun blow (player &optional arg) + "Blow up a balloon." + (setf msg '("You take a deep breath and put the balloon between your lips." + "You blow as hard as you can." + "The balloon starts to fill up." + "You take another breath and blow again." + "Your lungs are going to burst any minute now, but you keep blowing." + "The balloon is already pretty big, but you want it even larger." + "Your eyes feel as if they're about to pop out, but you keep blowing." + "The balloon is huge. You struggle to keep hold of it." + "You blow just a little bit more." + "The balloon lifts you up! Your feet leave the ground." + "This is fun!" + "You rise up into the sky, free as a bird." + "There's a branch above you!" + "The balloon flies into the branch." + "KER-BOOM!" + "You fall back down to the ground." + "Ouch, that hurt! -3 HP")) + (dolist (m msg) + (format t "~&~A" m) + (sleep 2)) + (remove-object-attribute player 'item "Balloon") + (add-player-experience player 5) + (change-player-health player -3)) + (defun nap (player &optional arg) "Take a nap in front of Pooh's house" (format t "~&You lie down on the bench and close your eyes.") (sleep 1) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 2e53b6b..9e50fac 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -265,6 +265,7 @@ item "North Pole" item "Rock" item "Stone" + hidden "Hunny" neighbour "Northern woods" neighbour "Misty forest" neighbour "Stream" @@ -279,8 +280,13 @@ entry-hook "stream-current" define-place "Christopher Robin's house" - description "TODO" + description "Christopher Robin is your best friend. What a shame he lives so + far away from your home! This is his house, built into an old + chestnut tree. It has a lovely green door, which unfortunately + appears to be shut just now. You wonder where he is?" neighbour "Eastern woods" + item "Balloon" + item "Balloon" define-place "Owl's porch" description "TODO" diff --git a/doc/COMMANDS b/doc/COMMANDS index 8fc16ec..c7ef700 100644 --- a/doc/COMMANDS +++ b/doc/COMMANDS @@ -5,13 +5,14 @@ clear - Clear the screen look [here] - Describe the current location look - Show a description of this entity +look around - Search for hidden items look me - Describe your character inventory - Same as 'look me' goto - Go to a neighbouring location take - Pick up an item lying around drop - Drop the item talk [to] - Talk to an NPC -seek - Search for hidden items +seek - Same as 'look around' equip - Equip this item as your weapon attack - Fight a monster diff --git a/doc/PLAYING b/doc/PLAYING index 148ccdd..64bb789 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -94,15 +94,15 @@ look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location - with "look here". + with "look here". Finally, "look around" is an alias for "seek". goto - The second most important command in Atlantis. With "goto" you can change your location to a neighbouring place. Enter the name of the place you wish to go to after the actual command (e.g. goto Kitchen). -search - Some rooms contain hidden items. To find them, you first need to search - the room. When you do so, you have a 50% chance of finding a hidden - object. +seek - Some rooms contain hidden items. To find them, you first need to search + the room. When you do so, you have a 66% chance of finding a hidden + object. Don't forget to do this once in a while! take - This command is used to pick up an item. Most items in the game can be picked up, many are useful. diff --git a/doc/TODO b/doc/TODO index 62912fb..ffe9145 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,13 +2,10 @@ LISP * update Helios guide (include bug reporting with 'archive') -* split ui.lisp into two modules (one for interaction functions) +* fix (string-from-list) bug ATL -* fix commands that break after reloading game -* introduce honour roll * fill in missing place descriptions -* integrate the quests to lead the player through the game NOTES diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 151e2dd..09ec11e 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -14,8 +14,6 @@ ;; (This module should be purely UI) ;; Yeah, probably not going to happen ;-) -;; TODO Split module in two - ;; TODO Change to 5 once the (string-from-list) bug is fixed (setf *max-line-items* 10) @@ -198,7 +196,9 @@ (cond ((equalp object-name "me") (describe-player player) (return-from look)) ((equalp object-name "here") - (describe-place (player-place player)) (return-from look))) + (describe-place (player-place player)) (return-from look)) + ((equalp object-name "around") + (seek player) (return-from look))) (let* ((place (get-game-object 'place (player-place player))) (o-name (fuzzy-match object-name (append (place-item place) (place-npc place) @@ -217,12 +217,10 @@ "Search for hidden items in the current room" (format t "~&You start hunting around.") (sleep (random 4)) (let* ((place (get-game-object 'place (player-place player))) - (items (place-item place)) (hidden (place-hidden place))) (dolist (h hidden) - (when (> 50 (random 100)) - (format t "~&You find: ~A" - (item-name (get-game-object 'item h))) + (when (> 67 (random 100)) + (format t "~&You find: ~A" h) (set-object-attribute place 'item h) (remove-object-attribute place 'hidden h)))) (format t "~&You finish searching."))