903ab2ce309c

More flavors
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 08 Jan 2017 13:52:52 +0000
parents 42e7e264ebdd
children ea80c30bf217
branches/tags (none)
files data/help.txt src/entities/food.lisp

Changes

--- a/data/help.txt	Sun Jan 08 13:33:27 2017 +0000
+++ b/data/help.txt	Sun Jan 08 13:52:52 2017 +0000
@@ -5,3 +5,5 @@
 ←↑↓→ - move
    q - quit
    g - get item
+   d - drop item
+   e - eat item
--- a/src/entities/food.lisp	Sun Jan 08 13:33:27 2017 +0000
+++ b/src/entities/food.lisp	Sun Jan 08 13:52:52 2017 +0000
@@ -5,6 +5,35 @@
                (read-file-into-form "data/vegetables.lisp")
                (read-file-into-form "data/meat.lisp")))
 
+(defparameter *tastes*
+  #("a bit rotten"
+    "a bit strange"
+    "awful"
+    "better than nothing"
+    "better than you expected"
+    "crunchy"
+    "decent"
+    "delicious"
+    "depressing"
+    "expensive"
+    "faintly of mice"
+    "gritty"
+    "horrifying"
+    "like an old sock"
+    "like it's brand new"
+    "like it's starting to go bad"
+    "like something else"
+    "like something your father used to make"
+    "like something your mother used to make"
+    "musty"
+    "okay"
+    "pretty nice"
+    "questionable"
+    "salty"
+    "sour"
+    "spicy"
+    "wonderful"))
+
 
 (define-entity food (visible coords holdable)
   (energy :accessor food/energy :initarg :food/energy))
@@ -19,22 +48,7 @@
 
 (defun random-food-taste ()
   (format nil "It tastes ~A."
-          (random-elt #("delicious"
-                        "okay"
-                        "wonderful"
-                        "decent"
-                        "musty"
-                        "salty"
-                        "awful"
-                        "depressing"
-                        "like something else"
-                        "faintly of mice"
-                        "better than nothing"
-                        "questionable"
-                        "pretty nice"
-                        "expensive"
-                        "horrifying"
-                        "like an old sock"))))
+          (random-elt *tastes*)))
 
 (defun make-food (x y)
   (create-entity 'food