mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: reveals a few hidden values
This commit is contained in:
1 parent
46f9d605f7
commit
6d1ed1e56e
5 files changed
+34
-32
No files matched your search
@@ -674,7 +674,7 @@ export async function definitions(production: boolean) {
|
||||
: turretGunEntry.reloadTime;
|
||||
const gunClipCount =
|
||||
gunType === 'regular' ? undefined : turretGunEntry.clip!.count;
|
||||
const gunInterClip =
|
||||
const gunIntraClip =
|
||||
gunType === 'regular'
|
||||
? undefined
|
||||
: 60 / turretGunEntry.clip!.rate;
|
||||
@@ -722,7 +722,7 @@ export async function definitions(production: boolean) {
|
||||
type: gunType,
|
||||
reload: gunReload,
|
||||
count: gunClipCount,
|
||||
interClip: gunInterClip,
|
||||
intraClip: gunIntraClip,
|
||||
camouflageLoss:
|
||||
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
||||
? turretGunEntry.invisibilityFactorAtShot
|
||||
|
||||
@@ -113,7 +113,7 @@ export function Characteristics() {
|
||||
// TODO: add max rolls
|
||||
[hasTungsten, 0.15],
|
||||
);
|
||||
const interClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
||||
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
||||
const shellVelocityCoefficient = coefficient(
|
||||
[hasSupercharger, 0.3],
|
||||
[hasImprovedGunPowder, 0.3],
|
||||
@@ -210,7 +210,7 @@ export function Characteristics() {
|
||||
shell,
|
||||
damageCoefficient,
|
||||
reloadCoefficient,
|
||||
interClipCoefficient,
|
||||
intraClipCoefficient,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -255,7 +255,7 @@ export function Characteristics() {
|
||||
<>
|
||||
<InfoWithDelta decimals={0} indent name="Maximum" unit="hp / min">
|
||||
{gun.reload.at(-1)! < gun.reload.at(-2)!
|
||||
? (shell.damage.armor / (gun.reload.at(-1)! + gun.interClip)) *
|
||||
? (shell.damage.armor / (gun.reload.at(-1)! + gun.intraClip)) *
|
||||
60
|
||||
: (shell.damage.armor / gun.reload[0]) * 60}
|
||||
</InfoWithDelta>
|
||||
@@ -266,12 +266,12 @@ export function Characteristics() {
|
||||
unit="hp / min"
|
||||
>
|
||||
{gun.reload.at(-1)! < gun.reload.at(-2)!
|
||||
? (shell.damage.armor / (gun.reload.at(-1)! + gun.interClip)) *
|
||||
? (shell.damage.armor / (gun.reload.at(-1)! + gun.intraClip)) *
|
||||
(60 -
|
||||
(gun.reload.slice(0, -1).length - 1) * gun.interClip) +
|
||||
(gun.reload.slice(0, -1).length - 1) * gun.intraClip) +
|
||||
shell.damage.armor * gun.reload.slice(0, -1).length
|
||||
: (shell.damage.armor / (gun.reload[0] + gun.interClip)) *
|
||||
(60 - (gun.reload.slice(1).length - 1) * gun.interClip) +
|
||||
: (shell.damage.armor / (gun.reload[0] + gun.intraClip)) *
|
||||
(60 - (gun.reload.slice(1).length - 1) * gun.intraClip) +
|
||||
shell.damage.armor * gun.reload.slice(1).length}
|
||||
</InfoWithDelta>
|
||||
<Info
|
||||
@@ -285,14 +285,15 @@ export function Characteristics() {
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
<Info indent name="Optimal shell index">
|
||||
{gun.reload.at(-1)! < gun.reload.at(-2)! ? gun.reload.length : 1}
|
||||
</Info>
|
||||
</>
|
||||
)}
|
||||
{gun.type === 'autoReloader' ? (
|
||||
<>
|
||||
<Info name="Reload" unit="s" />
|
||||
<InfoWithDelta name="Shells">{gun.reload.length}</InfoWithDelta>
|
||||
<Info indent name="Most optimal">
|
||||
{gun.reload.at(-1)! < gun.reload.at(-2)! ? gun.reload.length : 1}
|
||||
</Info>
|
||||
<Info name="Shell reloads" unit="s" />
|
||||
{gun.reload.map((reload, index) => (
|
||||
<InfoWithDelta
|
||||
key={index}
|
||||
@@ -301,7 +302,7 @@ export function Characteristics() {
|
||||
decimals={2}
|
||||
deltaType="lowerIsBetter"
|
||||
>
|
||||
{reload}
|
||||
{reload * reloadCoefficient}
|
||||
</InfoWithDelta>
|
||||
))}
|
||||
</>
|
||||
@@ -315,17 +316,18 @@ export function Characteristics() {
|
||||
{gun.reload * reloadCoefficient}
|
||||
</InfoWithDelta>
|
||||
)}
|
||||
{gun.type === 'autoLoader' && (
|
||||
<InfoWithDelta
|
||||
indent
|
||||
decimals={2}
|
||||
name="Intra-clip"
|
||||
unit="s"
|
||||
deltaType="lowerIsBetter"
|
||||
>
|
||||
{gun.interClip * interClipCoefficient}
|
||||
</InfoWithDelta>
|
||||
)}
|
||||
{gun.type === 'autoLoader' ||
|
||||
(gun.type === 'autoReloader' && (
|
||||
<InfoWithDelta
|
||||
indent
|
||||
decimals={2}
|
||||
name="Intra-clip"
|
||||
unit="s"
|
||||
deltaType="lowerIsBetter"
|
||||
>
|
||||
{gun.intraClip * intraClipCoefficient}
|
||||
</InfoWithDelta>
|
||||
))}
|
||||
<InfoWithDelta name="Caliber" decimals={0} unit="mm">
|
||||
{shell.caliber}
|
||||
</InfoWithDelta>
|
||||
|
||||
@@ -5,7 +5,7 @@ export function resolveDpm(
|
||||
shell: ShellDefinition,
|
||||
damageCoefficient = 1,
|
||||
reloadCoefficient = 1,
|
||||
interClipCoefficient = 1,
|
||||
intraClipCoefficient = 1,
|
||||
) {
|
||||
const alpha = shell.damage.armor * damageCoefficient;
|
||||
|
||||
@@ -14,14 +14,14 @@ export function resolveDpm(
|
||||
} else if (gun.type === 'autoLoader') {
|
||||
return (
|
||||
((alpha * gun.count) /
|
||||
(gun.reload + (gun.count - 1) * gun.interClip * interClipCoefficient)) *
|
||||
(gun.reload + (gun.count - 1) * gun.intraClip * intraClipCoefficient)) *
|
||||
60
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
((alpha * gun.count) /
|
||||
(gun.reload.reduce((a, b) => a + b, 0) +
|
||||
(gun.count - 1) * gun.interClip)) *
|
||||
(gun.count - 1) * gun.intraClip)) *
|
||||
60
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ export function resolveReload(gun: GunDefinition) {
|
||||
if (gun.type === 'regular') {
|
||||
return gun.reload;
|
||||
} else if (gun.type === 'autoLoader') {
|
||||
return gun.reload + (gun.count - 1) * gun.interClip;
|
||||
return gun.reload + (gun.count - 1) * gun.intraClip;
|
||||
} else {
|
||||
return (
|
||||
gun.reload.reduce((a, b) => a + b, 0) + (gun.count - 1) * gun.interClip
|
||||
gun.reload.reduce((a, b) => a + b, 0) + (gun.count - 1) * gun.intraClip
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -125,13 +125,13 @@ interface GunDefinitionRegular extends GunDefinitionBase {
|
||||
interface GunDefinitionAutoLoader extends GunDefinitionBase {
|
||||
type: 'autoLoader';
|
||||
reload: number;
|
||||
interClip: number;
|
||||
intraClip: number;
|
||||
count: number;
|
||||
}
|
||||
interface GunDefinitionAutoReloader extends GunDefinitionBase {
|
||||
type: 'autoReloader';
|
||||
reload: number[];
|
||||
interClip: number;
|
||||
intraClip: number;
|
||||
count: number;
|
||||
}
|
||||
export type ShellDefinition = {
|
||||
|
||||
Reference in new issue
Block a user