Fix hull boost calculation. Partial fix for #29

This commit is contained in:
Cmdr McDonald
2016-11-23 00:54:42 +00:00
parent c6bde19052
commit f863daa347
2 changed files with 10 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
#2.2.x
#2.2.3
* Fix hull boost calculation
#2.2.2
* Update DPS/HPS/EPS in real-time as modifiers change
* Use coriolis-data 2.2.2:
* Add distributor draw modifier to shield generators

View File

@@ -355,6 +355,12 @@ function _addModifications(module, modifiers) {
}
}
// Bulkhead boost is based off the inherent boost of the module
if (module.grp == 'bh') {
const alteredBoost = (1 + module.hullboost) * (1 + module.getModValue('hullboost') / 10000) - 1;
module.setModValue('hullboost', (alteredBoost / module.hullboost - 1) * 10000);
}
// Jitter is an absolute number, so we need to divide it by 100
if (module.getModValue('jitter')) {
module.setModValue('jitter', module.getModValue('jitter') / 100);