Skills can now apply to calcs by tag
This commit is contained in:
@@ -50,7 +50,6 @@ let ActionSchema = createPropertySchema({
|
||||
attackRoll: {
|
||||
type: 'fieldToCompute',
|
||||
optional: true,
|
||||
defaultValue: 'strength.modifier + proficiencyBonus',
|
||||
},
|
||||
// Calculation of how many times this action can be used
|
||||
uses: {
|
||||
|
||||
@@ -59,6 +59,51 @@ let SkillSchema = createPropertySchema({
|
||||
type: 'inlineCalculationFieldToCompute',
|
||||
optional: true,
|
||||
},
|
||||
// Skills can apply their value to other calculations as a proficiency
|
||||
// True when applying skill to tagged props
|
||||
targetByTags: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
// Which tags the proficiency is applied to
|
||||
targetTags: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
maxCount: STORAGE_LIMITS.tagCount,
|
||||
},
|
||||
'targetTags.$': {
|
||||
type: String,
|
||||
max: STORAGE_LIMITS.tagLength,
|
||||
},
|
||||
extraTags: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
maxCount: STORAGE_LIMITS.extraTagsCount,
|
||||
},
|
||||
'extraTags.$': {
|
||||
type: Object,
|
||||
},
|
||||
'extraTags.$._id': {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue() {
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
'extraTags.$.operation': {
|
||||
type: String,
|
||||
allowedValues: ['OR', 'NOT'],
|
||||
defaultValue: 'OR',
|
||||
},
|
||||
'extraTags.$.tags': {
|
||||
type: Array,
|
||||
defaultValue: [],
|
||||
maxCount: STORAGE_LIMITS.tagCount,
|
||||
},
|
||||
'extraTags.$.tags.$': {
|
||||
type: String,
|
||||
max: STORAGE_LIMITS.tagLength,
|
||||
},
|
||||
});
|
||||
|
||||
let ComputedOnlySkillSchema = createPropertySchema({
|
||||
|
||||
Reference in New Issue
Block a user