From 0b69e6825fc93c7c230418e6fc3e3fcdcce8962d Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 18 Feb 2016 07:53:48 -0800 Subject: [PATCH] added error messages for the ambitious alchemist. --- desktop/last-release | 2 +- desktop/src-common/advent/screens/items.clj | 28 ++++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/desktop/last-release b/desktop/last-release index 920a1396..c739b42c 100644 --- a/desktop/last-release +++ b/desktop/last-release @@ -1 +1 @@ -43 +44 diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index fa008840..5e25a5ba 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -69,6 +69,13 @@ (actions/talk entities :ego "I'll just put a few of these in here.")) (actions/talk entities :ego "I don't know if I could get them back out.")))) +(defn not-ready [] + (actions/get-script entities + (if (actions/has-item? entities :recipe) + (actions/do-dialogue entities :ego "I don't think it's quite ready for that." + :ego "Maybe I should double-check the recipe.") + (actions/talk entities :ego "I'm not sure I could get it back out.")))) + (declare items) (defn mix-ingredients [base] (fn [other] @@ -93,13 +100,18 @@ :scripts {:flask-1-with-milk (actions/get-script entities (make-cream-of-mushroom entities)) :flask-1 (add-mushrooms-to-flask)}} :carrot {:name "Carrot" :value :carrot :cursor :carrot} - :flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents} + :flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents + :scripts {:mandrake (not-ready) :slobber (not-ready)}} :flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents - :scripts {:mushrooms (actions/get-script entities (make-cream-of-mushroom entities))}} + :scripts {:mushrooms (actions/get-script entities (make-cream-of-mushroom entities)) + :slobber (not-ready) + :mandrake (not-ready)}} :flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-strength} :flask-1 {:name "Flask" :value :flask-1 :cursor :flask - :scripts {:mushrooms (add-mushrooms-to-flask)}} + :scripts {:mushrooms (add-mushrooms-to-flask) + :mandrake (not-ready) + :slobber (not-ready)}} :trophy {:name "Trophy of wisdom" :value :trophy :cursor :trophy} :cat-toy {:name "Cat toy" :value :cat-toy :cursor :cat-toy} :stick {:name "Stick" :value :stick :cursor :stick :scripts {:wool make-cat-toy}} @@ -113,16 +125,20 @@ :motivational-tapes {:name "Choicest motivational tapes" :value :motivational-tapes :cursor :motivational-tapes} :used-earplugs {:name "Choicest used earplugs" :value :used-earplugs :cursor :used-earplugs} :grass {:name "High protein grass" :value :grass :cursor :grass} - :slobber {:name "Bull slobber" :value :slobber :cursor :slobber :scripts {:flask-1-with-cream-of-mushroom (add-slobber)}} + :slobber {:name "Bull slobber" :value :slobber :cursor :slobber :scripts {:flask-1-with-mushrooms (not-ready) :flask-1-with-milk (not-ready) :flask-1 (not-ready) :flask-1-with-cream-of-mushroom (add-slobber)}} :flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents - :scripts {:slobber (add-slobber)}} + :scripts {:slobber (add-slobber) :mandrake (not-ready)}} :flask-1-slobber {:name "Cream of mushrooms soup and bull slobber" :value :flask-1-slobber :cursor :flask-with-contents :scripts {:mandrake (make-strength-potion)}} :medal {:name "Medal of strength" :value :medal :cursor :medal} :kiss {:name "Kiss for courage" :value :kiss :cursor :kiss} :sword {:name "Sword of Blergh" :value :sword :cursor :sword} :mandrake {:name "Mandrake root" :value :mandrake :cursor :mandrake - :scripts {:flask-1-slobber (make-strength-potion) }} + :scripts {:flask-1-slobber (make-strength-potion) + :flask-1-with-cream-of-mushroom (not-ready) + :flask-1-with-milk (not-ready) + :flask-1-with-mushrooms (not-ready) + :flask-1 (not-ready)}} :ball-n-chain {:name "Ball-n-chain" :value :ball-n-chain :cursor :ball-n-chain} :key {:name "Jail key" :value :key :cursor :key} :rope {:name "Rope" :value :rope :cursor :rope}