Skip to content

Instantly share code, notes, and snippets.

@Gitmoko
Last active May 23, 2017 08:26
Show Gist options
  • Save Gitmoko/2fed06d74000049a7dd0d5595341a90c to your computer and use it in GitHub Desktop.
Save Gitmoko/2fed06d74000049a7dd0d5595341a90c to your computer and use it in GitHub Desktop.
{
"title": "CNS",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"NAME": {
"type": "string"
},
"ATK": {
"type": "number"
},
"CRITICAL": {
"type": "number"
},
"RANGE": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"linear": {
"$ref": "#/definitions/linear"
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"cicle": {
"$ref": "#/definitions/circle"
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"custom": {
"$ref": "#/definitions/custom"
}
}
}
]
}
}
},
"definitions": {
"vec2": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
},
"linear": {
"name": "linear",
"type": "object",
"properties": {
"length": {
"type": "number"
},
"direction": {
"$ref": "#/definitions/vec2"
},
"offset": {
"$ref": "#/definitions/vec2"
}
},
"additionalProperties": false
},
"circle": {
"name": "cicle",
"type": "object",
"properties": {
"radius": {
"type": "number"
},
"offset": {
"$ref": "#/definitions/vec2"
},
"type": {
"type": "string",
"enum": [
"penetrative"
]
}
},
"additionalProperties": false
},
"custom": {
"type": "object",
"properties": {
"layers": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"cells": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/vec2"
}
}
},
"type": {
"type": "string",
"enum": [
"penetrative"
]
}
}
}
}
},
"additionalProperties": false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment