Continued migration to nested sets
This commit is contained in:
@@ -2,6 +2,7 @@ import { buildComputationFromProps } from '/imports/api/engine/computation/build
|
||||
import { assert } from 'chai';
|
||||
import computeCreatureComputation from '../../computeCreatureComputation';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
import { applyNestedSetProperties } from '/imports/api/parenting/parentingFunctions';
|
||||
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
@@ -20,41 +21,37 @@ var testProperties = [
|
||||
type: 'class',
|
||||
variableName: 'wizard',
|
||||
classType: 'startingClass',
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'rangerId',
|
||||
type: 'class',
|
||||
variableName: 'ranger',
|
||||
classType: 'multiClass',
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'wiz1Id',
|
||||
type: 'classLevel',
|
||||
variableName: 'wizard',
|
||||
level: 1,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'wiz2Id',
|
||||
type: 'classLevel',
|
||||
variableName: 'wizard',
|
||||
level: 2,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'wiz4Id',
|
||||
type: 'classLevel',
|
||||
variableName: 'wizard',
|
||||
level: 4,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
clean({
|
||||
_id: 'rang1Id',
|
||||
type: 'classLevel',
|
||||
variableName: 'ranger',
|
||||
level: 1,
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
];
|
||||
|
||||
applyNestedSetProperties(testProperties);
|
||||
|
||||
@@ -2,6 +2,7 @@ import { buildComputationFromProps } from '/imports/api/engine/computation/build
|
||||
import { assert } from 'chai';
|
||||
import computeCreatureComputation from '../../computeCreatureComputation';
|
||||
import clean from '../../utility/cleanProp.testFn';
|
||||
import { applyNestedSetProperties } from '/imports/api/parenting/parentingFunctions';
|
||||
|
||||
export default function () {
|
||||
const computation = buildComputationFromProps(testProperties);
|
||||
@@ -23,6 +24,7 @@ var testProperties = [
|
||||
baseValue: {
|
||||
calculation: 'arrayConstant[3]',
|
||||
},
|
||||
ancestors: [{ id: 'charId' }],
|
||||
}),
|
||||
];
|
||||
|
||||
applyNestedSetProperties(testProperties);
|
||||
|
||||
@@ -44,7 +44,6 @@ var testProperties = [
|
||||
clean({
|
||||
_id: 'actionId',
|
||||
type: 'action',
|
||||
ancestors: [{ id: 'charId' }],
|
||||
attackRoll: {
|
||||
calculation: 'strength.modifier',
|
||||
},
|
||||
@@ -54,7 +53,6 @@ var testProperties = [
|
||||
_id: 'profBonusId',
|
||||
type: 'attribute',
|
||||
variableName: 'proficiencyBonus',
|
||||
ancestors: [{ id: 'charId' }],
|
||||
baseValue: {
|
||||
calculation: '13'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user