7 changed files with 117 additions and 6 deletions
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
{ |
||||
"$defs" : { |
||||
"fighter" : [ |
||||
"barbarian", |
||||
"berserker", |
||||
"cataphract", |
||||
"hunstman", |
||||
"paladin", |
||||
"ranger", |
||||
"warlock" |
||||
], |
||||
"magician" : [ |
||||
"cryomancer", |
||||
"illusionist", |
||||
"necromancer", |
||||
"pyromancer", |
||||
"witch" |
||||
] |
||||
}, |
||||
"$id" : "https://hyperboria.babyl.ca/classes.json", |
||||
"oneOf" : [ |
||||
{ |
||||
"enum" : [ |
||||
"fighter", |
||||
"magician" |
||||
] |
||||
}, |
||||
{ |
||||
"properties" : { |
||||
"generic" : { |
||||
"const" : "fighter" |
||||
}, |
||||
"subclass" : { |
||||
"enum" : [ |
||||
"barbarian", |
||||
"berserker", |
||||
"cataphract", |
||||
"hunstman", |
||||
"paladin", |
||||
"ranger", |
||||
"warlock" |
||||
] |
||||
} |
||||
}, |
||||
"type" : "object" |
||||
}, |
||||
{ |
||||
"properties" : { |
||||
"generic" : { |
||||
"const" : "magician" |
||||
}, |
||||
"subclass" : { |
||||
"enum" : [ |
||||
"cryomancer", |
||||
"illusionist", |
||||
"necromancer", |
||||
"pyromancer", |
||||
"witch" |
||||
] |
||||
} |
||||
}, |
||||
"type" : "object" |
||||
} |
||||
], |
||||
"title" : "Classes of characters for Hyperborea" |
||||
} |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
sub { |
||||
my $schema = $_->{oneOf} = []; |
||||
|
||||
push @$schema, { enum => [ keys $_->{'$defs'}->%* ] }; |
||||
|
||||
for my $generic ( keys $_->{'$defs'}->%* ) { |
||||
push @$schema, { |
||||
type => 'object', |
||||
properties => { |
||||
generic => { const => $generic }, |
||||
subclass => { enum => $_->{'$defs'}{$generic} } |
||||
} |
||||
} |
||||
} |
||||
|
||||
return $_; |
||||
} |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
$id: https://hyperboria.babyl.ca/classes.json |
||||
title: Classes of characters for Hyperborea |
||||
$defs: |
||||
fighter: |
||||
- barbarian |
||||
- berserker |
||||
- cataphract |
||||
- hunstman |
||||
- paladin |
||||
- ranger |
||||
- warlock |
||||
magician: [cryomancer, illusionist, necromancer, pyromancer, witch] |
Loading…
Reference in new issue