diff --git a/doc/PLAYING b/doc/PLAYING index e68c5ad..148ccdd 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -22,8 +22,6 @@ you. In a menu like this, you can choose an option by typing the relevant number and pressing ENTER. (Commands to the computer must always be terminated by pressing ENTER.) - -## TODO Include autosave! The first option, "Start a new game", will first ask you for your name. (This is needed to save the game.) It then drops you into a submenu in which you can @@ -90,6 +88,9 @@ or in possession of the item. If any place/item provides commands, it is so indicated in the game. +help - This will give a list of game commands with a concise description for + quick reference. + look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location @@ -141,4 +142,4 @@ Daniel Vedder -Last modified 20/10/2017 +Last modified 21/10/2017 diff --git a/doc/PLAYING b/doc/PLAYING index e68c5ad..148ccdd 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -22,8 +22,6 @@ you. In a menu like this, you can choose an option by typing the relevant number and pressing ENTER. (Commands to the computer must always be terminated by pressing ENTER.) - -## TODO Include autosave! The first option, "Start a new game", will first ask you for your name. (This is needed to save the game.) It then drops you into a submenu in which you can @@ -90,6 +88,9 @@ or in possession of the item. If any place/item provides commands, it is so indicated in the game. +help - This will give a list of game commands with a concise description for + quick reference. + look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location @@ -141,4 +142,4 @@ Daniel Vedder -Last modified 20/10/2017 +Last modified 21/10/2017 diff --git a/doc/TODO b/doc/TODO index 887e41c..d838476 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,9 +1,12 @@ ATLANTIS TODO LISP +* update Helios guide (include bug reporting with 'archive') * split ui.lisp into two modules (one for interaction functions) -ATL +ATL +* 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 @@ -29,4 +32,4 @@ 2. Bring jacket 3. Bring mushrooms 4. Reading material - 5. Bring honey \ No newline at end of file + 5. Bring honey diff --git a/doc/PLAYING b/doc/PLAYING index e68c5ad..148ccdd 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -22,8 +22,6 @@ you. In a menu like this, you can choose an option by typing the relevant number and pressing ENTER. (Commands to the computer must always be terminated by pressing ENTER.) - -## TODO Include autosave! The first option, "Start a new game", will first ask you for your name. (This is needed to save the game.) It then drops you into a submenu in which you can @@ -90,6 +88,9 @@ or in possession of the item. If any place/item provides commands, it is so indicated in the game. +help - This will give a list of game commands with a concise description for + quick reference. + look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location @@ -141,4 +142,4 @@ Daniel Vedder -Last modified 20/10/2017 +Last modified 21/10/2017 diff --git a/doc/TODO b/doc/TODO index 887e41c..d838476 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,9 +1,12 @@ ATLANTIS TODO LISP +* update Helios guide (include bug reporting with 'archive') * split ui.lisp into two modules (one for interaction functions) -ATL +ATL +* 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 @@ -29,4 +32,4 @@ 2. Bring jacket 3. Bring mushrooms 4. Reading material - 5. Bring honey \ No newline at end of file + 5. Bring honey diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 611c7eb..6970752 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -42,8 +42,10 @@ "Advanced" "Help" "About" "Exit")) (case (choose-number-option options) (0 ;; ask the player for his/her name - (format t "~&What is your name? ") - (setf player-name (read-line)) + (setf player-name "") + (while (zerop (length player-name)) + (format t "~&What is your name? ") + (setf player-name (read-line))) (if (and (member player-name (mapcar #'pathname-name (directory "../saves/*")) :test #'equalp) diff --git a/doc/PLAYING b/doc/PLAYING index e68c5ad..148ccdd 100644 --- a/doc/PLAYING +++ b/doc/PLAYING @@ -22,8 +22,6 @@ you. In a menu like this, you can choose an option by typing the relevant number and pressing ENTER. (Commands to the computer must always be terminated by pressing ENTER.) - -## TODO Include autosave! The first option, "Start a new game", will first ask you for your name. (This is needed to save the game.) It then drops you into a submenu in which you can @@ -90,6 +88,9 @@ or in possession of the item. If any place/item provides commands, it is so indicated in the game. +help - This will give a list of game commands with a concise description for + quick reference. + look - This is the most versatile command in the game. With it, you can inspect any item, NPC or monster (e.g. look cook). You can also bring up information about yourself with "look me" or about your current location @@ -141,4 +142,4 @@ Daniel Vedder -Last modified 20/10/2017 +Last modified 21/10/2017 diff --git a/doc/TODO b/doc/TODO index 887e41c..d838476 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,9 +1,12 @@ ATLANTIS TODO LISP +* update Helios guide (include bug reporting with 'archive') * split ui.lisp into two modules (one for interaction functions) -ATL +ATL +* 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 @@ -29,4 +32,4 @@ 2. Bring jacket 3. Bring mushrooms 4. Reading material - 5. Bring honey \ No newline at end of file + 5. Bring honey diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 611c7eb..6970752 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -42,8 +42,10 @@ "Advanced" "Help" "About" "Exit")) (case (choose-number-option options) (0 ;; ask the player for his/her name - (format t "~&What is your name? ") - (setf player-name (read-line)) + (setf player-name "") + (while (zerop (length player-name)) + (format t "~&What is your name? ") + (setf player-name (read-line))) (if (and (member player-name (mapcar #'pathname-name (directory "../saves/*")) :test #'equalp) diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 86f6e68..7d42db8 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -124,7 +124,7 @@ (defvar *commands* '(help look goto take inventory drop talk equip attack - seek clear manual)) + seek clear manual archive)) ;;; Command functions have to take two arguments (a player instance and ;;; an optional(!) argument to the function). @@ -143,6 +143,13 @@ (clear-screen) (describe-place (player-place player))) +(defun archive (player &optional arg) + "Save a snapshot of the current game state (especially for debugging)" + (let ((archive-name (concatenate 'string "../" + (world-player-name *world*) "_archive.world"))) + (save-world archive-name) + (format t "~&Archived game to ~A." archive-name))) + (defun inventory (player &optional arg) "A wrapper for 'look me'" (look player "me")) @@ -227,7 +234,7 @@ (return-from talk)) ;; Allow for a bit of syntactic sugar (let ((split-name (cut-string npc-name 3))) - (when (and (< 1 (length split-name)) (equalp (first split-name) "to ")) + (when (and (listp split-name) (equalp (first split-name) "to ")) (setf npc-name (second split-name)))) (let* ((place (get-game-object 'place (player-place player))) (npc-name (fuzzy-match npc-name (place-npc place)))