Fixed skills not obeying baseValue correctly

This commit is contained in:
Stefan Zermatten
2022-03-03 15:55:07 +02:00
parent c4429f5dd7
commit 43e956eb6a
2 changed files with 5 additions and 2 deletions

View File

@@ -242,6 +242,9 @@ function linkSkill(dependencyGraph, prop){
}
// Skills depend on the creature's proficiencyBonus
dependencyGraph.addLink(prop._id, 'proficiencyBonus', 'skillProficiencyBonus');
// Depends on base value
dependOnCalc({dependencyGraph, prop, key: 'baseValue'});
}
function linkSlot(dependencyGraph, prop){

View File

@@ -14,7 +14,7 @@ export default function(){
assert.equal(prop.usesLeft, 2);
const rolled = computation.propsById['rolledDescriptionId'];
assert.equal(rolled.summary.value, 'test roll gets compiled d4 + 4 properly');
assert.equal(rolled.summary.value, 'test roll gets compiled 8 properly');
const itemConsumed = prop.resources.itemsConsumed[0];
assert.equal(itemConsumed.quantity.value, 3);
@@ -67,7 +67,7 @@ var testProperties = [
type: 'action',
ancestors: [{id: 'charId'}],
summary: {
text: 'test roll gets compiled {1d4 + (2 + 2)} properly',
text: 'test roll gets compiled {4 + (2 + 2)} properly',
},
}),
clean({