Began adding save-for-half to damage props
This commit is contained in:
@@ -2,6 +2,7 @@ import SimpleSchema from 'simpl-schema';
|
||||
import createPropertySchema from '/imports/api/properties/subSchemas/createPropertySchema.js';
|
||||
import STORAGE_LIMITS from '/imports/constants/STORAGE_LIMITS.js';
|
||||
import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js';
|
||||
import { SavingThrowSchema, ComputedOnlySavingThrowSchema } from '/imports/api/properties/SavingThrows.js';
|
||||
|
||||
const DamageSchema = createPropertySchema({
|
||||
// The roll that determines how much to damage the attribute
|
||||
@@ -32,6 +33,15 @@ const DamageSchema = createPropertySchema({
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
save: {
|
||||
type: SavingThrowSchema,
|
||||
optional: true,
|
||||
},
|
||||
'save.damageFunction': {
|
||||
type: 'fieldToCompute',
|
||||
optional: true,
|
||||
parseLevel: 'compile',
|
||||
},
|
||||
});
|
||||
|
||||
const ComputedOnlyDamageSchema = createPropertySchema({
|
||||
@@ -40,6 +50,15 @@ const ComputedOnlyDamageSchema = createPropertySchema({
|
||||
optional: true,
|
||||
parseLevel: 'compile',
|
||||
},
|
||||
save: {
|
||||
type: ComputedOnlySavingThrowSchema,
|
||||
optional: true,
|
||||
},
|
||||
'save.damageFunction': {
|
||||
type: 'computedOnlyField',
|
||||
optional: true,
|
||||
parseLevel: 'compile',
|
||||
},
|
||||
});
|
||||
|
||||
const ComputedDamageSchema = new SimpleSchema()
|
||||
|
||||
Reference in New Issue
Block a user