Fixed effects not applying to damage in actions

This commit is contained in:
Thaum Rystra
2024-10-30 10:03:47 +02:00
parent 74bd291426
commit ce9753fa9c
5 changed files with 66 additions and 8 deletions

View File

@@ -82,10 +82,12 @@ export async function runActionById(propId, targetIds?, userInput = inputProvide
function createAction(prop: any, targetIds?: string[]) {
const action: EngineAction = {
creatureId: prop.root.id,
rootPropId: prop._id,
results: [],
taskCount: 0,
targetIds,
task: {
prop,
targetIds: targetIds || [],
}
};
return EngineActions.insertAsync(action);
}

View File

@@ -48,7 +48,7 @@ export default async function recalculateCalculation(
// Resolve the modified valueNode, use the same context
const {
result: finalResult
} = await resolve(parseLevel, calcObj.parseNode, scope, context);
} = await resolve(parseLevel, calcObj.valueNode, scope, context);
// Store the errors
calcObj.errors = context.errors;