Gave effects their own collection, they no longer live in arrays attached to skills/attributes
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.
This commit is contained in:
@@ -5,8 +5,6 @@ Schemas.Attribute = new SimpleSchema({
|
||||
type: Number,
|
||||
defaultValue: 0
|
||||
},
|
||||
//effect arrays
|
||||
effects: { type: [Schemas.Effect], defaultValue: [] },
|
||||
reset: {
|
||||
type: String,
|
||||
defaultValue: "longRest",
|
||||
@@ -21,14 +19,6 @@ Schemas.Vulnerability = new SimpleSchema({
|
||||
type: Number,
|
||||
defaultValue: 0
|
||||
},
|
||||
//effect arrays
|
||||
effects: {
|
||||
type: [Schemas.Effect],
|
||||
defaultValue: [
|
||||
{type: "inate", name: "Resistance doesn't stack", operation: "min", value: 0.5},
|
||||
{type: "inate", name: "Vulnerability doesn't stack", operation: "max", value: 2}
|
||||
]
|
||||
},
|
||||
reset: {
|
||||
type: String,
|
||||
defaultValue: "longRest",
|
||||
|
||||
@@ -8,10 +8,6 @@ Schemas.Buff = new SimpleSchema({
|
||||
if(!this.isSet) return Random.id();
|
||||
}},
|
||||
|
||||
//things that expire
|
||||
effects: { type: [Schemas.Effect], defaultValue: [] },
|
||||
actions: { type: [Schemas.Action], defaultValue: [] },
|
||||
|
||||
//expiry time
|
||||
expiry: { type: Number, optional: true},
|
||||
duration: { type: Number }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Schemas.Skill = new SimpleSchema({
|
||||
//attribute name that this skill used as base mod for roll
|
||||
ability: { type: String, defaultValue: "" },
|
||||
effects: { type: [Schemas.Effect], defaultValue: [] },
|
||||
});
|
||||
Reference in New Issue
Block a user