diff --git a/ChangeLog.md b/ChangeLog.md
index bc78482c..a66545ff 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -3,6 +3,7 @@
* Make absolute damage visible
* Add 'average' roll for blueprints
* Update spacing for movement summary
+ * Provide damage dealt statistics for both shields and hull
#2.2.10
* Fix detailed export of module reinforcement packages
diff --git a/src/app/components/DamageDealt.jsx b/src/app/components/DamageDealt.jsx
index 5d0f27b2..7ce819ce 100644
--- a/src/app/components/DamageDealt.jsx
+++ b/src/app/components/DamageDealt.jsx
@@ -108,9 +108,12 @@ export default class DamageDealt extends TranslatedComponent {
// Track totals
let totals = {};
- totals.effectiveness = 0;
- totals.effectiveDps = 0;
- totals.effectiveSDps = 0;
+ totals.effectivenessShields = 0;
+ totals.effectiveDpsShields = 0;
+ totals.effectiveSDpsShields = 0;
+ totals.effectivenessHull = 0;
+ totals.effectiveDpsHull = 0;
+ totals.effectiveSDpsHull = 0;
let totalDps = 0;
let weapons = [];
@@ -134,24 +137,33 @@ export default class DamageDealt extends TranslatedComponent {
}
}
const classRating = `${m.class}${m.rating}${m.missile ? '/' + m.missile : ''}`;
- const effectiveness = (m.getPiercing() >= against.properties.hardness ? 1 : m.getPiercing() / against.properties.hardness) * dropoff;
- const effectiveDps = m.getDps() * effectiveness * dropoff;
- const effectiveSDps = (m.getClip() ? (m.getClip() * m.getDps() / m.getRoF()) / ((m.getClip() / m.getRoF()) + m.getReload()) * effectiveness : effectiveDps) * dropoff;
- totals.effectiveDps += effectiveDps;
- totals.effectiveSDps += effectiveSDps;
+ const effectivenessShields = dropoff;
+ const effectiveDpsShields = m.getDps() * effectivenessShields * dropoff;
+ const effectiveSDpsShields = (m.getClip() ? (m.getClip() * m.getDps() / m.getRoF()) / ((m.getClip() / m.getRoF()) + m.getReload()) * effectivenessShields : effectiveDpsShields) * dropoff;
+ const effectivenessHull = (m.getPiercing() >= against.properties.hardness ? 1 : m.getPiercing() / against.properties.hardness) * dropoff;
+ const effectiveDpsHull = m.getDps() * effectivenessHull * dropoff;
+ const effectiveSDpsHull = (m.getClip() ? (m.getClip() * m.getDps() / m.getRoF()) / ((m.getClip() / m.getRoF()) + m.getReload()) * effectivenessHull : effectiveDpsHull) * dropoff;
+ totals.effectiveDpsShields += effectiveDpsShields;
+ totals.effectiveSDpsShields += effectiveSDpsShields;
+ totals.effectiveDpsHull += effectiveDpsHull;
+ totals.effectiveSDpsHull += effectiveSDpsHull;
totalDps += m.getDps();
weapons.push({ id: i,
mount: m.mount,
name: m.name || m.grp,
classRating,
- effectiveDps,
- effectiveSDps,
- effectiveness });
+ effectiveDpsShields,
+ effectiveSDpsShields,
+ effectivenessShields,
+ effectiveDpsHull,
+ effectiveSDpsHull,
+ effectivenessHull });
}
}
}
- totals.effectiveness = totals.effectiveDps / totalDps;
+ totals.effectivenessShields = totals.effectiveDpsShields / totalDps;
+ totals.effectivenessHull = totals.effectiveDpsHull / totalDps;
return { weapons, totals };
}
@@ -201,9 +213,12 @@ export default class DamageDealt extends TranslatedComponent {
switch (predicate) {
case 'n': comp = comp(null, desc); break;
- case 'edps': comp = comp((a, b) => a.effectiveDps - b.effectiveDps, desc); break;
- case 'esdps': comp = comp((a, b) => a.effectiveSDps - b.effectiveSDps, desc); break;
- case 'e': comp = comp((a, b) => a.effectiveness - b.effectiveness, desc); break;
+ case 'edpss': comp = comp((a, b) => a.effectiveDpsShields - b.effectiveDpsShields, desc); break;
+ case 'esdpss': comp = comp((a, b) => a.effectiveSDpsShields - b.effectiveSDpsShields, desc); break;
+ case 'es': comp = comp((a, b) => a.effectivenessShields - b.effectivenessShields, desc); break;
+ case 'edpsh': comp = comp((a, b) => a.effectiveDpsHull - b.effectiveDpsHull, desc); break;
+ case 'esdpsh': comp = comp((a, b) => a.effectiveSDpsHull - b.effectiveSDpsHull, desc); break;
+ case 'eh': comp = comp((a, b) => a.effectivenessHull - b.effectivenessHull, desc); break;
}
this.state.weapons.sort(comp);
@@ -232,9 +247,12 @@ export default class DamageDealt extends TranslatedComponent {
{weapon.mount == 'T' ?
| {translate('weapon')} | -{translate('effective dps')} | -{translate('effective sdps')} | -{translate('effectiveness')} | +{translate('weapon')} | +{translate('shields')} | +{translate('armour')} | +||||
|---|---|---|---|---|---|---|---|---|---|---|
| {translate('effective dps')} | +{translate('effective sdps')} | +{translate('effectiveness')} | +{translate('effective dps')} | +{translate('effective sdps')} | +{translate('effectiveness')} | |||||
| {translate('total')} | -{formats.round1(totals.effectiveDps)} | -{formats.round1(totals.effectiveSDps)} | -{formats.pct(totals.effectiveness)} | +{formats.round1(totals.effectiveDpsShields)} | +{formats.round1(totals.effectiveSDpsShields)} | +{formats.pct(totals.effectivenessShields)} | +{formats.round1(totals.effectiveDpsHull)} | +{formats.round1(totals.effectiveSDpsHull)} | +{formats.pct(totals.effectivenessHull)} | |