This commit is contained in:
Mark
2016-10-12 22:39:47 +02:00
parent 5360cbb37a
commit bea3879eda
5 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -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) {
@@ -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();
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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;
+2 -6
View File
@@ -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) {