Data changes to make attacks top level objects
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import AdjustmentSchema from '/imports/api/properties/subSchemas/AdjustmentSchema.js';
|
||||
import { ActionSchema } from '/imports/api/properties/Actions.js';
|
||||
|
||||
// Attacks are special instances of actions
|
||||
@@ -9,16 +8,9 @@ let AttackSchema = new SimpleSchema()
|
||||
// What gets added to the d20 roll
|
||||
rollBonus: {
|
||||
type: String,
|
||||
defaultValue: 'strength.modifier + proficiencyBonus',
|
||||
optional: true,
|
||||
},
|
||||
// What damage does it do to the targets
|
||||
adjustments: {
|
||||
type: Array,
|
||||
defaultValue: [],
|
||||
},
|
||||
'adjustments.$': {
|
||||
type: AdjustmentSchema,
|
||||
},
|
||||
// If set reference an item whose quantity is reduced by 1 every time this
|
||||
// attack is rolled
|
||||
ammunition: {
|
||||
@@ -27,12 +19,16 @@ let AttackSchema = new SimpleSchema()
|
||||
optional: true,
|
||||
},
|
||||
// Set better defaults for the action
|
||||
type: {
|
||||
actionType: {
|
||||
defaultValue: 'attack',
|
||||
},
|
||||
tags: {
|
||||
type: Array,
|
||||
defaultValue: ['attack'],
|
||||
},
|
||||
'tags.$': {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
export { AttackSchema };
|
||||
|
||||
Reference in New Issue
Block a user