{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "Item",
    "definitions": {
        "effect": {
            "type": "object",
            "properties": {
                "condition": {
                    "type": "string",
                    "enum": [
                        "During Battle",
                        "Outside of Battle",
                        "Always"
                    ]
                },
                "target": {
                    "type": "string",
                    "enum": [
                        "Single Pokemon",
                        "Single Pokemon > Single Move",
                        "Single Pokemon > All Moves",
                        "Team",
                        "Trainer"
                    ]
                },
                "triggers_evolution": {
                    "type": "boolean"
                },
                "move_changes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "object",
                        "properties": {
                            "field": {
                                "type": "string",
                                "enum": [
                                    "max_pp",
                                    "pp"
                                ]
                            },
                            "change_by_percent": {
                                "type": "integer",
                                "minimum": -100,
                                "maximum": 160
                            },
                            "change_by": {
                                "type": "integer",
                                "minimum": -10000,
                                "maximum": 10000
                            },
                            "change_by_max": {
                                "type": "integer",
                                "minimum": -10000,
                                "maximum": 10000
                            }
                        },
                        "required": [
                            "field"
                        ],
                        "additionalProperties": false
                    }
                },
                "pokemon_changes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "object",
                        "properties": {
                            "field": {
                                "type": "string",
                                "enum": [
                                    "current_hp",
                                    "status_condition",
                                    "ev_hp",
                                    "ev_atk",
                                    "ev_def",
                                    "ev_sp_def",
                                    "ev_sp_atk",
                                    "ev_speed",
                                    "level",
                                    "atk",
                                    "def",
                                    "sp_atk",
                                    "sp_def",
                                    "speed",
                                    "accuracy",
                                    "critical_hit",
                                    "stat_reduction"
                                ]
                            },
                            "change_by_percent": {
                                "type": "integer",
                                "minimum": -100,
                                "maximum": 100
                            },
                            "revive": {
                                "type": "boolean"
                            },
                            "change_by": {
                                "type": "integer",
                                "minimum": -10000,
                                "maximum": 10000
                            },
                            "change": {
                                "type": "string",
                                "enum": [
                                    "remove",
                                    "immune_for_5_turns"
                                ]
                            },
                            "conditions": {
                                "type": "array",
                                "minItems": 1,
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "poison",
                                        "bad_poison",
                                        "paralysis",
                                        "sleep",
                                        "burn",
                                        "freeze",
                                        "confusion"
                                    ]
                                }
                            }
                        },
                        "required": [
                            "field"
                        ],
                        "additionalProperties": false
                    }
                }
            },
            "required": [
                "condition",
                "target"
            ],
            "additionalProperties": false
        },
        "games": {
            "type": "array",
            "minItems": 1,
            "items": {
                "type": "string",
                "enum": [
                    "Red",
                    "Blue",
                    "Yellow",
                    "Gold",
                    "Silver",
                    "Crystal",
                    "Ruby",
                    "Sapphire",
                    "Emerald",
                    "FireRed",
                    "LeafGreen",
                    "Diamond",
                    "Pearl",
                    "Platinum",
                    "HeartGold",
                    "SoulSilver",
                    "Black",
                    "White",
                    "Black 2",
                    "White 2",
                    "X",
                    "Y",
                    "Omega Ruby",
                    "Alpha Sapphire",
                    "Sun",
                    "Moon",
                    "Ultra Sun",
                    "Ultra Moon"
                ]
            }
        },
        "pocket": {
            "type": "string",
            "enum": [
                "Items",
                "Medicine",
                "Battle items",
                "Key items"
            ]
        },
        "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7
        },
        "translations": {
            "type": "object",
            "properties": {
                "cz": {
                    "type": "string"
                },
                "dk": {
                    "type": "string"
                },
                "fr": {
                    "type": "string"
                },
                "de": {
                    "type": "string"
                },
                "gr": {
                    "type": "string"
                },
                "it": {
                    "type": "string"
                },
                "pl": {
                    "type": "string"
                },
                "tr": {
                    "type": "string"
                },
                "en": {
                    "type": "string"
                },
                "jp": {
                    "type": "string"
                },
                "es": {
                    "type": "string"
                }
            },
            "required": [
                "en",
                "de"
            ],
            "additionalProperties": false
        }
    },
    "properties": {
        "names": {
            "$ref": "#/definitions/translations"
        },
        "category": {
            "type": "string",
            "enum": [
                "Evolutionary stones",
                "Repels",
                "Fossils",
                "Flutes",
                "Shards",
                "Held items",
                "Escape items",
                "Escape Rope",
                "Exchangeable items",
                "Valuable items",
                "Battle items",
                "Bottle Caps",
                "Legendary artifacts",
                "Honey",
                "Scents",
                "Nectars",
                "Potions",
                "Status condition healing items",
                "Revives",
                "PP-restoring items",
                "Vitamins",
                "Wings",
                "Drinks",
                "Herbal medicine",
                "Ability Capsule",
                "Berries",
                "Mulch",
                "Apricorns",
                "Pok\u00e9 Balls",
                "Decorations",
                "Accessoiries",
                "Backdrops",
                "Props",
                "D\u00e9cor",
                "Clothing",
                "Fashion items",
                "Mail",
                "Key Items",
                "Event items",
                "Wood boxes",
                "Time Flute",
                "Pass Orbs",
                "Wonder Launcher items",
                "Rotom Powers"
            ]
        },
        "descriptions": {
            "type": "array",
            "minItems": 1,
            "items": {
                "type": "object",
                "properties": {
                    "games": {
                        "$ref": "#/definitions/games"
                    },
                    "translations": {
                        "$ref": "#/definitions/translations"
                    }
                },
                "required": [
                    "games",
                    "translations"
                ],
                "additionalProperties": false
            }
        },
        "prices": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "games": {
                        "$ref": "#/definitions/games"
                    },
                    "buying": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 60000
                    },
                    "selling": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 60000
                    }
                },
                "required": [
                    "games",
                    "buying",
                    "selling"
                ],
                "additionalProperties": false
            }
        },
        "pockets": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "pocket": {
                        "$ref": "#/definitions/pocket"
                    },
                    "generations": {
                        "type": "array",
                        "items": {
                            "$ref": "#/definitions/generation"
                        }
                    }
                },
                "required": [
                    "pocket",
                    "generations"
                ],
                "additionalProperties": false
            }
        },
        "effects": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/effect"
            }
        },
        "fling_power": {
            "type": "integer",
            "minimum": 0,
            "maximum": 150
        }
    },
    "required": [
        "names",
        "category",
        "descriptions",
        "prices",
        "pockets",
        "effects",
        "fling_power"
    ],
    "additionalProperties": false
}