view 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 source

{
    "start" : {
        "text" : "Shoo, filthy fox! How did you get in here?",
        "events" : [
            { "matches" : "world.fox.shape == 'human'", "next": "state.shapeshifted" },
            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" }
        ]
    },
    "shapeshifted" : {
        "text" : "Excuse me, ma’am. The gate is closed.",
        "choices" : [
            { "text": "Why is that?", "next": "state.monks" },
            { "text": "Let me out now!", "next": "state.staycalm" },
            { "text": "Sayonara.", "next": "state.secondtry" }
        ],
        "events" : [
            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" },
            { "matches" : "world.fox.shape == 'fox'", "next": "state.start" }
        ]
    },
    "monks" : {
        "text" : "The monks have asked us not to let anybody out.",
        "choices" : [
            { "text": "Pretty please?", "next": "state.noexceptions" }
        ]
    },
    "noexceptions" : {
        "text" : "Sorry, no exceptions.",
        "auto_next": "state.secondtry"
    },
    "staycalm" : {
        "text" : "Please stay calm. Perhaps you should go meditate?",
        "auto_next": "state.secondtry"
    },
    "secondtry" : {
        "text" : "The gate is locked, and it’s staying locked.",
        "events" : [
            { "matches" : "world.fox.shape == 'human_with_fan'", "next": "state.disguised" }
        ]
    },
    "disguised" : {
        "text" : "Ah, good evening, young lady! I’m afraid the gate is still closed for the night...",
        "choices" : [
            { "text": "Even for me?", "next": "state.notsafe" },
            { "text": "Sayonara." }
        ]
    },
    "notsafe" : {
        "text" : "Ah, well, it isn’t safe for pretty young women to be wandering around alone.",
        "choices" : [
            { "text": "It’s only for a moment. My house is just across the road.", "next": "state.hmm" }
        ]
    },
    "hmm" : {
        "text" : "Hmm...",
        "choices" : [
            { "text": "You could come join me for some sake later.", "next": "state.okay" }
        ]
    },
    "okay" : {
        "text" : "Ah, well, okay! I guess I could make an exception, just this once... Just across the road, you say...",
        "auto_next": "state.agreed"
    },
    "agreed" : {
    }
}