Files
DiceCloud/app/imports/api/library/subSchemas/LibraryEffects.js

45 lines
749 B
JavaScript

import SimpleSchema from 'simpl-schema';
import schema from '/imports/api/schema.js';
libraryEffectsSchema = schema({
name: {
type: String,
optional: true, //TODO make necessary if there is no owner
trim: false,
},
operation: {
type: String,
defaultValue: "add",
allowedValues: [
"base",
"proficiency",
"add",
"mul",
"min",
"max",
"advantage",
"disadvantage",
"passiveAdd",
"fail",
"conditional",
],
},
// Effects either have a value OR a calculation
value: {
type: Number,
optional: true,
},
calculation: {
type: String,
optional: true,
trim: false,
},
//which stat the effect is applied to
stat: {
type: String,
optional: true,
},
});
export default libraryEffectsSchema;