diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 2673367..e92db3a 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -8,38 +8,46 @@ ; date: 20/07/2017 (defun eat (player &optional arg) - "Allow the player to eat something." - ;; XXX If any other edibles are added, split this function up + "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ;; Berries can be eaten any time, but don't have any effect - ((and (equalp arg "berries") - (member "berries" (player-item player) :test #'equalp)) - (format t "~&Mmmh, these berries are really delicious!") - (remove-object-attribute player 'item "berries")) - ;; Honey is reserved as medicine :-) - ((and (or (equalp arg "hunny") (equalp arg "honey")) - (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.") (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) - (remove-object-attribute player 'item "Hunny") - (set-object-attribute player 'item "Jar")))) - ;; Extract of Malt is very healthy, so obviously it can't be tasty... - ((and (or (equalp arg "extract of malt") (equalp arg "extract") (equalp arg "malt")) - (member "Extract of Malt" (player-item player) :test #'equalp)) - (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) - (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) - (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) - (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) - (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) - (format t "~&Something that disgusting can only be healthy. +1 HP") - (change-player-health player 1))) + ((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)) (T (format t "~&You can't eat that!")))) +(defun eat-berries (player) + "Berries can be eaten any time, but don't have any effect" + (if (member "berries" (player-item player) :test #'equalp) + (progn (format t "~&Mmmh, these berries are really delicious!") + (remove-object-attribute player 'item "berries")) + (format t "~&You don't have any berries!"))) + +(defun eat-honey (player) + "Honey is reserved as medicine :-)" + (if (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.") (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) + (remove-object-attribute player 'item "Hunny") + (set-object-attribute player 'item "Jar"))) + (format t "~&You don't have any honey!"))) + +(defun eat-malt (player) + "Extract of Malt is very healthy, so obviously it can't be tasty..." + (if (member "Extract of Malt" (player-item player) :test #'equalp) + (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) + (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) + (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) + (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) + (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) + (format t "~&Something that disgusting can only be healthy. +1 HP") + (change-player-health player 1)) + (format t "~&You don't have any Extract of Malt!"))) + (defun study (player &optional arg) "Print out the map" (unless (member 'map (extract-elements arg)) @@ -98,7 +106,7 @@ (format t "~&Suddenly, you are no longer sure you are walking in the right") (format t "~&direction. Perhaps you should keep more to your left. Or to") (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!") + (format t "~&You are walking in circles!~%~%Please press ENTER") (read-line) (change-player-location player lost-in) (spawn-monsters lost-in) @@ -223,8 +231,8 @@ (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")) - (110 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 110) (incf sandcastle 20)))) + (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) + (unless (= sandcastle 120) (incf sandcastle 20)))) (let ((score 0)) (defun poohsticks (player) @@ -266,6 +274,28 @@ "Nothing happens." "Nobody answers." "No reply."))) (format t "~&~A" (random-elt consequences)))) +(defun smell-honey (player &optional arg) + "The player smells honey when leaving the tunnel" + (let ((place (get-game-object 'place (player-place player)))) + (when (member "hunny" (place-hidden place) :test #'equalp) + (format t "~&For a brief second, the scent of honey wafts up to your nose.") + (sleep 2)))) + +(defun woozle-scratch (player &optional arg) + "The Woozle scratches when you try to pick him up." + (change-player-health player -1) + (format t "~&The woozle scratches you! -1 HP") + (when (> 55 (random 100)) + (sleep 1) + (format t "~&The woozle winds its way out of your arms.") + (sleep 1) + (drop player "Woozle"))) + +(defun woozle-disappear (player &optional arg) + "If you drop him, the Woozle escapes." + (let ((place (get-game-object 'place (player-place player)))) + (remove-object-attribute place 'item "Woozle") + (format t "~&The Woozle runs away!"))) ;; The golden ring is an easter egg referencing, of course, ;; The Lord of the Rings. diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 2673367..e92db3a 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -8,38 +8,46 @@ ; date: 20/07/2017 (defun eat (player &optional arg) - "Allow the player to eat something." - ;; XXX If any other edibles are added, split this function up + "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ;; Berries can be eaten any time, but don't have any effect - ((and (equalp arg "berries") - (member "berries" (player-item player) :test #'equalp)) - (format t "~&Mmmh, these berries are really delicious!") - (remove-object-attribute player 'item "berries")) - ;; Honey is reserved as medicine :-) - ((and (or (equalp arg "hunny") (equalp arg "honey")) - (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.") (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) - (remove-object-attribute player 'item "Hunny") - (set-object-attribute player 'item "Jar")))) - ;; Extract of Malt is very healthy, so obviously it can't be tasty... - ((and (or (equalp arg "extract of malt") (equalp arg "extract") (equalp arg "malt")) - (member "Extract of Malt" (player-item player) :test #'equalp)) - (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) - (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) - (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) - (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) - (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) - (format t "~&Something that disgusting can only be healthy. +1 HP") - (change-player-health player 1))) + ((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)) (T (format t "~&You can't eat that!")))) +(defun eat-berries (player) + "Berries can be eaten any time, but don't have any effect" + (if (member "berries" (player-item player) :test #'equalp) + (progn (format t "~&Mmmh, these berries are really delicious!") + (remove-object-attribute player 'item "berries")) + (format t "~&You don't have any berries!"))) + +(defun eat-honey (player) + "Honey is reserved as medicine :-)" + (if (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.") (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) + (remove-object-attribute player 'item "Hunny") + (set-object-attribute player 'item "Jar"))) + (format t "~&You don't have any honey!"))) + +(defun eat-malt (player) + "Extract of Malt is very healthy, so obviously it can't be tasty..." + (if (member "Extract of Malt" (player-item player) :test #'equalp) + (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) + (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) + (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) + (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) + (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) + (format t "~&Something that disgusting can only be healthy. +1 HP") + (change-player-health player 1)) + (format t "~&You don't have any Extract of Malt!"))) + (defun study (player &optional arg) "Print out the map" (unless (member 'map (extract-elements arg)) @@ -98,7 +106,7 @@ (format t "~&Suddenly, you are no longer sure you are walking in the right") (format t "~&direction. Perhaps you should keep more to your left. Or to") (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!") + (format t "~&You are walking in circles!~%~%Please press ENTER") (read-line) (change-player-location player lost-in) (spawn-monsters lost-in) @@ -223,8 +231,8 @@ (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")) - (110 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 110) (incf sandcastle 20)))) + (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) + (unless (= sandcastle 120) (incf sandcastle 20)))) (let ((score 0)) (defun poohsticks (player) @@ -266,6 +274,28 @@ "Nothing happens." "Nobody answers." "No reply."))) (format t "~&~A" (random-elt consequences)))) +(defun smell-honey (player &optional arg) + "The player smells honey when leaving the tunnel" + (let ((place (get-game-object 'place (player-place player)))) + (when (member "hunny" (place-hidden place) :test #'equalp) + (format t "~&For a brief second, the scent of honey wafts up to your nose.") + (sleep 2)))) + +(defun woozle-scratch (player &optional arg) + "The Woozle scratches when you try to pick him up." + (change-player-health player -1) + (format t "~&The woozle scratches you! -1 HP") + (when (> 55 (random 100)) + (sleep 1) + (format t "~&The woozle winds its way out of your arms.") + (sleep 1) + (drop player "Woozle"))) + +(defun woozle-disappear (player &optional arg) + "If you drop him, the Woozle escapes." + (let ((place (get-game-object 'place (player-place player)))) + (remove-object-attribute place 'item "Woozle") + (format t "~&The Woozle runs away!"))) ;; The golden ring is an easter egg referencing, of course, ;; The Lord of the Rings. diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5300102..cc7fa0d 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -22,4 +22,4 @@ define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Rapids" ;Development \ No newline at end of file + place "Piglet's home" ;Development \ No newline at end of file diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 2673367..e92db3a 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -8,38 +8,46 @@ ; date: 20/07/2017 (defun eat (player &optional arg) - "Allow the player to eat something." - ;; XXX If any other edibles are added, split this function up + "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ;; Berries can be eaten any time, but don't have any effect - ((and (equalp arg "berries") - (member "berries" (player-item player) :test #'equalp)) - (format t "~&Mmmh, these berries are really delicious!") - (remove-object-attribute player 'item "berries")) - ;; Honey is reserved as medicine :-) - ((and (or (equalp arg "hunny") (equalp arg "honey")) - (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.") (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) - (remove-object-attribute player 'item "Hunny") - (set-object-attribute player 'item "Jar")))) - ;; Extract of Malt is very healthy, so obviously it can't be tasty... - ((and (or (equalp arg "extract of malt") (equalp arg "extract") (equalp arg "malt")) - (member "Extract of Malt" (player-item player) :test #'equalp)) - (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) - (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) - (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) - (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) - (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) - (format t "~&Something that disgusting can only be healthy. +1 HP") - (change-player-health player 1))) + ((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)) (T (format t "~&You can't eat that!")))) +(defun eat-berries (player) + "Berries can be eaten any time, but don't have any effect" + (if (member "berries" (player-item player) :test #'equalp) + (progn (format t "~&Mmmh, these berries are really delicious!") + (remove-object-attribute player 'item "berries")) + (format t "~&You don't have any berries!"))) + +(defun eat-honey (player) + "Honey is reserved as medicine :-)" + (if (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.") (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) + (remove-object-attribute player 'item "Hunny") + (set-object-attribute player 'item "Jar"))) + (format t "~&You don't have any honey!"))) + +(defun eat-malt (player) + "Extract of Malt is very healthy, so obviously it can't be tasty..." + (if (member "Extract of Malt" (player-item player) :test #'equalp) + (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) + (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) + (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) + (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) + (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) + (format t "~&Something that disgusting can only be healthy. +1 HP") + (change-player-health player 1)) + (format t "~&You don't have any Extract of Malt!"))) + (defun study (player &optional arg) "Print out the map" (unless (member 'map (extract-elements arg)) @@ -98,7 +106,7 @@ (format t "~&Suddenly, you are no longer sure you are walking in the right") (format t "~&direction. Perhaps you should keep more to your left. Or to") (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!") + (format t "~&You are walking in circles!~%~%Please press ENTER") (read-line) (change-player-location player lost-in) (spawn-monsters lost-in) @@ -223,8 +231,8 @@ (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")) - (110 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 110) (incf sandcastle 20)))) + (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) + (unless (= sandcastle 120) (incf sandcastle 20)))) (let ((score 0)) (defun poohsticks (player) @@ -266,6 +274,28 @@ "Nothing happens." "Nobody answers." "No reply."))) (format t "~&~A" (random-elt consequences)))) +(defun smell-honey (player &optional arg) + "The player smells honey when leaving the tunnel" + (let ((place (get-game-object 'place (player-place player)))) + (when (member "hunny" (place-hidden place) :test #'equalp) + (format t "~&For a brief second, the scent of honey wafts up to your nose.") + (sleep 2)))) + +(defun woozle-scratch (player &optional arg) + "The Woozle scratches when you try to pick him up." + (change-player-health player -1) + (format t "~&The woozle scratches you! -1 HP") + (when (> 55 (random 100)) + (sleep 1) + (format t "~&The woozle winds its way out of your arms.") + (sleep 1) + (drop player "Woozle"))) + +(defun woozle-disappear (player &optional arg) + "If you drop him, the Woozle escapes." + (let ((place (get-game-object 'place (player-place player)))) + (remove-object-attribute place 'item "Woozle") + (format t "~&The Woozle runs away!"))) ;; The golden ring is an easter egg referencing, of course, ;; The Lord of the Rings. diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5300102..cc7fa0d 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -22,4 +22,4 @@ define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Rapids" ;Development \ No newline at end of file + place "Piglet's home" ;Development \ No newline at end of file diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index e6abda4..2e53b6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -124,6 +124,8 @@ requires "Lamp" neighbour "Deep forest" neighbour "Cave" + hidden "Hunny" + exit-hook "smell-honey" define-place "Cave" description "The tunnel suddenly opens out into a huge cavern. The walls are @@ -163,7 +165,6 @@ neighbour "Southern woods" neighbour "Eastern woods" neighbour "Floody place" - neighbour "The World" command "play" define-place "Piglet's porch" @@ -313,8 +314,13 @@ neighbour "Floody place" define-place "Woozle hideout" - description "TODO" + description "This is a small copse of larch trees, all standing tightly in a + circle. One fine winter day, you and Piglet went hunting here, + pursuing a Woozle. Only, the Woozle's footprints turned out to + be your own..." neighbour "Southern woods" + item "Tracks" + hidden "Woozle" define-place "Misty forest" description "You are surrounded by pines, their dead needles thickly carpeting diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 2673367..e92db3a 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -8,38 +8,46 @@ ; date: 20/07/2017 (defun eat (player &optional arg) - "Allow the player to eat something." - ;; XXX If any other edibles are added, split this function up + "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ;; Berries can be eaten any time, but don't have any effect - ((and (equalp arg "berries") - (member "berries" (player-item player) :test #'equalp)) - (format t "~&Mmmh, these berries are really delicious!") - (remove-object-attribute player 'item "berries")) - ;; Honey is reserved as medicine :-) - ((and (or (equalp arg "hunny") (equalp arg "honey")) - (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.") (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) - (remove-object-attribute player 'item "Hunny") - (set-object-attribute player 'item "Jar")))) - ;; Extract of Malt is very healthy, so obviously it can't be tasty... - ((and (or (equalp arg "extract of malt") (equalp arg "extract") (equalp arg "malt")) - (member "Extract of Malt" (player-item player) :test #'equalp)) - (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) - (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) - (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) - (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) - (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) - (format t "~&Something that disgusting can only be healthy. +1 HP") - (change-player-health player 1))) + ((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)) (T (format t "~&You can't eat that!")))) +(defun eat-berries (player) + "Berries can be eaten any time, but don't have any effect" + (if (member "berries" (player-item player) :test #'equalp) + (progn (format t "~&Mmmh, these berries are really delicious!") + (remove-object-attribute player 'item "berries")) + (format t "~&You don't have any berries!"))) + +(defun eat-honey (player) + "Honey is reserved as medicine :-)" + (if (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.") (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) + (remove-object-attribute player 'item "Hunny") + (set-object-attribute player 'item "Jar"))) + (format t "~&You don't have any honey!"))) + +(defun eat-malt (player) + "Extract of Malt is very healthy, so obviously it can't be tasty..." + (if (member "Extract of Malt" (player-item player) :test #'equalp) + (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) + (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) + (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) + (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) + (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) + (format t "~&Something that disgusting can only be healthy. +1 HP") + (change-player-health player 1)) + (format t "~&You don't have any Extract of Malt!"))) + (defun study (player &optional arg) "Print out the map" (unless (member 'map (extract-elements arg)) @@ -98,7 +106,7 @@ (format t "~&Suddenly, you are no longer sure you are walking in the right") (format t "~&direction. Perhaps you should keep more to your left. Or to") (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!") + (format t "~&You are walking in circles!~%~%Please press ENTER") (read-line) (change-player-location player lost-in) (spawn-monsters lost-in) @@ -223,8 +231,8 @@ (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")) - (110 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 110) (incf sandcastle 20)))) + (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) + (unless (= sandcastle 120) (incf sandcastle 20)))) (let ((score 0)) (defun poohsticks (player) @@ -266,6 +274,28 @@ "Nothing happens." "Nobody answers." "No reply."))) (format t "~&~A" (random-elt consequences)))) +(defun smell-honey (player &optional arg) + "The player smells honey when leaving the tunnel" + (let ((place (get-game-object 'place (player-place player)))) + (when (member "hunny" (place-hidden place) :test #'equalp) + (format t "~&For a brief second, the scent of honey wafts up to your nose.") + (sleep 2)))) + +(defun woozle-scratch (player &optional arg) + "The Woozle scratches when you try to pick him up." + (change-player-health player -1) + (format t "~&The woozle scratches you! -1 HP") + (when (> 55 (random 100)) + (sleep 1) + (format t "~&The woozle winds its way out of your arms.") + (sleep 1) + (drop player "Woozle"))) + +(defun woozle-disappear (player &optional arg) + "If you drop him, the Woozle escapes." + (let ((place (get-game-object 'place (player-place player)))) + (remove-object-attribute place 'item "Woozle") + (format t "~&The Woozle runs away!"))) ;; The golden ring is an easter egg referencing, of course, ;; The Lord of the Rings. diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5300102..cc7fa0d 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -22,4 +22,4 @@ define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Rapids" ;Development \ No newline at end of file + place "Piglet's home" ;Development \ No newline at end of file diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index e6abda4..2e53b6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -124,6 +124,8 @@ requires "Lamp" neighbour "Deep forest" neighbour "Cave" + hidden "Hunny" + exit-hook "smell-honey" define-place "Cave" description "The tunnel suddenly opens out into a huge cavern. The walls are @@ -163,7 +165,6 @@ neighbour "Southern woods" neighbour "Eastern woods" neighbour "Floody place" - neighbour "The World" command "play" define-place "Piglet's porch" @@ -313,8 +314,13 @@ neighbour "Floody place" define-place "Woozle hideout" - description "TODO" + description "This is a small copse of larch trees, all standing tightly in a + circle. One fine winter day, you and Piglet went hunting here, + pursuing a Woozle. Only, the Woozle's footprints turned out to + be your own..." neighbour "Southern woods" + item "Tracks" + hidden "Woozle" define-place "Misty forest" description "You are surrounded by pines, their dead needles thickly carpeting diff --git a/doc/TODO b/doc/TODO index d838476..62912fb 100644 --- a/doc/TODO +++ b/doc/TODO @@ -8,8 +8,6 @@ * fix commands that break after reloading game * introduce honour roll * fill in missing place descriptions -* hide 2 more pots of honey -* think of more quests * integrate the quests to lead the player through the game @@ -23,13 +21,14 @@ 5. Heffalump 6. Kanga's quest 7. Eeyore's quest - 8. Bee tree - 9. Cave (?) - 10. + 8. Piglet's quest + 9. Bee tree + 10. Cave Quests: 1. Find the tail 2. Bring jacket 3. Bring mushrooms 4. Reading material - 5. Bring honey + 5. Find Woozle + 6. Bring honey diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index 6e778be..0defab1 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -11,7 +11,9 @@ define-npc "Piglet" description "Piglet is Pooh's best friend. He is always cheerful (except when he's scared) and always ready for a bit of fun." - says "Oh hello Pooh, good to see you!" + says "Hi there, Pooh, good to see you!" + says "I heard Tigger discovered a cave in the forest. Creepy, isn't it?" + quest "Find Woozle" define-npc "Kanga" description "Kanga is Roo's mother. She is very responsible, but also @@ -26,7 +28,8 @@ says "Hey Pooh, Tigger and I were going to go looking for Christopher Robin. Do you want to come along?" says "Hello Pooh, have you seen Christopher Robin anywhere?" - quest "Bring Mushrooms" + says "Pooh, Pooh, Tigger discovered a cave in the forest!" + quest "Bring mushrooms" define-npc "Tigger" description "Tigger is the most hyperactive animal you could imagine. His @@ -193,6 +196,18 @@ proof-item "Letter" experience 5 +define-quest "Find Woozle" + say-before "Oh Pooh, I found woozle tracks again! I'm pretty sure they + weren't mine this time... And now I'm scared to go anywhere + outdoors! You need to help me!" + say-after "Pooh, is that a woozle? Why, he's even smaller than me! And + isn't he cute? No need to be scared of him! + + You must be tired after your hunt. Here, have some honey!" + proof-item "Woozle" + reward-item "Hunny" + experience 5 + ; MONSTERS define-monster "Heffalump" diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 4d48394..fbf59ed 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -151,6 +151,20 @@ pickup-hook "ring-of-destiny" drop-hook "annoying-ring" +define-item "Woozle" + description "The Woozle is a strange animal. It is no larger than a mouse, + but with feet almost as big as your own. It also has big eyes, + big ears and incredibly fluffy fur." + pickup-hook "woozle-scratch" + drop-hook "woozle-disappear" + infinite + +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?" + fixed + define-item "Grandfather's cane" description "Piglet's grandfather used to carry this cane around with him. And woe to any young animal who dared to be disrespectful!" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 2673367..e92db3a 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -8,38 +8,46 @@ ; date: 20/07/2017 (defun eat (player &optional arg) - "Allow the player to eat something." - ;; XXX If any other edibles are added, split this function up + "Allow the player to eat something (dispatch function)." (cond ((null arg) (format t "~&What do you want to eat?")) - ;; Berries can be eaten any time, but don't have any effect - ((and (equalp arg "berries") - (member "berries" (player-item player) :test #'equalp)) - (format t "~&Mmmh, these berries are really delicious!") - (remove-object-attribute player 'item "berries")) - ;; Honey is reserved as medicine :-) - ((and (or (equalp arg "hunny") (equalp arg "honey")) - (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.") (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) - (remove-object-attribute player 'item "Hunny") - (set-object-attribute player 'item "Jar")))) - ;; Extract of Malt is very healthy, so obviously it can't be tasty... - ((and (or (equalp arg "extract of malt") (equalp arg "extract") (equalp arg "malt")) - (member "Extract of Malt" (player-item player) :test #'equalp)) - (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) - (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) - (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) - (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) - (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) - (format t "~&Something that disgusting can only be healthy. +1 HP") - (change-player-health player 1))) + ((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)) (T (format t "~&You can't eat that!")))) +(defun eat-berries (player) + "Berries can be eaten any time, but don't have any effect" + (if (member "berries" (player-item player) :test #'equalp) + (progn (format t "~&Mmmh, these berries are really delicious!") + (remove-object-attribute player 'item "berries")) + (format t "~&You don't have any berries!"))) + +(defun eat-honey (player) + "Honey is reserved as medicine :-)" + (if (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.") (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) + (remove-object-attribute player 'item "Hunny") + (set-object-attribute player 'item "Jar"))) + (format t "~&You don't have any honey!"))) + +(defun eat-malt (player) + "Extract of Malt is very healthy, so obviously it can't be tasty..." + (if (member "Extract of Malt" (player-item player) :test #'equalp) + (progn (format t "~&You open the bottle and tip it over a spoon.") (sleep 1) + (format t "~&A big dollop of Extract flows out slowly.") (sleep 3) + (format t "~&The smell of it makes you wrinkle your nose.") (sleep 2) + (format t "~&Without thinking much longer, you shove it into your mouth.") (sleep 1) + (format t "~&That's bitter! You scrunch up your face and try to swallow.") (sleep 3) + (format t "~&Something that disgusting can only be healthy. +1 HP") + (change-player-health player 1)) + (format t "~&You don't have any Extract of Malt!"))) + (defun study (player &optional arg) "Print out the map" (unless (member 'map (extract-elements arg)) @@ -98,7 +106,7 @@ (format t "~&Suddenly, you are no longer sure you are walking in the right") (format t "~&direction. Perhaps you should keep more to your left. Or to") (format t "~&your right? The trees all look the same here...") - (format t "~&You are walking in circles!") + (format t "~&You are walking in circles!~%~%Please press ENTER") (read-line) (change-player-location player lost-in) (spawn-monsters lost-in) @@ -223,8 +231,8 @@ (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")) - (110 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) - (unless (= sandcastle 110) (incf sandcastle 20)))) + (120 (format t "~&You've already built a sandcastle here! And a fine one it is too..."))) + (unless (= sandcastle 120) (incf sandcastle 20)))) (let ((score 0)) (defun poohsticks (player) @@ -266,6 +274,28 @@ "Nothing happens." "Nobody answers." "No reply."))) (format t "~&~A" (random-elt consequences)))) +(defun smell-honey (player &optional arg) + "The player smells honey when leaving the tunnel" + (let ((place (get-game-object 'place (player-place player)))) + (when (member "hunny" (place-hidden place) :test #'equalp) + (format t "~&For a brief second, the scent of honey wafts up to your nose.") + (sleep 2)))) + +(defun woozle-scratch (player &optional arg) + "The Woozle scratches when you try to pick him up." + (change-player-health player -1) + (format t "~&The woozle scratches you! -1 HP") + (when (> 55 (random 100)) + (sleep 1) + (format t "~&The woozle winds its way out of your arms.") + (sleep 1) + (drop player "Woozle"))) + +(defun woozle-disappear (player &optional arg) + "If you drop him, the Woozle escapes." + (let ((place (get-game-object 'place (player-place player)))) + (remove-object-attribute place 'item "Woozle") + (format t "~&The Woozle runs away!"))) ;; The golden ring is an easter egg referencing, of course, ;; The Lord of the Rings. diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5300102..cc7fa0d 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -22,4 +22,4 @@ define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Rapids" ;Development \ No newline at end of file + place "Piglet's home" ;Development \ No newline at end of file diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index e6abda4..2e53b6b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -124,6 +124,8 @@ requires "Lamp" neighbour "Deep forest" neighbour "Cave" + hidden "Hunny" + exit-hook "smell-honey" define-place "Cave" description "The tunnel suddenly opens out into a huge cavern. The walls are @@ -163,7 +165,6 @@ neighbour "Southern woods" neighbour "Eastern woods" neighbour "Floody place" - neighbour "The World" command "play" define-place "Piglet's porch" @@ -313,8 +314,13 @@ neighbour "Floody place" define-place "Woozle hideout" - description "TODO" + description "This is a small copse of larch trees, all standing tightly in a + circle. One fine winter day, you and Piglet went hunting here, + pursuing a Woozle. Only, the Woozle's footprints turned out to + be your own..." neighbour "Southern woods" + item "Tracks" + hidden "Woozle" define-place "Misty forest" description "You are surrounded by pines, their dead needles thickly carpeting diff --git a/doc/TODO b/doc/TODO index d838476..62912fb 100644 --- a/doc/TODO +++ b/doc/TODO @@ -8,8 +8,6 @@ * fix commands that break after reloading game * introduce honour roll * fill in missing place descriptions -* hide 2 more pots of honey -* think of more quests * integrate the quests to lead the player through the game @@ -23,13 +21,14 @@ 5. Heffalump 6. Kanga's quest 7. Eeyore's quest - 8. Bee tree - 9. Cave (?) - 10. + 8. Piglet's quest + 9. Bee tree + 10. Cave Quests: 1. Find the tail 2. Bring jacket 3. Bring mushrooms 4. Reading material - 5. Bring honey + 5. Find Woozle + 6. Bring honey diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 7d42db8..151e2dd 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -455,7 +455,7 @@ (decf (monster-health monster) damage) (format t "~&You hit! ~A points damage." damage) (when (> 1 (monster-health monster)) - (let ((experience (round (average m-str m-dex)))) + (let ((experience (* (+ m-str m-dex) 5))) ;XXX magic numbers! (dolist (i (monster-item monster)) (set-object-attribute place 'item i)) (remove-object-attribute place