expanding dialogue.

This commit is contained in:
2014-12-17 12:49:14 -08:00
parent 3c9e00a494
commit 2fcbe26ea2
4 changed files with 118 additions and 79 deletions

View File

@@ -177,30 +177,37 @@
(actions/give entities :wool)
(actions/talk entities :ego "I guess her wool is shedding."))
(actions/talk entities :ego "She's too far away for me to pet her."))))
:scripts {:wool (actions/get-script entities
(actions/talk entities :ego "She doesn't need it back."))
:carrot (actions/get-script entities
(actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/talk entities :ego "Come on girl, get the carrot!")
(actions/walk-straight-to entities :sheep [95 150])
:scripts #(condp = %
:wool (actions/get-script entities
(actions/talk entities :ego "She doesn't need it back."))
:grass (actions/get-script entities
(actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/talk entities :ego "Come on girl, get the grass!")
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "I think she's not interested."))
:carrot (actions/get-script entities
(actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/talk entities :ego "Come on girl, get the carrot!")
(actions/walk-straight-to entities :sheep [95 150])
(actions/play-animation entities :ego :reach)
(actions/remove-item entities :carrot)
(actions/update-state entities (fn [s] (assoc s :coaxed-sheep? true))))
:flask-1 (actions/get-script entities
(if (is-sheep-close? @entities)
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/play-animation entities :ego :reach)
(actions/remove-item entities :flask-1)
(actions/give entities :flask-1-with-milk)
(actions/talk entities :ego "Sheeps milk."))
(actions/talk entities :ego "She's too far away.")))
:flask-1-with-mushrooms
(actions/get-script entities
(if (is-sheep-close? @entities)
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/play-animation entities :ego :reach)
(actions/remove-item entities :carrot)
(actions/update-state entities #(assoc % :coaxed-sheep? true)))
:flask-1 (actions/get-script entities
(if (is-sheep-close? @entities)
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/play-animation entities :ego :reach)
(actions/remove-item entities :flask-1)
(actions/give entities :flask-1-with-milk)
(actions/talk entities :ego "Sheeps milk."))
(actions/talk entities :ego "She's too far away.")))
:flask-1-with-mushrooms
(actions/get-script entities
(if (is-sheep-close? @entities)
(do (actions/walk-to entities :ego ego-sheep-loc :face :left)
(actions/play-animation entities :ego :reach)
(items/make-cream-of-mushroom entities))
(actions/talk entities :ego "She's too far away.")))}
(items/make-cream-of-mushroom entities))
(actions/talk entities :ego "She's too far away.")))
nil)
:left {:walk (utils/flip sheep-walk)
:stand (utils/flip sheep-stand)}
:right {:walk sheep-walk