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

49 lines
1.0 KiB
YAML
Raw Normal View History

2022-04-26 16:44:25 +00:00
$id: https://hyperboria.babyl.ca/character.json
title: Hyperboria character sheet
type: object
2022-04-26 16:57:57 +00:00
additionalProperties: false
required:
2022-04-26 22:55:59 +00:00
- name
- player
- statistics
- class
- level
- health
2022-04-26 16:57:57 +00:00
properties:
2022-04-26 22:55:59 +00:00
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" }
2022-04-26 17:50:56 +00:00
$defs:
statistic:
type: number
minimum: 1
maximum: 20
2022-04-26 21:43:26 +00:00
health:
type: object
2022-04-26 22:55:59 +00:00
required: [max]
2022-04-26 21:43:26 +00:00
properties:
2022-04-26 22:55:59 +00:00
max:
type: number
sumOf: { list: { $data: 1/log } }
current: { type: number }
log:
type: array
description: history of health rolls
items: { type: number }
minItems: { $data: /level }
maxItems: { $data: /level }