diff --git a/src/app/shipyard/Module.js b/src/app/shipyard/Module.js index ca25fa76..964c659f 100755 --- a/src/app/shipyard/Module.js +++ b/src/app/shipyard/Module.js @@ -29,7 +29,7 @@ export default class Module { /** * Get a value for a given modification * @param {Number} name The name of the modification - * @return {Number} The value of the modification, as a decimal value from -1 to 1 + * @return {Number} The value of the modification, as a decimal value where 1 is 100% */ getModValue(name) { return this.mods && this.mods[name] ? this.mods[name] / 10000 : null; @@ -38,7 +38,7 @@ export default class Module { /** * Set a value for a given modification ID * @param {Number} name The name of the modification - * @param {Number} value The value of the modification, as a decimal value from -1 to 1 + * @param {Number} value The value of the modification, as a decimal value where 1 is 100% */ setModValue(name, value) { if (value == null || value == 0) { diff --git a/src/app/shipyard/Ship.js b/src/app/shipyard/Ship.js index bd2c8fec..69c064a0 100755 --- a/src/app/shipyard/Ship.js +++ b/src/app/shipyard/Ship.js @@ -212,8 +212,10 @@ export default class Ship { */ calcShieldRecovery() { if (this.shieldStrength && this.sgSlot) { + let brokenRegenRate = 1 + this.sgSlot.m.getModValue('brokenregen'); + console.log('Broken regen rate is ' + brokenRegenRate); // 50% of shield strength / recovery recharge rate + 15 second delay before recharge starts - return ((this.shieldStrength / 2) / this.sgSlot.m.recover) + 15; + return ((this.shieldStrength / 2) / (this.sgSlot.m.recover * brokenRegenRate)) + 15; } return 0; } @@ -226,8 +228,9 @@ export default class Ship { */ calcShieldRecharge() { if (this.shieldStrength && this.sgSlot) { + let regenRate = 1 + this.sgSlot.m.getModValue('regen'); // 50% -> 100% recharge time, Bi-Weave shields charge at 1.8 MJ/s - return (this.shieldStrength / 2) / (this.sgSlot.m.grp == 'bsg' ? 1.8 : 1); + return (this.shieldStrength / 2) / ((this.sgSlot.m.grp == 'bsg' ? 1.8 : 1) * regenRate); } return 0; }