Moved subschema folder

This commit is contained in:
Stefan Zermatten
2019-09-16 10:24:13 +02:00
parent 88a2a506b0
commit 63a20b2bef
8 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,42 @@
import SimpleSchema from 'simpl-schema';
import { Random } from 'meteor/random';
import DAMAGE_TYPES from '/imports/constants/DAMAGE_TYPES.js';
const AdjustmentSchema = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue(){
if (!this.isSet) return Random.id();
}
},
// The roll that determines how much to damage the attribute
damage: {
type: String,
optional: true,
defaultValue: '1',
},
// Who this adjustment applies to
target: {
type: String,
defaultValue: 'every',
allowedValues: [
'self', // the character who took the action
'each', // rolled once for `each` target
'every', // rolled once and applied to `every` target
],
},
// The stat this rolls applies to, if damage type is set, this is ignored
stat: {
type: String,
optional: true,
},
// If set, the type of damage this adjustment causes
damageType: {
type: String,
allowedValues: DAMAGE_TYPES,
optional: true,
},
});
export default AdjustmentSchema;