# HG changeset patch # User Steve Losh # Date 1470795339 0 # Node ID 3f8706de9d352dfbd39fd52b29ff51e2c1ffcefe # Parent d792f112d546aedb7f0c9d1019274826036a37b7 Add more glyphs diff -r d792f112d546 -r 3f8706de9d35 silt.lisp --- a/silt.lisp Tue Aug 09 21:02:55 2016 +0000 +++ b/silt.lisp Wed Aug 10 02:15:39 2016 +0000 @@ -601,7 +601,7 @@ (define-system grow-fruit ((entity fruiting coords)) - (when (< (random 1.0) (fruiting/chance entity)) + (when (randomp (fruiting/chance entity)) (make-fruit (wrap (random-around (coords/x entity) 2)) (wrap (random-around (coords/y entity) 2))))) @@ -618,7 +618,7 @@ (for x :from 0 :below +world-size+) (iterate (for y :from 0 :below +world-size+) - (when (< (random 1.0) (tree-probability x y)) + (when (randomp (tree-probability x y)) (make-tree x y))))) @@ -664,7 +664,8 @@ +color-pink-black+)) (defparameter *creature-glyphs* - (vector "@" "$" "?" "!" "&" "+")) + (vector "@" "$" "?" "!" "&" "+" "☃" "$" "&" "¥" + "£" "¤" "€" "‡" "¶" "µ" "¢" "¬" "¿" "§")) (defun creature-mutate-glyph (c) @@ -701,10 +702,10 @@ (defun creature-should-reproduce-p (c) (and (> (metabolizing/energy c) 1000) - (< (random 1.0) 0.01))) + (randomp 0.01))) (defun creature-should-mutate-p () - (< (random 1.0) 0.5)) + (randomp 0.6)) (defun creature-reproduce (parent) (let* ((energy (floor (metabolizing/energy parent) 2))