@elite-dangerous-almanac/core 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PROVENANCE/i18n/SOURCES.md +2 -2
- package/PROVENANCE/ships/SOURCES.md +29 -9
- package/README.md +54 -40
- package/dist/astro/galaxy-grid.js +1 -1
- package/dist/astro/index.d.ts +1 -1
- package/dist/astro/index.js +1 -1
- package/dist/astro/naming-region-origins.d.ts +1 -1
- package/dist/astro/naming-region-origins.js +1 -1
- package/dist/astro/nebulae.d.ts +2 -2
- package/dist/astro/permit-locks.d.ts +2 -1
- package/dist/astro/permit-locks.js +1 -1
- package/dist/astro/procedural-system.d.ts +2 -1
- package/dist/astro/procedural-system.js +1 -1
- package/dist/astro/sector-name.d.ts +2 -1
- package/dist/astro/sector-name.js +1 -1
- package/dist/astro/system-address.d.ts +1 -1
- package/dist/astro/system-name.d.ts +14 -9
- package/dist/astro/system-name.js +1 -1
- package/dist/chunk-2W5MW376.js +1 -0
- package/dist/chunk-2W5MW376.js.map +1 -0
- package/dist/{chunk-VZZUNSDF.js → chunk-4KJ7CR74.js} +1 -1
- package/dist/{chunk-VZZUNSDF.js.map → chunk-4KJ7CR74.js.map} +1 -1
- package/dist/{chunk-6EUVIZAS.js → chunk-4QYTVSNR.js} +1 -1
- package/dist/{chunk-EKQCVCMK.js → chunk-5ZVYRX6Z.js} +1 -1
- package/dist/{chunk-EKQCVCMK.js.map → chunk-5ZVYRX6Z.js.map} +1 -1
- package/dist/chunk-6GJHUWMO.js +1 -0
- package/dist/chunk-6GJHUWMO.js.map +1 -0
- package/dist/chunk-6L56LWTT.js +1 -0
- package/dist/chunk-6L56LWTT.js.map +1 -0
- package/dist/{chunk-GQ5GX5TB.js → chunk-6O4NRRSB.js} +1 -1
- package/dist/chunk-6O4NRRSB.js.map +1 -0
- package/dist/{chunk-WNGQ3IAM.js → chunk-6UNAD74Z.js} +1 -1
- package/dist/{chunk-WNGQ3IAM.js.map → chunk-6UNAD74Z.js.map} +1 -1
- package/dist/{chunk-JPBMRJFC.js → chunk-77I24V6B.js} +1 -1
- package/dist/chunk-77I24V6B.js.map +1 -0
- package/dist/chunk-7ATBEOVC.js +1 -0
- package/dist/chunk-7ATBEOVC.js.map +1 -0
- package/dist/chunk-7TQ2X6Q3.js +1 -0
- package/dist/chunk-7TQ2X6Q3.js.map +1 -0
- package/dist/{chunk-6EPYVBAX.js → chunk-A6OINYNP.js} +1 -1
- package/dist/{chunk-Q3QCLNVG.js → chunk-AYAKU4YA.js} +1 -1
- package/dist/chunk-AYAKU4YA.js.map +1 -0
- package/dist/chunk-B7EYTZRK.js +1 -0
- package/dist/chunk-B7EYTZRK.js.map +1 -0
- package/dist/{chunk-EBAHNZ36.js → chunk-CIULJH3G.js} +1 -1
- package/dist/{chunk-EBAHNZ36.js.map → chunk-CIULJH3G.js.map} +1 -1
- package/dist/{chunk-SNADUQSJ.js → chunk-CJK2IBI2.js} +1 -1
- package/dist/{chunk-SNADUQSJ.js.map → chunk-CJK2IBI2.js.map} +1 -1
- package/dist/{chunk-DYPOL3CI.js → chunk-CJQ37JII.js} +1 -1
- package/dist/chunk-CJQ37JII.js.map +1 -0
- package/dist/chunk-D6YEHR5S.js +1 -0
- package/dist/chunk-D6YEHR5S.js.map +1 -0
- package/dist/{chunk-Z6XMXMVI.js → chunk-DBDCOHI4.js} +1 -1
- package/dist/chunk-DBDCOHI4.js.map +1 -0
- package/dist/{chunk-AFVYCQWL.js → chunk-DCB4COCL.js} +1 -1
- package/dist/{chunk-AFVYCQWL.js.map → chunk-DCB4COCL.js.map} +1 -1
- package/dist/{chunk-CJWFY6OX.js → chunk-DSMLYA2M.js} +1 -1
- package/dist/{chunk-CJWFY6OX.js.map → chunk-DSMLYA2M.js.map} +1 -1
- package/dist/{chunk-UXBCLFGU.js → chunk-DWRNXUAX.js} +1 -1
- package/dist/{chunk-UXBCLFGU.js.map → chunk-DWRNXUAX.js.map} +1 -1
- package/dist/{chunk-UHSNB5SV.js → chunk-EVJ32UF3.js} +1 -1
- package/dist/{chunk-UHSNB5SV.js.map → chunk-EVJ32UF3.js.map} +1 -1
- package/dist/chunk-EVW4Z4CB.js +1 -0
- package/dist/chunk-EVW4Z4CB.js.map +1 -0
- package/dist/{chunk-4S6WB7QR.js → chunk-FF2X4K5P.js} +1 -1
- package/dist/chunk-FF2X4K5P.js.map +1 -0
- package/dist/chunk-FYVPZBXN.js +1 -0
- package/dist/chunk-FYVPZBXN.js.map +1 -0
- package/dist/{chunk-QTZPA2FR.js → chunk-GLWPSVFV.js} +1 -1
- package/dist/chunk-GLWPSVFV.js.map +1 -0
- package/dist/chunk-GZYPQIO2.js +1 -0
- package/dist/chunk-GZYPQIO2.js.map +1 -0
- package/dist/chunk-H47K3UWG.js +1 -0
- package/dist/chunk-H47K3UWG.js.map +1 -0
- package/dist/chunk-JGOAQLYW.js +1 -0
- package/dist/chunk-JGOAQLYW.js.map +1 -0
- package/dist/{chunk-JWWYAMGD.js → chunk-MGRDB2BZ.js} +1 -1
- package/dist/{chunk-JWWYAMGD.js.map → chunk-MGRDB2BZ.js.map} +1 -1
- package/dist/{chunk-MKGJPVPS.js → chunk-MRTTQYT5.js} +1 -1
- package/dist/{chunk-MKGJPVPS.js.map → chunk-MRTTQYT5.js.map} +1 -1
- package/dist/chunk-MTJ4MS7W.js +1 -0
- package/dist/chunk-MTJ4MS7W.js.map +1 -0
- package/dist/chunk-NIURLW2F.js +1 -0
- package/dist/chunk-NIURLW2F.js.map +1 -0
- package/dist/chunk-OLKNYGGT.js +1 -0
- package/dist/chunk-OLKNYGGT.js.map +1 -0
- package/dist/{chunk-UXFMVZAY.js → chunk-OVUHQEH5.js} +1 -1
- package/dist/{chunk-UXFMVZAY.js.map → chunk-OVUHQEH5.js.map} +1 -1
- package/dist/chunk-OYFMHDYT.js +1 -0
- package/dist/chunk-OYFMHDYT.js.map +1 -0
- package/dist/chunk-OYR5HUQZ.js +1 -0
- package/dist/chunk-OYR5HUQZ.js.map +1 -0
- package/dist/{chunk-LLHGSBPI.js → chunk-PA5EITW5.js} +1 -1
- package/dist/{chunk-LLHGSBPI.js.map → chunk-PA5EITW5.js.map} +1 -1
- package/dist/chunk-PL75RTA2.js +1 -0
- package/dist/{chunk-2VPVZELZ.js.map → chunk-PL75RTA2.js.map} +1 -1
- package/dist/chunk-PY5L6WC5.js +1 -0
- package/dist/chunk-PY5L6WC5.js.map +1 -0
- package/dist/{chunk-W6EPHHTS.js → chunk-Q2L75GSI.js} +1 -1
- package/dist/chunk-Q2L75GSI.js.map +1 -0
- package/dist/chunk-QJ7GB6FF.js +1 -0
- package/dist/chunk-QJ7GB6FF.js.map +1 -0
- package/dist/chunk-QTAMQ6ME.js +1 -0
- package/dist/chunk-QTAMQ6ME.js.map +1 -0
- package/dist/{chunk-VDVFJXX5.js → chunk-QY3L5BKN.js} +1 -1
- package/dist/{chunk-FMPRCYKY.js → chunk-RRYBSAPX.js} +1 -1
- package/dist/chunk-RRYBSAPX.js.map +1 -0
- package/dist/{chunk-J42ZXLBL.js → chunk-T62GO4AA.js} +1 -1
- package/dist/chunk-T62GO4AA.js.map +1 -0
- package/dist/{chunk-E3BRVGJJ.js → chunk-TBZJIQ5P.js} +1 -1
- package/dist/{chunk-E3BRVGJJ.js.map → chunk-TBZJIQ5P.js.map} +1 -1
- package/dist/chunk-V3AEUBHV.js +1 -0
- package/dist/chunk-V3AEUBHV.js.map +1 -0
- package/dist/chunk-VYDQHPY2.js +1 -0
- package/dist/chunk-VYDQHPY2.js.map +1 -0
- package/dist/chunk-XUHAPOM6.js +1 -0
- package/dist/chunk-XUHAPOM6.js.map +1 -0
- package/dist/chunk-Y6KJJMIM.js +1 -0
- package/dist/chunk-Y6KJJMIM.js.map +1 -0
- package/dist/chunk-YXPZ7QQB.js +1 -0
- package/dist/chunk-YXPZ7QQB.js.map +1 -0
- package/dist/{chunk-Y6UZWNP4.js → chunk-ZCEAPJDH.js} +1 -1
- package/dist/{chunk-Y6UZWNP4.js.map → chunk-ZCEAPJDH.js.map} +1 -1
- package/dist/commodities/commodities.d.ts +20 -10
- package/dist/commodities/commodities.js +1 -1
- package/dist/commodities/index.d.ts +15 -4
- package/dist/commodities/index.js +1 -1
- package/dist/equipment/index.js +1 -1
- package/dist/equipment/modification-costs.d.ts +2 -1
- package/dist/equipment/modification-costs.js.map +1 -1
- package/dist/equipment/modification-journal.js +1 -1
- package/dist/equipment/modifications.d.ts +2 -1
- package/dist/equipment/modifications.js +1 -1
- package/dist/equipment/suits.d.ts +6 -3
- package/dist/equipment/suits.js +1 -1
- package/dist/equipment/upgrade-costs.d.ts +8 -4
- package/dist/equipment/upgrade-costs.js +1 -1
- package/dist/equipment/upgrade-costs.js.map +1 -1
- package/dist/equipment/weapons.d.ts +13 -5
- package/dist/equipment/weapons.js +1 -1
- package/dist/i18n/blueprints.d.ts +6 -6
- package/dist/i18n/blueprints.js +1 -1
- package/dist/i18n/diagnostics.d.ts +1 -13
- package/dist/i18n/engineering-groups.d.ts +1 -0
- package/dist/i18n/engineering-groups.js +1 -1
- package/dist/i18n/experimental-effect-descriptions.d.ts +4 -3
- package/dist/i18n/experimental-effect-descriptions.js +1 -1
- package/dist/i18n/experimental-effects.d.ts +5 -4
- package/dist/i18n/experimental-effects.js +1 -1
- package/dist/i18n/index.d.ts +1 -13
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/pre-engineered.d.ts +7 -6
- package/dist/i18n/pre-engineered.js +1 -1
- package/dist/materials/index.d.ts +16 -4
- package/dist/materials/index.js +1 -1
- package/dist/materials/materials.d.ts +36 -19
- package/dist/materials/materials.js +1 -1
- package/dist/materials/micro-resources.d.ts +18 -7
- package/dist/materials/micro-resources.js +1 -1
- package/dist/ships/armour.d.ts +20 -4
- package/dist/ships/armour.js +1 -1
- package/dist/ships/blueprint-costs.d.ts +20 -17
- package/dist/ships/blueprint-costs.js +1 -1
- package/dist/ships/blueprint-journal.d.ts +9 -8
- package/dist/ships/blueprint-journal.js +1 -1
- package/dist/ships/blueprints.d.ts +14 -12
- package/dist/ships/blueprints.js +1 -1
- package/dist/ships/build-metrics.d.ts +1061 -0
- package/dist/ships/build-metrics.js +1 -0
- package/dist/ships/build-metrics.js.map +1 -0
- package/dist/ships/distributor.d.ts +10 -3
- package/dist/ships/distributor.js +1 -1
- package/dist/ships/engineering-options.d.ts +8 -6
- package/dist/ships/engineering-options.js +1 -1
- package/dist/ships/engineering.d.ts +2 -16
- package/dist/ships/engineering.js +1 -1
- package/dist/ships/experimental-effect-costs.d.ts +5 -5
- package/dist/ships/experimental-effect-costs.js +1 -1
- package/dist/ships/experimental-effects.d.ts +9 -8
- package/dist/ships/experimental-effects.js +1 -1
- package/dist/ships/heat.d.ts +7 -2
- package/dist/ships/heat.js +1 -1
- package/dist/ships/index.d.ts +34 -22
- package/dist/ships/index.js +1 -1
- package/dist/ships/jump-range.d.ts +10 -3
- package/dist/ships/jump-range.js +1 -1
- package/dist/ships/loadout-calculations.d.ts +1 -1
- package/dist/ships/loadout-calculations.js +1 -1
- package/dist/ships/mobility-capacitor.d.ts +90 -0
- package/dist/ships/mobility-capacitor.js +1 -0
- package/dist/ships/mobility-capacitor.js.map +1 -0
- package/dist/ships/mobility.d.ts +41 -17
- package/dist/ships/mobility.js +1 -1
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules-core.js +1 -1
- package/dist/ships/modules.d.ts +27 -1
- package/dist/ships/modules.js +1 -1
- package/dist/ships/power.d.ts +12 -5
- package/dist/ships/power.js +1 -1
- package/dist/ships/pre-engineered-stats.d.ts +10 -8
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/pre-engineered.d.ts +6 -6
- package/dist/ships/pre-engineered.js +1 -1
- package/dist/ships/resistances.d.ts +2 -2
- package/dist/ships/resistances.js +1 -1
- package/dist/ships/shield-capacitor.d.ts +133 -0
- package/dist/ships/shield-capacitor.js +1 -0
- package/dist/ships/shield-capacitor.js.map +1 -0
- package/dist/ships/shield-recovery.d.ts +16 -2
- package/dist/ships/shield-recovery.js +1 -1
- package/dist/ships/shields.d.ts +86 -28
- package/dist/ships/shields.js +1 -1
- package/dist/ships/ship-loadout.d.ts +100 -671
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/ships.d.ts +7 -6
- package/dist/ships/ships.js +1 -1
- package/dist/ships/slef.d.ts +11 -9
- package/dist/ships/slef.js +1 -1
- package/dist/ships/source-purchase.d.ts +2 -1
- package/dist/ships/source-purchase.js +1 -1
- package/dist/ships/weapons-capacitor.d.ts +10 -3
- package/dist/ships/weapons-capacitor.js +1 -1
- package/dist/ships/weapons.d.ts +22 -6
- package/dist/ships/weapons.js +1 -1
- package/dist/{system-address-DYsN1qOT.d.ts → system-address-cyJaeZIS.d.ts} +2 -1
- package/package.json +17 -2
- package/dist/chunk-24INI4U7.js +0 -1
- package/dist/chunk-24INI4U7.js.map +0 -1
- package/dist/chunk-2FHHMYDC.js +0 -1
- package/dist/chunk-2FHHMYDC.js.map +0 -1
- package/dist/chunk-2TW4ZBI3.js +0 -1
- package/dist/chunk-2TW4ZBI3.js.map +0 -1
- package/dist/chunk-2VPVZELZ.js +0 -1
- package/dist/chunk-4S6WB7QR.js.map +0 -1
- package/dist/chunk-DVL5RBKX.js +0 -1
- package/dist/chunk-DVL5RBKX.js.map +0 -1
- package/dist/chunk-DYPOL3CI.js.map +0 -1
- package/dist/chunk-EXVCRIDP.js +0 -1
- package/dist/chunk-EXVCRIDP.js.map +0 -1
- package/dist/chunk-FGXWVFN6.js +0 -1
- package/dist/chunk-FGXWVFN6.js.map +0 -1
- package/dist/chunk-FMPRCYKY.js.map +0 -1
- package/dist/chunk-G3265B27.js +0 -1
- package/dist/chunk-G3265B27.js.map +0 -1
- package/dist/chunk-GQ5GX5TB.js.map +0 -1
- package/dist/chunk-IOJXLDJN.js +0 -1
- package/dist/chunk-IOJXLDJN.js.map +0 -1
- package/dist/chunk-IYU4WLFM.js +0 -1
- package/dist/chunk-IYU4WLFM.js.map +0 -1
- package/dist/chunk-J42ZXLBL.js.map +0 -1
- package/dist/chunk-JPBMRJFC.js.map +0 -1
- package/dist/chunk-LJI7VXJD.js +0 -1
- package/dist/chunk-LJI7VXJD.js.map +0 -1
- package/dist/chunk-OCND33TO.js +0 -1
- package/dist/chunk-OCND33TO.js.map +0 -1
- package/dist/chunk-P2QOL63K.js +0 -1
- package/dist/chunk-P2QOL63K.js.map +0 -1
- package/dist/chunk-Q3QCLNVG.js.map +0 -1
- package/dist/chunk-QTZPA2FR.js.map +0 -1
- package/dist/chunk-RLUS76LZ.js +0 -1
- package/dist/chunk-RLUS76LZ.js.map +0 -1
- package/dist/chunk-TEOJCBSG.js +0 -1
- package/dist/chunk-TEOJCBSG.js.map +0 -1
- package/dist/chunk-TMMGS6TC.js +0 -1
- package/dist/chunk-TMMGS6TC.js.map +0 -1
- package/dist/chunk-W6EPHHTS.js.map +0 -1
- package/dist/chunk-Z6XMXMVI.js.map +0 -1
- package/dist/chunk-ZNCXENNB.js +0 -1
- package/dist/chunk-ZNCXENNB.js.map +0 -1
- package/dist/chunk-ZZT2PQZ5.js +0 -1
- package/dist/chunk-ZZT2PQZ5.js.map +0 -1
- /package/dist/{chunk-6EUVIZAS.js.map → chunk-4QYTVSNR.js.map} +0 -0
- /package/dist/{chunk-6EPYVBAX.js.map → chunk-A6OINYNP.js.map} +0 -0
- /package/dist/{chunk-VDVFJXX5.js.map → chunk-QY3L5BKN.js.map} +0 -0
package/dist/ships/shields.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DamageResistances, DamageTypeValues, DamageResistanceParams } from './resistances.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* **Shields** — strength in megajoules and the resistances that decide what that
|
|
@@ -16,9 +16,10 @@ import { DamageResistanceParams, DamageResistances, DamageTypeValues } from './r
|
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* Resistances stack separately, with their own diminishing returns — see
|
|
19
|
-
* `./resistances`.
|
|
19
|
+
* `./resistances`. Everything here is **pip-free**: the SYS capacitor's own resistance,
|
|
20
|
+
* and the effective figures it buys, live in `./shield-capacitor`.
|
|
20
21
|
*
|
|
21
|
-
* This module is data-free. {@link
|
|
22
|
+
* This module is data-free. {@link BuildMetrics.shieldMetrics} (in `./build-metrics`)
|
|
22
23
|
* pulls the generator, boosters and reinforcement packages out of a build,
|
|
23
24
|
* post-engineering, and calls {@link shieldMetrics} for you.
|
|
24
25
|
*
|
|
@@ -56,6 +57,13 @@ import { DamageResistanceParams, DamageResistances, DamageTypeValues } from './r
|
|
|
56
57
|
* moves. Every field is optional because the type accepts those records; a generator
|
|
57
58
|
* **missing** any of the six curve fields cannot be placed on the curve at all, and
|
|
58
59
|
* raises no shield ({@link shieldMassCurveMultiplier} returns `0`).
|
|
60
|
+
*
|
|
61
|
+
* A generator that carries all six is held to the curve's shape: every value finite and
|
|
62
|
+
* non-negative, masses strictly ordered `minMass < optMass < maxMass` (or all equal, for
|
|
63
|
+
* a constant curve), multipliers strictly ordered
|
|
64
|
+
* `minMultiplier < optMultiplier < maxMultiplier` (or all equal), and equal multipliers
|
|
65
|
+
* wherever the masses are all equal. Anything else is a `RangeError` rather than a
|
|
66
|
+
* plausible-looking number.
|
|
59
67
|
*/
|
|
60
68
|
interface ShieldGeneratorParams extends DamageResistanceParams {
|
|
61
69
|
/** Hull mass at which the generator performs at `maxMultiplier`, in tonnes. */
|
|
@@ -101,15 +109,15 @@ interface ShieldInput {
|
|
|
101
109
|
* {@link ShieldMetrics.reinforcement} is `0`.
|
|
102
110
|
*/
|
|
103
111
|
readonly reinforcement?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Pips to the systems capacitor, `0`–`4`, folded into the reported resistances when
|
|
106
|
-
* a generator is fitted; with none, they are reported only as
|
|
107
|
-
* {@link ShieldMetrics.systemsResistance}.
|
|
108
|
-
* Defaults to `0` — the bare shield, as an outfitting screen shows it.
|
|
109
|
-
*/
|
|
110
|
-
readonly systemsPips?: number;
|
|
111
112
|
}
|
|
112
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* A build's shield strength, where it comes from, and what it resists.
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* Frozen — nested records and lists included — so a result can be held, cached and
|
|
118
|
+
* shared without a defensive copy. Derive a changed figure with a spread rather than
|
|
119
|
+
* by assigning into one.
|
|
120
|
+
*/
|
|
113
121
|
interface ShieldMetrics {
|
|
114
122
|
/** Total shield strength, in megajoules. `0` when no generator is fitted. */
|
|
115
123
|
readonly strength: number;
|
|
@@ -131,9 +139,17 @@ interface ShieldMetrics {
|
|
|
131
139
|
*/
|
|
132
140
|
readonly boostMultiplier: number;
|
|
133
141
|
/**
|
|
134
|
-
* Effective resistances, generator and boosters stacked with diminishing returns
|
|
135
|
-
*
|
|
136
|
-
*
|
|
142
|
+
* Effective resistances, generator and boosters stacked with diminishing returns.
|
|
143
|
+
* The SYS pips are **not** in these — they belong to the capacitor, and
|
|
144
|
+
* {@link shieldCapacitorMetrics} folds them in. `0` for every damage type when no
|
|
145
|
+
* generator is fitted.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* Fractions rather than percentages, and **unrounded**: the stacking is
|
|
149
|
+
* floating-point arithmetic, so a nominal −20% reads as `-0.19999999999999996`
|
|
150
|
+
* rather than `-0.2`. Round where the figure is displayed, not before it is
|
|
151
|
+
* composed further — {@link ShieldMetrics.effectiveHitPoints} is derived from
|
|
152
|
+
* exactly these values.
|
|
137
153
|
*/
|
|
138
154
|
readonly resistances: DamageResistances;
|
|
139
155
|
/**
|
|
@@ -142,24 +158,35 @@ interface ShieldMetrics {
|
|
|
142
158
|
* `Infinity` where a resistance reaches 100%.
|
|
143
159
|
*/
|
|
144
160
|
readonly effectiveHitPoints: DamageTypeValues;
|
|
145
|
-
/** The extra resistance the SYS pips contribute, as a fraction. */
|
|
146
|
-
readonly systemsResistance: number;
|
|
147
161
|
}
|
|
148
162
|
/**
|
|
149
163
|
* A shield generator's strength multiplier at a given hull mass.
|
|
150
164
|
*
|
|
151
|
-
* @param hullMass - The **hull's** mass, in tonnes (not the loaded ship's).
|
|
152
|
-
*
|
|
165
|
+
* @param hullMass - The **hull's** mass, in tonnes (not the loaded ship's). Finite and
|
|
166
|
+
* non-negative.
|
|
167
|
+
* @param generator - The generator's mass/multiplier curve, post-engineering. Either all
|
|
168
|
+
* six curve fields, or a record the catalogue left incomplete — see the `0` cases below.
|
|
153
169
|
* @returns The multiplier to apply to the hull's base shield strength: `minMultiplier`
|
|
154
170
|
* for a hull sitting exactly on `maxMass`, no more than `maxMultiplier` for a
|
|
155
171
|
* featherweight one, and **`0` past `maxMass`** — a generator cannot raise a shield
|
|
156
172
|
* around a hull heavier than it is rated for. Also `0` for a generator whose record is
|
|
157
173
|
* missing part of its curve.
|
|
174
|
+
* @throws {RangeError} If `hullMass` is not a finite number of zero or more, or if the
|
|
175
|
+
* generator carries all six curve fields and they are not a physical curve: every one
|
|
176
|
+
* has to be finite and non-negative, the masses strictly ordered
|
|
177
|
+
* `minMass < optMass < maxMass` (or all equal, for a constant curve), the multipliers
|
|
178
|
+
* strictly ordered `minMultiplier < optMultiplier < maxMultiplier` (or all equal), and an
|
|
179
|
+
* all-equal mass curve must have equal multipliers. A curve that is merely *absent* still
|
|
180
|
+
* answers `0`: a catalogue record missing any of the six fields is incomplete data, not a
|
|
181
|
+
* non-physical curve, and this is the only mass-curve outcome that is not a number or a
|
|
182
|
+
* throw.
|
|
158
183
|
* @remarks
|
|
159
184
|
* The curve is a power law fitted through the generator's three declared points:
|
|
160
185
|
* normalize the mass into `[0, 1]` between `maxMass` and `minMass`, raise it to the
|
|
161
186
|
* exponent that makes the curve pass through `(optMass, optMultiplier)`, then
|
|
162
|
-
* interpolate between `minMultiplier` and `maxMultiplier`.
|
|
187
|
+
* interpolate between `minMultiplier` and `maxMultiplier`. It is the same curve
|
|
188
|
+
* `thrusterMassCurveMultiplier` reads a thruster's performance off, and the two agree on
|
|
189
|
+
* every input they both accept.
|
|
163
190
|
* @example
|
|
164
191
|
* ```ts
|
|
165
192
|
* import { shieldMassCurveMultiplier } from '@elite-dangerous-almanac/core/ships/shields';
|
|
@@ -170,6 +197,24 @@ interface ShieldMetrics {
|
|
|
170
197
|
* minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
|
|
171
198
|
* }); // -> 1.434…
|
|
172
199
|
* ```
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* import { shieldMassCurveMultiplier } from '@elite-dangerous-almanac/core/ships/shields';
|
|
203
|
+
*
|
|
204
|
+
* // A generator whose optimal mass sits on its maximum is not a curve at all
|
|
205
|
+
* try {
|
|
206
|
+
* shieldMassCurveMultiplier(400, {
|
|
207
|
+
* minMass: 270, optMass: 1350, maxMass: 1350,
|
|
208
|
+
* minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
|
|
209
|
+
* });
|
|
210
|
+
* } catch (error) {
|
|
211
|
+
* (error as Error).message;
|
|
212
|
+
* // -> 'shieldMassCurveMultiplier: generator: masses must be strictly ordered minMass < optMass < maxMass, or all equal'
|
|
213
|
+
* }
|
|
214
|
+
*
|
|
215
|
+
* // A record the catalogue left incomplete is data that is missing, not data that is wrong
|
|
216
|
+
* shieldMassCurveMultiplier(400, { optMass: 540, optMultiplier: 1.2 }); // -> 0
|
|
217
|
+
* ```
|
|
173
218
|
*/
|
|
174
219
|
declare function shieldMassCurveMultiplier(hullMass: number, generator: ShieldGeneratorParams): number;
|
|
175
220
|
/**
|
|
@@ -180,24 +225,37 @@ declare function shieldMassCurveMultiplier(hullMass: number, generator: ShieldGe
|
|
|
180
225
|
* @param generator - The fitted generator, post-engineering.
|
|
181
226
|
* @param boostMultiplier - The boosters' combined multiplier — `1 + Σ shieldBoost`.
|
|
182
227
|
* Defaults to `1` (no boosters).
|
|
183
|
-
* @returns The shield's megajoules, before any Guardian reinforcement addition.
|
|
228
|
+
* @returns The shield's megajoules, before any Guardian reinforcement addition. `0` for a
|
|
229
|
+
* hull past the generator's `maxMass`, and `0` for a generator whose record is missing
|
|
230
|
+
* part of its curve — see {@link shieldMassCurveMultiplier}.
|
|
231
|
+
* @throws {RangeError} If `hullMass` is not a finite number of zero or more, or the
|
|
232
|
+
* generator carries a complete but non-physical curve — the contract
|
|
233
|
+
* {@link shieldMassCurveMultiplier} documents, reported as `shieldStrength`.
|
|
184
234
|
*/
|
|
185
235
|
declare function shieldStrength(hullMass: number, baseShieldStrength: number, generator: ShieldGeneratorParams, boostMultiplier?: number): number;
|
|
186
236
|
/**
|
|
187
|
-
*
|
|
188
|
-
*
|
|
237
|
+
* A build's bare shields: strength, where it comes from, and the resistances the
|
|
238
|
+
* generator and boosters stack up between them.
|
|
239
|
+
*
|
|
240
|
+
* These are the **pip-free** figures, the ones an outfitting screen shows. The SYS
|
|
241
|
+
* capacitor is a separate story with its own entry point,
|
|
242
|
+
* {@link shieldCapacitorMetrics}, which takes what this returns and folds a pip
|
|
243
|
+
* allocation into it.
|
|
189
244
|
*
|
|
190
245
|
* @param input - The hull's mass and base shield strength, the fitted generator, and
|
|
191
|
-
* any powered boosters
|
|
246
|
+
* any powered boosters and Guardian reinforcement.
|
|
192
247
|
* @returns The {@link ShieldMetrics}. With no generator fitted there is no shield for
|
|
193
248
|
* a resistance to apply to: every strength figure is `0` — any `reinforcement` passed is
|
|
194
249
|
* dropped, since a Guardian package has no shield to reinforce — and `resistances` and
|
|
195
|
-
* `effectiveHitPoints` are `0` for every damage type
|
|
196
|
-
*
|
|
197
|
-
* `systemsResistance`. `massCurveMultiplier` is `0` and `boostMultiplier` is `1`,
|
|
250
|
+
* `effectiveHitPoints` are `0` for every damage type.
|
|
251
|
+
* `massCurveMultiplier` is `0` and `boostMultiplier` is `1`,
|
|
198
252
|
* whatever boosters are fitted, since there is no generator strength to multiply.
|
|
199
|
-
* @throws {RangeError}
|
|
200
|
-
*
|
|
253
|
+
* @throws {RangeError} With a generator fitted, if `hullMass` is not a finite number of
|
|
254
|
+
* zero or more, or the generator
|
|
255
|
+
* carries a complete but non-physical curve — the contract
|
|
256
|
+
* {@link shieldMassCurveMultiplier} documents, reported as `shieldMetrics`. A generator
|
|
257
|
+
* whose record is simply *missing* part of its curve is not a failure: `hullMass` is
|
|
258
|
+
* never read, and `massCurveMultiplier` and every strength figure are `0`.
|
|
201
259
|
* @example
|
|
202
260
|
* ```ts
|
|
203
261
|
* import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
|
package/dist/ships/shields.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-
|
|
1
|
+
export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-QTAMQ6ME.js"; //# sourceMappingURL=shields.js.map
|