Made character arrays of objects into their own collections

This commit is contained in:
Thaum
2015-01-28 10:20:23 +00:00
parent 80c2c3249d
commit 4f205eb970
8 changed files with 59 additions and 40 deletions

View File

@@ -1,29 +0,0 @@
/*
* Actions are given to a character by items and features
*/
Schemas.Action = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue: function(){
if(!this.isSet) return Random.id();
}
},
name: {
type: String
},
description: {
type: String
},
type: {
type: String,
allowedValues: ["action, bonus, reaction, free"],
defaultValue: "action"
},
selfBuffs: {
type: [Schemas.Buff], defaultValue: []
},
selfAdjustments: {
type: [Schemas.Adjustment], defaultValue: []
}
});

View File

@@ -22,4 +22,4 @@ Schemas.Adjustment = new SimpleSchema({
type: String,
optional: true
}
});
});

View File

@@ -1,31 +0,0 @@
/*
* Attacks are given to a character by items and features
*/
Schemas.Attack = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue: function(){
if(!this.isSet) return Random.id();
}
},
name: {
type: String
},
range: {
type: String,
optional: true
},
attackBonus: {
type: String,
optional: true
},
damage: {
type: String
},
damageType: {
type: String,
allowedValues: ["acid", "bludgeoning", "cold", "fire", "force", "lightning", "necrotic",
"piercing", "poison", "psychic", "radiant", "slashing", "thunder"]
}
});

View File

@@ -1,14 +0,0 @@
//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 }
});

View File

@@ -1,4 +0,0 @@
Schemas.Proficiency = new SimpleSchema({
name: {type: String},
source: {type: String}
})

View File

@@ -1,22 +0,0 @@
Schemas.Spell = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue: function(){
if(!isSet) return Random.id();
}
},
name: {type: String},
description:{type: String},
castingTime:{type: String},
range: {type: String},
duration: {type: Number},
"components.verbal": {type: Boolean},
"components.somatic": {type: Boolean},
"components.material": {type: String, optional: true},
"components.concentration": {type: Boolean},
ritual: {type: Boolean},
selfBuffs: {type: [Schemas.Buff], defaultValue: []},
level: {type: Number},
class: {type: String}
});