Added saving throws, messed with data structure a bunch, and updated forms to suit

This commit is contained in:
Stefan Zermatten
2019-09-25 14:38:20 +02:00
parent 4fcae9b3f9
commit 21030d186a
18 changed files with 262 additions and 155 deletions

View File

@@ -1,6 +1,5 @@
import SimpleSchema from 'simpl-schema';
import AdjustmentSchema from '/imports/api/properties/subSchemas/AdjustmentSchema.js';
import { StoredBuffWithIdSchema } from '/imports/api/properties/Buffs.js';
import ResultsSchema from '/imports/api/properties/subSchemas/ResultsSchema.js';
// These are the rolls made when saves are called for
// For the saving throw bonus or proficiency, see ./Skills.js
@@ -14,34 +13,14 @@ let SavingThrowSchema = new SimpleSchema ({
type: String,
optional: true,
},
passAdjustments: {
type: Array,
defaultValue: [],
},
'passAdjustments.$': {
type: AdjustmentSchema,
},
passBuffs: {
type: Array,
defaultValue: [],
},
'passBuffs.$': {
type: StoredBuffWithIdSchema,
},
failAdjustments: {
type: Array,
defaultValue: [],
},
'failAdjustments.$': {
type: AdjustmentSchema,
},
failBuffs: {
type: Array,
defaultValue: [],
},
'failBuffs.$': {
type: StoredBuffWithIdSchema,
passResults: {
type: ResultsSchema,
defaultValue: {},
},
failResults: {
type: ResultsSchema,
defaultValue: {},
},
});
export { SavingThrowSchema };