made it so you can make the spell componoent.

This commit is contained in:
2014-12-28 12:54:38 -08:00
parent 262291d6ec
commit 527c6eefe2
6 changed files with 37 additions and 9 deletions

View File

@@ -140,12 +140,12 @@
(actions/give entities :flask-2))))
(defn add-wizard-if-necessary [entities]
(if (actions/has-item? entities :flask-water)
(if (actions/has-obtained? entities :flask-water)
entities
(update-in entities [:room :entities] #(assoc % :wizard (get-in entities [:room :wizard])))))
(defn add-note-if-necessary [entities]
(if (and (actions/has-item? entities :flask-water)
(if (and (actions/has-obtained? entities :flask-water)
(not (actions/has-obtained? entities :note-1)))
(update-in entities [:room :entities] #(assoc % :note (get-in entities [:room :note])))
entities))