Added fields to features, made features able to expire

This commit is contained in:
Stefan Zermatten
2014-11-28 09:19:53 +02:00
parent 19059d4cd5
commit cd6682a78a
9 changed files with 464 additions and 452 deletions

View File

@@ -1,6 +1,6 @@
Schemas.Attribute = new SimpleSchema({
//the temporary shift of the attribute
//should be zero for most attributes after a long rest
//should be zero after reset
adjustment: {
type: Number,
defaultValue: 0
@@ -10,7 +10,12 @@ Schemas.Attribute = new SimpleSchema({
mul: { type: [Schemas.Effect], defaultValue: [] },
min: { type: [Schemas.Effect], defaultValue: [] },
max: { type: [Schemas.Effect], defaultValue: [] },
conditional:{ type: [Schemas.Effect], defaultValue: [] }
conditional:{ type: [Schemas.Effect], defaultValue: [] },
reset: {
type: String,
defaultValue: "longRest",
allowedValues: ["longRest", "shortRest"]
}
});
//note that to make an invulnerability add a new max of zero value
@@ -24,4 +29,9 @@ Schemas.Vulnerability = new SimpleSchema({
mul: { type: [Schemas.Effect], defaultValue: [] },
min: { type: [Schemas.Effect], defaultValue: [{name: "Resistance doesn't stack", value: 0.5}] },
max: { type: [Schemas.Effect], defaultValue: [{name: "Vulnerability doesn't stack", value: 2}] },
});
reset: {
type: String,
defaultValue: "longRest",
allowedValues: ["longRest", "shortRest"]
}
});