# HG changeset patch # User Steve Losh # Date 1483883572 0 # Node ID 903ab2ce309ce4ea2ec8ce62aa2e982ea9e4568b # Parent 42e7e264ebdd75b829c4056a055aff4296b39465 More flavors diff -r 42e7e264ebdd -r 903ab2ce309c data/help.txt --- 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 diff -r 42e7e264ebdd -r 903ab2ce309c src/entities/food.lisp --- 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