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

108 lines
2.4 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
2022-04-26 16:57:57 +00:00
additionalProperties: false
2022-04-27 00:15:42 +00:00
type: object
2022-04-26 16:57:57 +00:00
required:
2022-04-27 00:15:42 +00:00
- name
- player
- statistics
- class
- level
- health
- experience
- age
- height
- appearance
- alignment
2022-04-26 16:57:57 +00:00
properties:
2022-04-27 00:15:42 +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" }
experience: { $ref: '#/$defs/experience' }
gender: *string
age: &number
type: number
height: *string
appearance: *string
alignment: *string
race: { $ref: /races.json }
languages:
type: array
minItems: 1
items:
$ref: /languages.json
spells:
type: array
items: { $ref: /spells.json }
maxSpells:
class: { $data: /class }
level: { $data: /level }
gear: { $ref: '#/$defs/gear' }
2022-04-26 17:50:56 +00:00
$defs:
2022-04-27 00:15:42 +00:00
gear:
type: array
items:
oneOf:
- *string
- type: object
properties:
desc:
type: string
description: description of the equipment
qty:
type: number
description: quantity of the item in the character's possession
required: [ desc ]
additionalProperties: false
examples:
- { desc: 'lamp oil', qty: 2 }
2022-04-26 17:50:56 +00:00
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
2022-04-27 00:15:42 +00:00
items: &number { type: number }
2022-04-26 22:55:59 +00:00
minItems: { $data: /level }
maxItems: { $data: /level }
2022-04-27 00:15:42 +00:00
experience:
type: object
properties:
total:
type: number
sumOf:
list: { $data: '1/log' }
map: amount
log:
type: array
items:
type: object
properties:
date: *string
amount: *number
notes: *string