ソースを参照

Fixing a few issues with the spell book schema.
Adding the Reclaimed type of casting used by Sprit Shamans, which combines the best aspects of Inspired and Spontaneous casting (whereas Researched takes the worst, and then adds a little bonus).

Samuel Jaffe 8 年 前
コミット
dc8bf70b9b
2 ファイル変更34 行追加5 行削除
  1. 0 0
      schema/spell.json
  2. 34 5
      schema/spellbook_schema.json

schema/spell_schema.json → schema/spell.json


+ 34 - 5
schema/spellbook_schema.json

@@ -10,6 +10,16 @@
     "@class": {"type": "string"},
     "@class": {"type": "string"},
     "classRef": {"type": "string"},
     "classRef": {"type": "string"},
     "spellInfo": {
     "spellInfo": {
+      "dependencies":{
+        "2":["1"],
+        "3":["2"],
+        "4":["3"],
+        "5":["4"],
+        "6":["5"],
+        "7":["6"],
+        "8":["7"],
+        "9":["8"]
+      },
       "patternProperties": {
       "patternProperties": {
         "^[0-9]$": {
         "^[0-9]$": {
           "properties": {
           "properties": {
@@ -43,7 +53,8 @@
             "additionalProperties":false
             "additionalProperties":false
           }
           }
         }
         }
-      }
+      },
+      "required": ["classRef"]
     },
     },
     {
     {
       "properties": {
       "properties": {
@@ -68,15 +79,13 @@
       "properties": {
       "properties": {
         "@class": {
         "@class": {
           "enum": [
           "enum": [
-            "org.leumasjaffe.charsheet.model.magic.impl.Researched",
-            "org.leumasjaffe.charsheet.model.magic.impl.Unearthed"
+            "org.leumasjaffe.charsheet.model.magic.impl.Researched"
           ]
           ]
         },
         },
         "spellInfo": {
         "spellInfo": {
           "^[0-9]$": {
           "^[0-9]$": {
             "required": [
             "required": [
               "spellsPerDay",
               "spellsPerDay",
-              "spellsPerDayRemaining",
               "spellsKnown",
               "spellsKnown",
               "spellsPrepared",
               "spellsPrepared",
               "spellsPreparedPreviously"
               "spellsPreparedPreviously"
@@ -85,11 +94,31 @@
           }
           }
         }
         }
       }
       }
+    },
+    {
+      "properties": {
+        "@class": {
+          "enum": [
+            "org.leumasjaffe.charsheet.model.magic.impl.Retrieved"
+          ]
+        },
+        "spellInfo": {
+          "^[0-9]$": {
+            "required": [
+              "spellsPerDay",
+              "spellsPerDayRemaining",
+              "spellsPrepared",
+              "spellsPreparedPreviously"
+            ],
+            "additionalProperties":false
+          }
+        }
+      },
+      "required": ["classRef"]
     }
     }
   ],
   ],
   "required": [
   "required": [
     "@class",
     "@class",
-    "classRef",
     "spellInfo"
     "spellInfo"
   ],
   ],
   "type": "object"
   "type": "object"