Also improved the display of features and generally iterated on their manipulation. Characters now fetch the relevant effects directly when making a calculation, simplifying almost everything. Effects now store a reference to their source if they have one. Effect names are now optional, they can be fetched from the source's name if the source exists.
28 lines
555 B
JavaScript
28 lines
555 B
JavaScript
Schemas.Attribute = new SimpleSchema({
|
|
//the temporary shift of the attribute
|
|
//should be zero after reset
|
|
adjustment: {
|
|
type: Number,
|
|
defaultValue: 0
|
|
},
|
|
reset: {
|
|
type: String,
|
|
defaultValue: "longRest",
|
|
allowedValues: ["longRest", "shortRest"]
|
|
}
|
|
});
|
|
|
|
//note that to make an invulnerability add a new max of zero value
|
|
Schemas.Vulnerability = new SimpleSchema({
|
|
//same as attribute
|
|
adjustment: {
|
|
type: Number,
|
|
defaultValue: 0
|
|
},
|
|
reset: {
|
|
type: String,
|
|
defaultValue: "longRest",
|
|
allowedValues: ["longRest", "shortRest"]
|
|
}
|
|
});
|