Fixed bugs with effects

they were not providing advantage or conditional benefits
This commit is contained in:
Stefan Zermatten
2022-11-08 18:29:27 +02:00
parent 03f87b0afa
commit 60b21c1901
2 changed files with 6 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ export default function aggregateEffect({node, linkedNode, link}){
operation: linkedNode.data.operation, operation: linkedNode.data.operation,
amount: effectAmount, amount: effectAmount,
type: linkedNode.data.type, type: linkedNode.data.type,
text: linkedNode.data.text,
// ancestors: linkedNode.data.ancestors, // ancestors: linkedNode.data.ancestors,
}); });
@@ -45,8 +46,7 @@ export default function aggregateEffect({node, linkedNode, link}){
const aggregator = node.data.effectAggregator; const aggregator = node.data.effectAggregator;
// Get the result of the effect // Get the result of the effect
const result = linkedNode.data.amount?.value; 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 // Aggregate the effect based on its operation
switch (linkedNode.data.operation) { switch (linkedNode.data.operation) {
case 'base': case 'base':

View File

@@ -24,14 +24,6 @@
> >
<v-icon>mdi-help</v-icon> <v-icon>mdi-help</v-icon>
</v-btn> </v-btn>
<v-switch
v-if="tab === 0"
:input-value="showPropertyHelp"
append-icon="mdi-help"
hide-details
flat
@change="propertyHelpChanged"
/>
<text-field <text-field
v-if="tab === 2" v-if="tab === 2"
prepend-inner-icon="mdi-magnify" prepend-inner-icon="mdi-magnify"