From e85f9795ed2db9cc243a667bf6c117a125e32ffc Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Tue, 26 Apr 2022 13:50:56 -0400 Subject: [PATCH] adding the stats --- samples/verg.yml | 7 +++++++ schemas-yaml/character.yml | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/samples/verg.yml b/samples/verg.yml index ddb91b0..97ed937 100644 --- a/samples/verg.yml +++ b/samples/verg.yml @@ -1,2 +1,9 @@ name: Verg-La player: Yanick +statistics: + strength: 11 + dexterity: 13 + constitution: 10 + intelligence: 18 + wisdom: 15 + charisma: 11 diff --git a/schemas-yaml/character.yml b/schemas-yaml/character.yml index 7fb1b98..204c87d 100644 --- a/schemas-yaml/character.yml +++ b/schemas-yaml/character.yml @@ -5,7 +5,25 @@ additionalProperties: false required: - name - player + - statistics properties: name: &string type: string player: *string + statistics: + type: object + allRequired: true + properties: + strength: &stat + $ref: '#/$defs/statistic' + dexterity: *stat + constitution: *stat + intelligence: *stat + wisdom: *stat + charisma: *stat +$defs: + statistic: + type: number + minimum: 1 + maximum: 20 +