PokemonJsonSchemas/encounters.schema.json

74 lines
2.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Encounters",
"description": "A schema for route encounters.",
"type": "object",
"properties": {
"$schema": {
"type": "string"
}
},
"patternProperties": {
"^.*$": {
"type": "array",
"items": {
"type": "object",
"required": [
"species",
"time",
"type",
"chance",
"minimumlvl",
"maximumlvl"
],
"properties": {
"species": {
"type": "string",
"description": "The species that may be encountered"
},
"time": {
"type": "array",
"items": {
"enum": ["morning", "day", "evening", "night"]
},
"description": "The time the encounter may occur."
},
"type": {
"enum": ["grass", "oldrod", "goodrod", "superrod", "surf"],
"description": "The method with which the encounter occurs."
},
"chance": {
"type": "integer",
"description": "The weight of the encounter chance, relative to the total weight of valid encounters."
},
"minimumLevel": {
"type": "integer",
"description": "The lowest possible level the encounter may have."
},
"maximumlvl": {
"type": "integer",
"description": "The highest possible level the encounter may have."
},
"formes": {
"type": "array",
"description": "An optional definition to chance which formes may be encountered. If not given defaults to default forme.",
"items": {
"type": "object",
"properties": {
"forme": {
"type": "string",
"description": "The forme name that may be encountered"
},
"chance": {
"type": "integer",
"description": "The weight of the forme chance, relative to the total weight of valid formes."
}
}
}
}
}
}
}
}
}