adding strength potion transformation.

This commit is contained in:
2014-11-14 17:19:16 -08:00
parent 949d7f71c1
commit 9529c60cf7
5 changed files with 32 additions and 11 deletions

View File

@@ -83,6 +83,7 @@
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
squat-sheet (texture! (texture "ego/squat.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)
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
walk-right (animation 0.075 (for [i (range 8)]
@@ -107,6 +108,8 @@
(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]]
(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
:stand stand-anim
:talk talk-anim
@@ -115,6 +118,7 @@
:end-squat end-squat
:reach reach-anim
:cat-toy cat-toy-anim
:grow grow
[:fire 1] fire-1-anim
[:fire 2] fire-2-anim
[:fire 3] fire-3-anim}
@@ -126,6 +130,7 @@
:squat (utils/flip squat-anim)
:reach (utils/flip reach-anim)
:cat-toy (utils/flip cat-toy-anim)
:grow (utils/flip grow)
[:fire 1] (utils/flip fire-1-anim)
[:fire 2] (utils/flip fire-2-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)))
:get-script (fn [cursor [x y]]
(condp = cursor
items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "My muscles have doubled in size!"))
(condp = cursor
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
:ego "The recipe says:"
: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 "'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 sip is all it takes to grow.'"
:ego "'Not more than that do drink,'"
@@ -219,7 +227,7 @@
:inside-fangald (make-music "inside-fangald.ogg")}
:state {:object nil
:active? true
:inventory [items/grass]
:inventory [items/flask-1-strength]
:clues #{}
:mints-eaten 0}
:actions {:object nil