Fixed checks not applying rolled effects
This commit is contained in:
@@ -32,10 +32,10 @@ export default function computeCalculation(computation, node) {
|
||||
delete calcObj._localScope;
|
||||
}
|
||||
|
||||
export function resolveCalculationNode(calculation, parseNode, scope) {
|
||||
export function resolveCalculationNode(calculation, parseNode, scope, givenContext) {
|
||||
const fn = calculation._parseLevel;
|
||||
const calculationScope = { ...calculation._localScope, ...scope };
|
||||
const { result: resultNode, context } = resolve(fn, parseNode, calculationScope);
|
||||
const { result: resultNode, context } = resolve(fn, parseNode, calculationScope, givenContext);
|
||||
calculation.errors = context.errors;
|
||||
calculation.valueNode = resultNode;
|
||||
}
|
||||
|
||||
@@ -32,11 +32,12 @@ export default function aggregateDefinition({ node, linkedNode, link }) {
|
||||
|
||||
if (propBaseValue === undefined) return;
|
||||
// Store a summary of the definition as a base value effect
|
||||
node.data.effectIds = node.data.effectIds || [];
|
||||
node.data.definitions = node.data.definitions || [];
|
||||
|
||||
if (prop.type === 'pointBuyRow') {
|
||||
node.data.effectIds.push(prop.tableId);
|
||||
node.data.definitions.push({ _id: prop.tableId, type: 'pointBuy', row: prop.index });
|
||||
} else {
|
||||
node.data.effectIds.push(prop._id);
|
||||
node.data.definitions.push({ _id: prop._id, type: node.data.type });
|
||||
}
|
||||
if (node.data.baseValue === undefined || propBaseValue > node.data.baseValue) {
|
||||
node.data.baseValue = propBaseValue;
|
||||
|
||||
@@ -50,5 +50,6 @@ export default function computeVariableAsAttribute(computation, node, prop) {
|
||||
|
||||
// Store effects and proficiencies
|
||||
prop.effectIds = node.data.effectIds;
|
||||
prop.definitions = node.data.definitions;
|
||||
prop.proficiencyIds = node.data.proficiencyIds;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export default function computeVariableAsSkill(computation, node, prop) {
|
||||
|
||||
// Store effects and proficiencies
|
||||
prop.effectIds = node.data.effectIds;
|
||||
prop.definitions = node.data.definitions;
|
||||
prop.proficiencyIds = node.data.proficiencyIds;
|
||||
|
||||
// If there is no aggregator, determine if the prop can hide, then exit
|
||||
|
||||
Reference in New Issue
Block a user