Added spell and spell list forms
This commit is contained in:
@@ -24,7 +24,6 @@ let SpellListSchema = schema({
|
||||
type: String,
|
||||
regEx: VARIABLE_NAME_REGEX,
|
||||
min: 3,
|
||||
defaultValue: 'newAttribute',
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
@@ -72,3 +71,4 @@ const updateSpellList = new ValidatedMethod({
|
||||
});
|
||||
|
||||
export default SpellLists;
|
||||
export { SpellListSchema }
|
||||
|
||||
@@ -12,14 +12,14 @@ import propagateInheritanceUpdateMixin from '/imports/api/creature/mixins/propag
|
||||
import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js';
|
||||
|
||||
const magicSchools = [
|
||||
'Abjuration',
|
||||
'Conjuration',
|
||||
'Divination',
|
||||
'Enchantment',
|
||||
'Evocation',
|
||||
'Illusion',
|
||||
'Necromancy',
|
||||
'Transmutation',
|
||||
'abjuration',
|
||||
'conjuration',
|
||||
'divination',
|
||||
'enchantment',
|
||||
'evocation',
|
||||
'illusion',
|
||||
'necromancy',
|
||||
'transmutation',
|
||||
];
|
||||
|
||||
let Spells = new Mongo.Collection('spells');
|
||||
@@ -33,7 +33,7 @@ let SpellSchema = schema({
|
||||
// prepared in a spell list, and enabled should be true
|
||||
alwaysPrepared: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
optional: true,
|
||||
},
|
||||
// Spell lists that this spell appears on
|
||||
spellLists: {
|
||||
@@ -63,31 +63,33 @@ let SpellSchema = schema({
|
||||
},
|
||||
verbal: {
|
||||
type: Boolean,
|
||||
defaultValue: false
|
||||
optional: true,
|
||||
},
|
||||
somatic: {
|
||||
type: Boolean,
|
||||
defaultValue: false
|
||||
optional: true,
|
||||
},
|
||||
concentration: {
|
||||
type: Boolean,
|
||||
defaultValue: false
|
||||
optional: true,
|
||||
},
|
||||
material: {
|
||||
type: String,
|
||||
optional: true
|
||||
optional: true,
|
||||
},
|
||||
ritual: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
optional: true,
|
||||
},
|
||||
level: {
|
||||
type: SimpleSchema.Integer,
|
||||
defaultValue: 1,
|
||||
max: 9,
|
||||
min: 0,
|
||||
},
|
||||
school: {
|
||||
type: String,
|
||||
defaultValue: 'Abjuration',
|
||||
defaultValue: 'abjuration',
|
||||
allowedValues: magicSchools,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user