diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 61cbc2f..79db160 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -16,8 +16,8 @@ define-player "Winnie the Pooh" description "A small but lovable bear of Very Little Brain." - ;place "Pooh's home" - place "Rapids" + place "Pooh's home" + ;place "Sandy pit" ;Development max-health 20 health 20 strength 1 diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 61cbc2f..79db160 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -16,8 +16,8 @@ define-player "Winnie the Pooh" description "A small but lovable bear of Very Little Brain." - ;place "Pooh's home" - place "Rapids" + place "Pooh's home" + ;place "Sandy pit" ;Development max-health 20 health 20 strength 1 diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index df9196b..67e8c6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -55,6 +55,8 @@ description "This is the oldest part of the 100 Acre Wood. The oaks you see around you are truly ancient, hundreds of years old. Even Owl can't remember when they were planted. It's very peaceful here." + item "Stone" + item "Stick" neighbour "Northern woods" neighbour "Eastern woods" neighbour "Southern woods" @@ -85,6 +87,7 @@ you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of the trees. Here and there, are willow bends its branches." + item "Stick" neighbour "Central woods" neighbour "Eastern woods" neighbour "Western woods" @@ -98,6 +101,7 @@ description "This is the eastern part of the 100 Acre Wood. As you would expect in a wood, it is full of trees. In this case you mainly see young birches around you." + item "Stick" neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" @@ -160,6 +164,7 @@ neighbour "Eastern woods" neighbour "Floody place" neighbour "The World" + command "play" define-place "Piglet's porch" description "TODO" @@ -183,11 +188,14 @@ item "Jacket" define-place "Sandy pit" - description "TODO" + description "The sandy pit is just that - a large pit full of sand somewhere + in the forest. It's a great place to play in, Roo just loves it. + If his mother let him, he would spend all day, every day here!" neighbour "Northern woods" neighbour "Kanga's house" neighbour "Misty forest" npc "Roo" + command "play" define-place "Six pine trees" description "The Six Pine Trees are a group of particularly tall pines @@ -217,16 +225,26 @@ exit-hook "leave-bee-tree" define-place "Rabbit's house" - description "TODO" + description "Rabbit's house is a warren dug into the side of a sandy bank. + It's very tidy, because of course it would be dreadful if + Rabbit's friends found his house disorderly. And he's taken + special care to tidy away any food. Of course, he would be + glad to give you any if you saw some and needed it, but even + gladder if he didn't have to play the generous host..." npc "Rabbit" hidden "Hunny" neighbour "Northern woods" neighbour "Rabbit's friends and relations" define-place "Rabbit's friends and relations" - description "TODO" + description "Just outside the main woods lies an area where most of Rabbit's + friends-and-relations live. Basically, Rabbit knows very hedgehog, + beetle and jackdaw here. Unfortunately, most of them are so + unimportant that nobody else does." neighbour "Northern woods" neighbour "Rabbit's house" + npc "Small" + npc "Henry Rush" define-place "Rapids" description "The rapids are a series of pools in the stream, connected by diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 61cbc2f..79db160 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -16,8 +16,8 @@ define-player "Winnie the Pooh" description "A small but lovable bear of Very Little Brain." - ;place "Pooh's home" - place "Rapids" + place "Pooh's home" + ;place "Sandy pit" ;Development max-health 20 health 20 strength 1 diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index df9196b..67e8c6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -55,6 +55,8 @@ description "This is the oldest part of the 100 Acre Wood. The oaks you see around you are truly ancient, hundreds of years old. Even Owl can't remember when they were planted. It's very peaceful here." + item "Stone" + item "Stick" neighbour "Northern woods" neighbour "Eastern woods" neighbour "Southern woods" @@ -85,6 +87,7 @@ you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of the trees. Here and there, are willow bends its branches." + item "Stick" neighbour "Central woods" neighbour "Eastern woods" neighbour "Western woods" @@ -98,6 +101,7 @@ description "This is the eastern part of the 100 Acre Wood. As you would expect in a wood, it is full of trees. In this case you mainly see young birches around you." + item "Stick" neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" @@ -160,6 +164,7 @@ neighbour "Eastern woods" neighbour "Floody place" neighbour "The World" + command "play" define-place "Piglet's porch" description "TODO" @@ -183,11 +188,14 @@ item "Jacket" define-place "Sandy pit" - description "TODO" + description "The sandy pit is just that - a large pit full of sand somewhere + in the forest. It's a great place to play in, Roo just loves it. + If his mother let him, he would spend all day, every day here!" neighbour "Northern woods" neighbour "Kanga's house" neighbour "Misty forest" npc "Roo" + command "play" define-place "Six pine trees" description "The Six Pine Trees are a group of particularly tall pines @@ -217,16 +225,26 @@ exit-hook "leave-bee-tree" define-place "Rabbit's house" - description "TODO" + description "Rabbit's house is a warren dug into the side of a sandy bank. + It's very tidy, because of course it would be dreadful if + Rabbit's friends found his house disorderly. And he's taken + special care to tidy away any food. Of course, he would be + glad to give you any if you saw some and needed it, but even + gladder if he didn't have to play the generous host..." npc "Rabbit" hidden "Hunny" neighbour "Northern woods" neighbour "Rabbit's friends and relations" define-place "Rabbit's friends and relations" - description "TODO" + description "Just outside the main woods lies an area where most of Rabbit's + friends-and-relations live. Basically, Rabbit knows very hedgehog, + beetle and jackdaw here. Unfortunately, most of them are so + unimportant that nobody else does." neighbour "Northern woods" neighbour "Rabbit's house" + npc "Small" + npc "Henry Rush" define-place "Rapids" description "The rapids are a series of pools in the stream, connected by diff --git a/doc/TODO b/doc/TODO index 144f2a0..5b88324 100644 --- a/doc/TODO +++ b/doc/TODO @@ -6,7 +6,23 @@ ATL * fill in missing place descriptions -* hide 3 more pots of honey +* hide 2 more pots of honey * require XP minimum to finish game? * think of more quests * integrate the quests to lead the player through the game + + +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. Bee tree + 9. + 10. + \ No newline at end of file diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 61cbc2f..79db160 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -16,8 +16,8 @@ define-player "Winnie the Pooh" description "A small but lovable bear of Very Little Brain." - ;place "Pooh's home" - place "Rapids" + place "Pooh's home" + ;place "Sandy pit" ;Development max-health 20 health 20 strength 1 diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index df9196b..67e8c6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -55,6 +55,8 @@ description "This is the oldest part of the 100 Acre Wood. The oaks you see around you are truly ancient, hundreds of years old. Even Owl can't remember when they were planted. It's very peaceful here." + item "Stone" + item "Stick" neighbour "Northern woods" neighbour "Eastern woods" neighbour "Southern woods" @@ -85,6 +87,7 @@ you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of the trees. Here and there, are willow bends its branches." + item "Stick" neighbour "Central woods" neighbour "Eastern woods" neighbour "Western woods" @@ -98,6 +101,7 @@ description "This is the eastern part of the 100 Acre Wood. As you would expect in a wood, it is full of trees. In this case you mainly see young birches around you." + item "Stick" neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" @@ -160,6 +164,7 @@ neighbour "Eastern woods" neighbour "Floody place" neighbour "The World" + command "play" define-place "Piglet's porch" description "TODO" @@ -183,11 +188,14 @@ item "Jacket" define-place "Sandy pit" - description "TODO" + description "The sandy pit is just that - a large pit full of sand somewhere + in the forest. It's a great place to play in, Roo just loves it. + If his mother let him, he would spend all day, every day here!" neighbour "Northern woods" neighbour "Kanga's house" neighbour "Misty forest" npc "Roo" + command "play" define-place "Six pine trees" description "The Six Pine Trees are a group of particularly tall pines @@ -217,16 +225,26 @@ exit-hook "leave-bee-tree" define-place "Rabbit's house" - description "TODO" + description "Rabbit's house is a warren dug into the side of a sandy bank. + It's very tidy, because of course it would be dreadful if + Rabbit's friends found his house disorderly. And he's taken + special care to tidy away any food. Of course, he would be + glad to give you any if you saw some and needed it, but even + gladder if he didn't have to play the generous host..." npc "Rabbit" hidden "Hunny" neighbour "Northern woods" neighbour "Rabbit's friends and relations" define-place "Rabbit's friends and relations" - description "TODO" + description "Just outside the main woods lies an area where most of Rabbit's + friends-and-relations live. Basically, Rabbit knows very hedgehog, + beetle and jackdaw here. Unfortunately, most of them are so + unimportant that nobody else does." neighbour "Northern woods" neighbour "Rabbit's house" + npc "Small" + npc "Henry Rush" define-place "Rapids" description "The rapids are a series of pools in the stream, connected by diff --git a/doc/TODO b/doc/TODO index 144f2a0..5b88324 100644 --- a/doc/TODO +++ b/doc/TODO @@ -6,7 +6,23 @@ ATL * fill in missing place descriptions -* hide 3 more pots of honey +* hide 2 more pots of honey * require XP minimum to finish game? * think of more quests * integrate the quests to lead the player through the game + + +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. Bee tree + 9. + 10. + \ No newline at end of file diff --git a/lisp/ui.lisp b/lisp/ui.lisp index a2d0a50..ddcb594 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -261,8 +261,9 @@ (format t "~&~A is not here!" npc-name) (return-from talk)) ;; The NPC says one of its lines - (format t "~&~A: ~A" (string-upcase npc-name) - (random-elt (npc-says npc))) + (when (npc-says npc) + (format t "~&~A: ~A" (string-upcase npc-name) + (random-elt (npc-says npc)))) ;; Interaction hook (let ((hook (npc-interaction-hook npc))) (unless (zerop (length hook)) diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 0cecc65..40080c6 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -71,8 +71,22 @@ seems to have time for any of them. He is always on the move, always busy, and not particularly fond of bears who happen to stop by his home for teatime." - says "Hello Pooh, how are you? Oh, would you look at the time, I really - must be getting a move on. Catch you later!" + says "Hello Pooh, how are you? Oh, would you look at the time, I really must + be getting a move on. Would you mind coming back a little later?" + +define-npc "Small" + description "Small's real name is 'Very Small Beetle', but since that name + is too big for him, everybody simply calls him Small. If he + doesn't happen to be lost, he's quite a nice fellow to have + around." + says "Bzzzzz..." + +define-npc "Henry Rush" + description "Henry Rush is one of Small's brothers. Or cousins. Or something + like that, anyway. He certainly is a very curious little + beetle. Unfortunately, he takes so long getting anywhere + that all the fun is always over by the time he gets there..." + says "Where are you going? Is there something to see there?" define-npc "Mr Milne" description "Alan Alexander Milne is sitting at the table, staring very diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 02290e4..03e2ed4 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -57,6 +57,11 @@ define-item "Stone" description "A pretty little pebble, very colourful and worn smooth by the water." infinite + +define-item "Stick" + description "Just an ordinary sort of stick. Nothing special, but fun to + play around with." + infinite define-item "Berries" description "Scrumptious, fresh wild berries: blueberries, blackberries, @@ -64,6 +69,12 @@ command "eat" infinite +define-item "Sandcastle" + description "A very impressive sandcastle. It has everything you could wish + for: a moat, four walls, strong towers - even small windows! + Somebody must have put a lot of effort into building this." + fixed + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 211d6bd..30045a7 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -20,8 +20,8 @@ (member "Hunny" (player-item player) :test #'equalp)) (if (> (player-health player) 10) (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.") - (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") - (format t "~&You stick your paw deeply into the jar, then draw it out again.") + (progn (format t "~&You really shouldn't, but you are feeling sore enough to eat some anyway.") (sleep 1) + (format t "~&You stick your paw deeply into the jar, then draw it out again.") (sleep 1) (format t "~&Smooth golden honey runs into your mouth, making you feel much better.") (format t "~&+10 HP") (change-player-health player 10) @@ -32,6 +32,7 @@ (defun jump (player &optional arg) "Jump off Pooh's branch onto his porch." (format t "~&You look down nervously, then jump off the branch.") + (sleep 1) (if (> 50 (random 100)) (progn (format t "~&You land safely. That was fun! You gain 3 XP.") (add-player-experience player 3)) @@ -44,6 +45,7 @@ "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) (format t "~&~%Kanga bandages your wounds. You feel better.") (setf (player-health player) (player-max-health player)))) @@ -54,7 +56,7 @@ (random-elt (place-neighbour place))))) (format t "~&~%A large yellow-and-black object comes flying out of nowhere") (format t "~&and knocks you over. When you sit up again, you see Tigger") - (format t "~&grinning widely at you.") + (format t "~&grinning widely at you.") (sleep 3) (format t "~&~%Tigger bounces away toward ~A." (place-name neighbour)) (remove-object-attribute place 'npc "Tigger") (set-object-attribute neighbour 'npc "Tigger"))) @@ -108,11 +110,13 @@ (format t "~&You are already sitting up the tree.")) (return-from climb)) (format t "~&You start climbing up the tree.") + (sleep 3) ;; The player has a 60% chance of success. (if (> 60 (random 100)) (progn (setf climbed T) (add-player-experience player 2) (format t "~&You make it to the top.")) (progn (format t "~&A branch breaks beneath you! You fall into a gorse bush.") + (sleep 1) (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) ;; The bees attack if they are still present @@ -141,9 +145,11 @@ "Climb down the tree." (if climbed (progn (format t "~&Slowly you climb back down the tree.") + (sleep 2) (if (> 60 (random 100)) (format t "~&You reach the ground safely.") (progn (format t "~&You lose your grip!") + (sleep 1) (format t "~&Well, that was rather faster than expected.") (format t "~&You take 4 HP fall damage.") (change-player-health player -4))) @@ -168,12 +174,50 @@ 'item "Hunny") (setf honey-found T)))))) +(defun play (player &optional arg) + "Let the player play a game" + (let ((place (player-place player))) + (cond ((equalp place "Sandy pit") (build-sandcastle)) + ((equalp place "Bridge") (poohsticks player))))) + +(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"))) + (unless (= sandcastle 100) (incf sandcastle 20)))) + +(let ((score 0)) + (defun poohsticks (player) + "Play Poohsticks" + (if (< (count-instances "Stick" (player-item player) :test #'equalp) 2) + (format t "~&You need at least two sticks to play Poohsticks!") + (progn (remove-object-attribute player 'item "Stick") + (remove-object-attribute player 'item "Stick") + (format t "~&Which stick do you think will win?") + (setf choice (choose-number-option '("Stick A" "Stick B"))) + (setf winner (random 2)) + (format t "~&You throw both sticks into the stream on one side of the bridge.") (sleep 1) + (format t "~&You run to the other side and lean over the railing.") (sleep (random 4)) + (format t "~&~A comes out first!" (nth winner '("Stick A" "Stick B"))) (sleep 1) + (if (= winner choice) + (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 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.") - (format t "~&Slowly, you start drifting off to dream land...") - (format t "~&~%Zzzzz Zzzzz Zzzzz") + (format t "~&You lie down on the bench and close your eyes.") (sleep 1) + (format t "~&Slowly, you start drifting off to dream land...") (sleep 1) + (format t "~&~%Zzzzz Zzzzz Zzzzz") (sleep 3) (format t "~&~%You wake up again.") (when (< (player-health player) (player-max-health player)) (format t "~&You feel better. +1 HP") @@ -185,6 +229,7 @@ (if (member "bellrope" (list-place-objects 'item place) :test #'equalp) (format t "~&You pull the bellrope. A loud ringing can be heard from inside.") (format t "~&Try as you might, you cannot find a bellrope to pull. You knock instead."))) + (sleep 1) (let ((consequences '("Nothing happens. Owl hasn't been too good of hearing lately..." "Nobody answers. Perhaps you should ring louder?" "You wait, but nobody comes. You can hear noises inside, though." @@ -199,7 +244,7 @@ "Wear the mystical golden ring..." (if (member 'ring (extract-elements arg)) (progn - (format t "~&You slip the golden ring on your finger.") + (format t "~&You slip the golden ring on your finger.") (sleep 1) (format t "~&You feel something ought to happen.~&Nothing does.")) (format t "~&What do you want to wear?"))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 61cbc2f..79db160 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -16,8 +16,8 @@ define-player "Winnie the Pooh" description "A small but lovable bear of Very Little Brain." - ;place "Pooh's home" - place "Rapids" + place "Pooh's home" + ;place "Sandy pit" ;Development max-health 20 health 20 strength 1 diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index df9196b..67e8c6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -55,6 +55,8 @@ description "This is the oldest part of the 100 Acre Wood. The oaks you see around you are truly ancient, hundreds of years old. Even Owl can't remember when they were planted. It's very peaceful here." + item "Stone" + item "Stick" neighbour "Northern woods" neighbour "Eastern woods" neighbour "Southern woods" @@ -85,6 +87,7 @@ you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of the trees. Here and there, are willow bends its branches." + item "Stick" neighbour "Central woods" neighbour "Eastern woods" neighbour "Western woods" @@ -98,6 +101,7 @@ description "This is the eastern part of the 100 Acre Wood. As you would expect in a wood, it is full of trees. In this case you mainly see young birches around you." + item "Stick" neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" @@ -160,6 +164,7 @@ neighbour "Eastern woods" neighbour "Floody place" neighbour "The World" + command "play" define-place "Piglet's porch" description "TODO" @@ -183,11 +188,14 @@ item "Jacket" define-place "Sandy pit" - description "TODO" + description "The sandy pit is just that - a large pit full of sand somewhere + in the forest. It's a great place to play in, Roo just loves it. + If his mother let him, he would spend all day, every day here!" neighbour "Northern woods" neighbour "Kanga's house" neighbour "Misty forest" npc "Roo" + command "play" define-place "Six pine trees" description "The Six Pine Trees are a group of particularly tall pines @@ -217,16 +225,26 @@ exit-hook "leave-bee-tree" define-place "Rabbit's house" - description "TODO" + description "Rabbit's house is a warren dug into the side of a sandy bank. + It's very tidy, because of course it would be dreadful if + Rabbit's friends found his house disorderly. And he's taken + special care to tidy away any food. Of course, he would be + glad to give you any if you saw some and needed it, but even + gladder if he didn't have to play the generous host..." npc "Rabbit" hidden "Hunny" neighbour "Northern woods" neighbour "Rabbit's friends and relations" define-place "Rabbit's friends and relations" - description "TODO" + description "Just outside the main woods lies an area where most of Rabbit's + friends-and-relations live. Basically, Rabbit knows very hedgehog, + beetle and jackdaw here. Unfortunately, most of them are so + unimportant that nobody else does." neighbour "Northern woods" neighbour "Rabbit's house" + npc "Small" + npc "Henry Rush" define-place "Rapids" description "The rapids are a series of pools in the stream, connected by diff --git a/doc/TODO b/doc/TODO index 144f2a0..5b88324 100644 --- a/doc/TODO +++ b/doc/TODO @@ -6,7 +6,23 @@ ATL * fill in missing place descriptions -* hide 3 more pots of honey +* hide 2 more pots of honey * require XP minimum to finish game? * think of more quests * integrate the quests to lead the player through the game + + +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. Bee tree + 9. + 10. + \ No newline at end of file diff --git a/lisp/ui.lisp b/lisp/ui.lisp index a2d0a50..ddcb594 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -261,8 +261,9 @@ (format t "~&~A is not here!" npc-name) (return-from talk)) ;; The NPC says one of its lines - (format t "~&~A: ~A" (string-upcase npc-name) - (random-elt (npc-says npc))) + (when (npc-says npc) + (format t "~&~A: ~A" (string-upcase npc-name) + (random-elt (npc-says npc)))) ;; Interaction hook (let ((hook (npc-interaction-hook npc))) (unless (zerop (length hook)) diff --git a/lisp/util.lisp b/lisp/util.lisp index 5f8b9ec..064fcfd 100644 --- a/lisp/util.lisp +++ b/lisp/util.lisp @@ -194,7 +194,8 @@ (defun random-elt (seq) "Return a random element of this sequence" - (elt seq (random (length seq)))) + (if (zerop (length seq)) NIL + (elt seq (random (length seq))))) (defun load-text-file (file-name) "Load a text file into a list of strings (representing the lines)"