Completed Action form, effects form, reworked form event api
This commit is contained in:
@@ -14,6 +14,13 @@ import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js
|
||||
let Buffs = new Mongo.Collection('buffs');
|
||||
|
||||
let BuffSchema = new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
optional: true,
|
||||
@@ -23,9 +30,8 @@ let BuffSchema = new SimpleSchema({
|
||||
optional: true,
|
||||
},
|
||||
duration: {
|
||||
type: SimpleSchema.Integer,
|
||||
type: String,
|
||||
optional: true,
|
||||
min: 0,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -18,6 +18,13 @@ let Effects = new Mongo.Collection('effects');
|
||||
* that modify their final value or presentation in some way
|
||||
*/
|
||||
let EffectSchema = schema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
optional: true,
|
||||
|
||||
@@ -7,8 +7,7 @@ const AdjustmentSchema = new SimpleSchema({
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (this.isSet) return;
|
||||
return Random.id();
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
// The roll that determines how much to damage the attribute
|
||||
|
||||
Reference in New Issue
Block a user