diff data/npcs/kumiko.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 77228c101cfc
children e06c54d7701f
line wrap: on
line diff
--- a/data/npcs/kumiko.json	Wed Apr 06 21:39:30 2011 +0200
+++ b/data/npcs/kumiko.json	Wed Apr 06 21:44:54 2011 +0200
@@ -6,61 +6,61 @@
     "temptingfate" : {
         "text" : "The room smells fresh, I have my best kimono on and I’ve set out my most magnificent vase. Everything is perfect (just like me)!",
         "events" : [
-            { "matches" : "world.vase_broken()", "next": "state.broken" }
+            { "matches" : "world.vase_broken", "next": "state.broken" }
         ]
     },
     "broken" : {
         "text" : "Oh no, my beautiful vase! What will the businessman think to see it broken on the floor?",
         "events" : [
-            { "matches" : "world.fish_in_house()", "next": "state.badsmell" }
+            { "matches" : "world.fish_in_house", "next": "state.badsmell" }
         ]
     },
     "badsmell" : {
         "text" : "Oh my, what is that terrible smell? Rotten fish? Oh, this won’t do at all!",
         "events" : [
-            { "matches" : "world.torn_kimono()", "next": "state.torn" }
+            { "matches" : "world.torn_kimono", "next": "state.torn" }
         ]
     },
     "torn" : {
         "text" : "Shoo, dirty fox! Oh, look what you’ve done – you’ve made a great big tear in my finest silk kimono. What will the businessman think of a ragged dress like this?",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','kumiko')", "next": "state.kaneda" }
+            { "matches" : "npcs.kaneda.state == 'kumiko'", "next": "state.kaneda" }
         ]
     },
     "kaneda" : {
         "text" : "Kaneda-san! I have been waiting for you.",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','tear')", "next": "state.jumped" }
+            { "matches" : "npcs.kaneda.state == 'tear'", "next": "state.jumped" }
         ]
     },
     "jumped" : {
         "text" : "Oh, Kaneda-san, a dirty little fox jumped on me just as you were approaching and ripped my kimono.",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','vase')", "next": "state.fallen" }
+            { "matches" : "npcs.kaneda.state == 'vase'", "next": "state.fallen" }
         ]
     },
     "fallen" : {
         "text" : "I am sorry, Kaneda-san, it must just have fallen over. It was probably pushed by that mean-spirited fox.",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','hmm')", "next": "state.shallwe" }
+            { "matches" : "npcs.kaneda.state == 'hmm'", "next": "state.shallwe" }
         ]
     },
     "shallwe" : {
         "text" : "Shall we- go on?",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','smell')", "next": "state.dropped" }
+            { "matches" : "npcs.kaneda.state == 'smell'", "next": "state.dropped" }
         ]
     },
     "dropped" : {
         "text" : "I- A fox came in and dropped an old fish?",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','wontstand')", "next": "state.but" }
+            { "matches" : "npcs.kaneda.state == 'wontstand'", "next": "state.but" }
         ]
     },
     "but" : {
         "text" : "But-",
         "events" : [
-            { "matches" : "world.npc_is('kaneda','wonthear')", "next": "state.curse" }
+            { "matches" : "npcs.kaneda.state == 'wonthear'", "next": "state.curse" }
         ]
     },
     "curse" : {