Implemented Features and Items granting effects, actions, attacks and spells
This commit is contained in:
18
rpg-docs/Model/Character/SubSchemas/Buff.js
Normal file
18
rpg-docs/Model/Character/SubSchemas/Buff.js
Normal file
@@ -0,0 +1,18 @@
|
||||
//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();
|
||||
}},
|
||||
|
||||
//things that expire
|
||||
effects: { type: [Schemas.Effect], defaultValue: [] },
|
||||
actions: { type: [Schemas.Action], defaultValue: [] },
|
||||
|
||||
//expiry time
|
||||
expiry: { type: Number, optional: true},
|
||||
duration: { type: Number }
|
||||
});
|
||||
Reference in New Issue
Block a user