Started restructuring the library with attacks, saves, and limited parenting

This commit is contained in:
Stefan Zermatten
2019-08-12 16:42:30 +02:00
parent 6f4710bee3
commit a8b3fc3f2f
14 changed files with 204 additions and 91 deletions

View File

@@ -0,0 +1,49 @@
import SimpleSchema from 'simpl-schema';
import AdjustmentSchema from '/imports/api/creature/subSchemas/AdjustmentSchema.js';
import { StoredBuffWithIdSchema } from '/imports/api/properties/Buffs.js';
// These are the rolls made when saves are called for
// For the saving throw bonus or proficiency, see ./Skills.js
let SavingThrowSchema = new SimpleSchema ({
dc: {
type: String,
optional: true,
},
// The variable name of ability the saving throw relies on
ability: {
type: String,
optional: true,
},
passAdjustments: {
type: Array,
defaultValue: [],
},
'passAdjustments.$': {
type: AdjustmentSchema,
},
// The buffs to be applied
passBuffs: {
type: Array,
defaultValue: [],
},
'passBuffs.$': {
type: StoredBuffWithIdSchema,
},
failAdjustments: {
type: Array,
defaultValue: [],
},
'failAdjustments.$': {
type: AdjustmentSchema,
},
// The buffs to be applied
failBuffs: {
type: Array,
defaultValue: [],
},
'failBuffs.$': {
type: StoredBuffWithIdSchema,
},
});
export { SavingThrowSchema };