# HG changeset patch # User Simon Cross # Date 1302291879 -7200 # Node ID 16ffe6f5dbb81fbd99498abac0eb4a3457ce4e91 # Parent ddcfc159dc2af4a38f85956702417ed85c50c318 Add fox.shape (which can be 'fox', 'human' or 'human_with_fan') to game.json. Use fox.shape in state checks in guard.json. diff -r ddcfc159dc2a -r 16ffe6f5dbb8 data/game.json --- a/data/game.json Fri Apr 08 21:23:00 2011 +0200 +++ b/data/game.json Fri Apr 08 21:44:39 2011 +0200 @@ -2,6 +2,7 @@ "fox": { "item": null, "tails" : [], + "shape": "fox", "cur_health" : 40, "max_health" : 40, "level": "temple", diff -r ddcfc159dc2a -r 16ffe6f5dbb8 data/npcs/guard.json --- 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" : {