Fiddled with rolls and saves

This commit is contained in:
Stefan Zermatten
2019-09-02 13:49:01 +02:00
parent a8b3fc3f2f
commit 710c578119
3 changed files with 6 additions and 11 deletions

View File

@@ -3,8 +3,8 @@ import SimpleSchema from 'simpl-schema';
/*
* RollModifiers are reason-value attached to rolls
* that modify their final value in some way
* These are separate from effects because they are a always a result of the
* creature's stats, and never cause a recomputation themselves
* These are separate from effects because they never cause a recomputation
* themselves
*/
let RollModifierSchema = new SimpleSchema({
name: {
@@ -13,10 +13,11 @@ let RollModifierSchema = new SimpleSchema({
},
operation: {
type: String,
defaultValue: 'add',
defaultValue: 'rollBonus',
allowedValues: [
'rollBonus',
'damageBonus',
'rollBonus',
'advantage',
],
},
calculation: {

View File

@@ -3,11 +3,8 @@ import AdjustmentSchema from '/imports/api/creature/subSchemas/AdjustmentSchema.
import { StoredBuffWithIdSchema } from '/imports/api/properties/Buffs.js';
let RollResultSchema = new SimpleSchema ({
// Expression of whether or not to apply buffs
comparison: {
type: String,
allowedValues: ['>', '<', '>=', '<=', '==', 'always', 'else'],
},
targetValue: {
type: String,
optional: true,
},
@@ -18,7 +15,6 @@ let RollResultSchema = new SimpleSchema ({
'adjustments.$': {
type: AdjustmentSchema,
},
// The buffs to be applied
buffs: {
type: Array,
defaultValue: [],

View File

@@ -21,7 +21,6 @@ let SavingThrowSchema = new SimpleSchema ({
'passAdjustments.$': {
type: AdjustmentSchema,
},
// The buffs to be applied
passBuffs: {
type: Array,
defaultValue: [],
@@ -36,7 +35,6 @@ let SavingThrowSchema = new SimpleSchema ({
'failAdjustments.$': {
type: AdjustmentSchema,
},
// The buffs to be applied
failBuffs: {
type: Array,
defaultValue: [],