Files
DiceCloud/app/imports/api/creature/Actions.js
Stefan Zermatten dcc460d9e6 Migrations
2018-11-28 11:48:49 +02:00

46 lines
845 B
JavaScript

import SimpleSchema from 'simpl-schema';
import {makeChild} from "/imports/api/parenting.js";
let Actions = new Mongo.Collection("actions");
/*
* Actions are given to a character by items and features
*/
let actionSchema = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
optional: true,
trim: false,
},
description: {
type: String,
optional: true,
trim: false,
},
type: {
type: String,
allowedValues: ["action, bonus, reaction, free"],
defaultValue: "action",
},
//the immediate impact of doing this action (eg. -1 rages)
adjustments: {
type: Array,
defaultValue: [],
},
"adjustments.$": {
type: Object,
},
});
Actions.attachSchema(actionSchema);
// Actions.attachBehaviour("softRemovable");
makeChild(Actions);
export default Actions