Autosaving

This commit is contained in:
2014-11-22 13:57:05 -08:00
parent 54b1f1497a
commit 919871ddc3
11 changed files with 100 additions and 60 deletions

View File

@@ -12,9 +12,9 @@
(def make-cat-toy
(actions/get-script entities
(actions/remove-item entities stick)
(actions/remove-item entities wool)
(actions/give entities cat-toy)
(actions/remove-item entities :stick)
(actions/remove-item entities :wool)
(actions/give entities :cat-toy)
(actions/talk entities :ego "It makes a little cat toy!")))
(def wool {:name "Wool" :value :wool :cursor :wool :scripts {:stick make-cat-toy}})
@@ -25,10 +25,10 @@
(defn make-cream-of-mushroom []
(actions/get-script entities
(actions/remove-item entities flask-1-with-mushrooms)
(actions/remove-item entities flask-1-with-milk)
(actions/remove-item entities mushrooms)
(actions/give entities flask-1-with-cream-of-mushroom)
(actions/remove-item entities :flask-1-with-mushrooms)
(actions/remove-item entities :flask-1-with-milk)
(actions/remove-item entities :mushrooms)
(actions/give entities :flask-1-with-cream-of-mushroom)
(actions/talk entities :ego "It's just like cream of mushroom soup.")))
(def flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents
@@ -37,9 +37,9 @@
(def flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-strength})
(def flask-1 {:name "Flask" :value :flask-1 :cursor :flask
:scripts {:mushrooms (actions/get-script entities
(actions/remove-item entities flask-1)
(actions/remove-item entities mushrooms)
(actions/give entities flask-1-with-mushrooms)
(actions/remove-item entities :flask-1)
(actions/remove-item entities :mushrooms)
(actions/give entities :flask-1-with-mushrooms)
(actions/talk entities :ego "I'll just put a few of these in here."))}})
(def trophy {:name "Trophy of wisdom" :value :trophy :cursor :trophy})
@@ -61,9 +61,9 @@
(defn make-strength-potion []
(actions/get-script entities
(actions/remove-item entities flask-1-with-cream-of-mushroom)
(actions/remove-item entities slobber)
(actions/give entities flask-1-strength)
(actions/remove-item entities :flask-1-with-cream-of-mushroom)
(actions/remove-item entities :slobber)
(actions/give entities :flask-1-strength)
(actions/talk entities :ego "It's the completed potion of strength!")))
(def slobber {:name "Bull slobber" :value :slobber :cursor :slobber :scripts {:flask-1-with-cream-of-mushroom (make-strength-potion)}})
@@ -73,3 +73,40 @@
(def medal {:name "Medal of strength" :value :medal :cursor :medal})
(def certificate {:name "Certificate of courage" :value :certificate :cursor :certificate})
(def items
{:wool {:name "Wool" :value :wool :cursor :wool :scripts {:stick make-cat-toy}}
:mushrooms {:name "Mushrooms" :value :mushrooms :cursor :mushrooms}
: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-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents
:scripts {:mushrooms (make-cream-of-mushroom)}}
: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 (actions/get-script entities
(actions/remove-item entities :flask-1)
(actions/remove-item entities :mushrooms)
(actions/give entities :flask-1-with-mushrooms)
(actions/talk entities :ego "I'll just put a few of these in here."))}}
:trophy {:name "Trophy of wisdom" :value :trophy :cursor :trophy}
:cheat-deck {:name "Warlock's Tower cheat deck" :value :cheat-deck :cursor :cheat-deck}
:cat-toy {:name "Cat toy" :value :cat-toy :cursor :cat-toy}
:stick {:name "Stick" :value :stick :cursor :stick :scripts {:wool make-cat-toy}}
:balloon {:name "Choicest of balloons" :value :balloon :cursor :balloon}
:frog-legs {:name "Frog legs" :value :frog-legs :cursor :frog-legs}
:ladder {:name "ladder" :value :ladder :cursor :ladder}
:teddy {:name "Teddy Bear" :value :teddy :cursor :teddy}
:portrait {:name "Portrait" :value :portrait :cursor :portrait}
:recipe {:name "Strength potion recipe" :value :recipe :cursor :recipe}
:glass-eye {:name "Choicest of glass eyes" :value :glass-eye :cursor :glass-eye}
: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 "Huge grass" :value :grass :cursor :grass}
:slobber {:name "Bull slobber" :value :slobber :cursor :slobber :scripts {:flask-1-with-cream-of-mushroom (make-strength-potion)}}
: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 (make-strength-potion)}}
:medal {:name "Medal of strength" :value :medal :cursor :medal}
:certificate {:name "Certificate of courage" :value :certificate :cursor :certificate}
})