Files
DiceCloud/rpg-docs/Model/Character/Actions.js
2015-03-16 05:56:33 +00:00

32 lines
656 B
JavaScript

Actions = new Meteor.Collection("actions");
/*
* Actions are given to a character by items and features
*/
Schemas.Action = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id
},
name: {
type: String, trim: false
},
description: {
type: String, trim: false
},
type: {
type: String,
allowedValues: ["action, bonus, reaction, free"],
defaultValue: "action"
},
//the immediate impact of doing this action (eg. -1 rages)
adjustments: {
type: [Schemas.Adjustment], defaultValue: []
}
});
Actions.attachSchema(Schemas.Action);
Actions.allow(CHARACTER_SUBSCHEMA_ALLOW);
Actions.deny(CHARACTER_SUBSCHEMA_DENY);