{
    "schema": { "version": 0.1, "disableDebug": false },
    "images": {
        "comments": [
            "This section gives names to a set of images for use as",
            "sprite sheets.  Each file has a URL and some parameters",
            "for determining how to find sprites.  A set of icon",
            "names is provided to more specifically identify sprites."
        ],
        "files": {
            "icons": {
                "url": "images/whiplash-sprites.svg",
                "size": 100, "rows": 5, "cols": 5}
        },
        "icons": {
            "default": {"image": "icons", "row": 0, "col": 0},
            "settings": {"image": "icons", "row": 0, "col": 0},
            "interact": {"image": "icons", "row": 0, "col": 1},
            "inventory": {"image": "icons", "row": 0, "col": 2},
            "lhand": {"image": "icons", "row": 0, "col": 3},
            "rhand": {"image": "icons", "row": 0, "col": 4},
            "close": {"image": "icons", "row": 1, "col": 2},
            "take": {"image": "icons", "row": 1, "col": 3},
            "give": {"image": "icons", "row": 1, "col": 4}
        }
    },
    "itemdefs": {
        "keycard": {
            "weight": 0.02,
            "icon": {"image": "icons", "row": 4, "col": 0}},
        "tablet": {"weight": 4,
                   "icon": {"image": "icons", "row": 3, "col": 0}},
        "knife": {
            "weight": 3,
            "icon": {"image": "icons", "row": 4, "col": 1}},
        "gun": {"weight": 5,
                "icon": {"image": "icons", "row": 4, "col": 2}},
        "tonfa": {"weight": 2,
                  "icon": {"image": "icons", "row": 4, "col": 3}},
        "flashlight": {
            "weight": 3, "light": {"width": 1, "length": 2},
            "icon": {"image": "icons", "row": 3, "col": 1}},
        "apple": {
            "weight": 0.5,
            "icon": {"image": "icons", "row": 2, "col": 3}},
        "cookie": {
            "weight": 0.2,
            "icon": {"image": "icons", "row": 2, "col": 4}}
    },
    "chardefs": {
        "player": {
            "headColor": "orangered",
            "bodyColor": "orange",
            "eyeColor": "blue",
            "speed": 0.009,
            "turnSpeed": 0.005,
            "inventory": [{"type": "knife"}, {"type": "flashlight"}]
        },
        "guard": {
            "headColor": "blue",
            "bodyColor": "darkgray",
            "eyeColor": "black",
            "blinkFreq": 1000,
            "blinkLength": 100,
            "visionRange": 5,
            "speed": 0.008,
            "plan": "guard",
            "inventory": [{"type": "keycard"}, {"type": "baton"}]
        }
    },

    "startStage": "start",
    "stages": {
        "start": {
            "maze": {"type": "hex", "size": 10, "rings": 3}
        },
        "old": {
            "characters": [
                {"type": "guard", "position": {"x": -5, "y": -5}},
                {"type": "guard", "position": {"x": 5, "y": -5}}
            ],
            "pillars": [
                {"p": {"x": 10, "y": 0}, "r": 1, "color": "purple"},
                {"p": {"x": 0, "y": 10}, "r": 1, "color": "green",
                 "inventory": [{"type": "knife"}, {"type": "gun"}]},
                {"p": {"x": 0, "y": -10}, "r": 1, "color": "green",
                 "inventory": [{"type": "tablet"}, {"type": "hat"}]}
            ],
            "walls": [
                {"s": {"x": -10, "y": -6}, "e": {"x": -10, "y": 6},
                 "width": 1, "color": "purple"},

                {"s": {"x": -10, "y": -17}, "e": {"x": 10, "y": -17},
                 "color": "purple"},
                {"s": {"x": 10, "y": -17}, "e": {"x": 20, "y": 0},
                 "color": "purple"},
                {"s": {"x": 20, "y": 0}, "e": {"x": 10, "y": 17},
                 "color": "purple"},
                {"s": {"x": -10, "y": 17}, "e": {"x": -20, "y": 0},
                 "color": "purple"},
                {"s": {"x": -20, "y": 0}, "e": {"x": -10, "y": -17},
                 "color": "purple"},

                {"s": {"x": 10, "y": 17}, "e": {"x": 3, "y": 17},
                 "color": "purple"},
                {"s": {"x": -3, "y": 17}, "e": {"x": -10, "y": 17},
                 "color": "purple"},

                {"s": {"x": 10, "y": 17}, "e": {"x": 20, "y": 34},
                 "color": "purple"},
                {"s": {"x": 20, "y": 34}, "e": {"x": 10, "y": 51},
                 "color": "purple"},
                {"s": {"x": 10, "y": 51}, "e": {"x": -10, "y": 51},
                 "color": "purple"},
                {"s": {"x": -10, "y": 51}, "e": {"x": -20, "y": 34},
                 "color": "purple"},
                {"s": {"x": -20, "y": 34}, "e": {"x": -10, "y": 17},
                 "color": "purple"},

                {"s": {"x": 0, "y": 26}, "e": {"x": 0, "y": 43},
                 "width": 1, "color": "purple"}
            ]
        }
    }
}
