From bea3879eda8317dfd60e39e76996e137d4315c24 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Oct 2016 22:39:47 +0200 Subject: [PATCH] lint --- 5eShaped/precompiled/scripts/Abilities.js | 2 +- 5eShaped/precompiled/scripts/AbilityChecks.js | 2 +- 5eShaped/precompiled/scripts/SavingThrows.js | 2 +- 5eShaped/precompiled/scripts/Settings.js | 4 ++-- 5eShaped/precompiled/scripts/Spells.js | 8 ++------ 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/5eShaped/precompiled/scripts/Abilities.js b/5eShaped/precompiled/scripts/Abilities.js index c1608a185a..d2a3bb0d0d 100644 --- a/5eShaped/precompiled/scripts/Abilities.js +++ b/5eShaped/precompiled/scripts/Abilities.js @@ -8,7 +8,7 @@ import { Attacks } from './Attacks'; const attacks = new Attacks(); import { Spells } from './Spells'; const spells = new Spells(); -import { getSetItems, getIntValue, getFloatValue, getAbilityMod, addArithmeticOperator, showSign, firstThree } from './utilities'; +import { getSetItems, getIntValue, getAbilityMod, addArithmeticOperator, showSign, firstThree } from './utilities'; export class Abilities { updateModifier(ability) { diff --git a/5eShaped/precompiled/scripts/AbilityChecks.js b/5eShaped/precompiled/scripts/AbilityChecks.js index 86f26d8c1b..681eeacb5e 100644 --- a/5eShaped/precompiled/scripts/AbilityChecks.js +++ b/5eShaped/precompiled/scripts/AbilityChecks.js @@ -1,6 +1,6 @@ /* global on:false, generateRowID:false, getTranslationByKey:false */ -import { getSetItems, getSetRepeatingItems, isUndefinedOrEmpty, getAbilityValue, getAbilityShortName, getIntValue, addArithmeticOperator, showSign, capitalize, exists, getRepeatingInfo, isUndefined } from './utilities'; +import { getSetItems, getSetRepeatingItems, isUndefinedOrEmpty, getAbilityValue, getAbilityShortName, getIntValue, addArithmeticOperator, showSign, exists, getRepeatingInfo, isUndefined } from './utilities'; import { ABILITIES } from './constants'; import { ProficiencyBonus } from './ProficiencyBonus'; const proficiencyBonus = new ProficiencyBonus(); diff --git a/5eShaped/precompiled/scripts/SavingThrows.js b/5eShaped/precompiled/scripts/SavingThrows.js index 8b6aa198dc..e71fc6a121 100644 --- a/5eShaped/precompiled/scripts/SavingThrows.js +++ b/5eShaped/precompiled/scripts/SavingThrows.js @@ -182,7 +182,7 @@ export class SavingThrows { callback: (v, finalSetAttrs) => { if (v.pb === 2 && checkedSavingThrowSRDCount < 50) { checkedSavingThrowSRDCount += 1; - this.updateFromSRD(checkedSavingThrowSRDCount); //timeouts lose context so just have to bruteforce it. + this.updateFromSRD(checkedSavingThrowSRDCount); // timeouts lose context so just have to bruteforce it. return; } for (const ability of ABILITIES) { diff --git a/5eShaped/precompiled/scripts/Settings.js b/5eShaped/precompiled/scripts/Settings.js index ed2800d7bf..639ee552c7 100644 --- a/5eShaped/precompiled/scripts/Settings.js +++ b/5eShaped/precompiled/scripts/Settings.js @@ -25,13 +25,13 @@ export class Settings { collectionArray: ['weight_system', 'weight_per_coin', 'carrying_capacity_multiplier', 'max_push_drag_lift_multiplier', 'encumbered_multiplier', 'heavily_encumbered_multiplier'], callback: (v, finalSetAttrs) => { if (v.weight_system === 'pounds') { - finalSetAttrs.weight_per_coin = .02; + finalSetAttrs.weight_per_coin = 0.02; finalSetAttrs.carrying_capacity_multiplier = 15; finalSetAttrs.max_push_drag_lift_multiplier = 30; finalSetAttrs.encumbered_multiplier = 5; finalSetAttrs.heavily_encumbered_multiplier = 10; } else if (v.weight_system === 'kilograms') { - finalSetAttrs.weight_per_coin = .00907; + finalSetAttrs.weight_per_coin = 0.00907; finalSetAttrs.carrying_capacity_multiplier = 6.804; finalSetAttrs.max_push_drag_lift_multiplier = 13.608; finalSetAttrs.encumbered_multiplier = 2.268; diff --git a/5eShaped/precompiled/scripts/Spells.js b/5eShaped/precompiled/scripts/Spells.js index 85b16526d9..85d50a10fe 100644 --- a/5eShaped/precompiled/scripts/Spells.js +++ b/5eShaped/precompiled/scripts/Spells.js @@ -321,8 +321,8 @@ export class Spells { collectionArray: ['warlock_spell_slots', 'warlock_spell_slots_calc', 'warlock_spell_slots_bonus', 'warlock_spell_slots_max'], callback: (v, finalSetAttrs) => { const warlockSlots = getIntValue(v.warlock_spell_slots_calc) + getIntValue(v.warlock_spell_slots_bonus); - finalSetAttrs['warlock_spell_slots'] = warlockSlots; - finalSetAttrs['warlock_spell_slots_max'] = warlockSlots; + finalSetAttrs.warlock_spell_slots = warlockSlots; + finalSetAttrs.warlock_spell_slots_max = warlockSlots; }, }); } @@ -423,10 +423,6 @@ export class Spells { for (let i = 1; i <= 8; i++) { const spellLevels = []; const warlockSpellsMaxLevel = getIntValue(v.warlock_spells_max_level); - let addWarlockLevel = 0; - if (getIntValue(v.warlock_spell_slots) > 0 && warlockSpellsMaxLevel > 0 && i < warlockSpellsMaxLevel) { - addWarlockLevel = warlockSpellsMaxLevel; - } for (let j = i; j <= 9; j++) { if (getIntValue(v[`spell_slots_l${j}`]) || j === warlockSpellsMaxLevel) {