Unset modifiers of attributes that aren't abilities
This commit is contained in:
@@ -119,6 +119,8 @@ function writeAttributes(char) {
|
||||
}
|
||||
if (typeof att.mod === 'number'){
|
||||
op.updateMany.update.$set.mod = att.mod;
|
||||
} else {
|
||||
op.updateMany.update.$unset = {mod: 1};
|
||||
}
|
||||
return op;
|
||||
});
|
||||
|
||||
@@ -50,10 +50,12 @@ attributeSchema = schema({
|
||||
type: Number,
|
||||
optional: true,
|
||||
},
|
||||
// The computed value of the attribute
|
||||
value: {
|
||||
type: Number,
|
||||
defaultValue: 0,
|
||||
},
|
||||
// The computed modifier, provided the attribute is an ability
|
||||
mod: {
|
||||
type: SimpleSchema.Integer,
|
||||
optional: true,
|
||||
|
||||
Reference in New Issue
Block a user