This commit is contained in:
Mark
2016-07-17 11:45:15 +02:00
parent b0767f02ab
commit 02fde531df
@@ -3825,8 +3825,8 @@ const getHighestAbilityScores = (v, savingThrowName) => {
return highestAbilities;
};
const getAverageOfHighestAbilityScoresForSavingThrow = (v, savingThrowName) => {
let obj = {
abilitiesUsed: []
const obj = {
abilitiesUsed: [],
};
let sum = 0;
@@ -3837,7 +3837,7 @@ const getAverageOfHighestAbilityScoresForSavingThrow = (v, savingThrowName) => {
}
if (obj.abilitiesUsed.length > 0) {
obj.avg = Math.floor(sum / obj.abilitiesUsed.length)
obj.avg = Math.floor(sum / obj.abilitiesUsed.length);
}
return obj;
};
@@ -3859,7 +3859,7 @@ const updateSavingThrow = (savingThrowName) => {
if (savingThrowName === 'fortitude' || savingThrowName === 'reflex' || savingThrowName === 'will') {
if (v.average_of_abilities === '1') {
let obj = getAverageOfHighestAbilityScoresForSavingThrow(v, savingThrowName);
const obj = getAverageOfHighestAbilityScoresForSavingThrow(v, savingThrowName);
if (obj.avg) {
total = obj.avg;
@@ -3982,7 +3982,6 @@ on('change:use_custom_saving_throws', () => {
updateCustomSavingThrowToggle();
});
const updateSavingThrowsFromSRD = () => {
getSetItems({
collectionArray: ['saving_throws_srd'],