adding strength potion transformation.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -6,6 +6,10 @@
|
|||||||
(declare wool)
|
(declare wool)
|
||||||
(declare cat-toy)
|
(declare cat-toy)
|
||||||
(declare flask-1-with-milk)
|
(declare flask-1-with-milk)
|
||||||
|
(declare slobber)
|
||||||
|
(declare flask-1-strength)
|
||||||
|
(declare flask-1-with-cream-of-mushroom)
|
||||||
|
|
||||||
(def make-cat-toy
|
(def make-cat-toy
|
||||||
(actions/get-script entities
|
(actions/get-script entities
|
||||||
(actions/remove-item entities stick)
|
(actions/remove-item entities stick)
|
||||||
@@ -18,8 +22,6 @@
|
|||||||
(def carrot {:name "Carrot" :value :carrot :cursor :carrot})
|
(def carrot {:name "Carrot" :value :carrot :cursor :carrot})
|
||||||
|
|
||||||
(def flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents})
|
(def flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents})
|
||||||
(def flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents})
|
|
||||||
|
|
||||||
|
|
||||||
(defn make-cream-of-mushroom []
|
(defn make-cream-of-mushroom []
|
||||||
(actions/get-script entities
|
(actions/get-script entities
|
||||||
@@ -32,7 +34,7 @@
|
|||||||
(def flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents
|
(def flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents
|
||||||
:scripts {:mushrooms (make-cream-of-mushroom)}})
|
:scripts {:mushrooms (make-cream-of-mushroom)}})
|
||||||
|
|
||||||
(def flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-contents})
|
(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
|
(def flask-1 {:name "Flask" :value :flask-1 :cursor :flask
|
||||||
:scripts {:mushrooms (actions/get-script entities
|
:scripts {:mushrooms (actions/get-script entities
|
||||||
(actions/remove-item entities flask-1)
|
(actions/remove-item entities flask-1)
|
||||||
@@ -56,4 +58,15 @@
|
|||||||
(def motivational-tapes {:name "Choicest motivational tapes" :value :motivational-tapes :cursor :motivational-tapes})
|
(def motivational-tapes {:name "Choicest motivational tapes" :value :motivational-tapes :cursor :motivational-tapes})
|
||||||
(def used-earplugs {:name "Choicest used earplugs" :value :used-earplugs :cursor :used-earplugs})
|
(def used-earplugs {:name "Choicest used earplugs" :value :used-earplugs :cursor :used-earplugs})
|
||||||
(def grass {:name "Huge grass" :value :grass :cursor :grass})
|
(def grass {:name "Huge grass" :value :grass :cursor :grass})
|
||||||
(def slobber {:name "Bull slobber" :value :slobber :cursor :slobber})
|
|
||||||
|
(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/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)}})
|
||||||
|
(def 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)}})
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
(actions/give entities items/flask-1-with-milk)
|
(actions/give entities items/flask-1-with-milk)
|
||||||
(actions/talk entities :ego "Sheeps milk."))
|
(actions/talk entities :ego "Sheeps milk."))
|
||||||
(actions/talk entities :ego "She's too far away.")))
|
(actions/talk entities :ego "She's too far away.")))
|
||||||
items/flask-1-with-mushrooms (items/make-cream-of-mushroom)}
|
:flask-1-with-mushrooms (items/make-cream-of-mushroom)}
|
||||||
:left {:walk (utils/flip sheep-walk)
|
:left {:walk (utils/flip sheep-walk)
|
||||||
:stand (utils/flip sheep-stand)}
|
:stand (utils/flip sheep-stand)}
|
||||||
:right {:walk sheep-walk
|
:right {:walk sheep-walk
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
|
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
|
||||||
squat-sheet (texture! (texture "ego/squat.png") :split 18 36)
|
squat-sheet (texture! (texture "ego/squat.png") :split 18 36)
|
||||||
reach-sheet (texture! (texture "ego/reach.png") :split 18 36)
|
reach-sheet (texture! (texture "ego/reach.png") :split 18 36)
|
||||||
|
grow-sheet (texture! (texture "ego/grow.png") :split 18 36)
|
||||||
cat-toy-sheet (texture! (texture "ego/cat-toy.png") :split 41 50)
|
cat-toy-sheet (texture! (texture "ego/cat-toy.png") :split 41 50)
|
||||||
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
|
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
|
||||||
walk-right (animation 0.075 (for [i (range 8)]
|
walk-right (animation 0.075 (for [i (range 8)]
|
||||||
@@ -107,6 +108,8 @@
|
|||||||
(texture (aget fire-sheet 0 i))))
|
(texture (aget fire-sheet 0 i))))
|
||||||
fire-3-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 8 9 10 11 2 2 2 2 2 2 2 2 0]]
|
fire-3-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 8 9 10 11 2 2 2 2 2 2 2 2 0]]
|
||||||
(texture (aget fire-sheet 0 i))))
|
(texture (aget fire-sheet 0 i))))
|
||||||
|
grow (animation 0.1 (for [i [0 2 0 0 0 0 2 0 0 0 2 2 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 2 1 2 1 2 1 2 1 3 2 3 2 3 2 3]]
|
||||||
|
(texture (aget grow-sheet 0 i))))
|
||||||
ego {:right {:walk walk-right
|
ego {:right {:walk walk-right
|
||||||
:stand stand-anim
|
:stand stand-anim
|
||||||
:talk talk-anim
|
:talk talk-anim
|
||||||
@@ -115,6 +118,7 @@
|
|||||||
:end-squat end-squat
|
:end-squat end-squat
|
||||||
:reach reach-anim
|
:reach reach-anim
|
||||||
:cat-toy cat-toy-anim
|
:cat-toy cat-toy-anim
|
||||||
|
:grow grow
|
||||||
[:fire 1] fire-1-anim
|
[:fire 1] fire-1-anim
|
||||||
[:fire 2] fire-2-anim
|
[:fire 2] fire-2-anim
|
||||||
[:fire 3] fire-3-anim}
|
[:fire 3] fire-3-anim}
|
||||||
@@ -126,6 +130,7 @@
|
|||||||
:squat (utils/flip squat-anim)
|
:squat (utils/flip squat-anim)
|
||||||
:reach (utils/flip reach-anim)
|
:reach (utils/flip reach-anim)
|
||||||
:cat-toy (utils/flip cat-toy-anim)
|
:cat-toy (utils/flip cat-toy-anim)
|
||||||
|
:grow (utils/flip grow)
|
||||||
[:fire 1] (utils/flip fire-1-anim)
|
[:fire 1] (utils/flip fire-1-anim)
|
||||||
[:fire 2] (utils/flip fire-2-anim)
|
[:fire 2] (utils/flip fire-2-anim)
|
||||||
[:fire 3] (utils/flip fire-3-anim)}
|
[:fire 3] (utils/flip fire-3-anim)}
|
||||||
@@ -144,15 +149,18 @@
|
|||||||
|
|
||||||
((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y)))
|
((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y)))
|
||||||
:get-script (fn [cursor [x y]]
|
:get-script (fn [cursor [x y]]
|
||||||
(condp = cursor
|
(condp = cursor
|
||||||
items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "My muscles have doubled in size!"))
|
items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Blegh! Gross!"))
|
||||||
|
items/flask-1-strength (actions/get-script entities
|
||||||
|
(actions/talk entities :ego "I'll just take a sip!")
|
||||||
|
(actions/talk entities :ego "Woah! I feel something!!")
|
||||||
|
(actions/play-animation entities :ego :grow :stop? false))
|
||||||
items/recipe (actions/get-script entities (actions/do-dialogue entities
|
items/recipe (actions/get-script entities (actions/do-dialogue entities
|
||||||
:ego "The recipe says:"
|
:ego "The recipe says:"
|
||||||
:ego "'For strength beyond measure,'"
|
:ego "'For strength beyond measure,'"
|
||||||
:ego "'you must mix, at your leisure,'"
|
:ego "'you must mix, at your leisure:'"
|
||||||
:ego "'1. Cream of mushroom soup.'"
|
:ego "'1. Cream of mushroom soup.'"
|
||||||
:ego "'2. Saliva of the creature whose strength you want to match.'"
|
:ego "'2. Saliva of the creature whose strength you want to match.'"
|
||||||
:ego "'3. Heat over flame.'"
|
|
||||||
:ego "'A word of warning, before you go.'"
|
:ego "'A word of warning, before you go.'"
|
||||||
:ego "'A sip is all it takes to grow.'"
|
:ego "'A sip is all it takes to grow.'"
|
||||||
:ego "'Not more than that do drink,'"
|
:ego "'Not more than that do drink,'"
|
||||||
@@ -219,7 +227,7 @@
|
|||||||
:inside-fangald (make-music "inside-fangald.ogg")}
|
:inside-fangald (make-music "inside-fangald.ogg")}
|
||||||
:state {:object nil
|
:state {:object nil
|
||||||
:active? true
|
:active? true
|
||||||
:inventory [items/grass]
|
:inventory [items/flask-1-strength]
|
||||||
:clues #{}
|
:clues #{}
|
||||||
:mints-eaten 0}
|
:mints-eaten 0}
|
||||||
:actions {:object nil
|
:actions {:object nil
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
(let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})]
|
||||||
(println (:input-x screen) (:input-y screen) "->" x y)))
|
(println (:input-x screen) (:input-y screen) "->" x y)))
|
||||||
|
|
||||||
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber])
|
(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength])
|
||||||
|
|
||||||
(defn cursor [filename which]
|
(defn cursor [filename which]
|
||||||
(let [scale 2
|
(let [scale 2
|
||||||
|
|||||||
Reference in New Issue
Block a user