Also improved the display of features and generally iterated on their manipulation. Characters now fetch the relevant effects directly when making a calculation, simplifying almost everything. Effects now store a reference to their source if they have one. Effect names are now optional, they can be fetched from the source's name if the source exists.
13 lines
424 B
JavaScript
13 lines
424 B
JavaScript
Features = new Meteor.Collection("features");
|
|
|
|
Schemas.Feature = new SimpleSchema({
|
|
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
|
|
name: {type: String},
|
|
description:{type: String, optional: true},
|
|
actions: {type: [Schemas.Action], defaultValue: []},
|
|
attacks: {type: [Schemas.Attack], defaultValue: []},
|
|
spells: {type: [Schemas.Spell] , defaultValue: []},
|
|
});
|
|
|
|
Features.attachSchema(Schemas.Feature);
|