{
    "$id": "http://labcompass.futurecode.com/map.schema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "content": {
            "enum": [
                "Switch puzzle",
                "Lever puzzle",
                "Floor puzzle",
                "Escort gauntlet",
                "Trap gauntlet",
                "darkshrine",
                "argus",
                "golden-key",
                "golden-door",
                "silver-key",
                "silver-door"
            ]
        },
        "difficulty": {
            "enum": [
                "Normal",
                "Cruel",
                "Merciless",
                "Uber"
            ]
        },
        "direction": {
            "enum": [
                "N",
                "NE",
                "E",
                "SE",
                "S",
                "SW",
                "W",
                "NW",
                "C"
            ]
        },
        "phase": {
            "enum": [
                "NoPhase",
                "ChargeDisruptors",
                "Conduits",
                "Essences",
                "Fonts",
                "Gargoyles",
                "Idols",
                "Lieutenants",
                "Portals"
            ]
        },
        "roomId": {
            "type": "string"
        },
        "sectionLayout": {
            "type": "string"
        },
        "trap": {
            "enum": [
                "NoTrap",
                "BladeSentries",
                "Darts",
                "FurnaceTraps",
                "Saws",
                "Spikes",
                "SpinningBlades"
            ]
        },
        "weapon": {
            "enum": [
                "NoWeapon",
                "TwoSwords",
                "SwordAndShield",
                "TwoHandedMace"
            ]
        }
    },
    "properties": {
        "date": {
            "pattern": "\\d{4}-\\d{2}-\\d{2}",
            "type": "string"
        },
        "difficulty": {
            "$ref": "#/definitions/difficulty"
        },
        "phase1": {
            "$ref": "#/definitions/phase"
        },
        "phase2": {
            "$ref": "#/definitions/phase"
        },
        "rooms": {
            "items": {
                "properties": {
                    "areacode": {
                        "type": "string"
                    },
                    "contents": {
                        "items": {
                            "$ref": "#/definitions/content"
                        },
                        "type": "array"
                    },
                    "exits": {
                        "additionalProperties": {
                            "$ref": "#/definitions/roomId"
                        },
                        "propertyNames": {
                            "$ref": "#/definitions/direction"
                        },
                        "type": "object"
                    },
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "secretPassage": {
                        "type": "string"
                    },
                    "x": {
                        "type": "string"
                    },
                    "y": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "areacode",
                    "id",
                    "x",
                    "y",
                    "contents",
                    "exits"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "section1layout": {
            "$ref": "#/definitions/sectionLayout"
        },
        "section2layout": {
            "$ref": "#/definitions/sectionLayout"
        },
        "section3layout": {
            "$ref": "#/definitions/sectionLayout"
        },
        "trap1": {
            "$ref": "#/definitions/trap"
        },
        "trap2": {
            "$ref": "#/definitions/trap"
        },
        "weapon": {
            "$ref": "#/definitions/weapon"
        }
    },
    "required": [
        "difficulty",
        "date",
        "weapon",
        "phase1",
        "phase2",
        "trap1",
        "trap2",
        "rooms"
    ],
    "title": "LabCompass Map File",
    "type": "object"
}