diff data/npcs/kaneda.json @ 193:897eec397cbb

Fix state checks for hattori, ichiro, kaneda and kumiko. In the process provide easier access to other npcs.
author Simon Cross <hodgestar@gmail.com>
date Wed, 06 Apr 2011 21:44:54 +0200
parents e7413a565421
children 6696ffd51ac2
line wrap: on
line diff
--- a/data/npcs/kaneda.json	Wed Apr 06 21:39:30 2011 +0200
+++ b/data/npcs/kaneda.json	Wed Apr 06 21:44:54 2011 +0200
@@ -1,44 +1,44 @@
 {
     "start" : {
         "events" : [
-            { "matches" : "world.npc_is('kumiko', 'torn')", "next": "state.kumiko" }
+            { "matches" : "npcs.kumiko.state ==  'torn'", "next": "state.kumiko" }
         ]
     },
     "kumiko" : {
         "text" : "Ah, here is the fabled beauty, Kumiko.",
         "auto_next": "state."
         "events" : [
-            { "matches" : "world.npc_is('kumiko', 'kaneda')", "next": "state.tear" }
+            { "matches" : "npcs.kumiko.state ==  'kaneda'", "next": "state.tear" }
         ]
     },
     "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" : "world.npc_is('kumiko', 'jumped')", "next": "state.vase" }
+            { "matches" : "npcs.kumiko.state ==  'jumped'", "next": "state.vase" }
         ]
     },
     "vase" : {
         "text" : "Hmm, well, never mind that. Do show me around your charming home. Hmm? Is that a broken vase I see?",
         "events" : [
-            { "matches" : "world.npc_is('kumiko', 'fallen')", "next": "state.hmm" }
+            { "matches" : "npcs.kumiko.state ==  'fallen'", "next": "state.hmm" }
         ]
     },
     "hmm" : {
         "text" : "Hmm.",
         "events" : [
-            { "matches" : "world.npc_is('kumiko', 'shallwe')", "next": "state.smell" }
+            { "matches" : "npcs.kumiko.state ==  'shallwe'", "next": "state.smell" }
         ]
     },
     "smell" : {
         "text" : "Yes. But only if you explain that horrible smell!",
         "events" : [
-            { "matches" : "world.npc_is('kumiko', 'dropped')", "next": "state.wontstand" }
+            { "matches" : "npcs.kumiko.state ==  'dropped'", "next": "state.wontstand" }
         ]
     },
     "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" : "world.npc_is('kumiko', 'but')", "next": "state.wonthear" }
+            { "matches" : "npcs.kumiko.state ==  'but'", "next": "state.wonthear" }
         ]
     },
     "wonthear" : {