diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 507d41a..ed9a900 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -19,6 +19,17 @@ (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.")) (T (format t "~&You can't eat that!")))) +(defun jump (player &optional arg) + "Jump off Pooh's branch onto his porch." + (format t "~&You look down nervously, then jump off the branch.") + (if (> 50 (random 100)) + (progn (format t "~&You land safely. That was fun!") + (add-player-experience player 3)) + (progn (format t "~&Ouch! That hurt! You take 3 fall damage.") + (change-player-health player -3))) + (read-line) + (goto player "Pooh's porch")) + (defun kanga-healing (player) "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 507d41a..ed9a900 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -19,6 +19,17 @@ (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.")) (T (format t "~&You can't eat that!")))) +(defun jump (player &optional arg) + "Jump off Pooh's branch onto his porch." + (format t "~&You look down nervously, then jump off the branch.") + (if (> 50 (random 100)) + (progn (format t "~&You land safely. That was fun!") + (add-player-experience player 3)) + (progn (format t "~&Ouch! That hurt! You take 3 fall damage.") + (change-player-health player -3))) + (read-line) + (goto player "Pooh's porch")) + (defun kanga-healing (player) "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 5a2ce85..ab5511b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -31,6 +31,7 @@ keeps an emergency ration of honey handy." neighbour "Pooh's home" neighbour "Pooh's porch" + command "jump" item "Hunny" define-place "Western woods" @@ -95,7 +96,7 @@ neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" - neighbour "Christopher Robin's porch" + neighbour "Christopher Robin's house" neighbour "Owl's porch" neighbour "Bridge" @@ -215,6 +216,7 @@ description "TODO" item "North Pole" neighbour "Northern woods" + neighbour "Misty forest" neighbour "Stream" define-place "Stream" @@ -259,6 +261,7 @@ description "TODO" item "Berries" neighbour "Sandy pit" + neighbour "Rapids" exit-hook "misty-forest" define-place "The World" diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 507d41a..ed9a900 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -19,6 +19,17 @@ (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.")) (T (format t "~&You can't eat that!")))) +(defun jump (player &optional arg) + "Jump off Pooh's branch onto his porch." + (format t "~&You look down nervously, then jump off the branch.") + (if (> 50 (random 100)) + (progn (format t "~&You land safely. That was fun!") + (add-player-experience player 3)) + (progn (format t "~&Ouch! That hurt! You take 3 fall damage.") + (change-player-health player -3))) + (read-line) + (goto player "Pooh's porch")) + (defun kanga-healing (player) "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 5a2ce85..ab5511b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -31,6 +31,7 @@ keeps an emergency ration of honey handy." neighbour "Pooh's home" neighbour "Pooh's porch" + command "jump" item "Hunny" define-place "Western woods" @@ -95,7 +96,7 @@ neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" - neighbour "Christopher Robin's porch" + neighbour "Christopher Robin's house" neighbour "Owl's porch" neighbour "Bridge" @@ -215,6 +216,7 @@ description "TODO" item "North Pole" neighbour "Northern woods" + neighbour "Misty forest" neighbour "Stream" define-place "Stream" @@ -259,6 +261,7 @@ description "TODO" item "Berries" neighbour "Sandy pit" + neighbour "Rapids" exit-hook "misty-forest" define-place "The World" diff --git a/doc/TODO b/doc/TODO new file mode 100644 index 0000000..c878ca6 --- /dev/null +++ b/doc/TODO @@ -0,0 +1,7 @@ +ATLANTIS TODO + +* add hidden items and the 'search' command +* fill in missing place descriptions +* hide 5 more pots of honey +* require XP minimum to finish game? +* think of more quests diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index 507d41a..ed9a900 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -19,6 +19,17 @@ (format t "~&The honey looks incredibly tempting, but perhaps you should save it for later.")) (T (format t "~&You can't eat that!")))) +(defun jump (player &optional arg) + "Jump off Pooh's branch onto his porch." + (format t "~&You look down nervously, then jump off the branch.") + (if (> 50 (random 100)) + (progn (format t "~&You land safely. That was fun!") + (add-player-experience player 3)) + (progn (format t "~&Ouch! That hurt! You take 3 fall damage.") + (change-player-health player -3))) + (read-line) + (goto player "Pooh's porch")) + (defun kanga-healing (player) "If the player is hurt, Kanga looks after him." (when (< (player-health player) (player-max-health player)) diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index 5a2ce85..ab5511b 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -31,6 +31,7 @@ keeps an emergency ration of honey handy." neighbour "Pooh's home" neighbour "Pooh's porch" + command "jump" item "Hunny" define-place "Western woods" @@ -95,7 +96,7 @@ neighbour "Central woods" neighbour "Northern woods" neighbour "Southern woods" - neighbour "Christopher Robin's porch" + neighbour "Christopher Robin's house" neighbour "Owl's porch" neighbour "Bridge" @@ -215,6 +216,7 @@ description "TODO" item "North Pole" neighbour "Northern woods" + neighbour "Misty forest" neighbour "Stream" define-place "Stream" @@ -259,6 +261,7 @@ description "TODO" item "Berries" neighbour "Sandy pit" + neighbour "Rapids" exit-hook "misty-forest" define-place "The World" diff --git a/doc/TODO b/doc/TODO new file mode 100644 index 0000000..c878ca6 --- /dev/null +++ b/doc/TODO @@ -0,0 +1,7 @@ +ATLANTIS TODO + +* add hidden items and the 'search' command +* fill in missing place descriptions +* hide 5 more pots of honey +* require XP minimum to finish game? +* think of more quests diff --git a/lisp/player.lisp b/lisp/player.lisp index 42f1081..d068cb1 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -66,6 +66,8 @@ (defun change-player-health (player amount) "Change the player's health points" (incf (player-health player) amount) + (when (> (player-health player) (player-max-health player)) + (setf (player-health player) (player-max-health player))) (when (> 1 (player-health player)) (error "You died!"))) ;; TODO adjust this