hyperborea-character-sheet/schemas-yaml/character.yml

48 lines
1.0 KiB
YAML

$id: https://hyperboria.babyl.ca/character.json
title: Hyperboria character sheet
type: object
additionalProperties: false
required:
- name
- player
- statistics
- class
- level
- health
properties:
name: &string
type: string
player: *string
class: { $ref: '/classes.json' }
statistics:
type: object
allRequired: true
properties:
strength: &stat
$ref: '#/$defs/statistic'
dexterity: *stat
constitution: *stat
intelligence: *stat
wisdom: *stat
charisma: *stat
level: { type: number, minimum: 1 }
health: { $ref: '#/$defs/health' }
$defs:
statistic:
type: number
minimum: 1
maximum: 20
health:
type: object
required: [ max ]
properties:
max: { type: number }
current: { type: number }
log:
type: array
description: history of health rolls
items: { type: number }
minItems: { $data: /level }
maxItems: { $data: /level }