PokemonJsonSchemas/pokemon.schema.json

346 lines
9.8 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Pokemon",
"description": "A schema for pokemon species data.",
"type": "object",
"properties": {
"$schema": {
"type": "string"
}
},
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"required": [
"species",
"id",
"genderRatio",
"growthRate",
"baseHappiness",
"catchRate",
"color",
"genderDifference",
"eggGroups",
"eggCycles",
"tags",
"formes",
"evolutions"
],
"properties": {
"species": {
"type": "string",
"description": "The internal name of the Pokemon species."
},
"id": {
"type": "number",
"description": "The numerical pokedex identifier of the species."
},
"genderRatio": {
"type": "number",
"description": "The gender ratio of the species. A value of -1 means genderless, a value of 0 means always female, 100 means always male. 50 means 50% male, 50% female, etc.",
"minimum": -1,
"maximum": 100
},
"growthRate": {
"type": "string",
"description": "The growth rate of the species.",
"enum": [
"Erratic",
"Fast",
"MediumFast",
"MediumSlow",
"Slow",
"Fluctuating"
]
},
"baseHappiness": {
"type": "integer",
"description": "The base happiness/friendship a species should have when captured.",
"minimum": 0,
"maximum": 255
},
"catchRate": {
"type": "integer",
"description": "The catch rate of the species. 0 means impossible to capture, 255 means a perfect capture every time.",
"minimum": 0,
"maximum": 255
},
"color": {
"type": "string",
"description": "The color of the species. No real use in game outside of pokedex purposes."
},
"genderDifference": {
"type": "boolean",
"description": "Whether there are different sprites for different genders.."
},
"eggGroups": {
"type": "array",
"description": "The egg groups the species has for breeding purposes.",
"items": {
"type": "string",
"enum": [
"monster",
"water1",
"bug",
"flying",
"field",
"fairy",
"grass",
"humanlike",
"water3",
"mineral",
"amorphous",
"water2",
"ditto",
"dragon",
"undiscovered"
]
}
},
"eggCycles": {
"type": "integer",
"description": "The number of egg cycles required for an egg of this species to hatch",
"minimum": 0
},
"tags": {
"type": "array",
"description": "Additional tags on the species for scripting purposes",
"items": {
"type": "string"
}
},
"formes": {
"required": ["default"],
"patternProperties": {
"^.*$": {
"additionalProperties": false,
"type": "object",
"required": [
"abilities",
"hiddenAbilities",
"baseStats",
"evReward",
"types",
"height",
"weight",
"baseExp",
"moves"
],
"properties": {
"abilities": {
"type": "array",
"minItems": 1,
"description": "The normal abilities a forme has.",
"items": {
"type": "string"
}
},
"hiddenAbilities": {
"type": "array",
"minItems": 0,
"description": "The additional hidden abilities a forme has.",
"items": {
"type": "string"
}
},
"baseStats": {
"required": [
"hp",
"attack",
"defense",
"specialAttack",
"specialDefense",
"speed"
],
"hp": {
"type": "integer",
"minimum": 0
},
"attack": {
"type": "integer",
"minimum": 0
},
"defense": {
"type": "integer",
"minimum": 0
},
"specialAttack": {
"type": "integer",
"minimum": 0
},
"specialDefense": {
"type": "integer",
"minimum": 0
},
"speed": {
"type": "integer",
"minimum": 0
}
},
"evReward": {
"hp": {
"type": "integer",
"minimum": 0
},
"attack": {
"type": "integer",
"minimum": 0
},
"defense": {
"type": "integer",
"minimum": 0
},
"specialAttack": {
"type": "integer",
"minimum": 0
},
"specialDefense": {
"type": "integer",
"minimum": 0
},
"speed": {
"type": "integer",
"minimum": 0
}
},
"types": {
"type": "array",
"minLength": 1,
"items": {
"type": "string",
"enum": [
"normal",
"fighting",
"flying",
"poison",
"ground",
"rock",
"bug",
"ghost",
"steel",
"fire",
"water",
"grass",
"electric",
"psychic",
"ice",
"dragon",
"dark",
"fairy",
"divine"
]
}
},
"height": {
"type": "number",
"minimum": 0.1
},
"weight": {
"type": "number",
"minimum": 0.1
},
"baseExp": {
"type": "integer",
"minimum": 0
},
"isMega": {
"type": "boolean"
},
"moves": {}
}
}
}
},
"evolutions": {
"type": "array",
"items": {
"type": "object",
"required": ["species", "method", "data"],
"properties": {
"species": {
"type": "string"
},
"method": {
"type": "string",
"enum": [
"level",
"item",
"itemmale",
"itemfemale",
"holditem",
"dayholditem",
"nightholditem",
"hasmove",
"happiness",
"happinessday",
"happinessnight",
"levelfemale",
"levelmale",
"trade",
"tradespecies",
"tradeitem",
"location",
"custom"
]
}
},
"anyOf": [
{
"properties": {
"method": {
"enum": [
"level",
"levelfemale",
"levelmale",
"happiness",
"happinessday",
"happinessnight"
]
},
"data": {
"type": "integer"
}
}
},
{
"properties": {
"method": {
"enum": [
"item",
"itemmale",
"itemfemale",
"holditem",
"dayholditem",
"nightholditem",
"hasmove",
"trade",
"tradespecies",
"tradeitem",
"location"
]
},
"data": {
"type": "string"
}
}
},
{
"properties": {
"method": { "enum": ["custom"] },
"data": {
"type": "array",
"items": [
{"type": "string", "description": "Method identifier"}
]
}
}
}
]
}
}
}
}
}
}