diff --git a/package.json b/package.json index 9e99f9a0..81d6de35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coriolis_shipyard", - "version": "2.2.6", + "version": "2.2.7", "repository": { "type": "git", "url": "https://github.com/EDCD/coriolis" diff --git a/src/app/components/DamageReceived.jsx b/src/app/components/DamageReceived.jsx index f3d5e637..7268d5c4 100644 --- a/src/app/components/DamageReceived.jsx +++ b/src/app/components/DamageReceived.jsx @@ -105,34 +105,36 @@ export default class DamageReceived extends TranslatedComponent { // Effective DPS taking in to account shield resistance let effectivenessShields = 0; if (m.getDamageType().indexOf('E') != -1) { - effectivenessShields += ship.shieldExplRes; + effectivenessShields += (1 - ship.shieldExplRes); } if (m.getDamageType().indexOf('K') != -1) { - effectivenessShields += ship.shieldKinRes; + effectivenessShields += (1 - ship.shieldKinRes); } if (m.getDamageType().indexOf('T') != -1) { - effectivenessShields += ship.shieldThermRes; + effectivenessShields += (1 - ship.shieldThermRes); + } + if (m.getDamageType().indexOf('A') != -1) { + effectivenessShields += 1; } effectivenessShields /= m.getDamageType().length; - // Plasma accelerators deal absolute damage - if (m.grp == 'pa') effectivenessShields = 1; const effectiveDpsShields = baseDps * effectivenessShields; const effectiveSDpsShields = baseSDps * effectivenessShields; // Effective DPS taking in to account hull hardness and resistance let effectivenessHull = 0; if (m.getDamageType().indexOf('E') != -1) { - effectivenessHull += ship.hullExplRes; + effectivenessHull += (1 - ship.hullExplRes); } if (m.getDamageType().indexOf('K') != -1) { - effectivenessHull += ship.hullKinRes; + effectivenessHull += (1 - ship.hullKinRes); } if (m.getDamageType().indexOf('T') != -1) { - effectivenessHull += ship.hullThermRes; + effectivenessHull += (1 - ship.hullThermRes); + } + if (m.getDamageType().indexOf('A') != -1) { + effectivenessHull += 1; } effectivenessHull /= m.getDamageType().length; - // Plasma accelerators deal absolute damage (but could be reduced by hardness) - if (m.grp == 'pa') effectivenessHull = 1; effectivenessHull *= Math.min(m.getPiercing() / ship.hardness, 1); const effectiveDpsHull = baseDps * effectivenessHull; const effectiveSDpsHull = baseSDps * effectivenessHull;