changeset 305:691278e89399

Link up hattori's and ichiro's conversation.
author Simon Cross <hodgestar@gmail.com>
date Fri, 08 Apr 2011 23:51:20 +0200
parents fed9689803ae
children 8b9369d34ff6
files data/npcs/hattori.json data/npcs/ichiro.json
diffstat 2 files changed, 25 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/data/npcs/hattori.json	Fri Apr 08 23:29:55 2011 +0200
+++ b/data/npcs/hattori.json	Fri Apr 08 23:51:20 2011 +0200
@@ -1,33 +1,34 @@
 {
     "start" : {
         "text" : "Ichiro, there is nothing to fear. Uesugi will light the signal fire if they come close.",
-        "events" : [
-            { "matches" : "npcs.ichiro.state ==  'prepared'", "next": "state.wait" }
-        ]
+        "auto_next" : "state.wait",
+        "on_exit" : "switch_to('ichiro')"
     },
     "wait" : {
         "text" : "There’s nothing more for us to do but sit and wait. Sasuke will arrive with our cannon in a while. We can’t take on the entire Hayashi clan without it.",
-        "events" : [
-            { "matches" : "npcs.ichiro.state ==  'sitting'", "next": "state.relax" }
-        ]
+        "auto_next" : "state.relax",
+        "on_exit" : "switch_to('ichiro')"
     },
     "relax" : {
         "text" : "Relax! You’re with me, the most fearsome katana in the East. We’re not moving from this spot until we have to. Besides, I need to meditate.",
-        "events" : [
-            { "matches" : "npcs.ichiro.state ==  'but'", "next": "state.omm" }
-        ]
+        "auto_next" : "state.omm",
+        "on_exit" : "switch_to('ichiro')"
     },
     "omm" : {
         "text" : "Ommmmm...",
+        "auto_next" : "state.omm2",
+        "on_exit" : "switch_to('ichiro')"
+    },
+    "omm2" : {
+        "text" : "Ommmmmmmmmm....",
         "events" : [
-            { "matches" : "npcs.ichiro.state ==  'wakeup'", "next": "state.letsgo" }
+            { "matches" : "world.missions.fire_started_on_road and npcs.ichiro.state != 'sigh'", "next": "state.letsgo" }
         ]
     },
     "letsgo" : {
         "text" : "Ha- huh? Uesugi’s fire! Let’s go!",
-        "events" : [
-            { "matches" : "npcs.ichiro.state ==  'cannon'", "next": "state.attack" }
-        ]
+        "auto_next" : "state.attack",
+        "on_exit" : "switch_to('ichiro')"
     },
     "attack" : {
         "text" : "It will have to catch up. Attack!",
--- a/data/npcs/ichiro.json	Fri Apr 08 23:29:55 2011 +0200
+++ b/data/npcs/ichiro.json	Fri Apr 08 23:51:20 2011 +0200
@@ -1,28 +1,23 @@
 {
     "start" : {
         "text" : "I’m telling you, Hattori. The Hayashi clan will arrive any minute now.",
-        "events" : [
-            { "matches" : "world.npcs.hattori.state ==  'start'", "next": "state.prepared" }
-        ]
+        "auto_next" : "state.prepared",
+        "on_exit" : "switch_to('hattori')"
     },
     "prepared" : {
         "text" : "It doesn’t hurt to be prepared.",
-        "events" : [
-            { "matches" : "npcs.hattori.state ==  'wait'", "next": "state.sitting" }
-        ],
+        "auto_next" : "state.sitting",
         "on_exit" : "switch_to('hattori')"
     },
     "sitting" : {
         "text" : "I just don’t like sitting out in the open like this.",
-        "events" : [
-            { "matches" : "npcs.hattori.state ==  'relax'", "next": "state.but" }
-        ]
+        "auto_next" : "state.but",
+        "on_exit" : "switch_to('hattori')"
     },
     "but" : {
         "text" : "But-",
-        "events" : [
-            { "matches" : "npcs.hattori.state ==  'omm'", "next": "state.sigh" }
-        ]
+        "auto_next" : "state.sigh",
+        "on_exit": "switch_to('hattori')"
     },
     "sigh" : {
         "text" : "Sigh.",
@@ -32,15 +27,13 @@
     },
     "wakeup" : {
         "text" : "Hattori, wake up! Look! Smoke coming over the rise.",
-        "events" : [
-            { "matches" : "npcs.hattori.state ==  'letsgo'", "next": "state.cannon" }
-        ]
+        "auto_next" : "state.cannon",
+        "on_exit" : "switch_to('hattori')"
     },
     "cannon" : {
         "text" : "What about the cannon?",
-        "events" : [
-            { "matches" : "npcs.hattori.state ==  'attack'", "next": "state.gone" }
-        ]
+        "auto_next" : "state.gone",
+        "on_exit" : "switch_to('hattori')"
     },
     "gone" : {
     }