{
    "id": "http://www.ubisoft.com/ugc/acd/v1/conditions#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "JSON Schema for Assassin's Creed Dynasty UGC",
    "Condition": {
        "oneOf": [
            {
                "$ref": "#/definitions/ExpressionCondition"
            },
            {
                "$ref": "#/definitions/InventoryItemCondition"
            },
            {
                "$ref": "#/definitions/DeathCondition"
            }
        ]
    },
    "definitions": {
        "ExpressionCondition": {
            "type": "object",
            "properties": {
                "Type": {
                    "type": "string",
                    "enum": [
                        "Expression"
                    ]
                },
                "Expression": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                },
                "Negated": {
                    "type": "boolean"
                }
            },
            "required": [
                "Type",
                "Expression"
            ],
            "additionalProperties": false
        },
        "InventoryItemCondition": {
            "type": "object",
            "properties": {
                "Type": {
                    "type": "string",
                    "enum": [
                        "InventoryItem"
                    ]
                },
                "Item": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                },
                "Count": {
                    "type": "integer",
                    "minimum": 1
                },
                "FromPlayer": {
                    "type": "boolean"
                },
                "Negated": {
                    "type": "boolean"
                }
            },
            "required": [
                "Type",
                "Item"
            ],
            "additionalProperties": false
        },
        "DeathCondition": {
            "type": "object",
            "properties": {
                "Type": {
                    "type": "string",
                    "enum": [
                        "Death"
                    ]
                },
                "Target": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/typedtarget#TypedTarget"
                },
                "ResolveType": {
                    "type": "string",
                    "enum": [
                        "All",
                        "Any",
                        "Count"
                    ]
                },
                "Count": {
                    "type": "integer",
                    "minimum": 1
                },
                "Participant": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                }
            },
            "required": [
                "Type"
            ],
            "additionalProperties": false
        }
    }
}