diff --git a/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js b/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js index 3b1b987e..ae609923 100644 --- a/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js +++ b/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js @@ -1,6 +1,6 @@ import { pick } from 'lodash'; -export default function aggregateEffect({node, linkedNode, link}){ +export default function aggregateEffect({ node, linkedNode, link }) { if (link.data !== 'effect') return; // store the effect aggregator, its presence indicates that the variable is // targeted by effects @@ -38,6 +38,7 @@ export default function aggregateEffect({node, linkedNode, link}){ operation: linkedNode.data.operation, amount: effectAmount, type: linkedNode.data.type, + text: linkedNode.data.text, // ancestors: linkedNode.data.ancestors, }); @@ -45,14 +46,13 @@ export default function aggregateEffect({node, linkedNode, link}){ const aggregator = node.data.effectAggregator; // Get the result of the effect const result = linkedNode.data.amount?.value; - // Skip aggregating if the result is not resolved completely - if (typeof result === 'string' || result === undefined) return; + // Aggregate the effect based on its operation - switch(linkedNode.data.operation){ + switch (linkedNode.data.operation) { case 'base': // Take the largest base value - if (Number.isFinite(result)){ - if(Number.isFinite(aggregator.base)){ + if (Number.isFinite(result)) { + if (Number.isFinite(aggregator.base)) { aggregator.base = Math.max(aggregator.base, result); } else { aggregator.base = result; diff --git a/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue b/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue index 720b4c45..60eea258 100644 --- a/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue +++ b/app/imports/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue @@ -24,14 +24,6 @@ > mdi-help -