Implemented remaining core features
This commit is contained in:
@@ -9,7 +9,8 @@ Schemas.Attack = new SimpleSchema({
|
||||
regEx: SimpleSchema.RegEx.Id
|
||||
},
|
||||
name: {
|
||||
type: String
|
||||
type: String,
|
||||
defaultValue: "New Attack"
|
||||
},
|
||||
range: {
|
||||
type: String,
|
||||
@@ -17,15 +18,24 @@ Schemas.Attack = new SimpleSchema({
|
||||
},
|
||||
attackBonus: {
|
||||
type: String,
|
||||
optional: true
|
||||
optional: true,
|
||||
defaultValue: "strengthMod + proficiencyBonus"
|
||||
},
|
||||
damage: {
|
||||
type: String
|
||||
type: String,
|
||||
optional: true,
|
||||
defaultValue: "1d8 + {strengthMod}"
|
||||
},
|
||||
damageType: {
|
||||
type: String,
|
||||
allowedValues: ["acid", "bludgeoning", "cold", "fire", "force", "lightning", "necrotic",
|
||||
"piercing", "poison", "psychic", "radiant", "slashing", "thunder"]
|
||||
allowedValues: ["bludgeoning", "piercing", "slashing", "acid", "cold", "fire", "force", "lightning", "necrotic",
|
||||
"poison", "psychic", "radiant", "thunder"],
|
||||
defaultValue: "slashing"
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
allowedValues: _.pluck(colorOptions, "key"),
|
||||
defaultValue: "q"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -3,16 +3,18 @@ Characters = new Meteor.Collection("characters");
|
||||
|
||||
Schemas.Character = new SimpleSchema({
|
||||
//strings
|
||||
name: { type: String, defaultValue: "", trim: false},
|
||||
alignment: { type: String, defaultValue: "", trim: false},
|
||||
gender: { type: String, defaultValue: "", trim: false},
|
||||
race: { type: String, defaultValue: "", trim: false},
|
||||
description:{ type: String, defaultValue: "", trim: false},
|
||||
personality:{ type: String, defaultValue: "", trim: false},
|
||||
ideals: { type: String, defaultValue: "", trim: false},
|
||||
bonds: { type: String, defaultValue: "", trim: false},
|
||||
flaws: { type: String, defaultValue: "", trim: false},
|
||||
backstory: { type: String, defaultValue: "", trim: false},
|
||||
name: { type: String, defaultValue: "", trim: false},
|
||||
alignment: { type: String, defaultValue: "", trim: false},
|
||||
gender: { type: String, defaultValue: "", trim: false},
|
||||
race: { type: String, defaultValue: "", trim: false},
|
||||
description: { type: String, defaultValue: "", trim: false},
|
||||
personality: { type: String, defaultValue: "", trim: false},
|
||||
ideals: { type: String, defaultValue: "", trim: false},
|
||||
bonds: { type: String, defaultValue: "", trim: false},
|
||||
flaws: { type: String, defaultValue: "", trim: false},
|
||||
backstory: { type: String, defaultValue: "", trim: false},
|
||||
proficiencies:{ type: String, defaultValue: "", trim: false},
|
||||
languages: { type: String, defaultValue: "", trim: false},
|
||||
|
||||
//attributes
|
||||
//ability scores
|
||||
|
||||
@@ -5,7 +5,7 @@ Effects = new Meteor.Collection("effects");
|
||||
* that modify their final value or presentation in some way
|
||||
*/
|
||||
Schemas.Effect = new SimpleSchema({
|
||||
charId: {
|
||||
charId: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id
|
||||
},
|
||||
@@ -31,7 +31,7 @@ Schemas.Effect = new SimpleSchema({
|
||||
type: {
|
||||
type: String,
|
||||
defaultValue: "editable",
|
||||
allowedValues: ["editable", "feature", "buff", "equipment", "inate"]
|
||||
allowedValues: ["editable", "feature", "level", "buff", "equipment", "racial", "inate"]
|
||||
},
|
||||
//the id of the feature, buff or item that created this effect
|
||||
sourceId: {
|
||||
|
||||
20
rpg-docs/Model/Character/Levels/Classes.js
Normal file
20
rpg-docs/Model/Character/Levels/Classes.js
Normal file
@@ -0,0 +1,20 @@
|
||||
Classes = new Meteor.Collection("classes");
|
||||
|
||||
Schemas.Class = new SimpleSchema({
|
||||
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
name: {type: String},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
autoValue: function() {
|
||||
if (this.isInsert) {
|
||||
return new Date;
|
||||
} else if (this.isUpsert) {
|
||||
return {$setOnInsert: new Date};
|
||||
} else {
|
||||
this.unset();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Classes.attachSchema(Schemas.Class);
|
||||
9
rpg-docs/Model/Character/Levels/Levels.js
Normal file
9
rpg-docs/Model/Character/Levels/Levels.js
Normal file
@@ -0,0 +1,9 @@
|
||||
Levels = new Meteor.Collection("levels");
|
||||
|
||||
Schemas.Level = new SimpleSchema({
|
||||
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
classId: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
value: {type: Number}
|
||||
});
|
||||
|
||||
Levels.attachSchema(Schemas.Level);
|
||||
@@ -14,5 +14,9 @@ Schemas.DeathSave = new SimpleSchema({
|
||||
canDeathSave: {
|
||||
type: Boolean,
|
||||
defaultValue: true
|
||||
},
|
||||
stable: {
|
||||
type: Boolean,
|
||||
defaultValue: false
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user