Skip to content

Commit

Permalink
Add schema for devices
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdouglas committed Mar 8, 2019
1 parent 2f1ce5f commit c131357
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions tests/schemas/upgrade.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,92 @@
"required": ["image", "source"],
"additionalProperties": false
}
},
"device": {
"type": "object",
"properties": {
"name": {"type": "string"},
"type": {
"type": "string",
"enum": [
"Bomb",
"Mine",
"Obstacle",
"Remote"
]
},
"effect": {"type": "string"},
"initiative": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"stats": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"agility",
"hull",
"shields"
]
},
"value": {
"type": "integer",
"minimum": 0
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"attack"
]
},
"arc": {
"type": "string",
"enum": [
"Double Turret Arc",
"Full Front Arc",
"Front Arc",
"Bullseye Arc",
"Single Turret Arc",
"Rear Arc"
]
},
"value": {
"type": "integer",
"minimum": 1
}
},
"required": [
"type",
"value",
"arc"
],
"additionalProperties": false
}
]
}
},
"image": { "type": "string" },
"artwork": { "type": "string" }
},
"required": ["name", "type", "effect"],
"additionalProperties": false
}
}
}
Expand Down

0 comments on commit c131357

Please sign in to comment.