diff data/npcs/guard.json @ 289:16ffe6f5dbb8

Add fox.shape (which can be 'fox', 'human' or 'human_with_fan') to game.json. Use fox.shape in state checks in guard.json.
author Simon Cross <hodgestar@gmail.com>
date Fri, 08 Apr 2011 21:44:39 +0200
parents 4e7ca5cf57fa
children 93352ab52f2e
line wrap: on
line diff
--- a/data/npcs/guard.json	Fri Apr 08 21:23:00 2011 +0200
+++ b/data/npcs/guard.json	Fri Apr 08 21:44:39 2011 +0200
@@ -2,8 +2,8 @@
     "start" : {
         "text" : "Shoo, filthy fox! How did you get in here?",
         "events" : [
-            { "matches" : "world.fox_is_shapeshifted", "next": "state.shapeshifted" },
-            { "matches" : "world.fox_is_disguised", "next": "state.disguised" }
+            { "matches" : "world.fox.shape == 'human'", "next": "state.shapeshifted" },
+            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" }
         ]
     },
     "shapeshifted" : {
@@ -14,7 +14,8 @@
             { "text": "Sayonara.", "next": "state.secondtry" }
         ],
         "events" : [
-            { "matches" : "world.fox_is_disguised", "next": "state.disguised" }
+            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" },
+            { "matches" : "world.fox.shape == 'fox'", "next": "state.start" }
         ]
     },
     "monks" : {
@@ -34,7 +35,7 @@
     "secondtry" : {
         "text" : "The gate is locked, and it’s staying locked.",
         "events" : [
-            { "matches" : "world.fox_is_disguised", "next": "state.disguised" }
+            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" }
         ]
     },
     "disguised" : {