comparison data/npcs/monk.json @ 153:704d23022f09

Start of dialogue tree / NPC state machine support.
author Simon Cross <hodgestar@gmail.com>
date Tue, 05 Apr 2011 22:18:26 +0200
parents
children 4e7ca5cf57fa
comparison
equal deleted inserted replaced
152:60138b935bc0 153:704d23022f09
1 {
2 "start" : {
3 "text" : "Oh poor thing, a tailless fox! What happened to you, little one?",
4 "choices" : [
5 { "text": "Yip!" },
6 { "text": "Grrrr...", "next": "state.unfortunate" }
7 ]
8 },
9 "unfortunate" : {
10 "text" : "Unfortunate, I’m sure. That’s why I keep my lucky fox tail handy.",
11 "choices" : [
12 { "text": "Yip yip!", "next": "state.you_dont_speak" }
13 ]
14 },
15 "you_dont_speak" : {
16 "text" : "You don’t speak, of course. Forgive a silly old man. I lose my senses when I haven’t had my tea! Mmm, a fine brew of oolong! But there’s a demon in the attic and I’m too scared to fetch the tea leaves. Pity you don’t understand me, or you could get me a cup!",
17 "auto_next": "state.no_tea"
18 },
19 "no_tea" : {
20 "text" : "Oh, what I wouldn’t do for a cup of tea.",
21 "events" : [
22 { "matches" : "world.fox_has_tea()", "next": "state.got_tea" }
23 ]
24 },
25 "got_tea" : {
26 "text" : "My tea! Oh, heavenly! Such aroma, what a taste... Just what I need. Mmm...",
27 "auto_next": "state.distracted"
28 },
29 "distracted" : {
30 }
31 }