diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 74a82fe..f03f30a 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -117,7 +117,11 @@ description "A bright red balloon, it must have been left over from our last birthday party. Can you blow it up?" command "blow" - + +define-item "Picture frame" + description "You made this picture frame from four sticks and some string. + Not very good perhaps, but it will do." + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -204,4 +208,17 @@ And woe to any young animal who dared to be disrespectful!" type "Cane" damage 4 - \ No newline at end of file + +define-item "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + weapon + +define-weapon "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + type "Sword" + damage 5 + \ No newline at end of file diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 74a82fe..f03f30a 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -117,7 +117,11 @@ description "A bright red balloon, it must have been left over from our last birthday party. Can you blow it up?" command "blow" - + +define-item "Picture frame" + description "You made this picture frame from four sticks and some string. + Not very good perhaps, but it will do." + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -204,4 +208,17 @@ And woe to any young animal who dared to be disrespectful!" type "Cane" damage 4 - \ No newline at end of file + +define-item "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + weapon + +define-weapon "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + type "Sword" + damage 5 + \ No newline at end of file diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index a78f59c..152fd90 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -347,8 +347,37 @@ (defun craft (player &optional arg) "The player can craft various items in Christopher Robin's workshop." - ;TODO - ) + (format t "~&What would you like to make?") + (case (choose-number-option '("Wooden sword" "Picture frame" "Nothing")) + (0 (craft-item player "Wooden sword" '("Stick" "Stick" "String") + "../ATL/Pooh/dialogue/sword.txt")) + (1 (craft-item player "Picture frame" + '("Stick" "Stick" "Stick" "Stick" "String") + "../ATL/Pooh/dialogue/pictureframe.txt")) + (2 NIL))) + +(defun craft-item (player item-name requirements dialogue-file) + "A generic crafting function - helper function for (craft)" + (dolist (r1 requirements) + (unless (member r1 (player-item player) :test #'equalp) + (format t "~&To craft this, you need: ~A" requirements) + (return-from craft-item))) + (dolist (r2 requirements) + (remove-object-attribute player 'item r2)) + (set-object-attribute player 'item item-name) + (narrate dialogue-file)) + +(defun clueless (player &optional arg) + "A.A. Milne gives clues to the player in exchange for berries." + (if (member "berries" (player-item player) :test #'equalp) + (when (y-or-n-p "~%Give Mr Milne some berries?") + (format t "~&~%MR MILNE:~%Thank you very much, Pooh!") + (format t "~&Here's a clue for you in return:") + (format t "~&~A" (random-elt (load-text-file "../ATL/Pooh/dialogue/clues.txt")))) + (progn + (format t "~&~%I'd love to eat some berries just now. If you bring me some,") + (format t "~&I'll get even by giving you a little clue for the game.") (sleep 3) + (format t "~&How about that?")))) ;; 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 b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 74a82fe..f03f30a 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -117,7 +117,11 @@ description "A bright red balloon, it must have been left over from our last birthday party. Can you blow it up?" command "blow" - + +define-item "Picture frame" + description "You made this picture frame from four sticks and some string. + Not very good perhaps, but it will do." + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -204,4 +208,17 @@ And woe to any young animal who dared to be disrespectful!" type "Cane" damage 4 - \ No newline at end of file + +define-item "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + weapon + +define-weapon "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + type "Sword" + damage 5 + \ No newline at end of file diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index a78f59c..152fd90 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -347,8 +347,37 @@ (defun craft (player &optional arg) "The player can craft various items in Christopher Robin's workshop." - ;TODO - ) + (format t "~&What would you like to make?") + (case (choose-number-option '("Wooden sword" "Picture frame" "Nothing")) + (0 (craft-item player "Wooden sword" '("Stick" "Stick" "String") + "../ATL/Pooh/dialogue/sword.txt")) + (1 (craft-item player "Picture frame" + '("Stick" "Stick" "Stick" "Stick" "String") + "../ATL/Pooh/dialogue/pictureframe.txt")) + (2 NIL))) + +(defun craft-item (player item-name requirements dialogue-file) + "A generic crafting function - helper function for (craft)" + (dolist (r1 requirements) + (unless (member r1 (player-item player) :test #'equalp) + (format t "~&To craft this, you need: ~A" requirements) + (return-from craft-item))) + (dolist (r2 requirements) + (remove-object-attribute player 'item r2)) + (set-object-attribute player 'item item-name) + (narrate dialogue-file)) + +(defun clueless (player &optional arg) + "A.A. Milne gives clues to the player in exchange for berries." + (if (member "berries" (player-item player) :test #'equalp) + (when (y-or-n-p "~%Give Mr Milne some berries?") + (format t "~&~%MR MILNE:~%Thank you very much, Pooh!") + (format t "~&Here's a clue for you in return:") + (format t "~&~A" (random-elt (load-text-file "../ATL/Pooh/dialogue/clues.txt")))) + (progn + (format t "~&~%I'd love to eat some berries just now. If you bring me some,") + (format t "~&I'll get even by giving you a little clue for the game.") (sleep 3) + (format t "~&How about that?")))) ;; 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 05a355a..70ffe8a 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -23,5 +23,4 @@ ;TODO development - remove before release define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Owl's porch" - item "Letter" ;FIXME gives problems \ No newline at end of file + place "Eastern woods" \ No newline at end of file diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 74a82fe..f03f30a 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -117,7 +117,11 @@ description "A bright red balloon, it must have been left over from our last birthday party. Can you blow it up?" command "blow" - + +define-item "Picture frame" + description "You made this picture frame from four sticks and some string. + Not very good perhaps, but it will do." + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -204,4 +208,17 @@ And woe to any young animal who dared to be disrespectful!" type "Cane" damage 4 - \ No newline at end of file + +define-item "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + weapon + +define-weapon "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + type "Sword" + damage 5 + \ No newline at end of file diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index a78f59c..152fd90 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -347,8 +347,37 @@ (defun craft (player &optional arg) "The player can craft various items in Christopher Robin's workshop." - ;TODO - ) + (format t "~&What would you like to make?") + (case (choose-number-option '("Wooden sword" "Picture frame" "Nothing")) + (0 (craft-item player "Wooden sword" '("Stick" "Stick" "String") + "../ATL/Pooh/dialogue/sword.txt")) + (1 (craft-item player "Picture frame" + '("Stick" "Stick" "Stick" "Stick" "String") + "../ATL/Pooh/dialogue/pictureframe.txt")) + (2 NIL))) + +(defun craft-item (player item-name requirements dialogue-file) + "A generic crafting function - helper function for (craft)" + (dolist (r1 requirements) + (unless (member r1 (player-item player) :test #'equalp) + (format t "~&To craft this, you need: ~A" requirements) + (return-from craft-item))) + (dolist (r2 requirements) + (remove-object-attribute player 'item r2)) + (set-object-attribute player 'item item-name) + (narrate dialogue-file)) + +(defun clueless (player &optional arg) + "A.A. Milne gives clues to the player in exchange for berries." + (if (member "berries" (player-item player) :test #'equalp) + (when (y-or-n-p "~%Give Mr Milne some berries?") + (format t "~&~%MR MILNE:~%Thank you very much, Pooh!") + (format t "~&Here's a clue for you in return:") + (format t "~&~A" (random-elt (load-text-file "../ATL/Pooh/dialogue/clues.txt")))) + (progn + (format t "~&~%I'd love to eat some berries just now. If you bring me some,") + (format t "~&I'll get even by giving you a little clue for the game.") (sleep 3) + (format t "~&How about that?")))) ;; 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 05a355a..70ffe8a 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -23,5 +23,4 @@ ;TODO development - remove before release define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Owl's porch" - item "Letter" ;FIXME gives problems \ No newline at end of file + place "Eastern woods" \ No newline at end of file diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index e941c33..c526fb7 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -330,7 +330,9 @@ hidden "Golden ring" define-place "Eeyore's gloomy place" - description "TODO" + description "This is where Eeyore lives. It is indeed rather gloomy - perhaps + that is why he is always so grumpy. A cold wind blows through the + hedges and makes the scraggly pasture even more uncomfortable." npc "Eeyore" neighbour "Southern woods" neighbour "Floody place" diff --git a/ATL/Pooh/characters.atl b/ATL/Pooh/characters.atl index b875a61..c5ba457 100644 --- a/ATL/Pooh/characters.atl +++ b/ATL/Pooh/characters.atl @@ -111,7 +111,7 @@ says "Hello Pooh, how very good to see you! I heard you are looking for my son, Christopher Robin? You are a brave bear to be looking all the way down here! Perhaps we can help you." - interaction-hook "cheating" + interaction-hook "clueless" define-npc "Mr Shepard" description "Ernest H. Shepard looks like a man with plenty of humour. diff --git a/ATL/Pooh/dialogue/clues.txt b/ATL/Pooh/dialogue/clues.txt new file mode 100644 index 0000000..a60da7c --- /dev/null +++ b/ATL/Pooh/dialogue/clues.txt @@ -0,0 +1,2 @@ +Don't forget to search your own home. +Honey is made by bees, but collecting it can be a bit of work. diff --git a/ATL/Pooh/dialogue/pictureframe.txt b/ATL/Pooh/dialogue/pictureframe.txt new file mode 100644 index 0000000..6746050 --- /dev/null +++ b/ATL/Pooh/dialogue/pictureframe.txt @@ -0,0 +1,5 @@ +You carefully select four straight sticks. +You whittle down any rough bits you find. +You arrange them in a rectangle and tie them together with some string. +For good measure, you also drive a nail through each corner. +Your picture frame looks just about finished. diff --git a/ATL/Pooh/dialogue/sword.txt b/ATL/Pooh/dialogue/sword.txt new file mode 100644 index 0000000..0e9b14f --- /dev/null +++ b/ATL/Pooh/dialogue/sword.txt @@ -0,0 +1,8 @@ +You choose a nice long piece of wood. +You weigh it in your hands, imagining it as a sword. +You clamp it in the vice and start planing it down. +Slowly, the blade begins to take shape. +Next, you take a smaller piece of wood and cut it to size. +You lay it over the blade to form a cross guard. +You nail the cross guard to the blade. +Finally, you wrap the hilt with string to give you a good grip. diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 74a82fe..f03f30a 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -117,7 +117,11 @@ description "A bright red balloon, it must have been left over from our last birthday party. Can you blow it up?" command "blow" - + +define-item "Picture frame" + description "You made this picture frame from four sticks and some string. + Not very good perhaps, but it will do." + define-item "Jacket" description "This is a small, bright red rain jacket. It looks about the right size to fit Roo." @@ -204,4 +208,17 @@ And woe to any young animal who dared to be disrespectful!" type "Cane" damage 4 - \ No newline at end of file + +define-item "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + weapon + +define-weapon "Wooden sword" + description "This is a wooden sword that you made all by yourself! It has + a long blade, a cross guard to protect your hands, and a + comfortable grip." + type "Sword" + damage 5 + \ No newline at end of file diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index a78f59c..152fd90 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -347,8 +347,37 @@ (defun craft (player &optional arg) "The player can craft various items in Christopher Robin's workshop." - ;TODO - ) + (format t "~&What would you like to make?") + (case (choose-number-option '("Wooden sword" "Picture frame" "Nothing")) + (0 (craft-item player "Wooden sword" '("Stick" "Stick" "String") + "../ATL/Pooh/dialogue/sword.txt")) + (1 (craft-item player "Picture frame" + '("Stick" "Stick" "Stick" "Stick" "String") + "../ATL/Pooh/dialogue/pictureframe.txt")) + (2 NIL))) + +(defun craft-item (player item-name requirements dialogue-file) + "A generic crafting function - helper function for (craft)" + (dolist (r1 requirements) + (unless (member r1 (player-item player) :test #'equalp) + (format t "~&To craft this, you need: ~A" requirements) + (return-from craft-item))) + (dolist (r2 requirements) + (remove-object-attribute player 'item r2)) + (set-object-attribute player 'item item-name) + (narrate dialogue-file)) + +(defun clueless (player &optional arg) + "A.A. Milne gives clues to the player in exchange for berries." + (if (member "berries" (player-item player) :test #'equalp) + (when (y-or-n-p "~%Give Mr Milne some berries?") + (format t "~&~%MR MILNE:~%Thank you very much, Pooh!") + (format t "~&Here's a clue for you in return:") + (format t "~&~A" (random-elt (load-text-file "../ATL/Pooh/dialogue/clues.txt")))) + (progn + (format t "~&~%I'd love to eat some berries just now. If you bring me some,") + (format t "~&I'll get even by giving you a little clue for the game.") (sleep 3) + (format t "~&How about that?")))) ;; 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 05a355a..70ffe8a 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -23,5 +23,4 @@ ;TODO development - remove before release define-player "Christopher Robin" description "Christopher Robin is my game dev character." - place "Owl's porch" - item "Letter" ;FIXME gives problems \ No newline at end of file + place "Eastern woods" \ No newline at end of file diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index e941c33..c526fb7 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -330,7 +330,9 @@ hidden "Golden ring" define-place "Eeyore's gloomy place" - description "TODO" + description "This is where Eeyore lives. It is indeed rather gloomy - perhaps + that is why he is always so grumpy. A cold wind blows through the + hedges and makes the scraggly pasture even more uncomfortable." npc "Eeyore" neighbour "Southern woods" neighbour "Floody place" diff --git a/doc/TODO b/doc/TODO index ec2d54f..add16c3 100644 --- a/doc/TODO +++ b/doc/TODO @@ -6,9 +6,8 @@ ATL * hide 2 more pots of honey -* write the 'craft' command -* delete cave quests * add Owl's quest +* add "Thoughtful Spot" * fill in missing place descriptions @@ -24,7 +23,7 @@ 7. Eeyore's quest 8. Piglet's quest 9. Owl's quest (?) - 10. Mr. Shepard (?) + 10. Thoughtful spot 11. Bee tree 12. Cave