Made spells into a special kind of action
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AttackSchema } from '/imports/api/properties/Attacks.js';
|
||||
import { ActionSchema } from '/imports/api/properties/Actions.js';
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
const magicSchools = [
|
||||
@@ -13,7 +13,7 @@ const magicSchools = [
|
||||
];
|
||||
|
||||
let SpellSchema = new SimpleSchema({})
|
||||
.extend(AttackSchema)
|
||||
.extend(ActionSchema)
|
||||
.extend({
|
||||
name: {
|
||||
type: String,
|
||||
@@ -29,6 +29,10 @@ let SpellSchema = new SimpleSchema({})
|
||||
castWithoutSpellSlots: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
hasAttackRoll: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
// Spell lists that this spell appears on
|
||||
spellLists: {
|
||||
@@ -87,6 +91,11 @@ let SpellSchema = new SimpleSchema({})
|
||||
defaultValue: 'abjuration',
|
||||
allowedValues: magicSchools,
|
||||
},
|
||||
// Set better defaults for the action
|
||||
actionType: {
|
||||
type: String,
|
||||
defaultValue: 'spell',
|
||||
},
|
||||
});
|
||||
|
||||
export { SpellSchema };
|
||||
|
||||
Reference in New Issue
Block a user