game data schema
This commit is contained in:
255
schemas/gdRoot.json
Normal file
255
schemas/gdRoot.json
Normal file
@@ -0,0 +1,255 @@
|
||||
{
|
||||
"$ref": "#/definitions/GdRoot",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"EEnemySize": {
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
"type": "number"
|
||||
},
|
||||
"EProjectileEffectType": {
|
||||
"const": 0,
|
||||
"type": "number"
|
||||
},
|
||||
"GdEnemy": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"speed": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"speed"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdLevel": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "number"
|
||||
},
|
||||
"enemyRoutes": {
|
||||
"items": {
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"enemySpawns": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Hex"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"enemyTargets": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Hex"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"radius": {
|
||||
"type": "number"
|
||||
},
|
||||
"walls": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Hex"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"waves": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/GdWave"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"radius",
|
||||
"currency",
|
||||
"walls",
|
||||
"enemySpawns",
|
||||
"enemyTargets",
|
||||
"enemyRoutes",
|
||||
"waves"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdProjectileEffect": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"speed": {
|
||||
"type": "number"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/EProjectileEffectType"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"amount",
|
||||
"speed"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdRoot": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"enemies": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/GdEnemy"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"levels": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/GdLevel"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"simulation": {
|
||||
"$ref": "#/definitions/GdSimulation"
|
||||
},
|
||||
"towers": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/GdTower"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enemies",
|
||||
"towers",
|
||||
"levels",
|
||||
"simulation"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdSimulation": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"spawnDelay": {
|
||||
"type": "number"
|
||||
},
|
||||
"stepsPerSecond": {
|
||||
"type": "number"
|
||||
},
|
||||
"waveDuration": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"stepsPerSecond",
|
||||
"waveDuration",
|
||||
"spawnDelay"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdTower": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"aoeEffect": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GdProjectileEffect"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"aoeRange": {
|
||||
"type": "number"
|
||||
},
|
||||
"aoeRate": {
|
||||
"type": "number"
|
||||
},
|
||||
"cost": {
|
||||
"type": "number"
|
||||
},
|
||||
"projectileEffect": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/GdProjectileEffect"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"projectileRange": {
|
||||
"type": "number"
|
||||
},
|
||||
"projectileRate": {
|
||||
"type": "number"
|
||||
},
|
||||
"projectileSize": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cost",
|
||||
"projectileEffect",
|
||||
"projectileRange",
|
||||
"projectileRate",
|
||||
"projectileSize",
|
||||
"aoeEffect",
|
||||
"aoeRange",
|
||||
"aoeRate"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GdWave": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"enemy": {
|
||||
"type": "number"
|
||||
},
|
||||
"gain": {
|
||||
"type": "number"
|
||||
},
|
||||
"hitpoints": {
|
||||
"type": "number"
|
||||
},
|
||||
"size": {
|
||||
"$ref": "#/definitions/EEnemySize"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enemy",
|
||||
"size",
|
||||
"amount",
|
||||
"gain",
|
||||
"hitpoints"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"Hex": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"col": {
|
||||
"type": "number"
|
||||
},
|
||||
"row": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"col",
|
||||
"row"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user