changeset 321:b244d01a8881

Hook up kaneda and kumiko.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 00:49:54 +0200
parents 0dc80b153580
children 8f808b5dd89b
files data/npcs/kaneda.json data/npcs/kumiko.json
diffstat 2 files changed, 31 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/data/npcs/kaneda.json	Sat Apr 09 00:56:34 2011 +0200
+++ b/data/npcs/kaneda.json	Sat Apr 09 00:49:54 2011 +0200
@@ -1,3 +1,4 @@
+
 {
     "start" : {
         "events" : [
@@ -6,43 +7,38 @@
     },
     "kumiko" : {
         "text" : "Ah, here is the fabled beauty, Kumiko.",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'kaneda'", "next": "state.tear" }
-        ]
+        "auto_next" : "state.tear",
+        "on_exit" : "switch_to('kumiko')"
     },
     "tear" : {
         "text" : "When I heard of your legendary charm, I rushed to your home right away. It is true what they say about your radiant glow. Ah, but what’s this? A tear?",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'jumped'", "next": "state.vase" }
-        ]
+        "auto_next": "state.vase",
+        "on_exit" : "switch_to('kumiko')"
     },
     "vase" : {
         "text" : "Hmm, well, never mind that. Do show me around your charming home. Hmm? Is that a broken vase I see?",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'fallen'", "next": "state.hmm" }
-        ]
+        "auto_next": "state.hmm",
+        "on_exit" : "switch_to('kumiko')"
     },
     "hmm" : {
         "text" : "Hmm.",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'shallwe'", "next": "state.smell" }
-        ]
+        "auto_next" : "state.smell",
+        "on_exit" : "switch_to('kumiko')"
     },
     "smell" : {
         "text" : "Yes. But only if you explain that horrible smell!",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'dropped'", "next": "state.wontstand" }
-        ]
+        "auto_next" : "state.wontstand",
+        "on_exit" : "switch_to('kumiko')"
     },
     "wontstand" : {
         "text" : "Kumiko-san, I won’t stand for this! A torn kimono, a house in disarray, dirt everywhere and that pungent stench. You are clearly no home maker! And to blame it all on a fox?",
-        "events" : [
-            { "matches" : "npcs.kumiko.state ==  'but'", "next": "state.wonthear" }
-        ]
+        "auto_next": "state.wonthear",
+        "on_exit" : "switch_to('kumiko')"
     },
     "wonthear" : {
         "text" : "I won’t hear any more from you.",
-        "auto_next": "state.gone"
+        "auto_next": "state.gone",
+        "on_exit" : "switch_to('kumiko')"
     },
     "gone" : {
     }
--- a/data/npcs/kumiko.json	Sat Apr 09 00:56:34 2011 +0200
+++ b/data/npcs/kumiko.json	Sat Apr 09 00:49:54 2011 +0200
@@ -29,42 +29,40 @@
     },
     "kaneda" : {
         "text" : "Kaneda-san! I have been waiting for you.",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'tear'", "next": "state.jumped" }
-        ]
+        "auto_next" : "state.jumped",
+        "on_exit" : "switch_to('kaneda')"
     },
     "jumped" : {
         "text" : "Oh, Kaneda-san, a dirty little fox jumped on me just as you were approaching and ripped my kimono.",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'vase'", "next": "state.fallen" }
-        ]
+        "auto_next": "state.fallen",
+        "on_exit" : "switch_to('kaneda')"
     },
     "fallen" : {
         "text" : "I am sorry, Kaneda-san, it must just have fallen over. It was probably pushed by that mean-spirited fox.",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'hmm'", "next": "state.shallwe" }
-        ]
+        "auto_next": "state.shallwe",
+        "on_exit" : "switch_to('kaneda')"
     },
     "shallwe" : {
         "text" : "Shall we- go on?",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'smell'", "next": "state.dropped" }
-        ]
+        "auto_next": "state.dropped",
+        "on_exit" : "switch_to('kaneda')"
     },
     "dropped" : {
         "text" : "I- A fox came in and dropped an old fish?",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'wontstand'", "next": "state.but" }
-        ]
+        "auto_next": "state.but",
+        "on_exit" : "switch_to('kaneda')"
     },
     "but" : {
         "text" : "But-",
-        "events" : [
-            { "matches" : "npcs.kaneda.state == 'wonthear'", "next": "state.curse" }
-        ]
+        "auto_next": "state.curse",
+        "on_exit" : "switch_to('kaneda')"
     },
     "curse" : {
         "text" : "Curse you, fox! I’ll be doomed to a peasant life forever!",
+        "auto_next": "state.sob",
         "on_exit": "world.missions.kumiko_disgraced = True"
+    },
+    "sob" : {
+        "text" : "*sob*"
     }
 }