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.
15 lines
353 B
JavaScript
15 lines
353 B
JavaScript
//buffs are temporary once applied and store things which expire and their expiry time
|
|
Schemas.Buff = new SimpleSchema({
|
|
//buff id
|
|
_id: {
|
|
type: String,
|
|
regEx: SimpleSchema.RegEx.Id,
|
|
autoValue: function(){
|
|
if(!this.isSet) return Random.id();
|
|
}},
|
|
|
|
//expiry time
|
|
expiry: { type: Number, optional: true},
|
|
duration: { type: Number }
|
|
});
|