Fixed bug where children of rolls would be applied
This commit is contained in:
@@ -6,9 +6,11 @@ import resolve, { toString } from '/imports/parser/resolve.js';
|
|||||||
export default function applyRoll(node, {creature, targets, scope, log}){
|
export default function applyRoll(node, {creature, targets, scope, log}){
|
||||||
const prop = node.node;
|
const prop = node.node;
|
||||||
|
|
||||||
const applyChildren = node.children.forEach(child => applyProperty(child, {
|
const applyChildren = function(){
|
||||||
creature, targets, scope, log
|
node.children.forEach(child => applyProperty(child, {
|
||||||
}));
|
creature, targets, scope, log
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
if (prop.roll?.calculation){
|
if (prop.roll?.calculation){
|
||||||
const logValue = [];
|
const logValue = [];
|
||||||
@@ -54,7 +56,5 @@ export default function applyRoll(node, {creature, targets, scope, log}){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return node.children.forEach(child => applyProperty(child, {
|
return applyChildren();
|
||||||
creature, targets, scope, log
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user