mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +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;
|
: turretGunEntry.reloadTime;
|
||||||
const gunClipCount =
|
const gunClipCount =
|
||||||
gunType === 'regular' ? undefined : turretGunEntry.clip!.count;
|
gunType === 'regular' ? undefined : turretGunEntry.clip!.count;
|
||||||
const gunInterClip =
|
const gunIntraClip =
|
||||||
gunType === 'regular'
|
gunType === 'regular'
|
||||||
? undefined
|
? undefined
|
||||||
: 60 / turretGunEntry.clip!.rate;
|
: 60 / turretGunEntry.clip!.rate;
|
||||||
@@ -722,7 +722,7 @@ export async function definitions(production: boolean) {
|
|||||||
type: gunType,
|
type: gunType,
|
||||||
reload: gunReload,
|
reload: gunReload,
|
||||||
count: gunClipCount,
|
count: gunClipCount,
|
||||||
interClip: gunInterClip,
|
intraClip: gunIntraClip,
|
||||||
camouflageLoss:
|
camouflageLoss:
|
||||||
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
||||||
? turretGunEntry.invisibilityFactorAtShot
|
? turretGunEntry.invisibilityFactorAtShot
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export function Characteristics() {
|
|||||||
// TODO: add max rolls
|
// TODO: add max rolls
|
||||||
[hasTungsten, 0.15],
|
[hasTungsten, 0.15],
|
||||||
);
|
);
|
||||||
const interClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
||||||
const shellVelocityCoefficient = coefficient(
|
const shellVelocityCoefficient = coefficient(
|
||||||
[hasSupercharger, 0.3],
|
[hasSupercharger, 0.3],
|
||||||
[hasImprovedGunPowder, 0.3],
|
[hasImprovedGunPowder, 0.3],
|
||||||
@@ -210,7 +210,7 @@ export function Characteristics() {
|
|||||||
shell,
|
shell,
|
||||||
damageCoefficient,
|
damageCoefficient,
|
||||||
reloadCoefficient,
|
reloadCoefficient,
|
||||||
interClipCoefficient,
|
intraClipCoefficient,
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -255,7 +255,7 @@ export function Characteristics() {
|
|||||||
<>
|
<>
|
||||||
<InfoWithDelta decimals={0} indent name="Maximum" unit="hp / min">
|
<InfoWithDelta decimals={0} indent name="Maximum" unit="hp / min">
|
||||||
{gun.reload.at(-1)! < gun.reload.at(-2)!
|
{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
|
60
|
||||||
: (shell.damage.armor / gun.reload[0]) * 60}
|
: (shell.damage.armor / gun.reload[0]) * 60}
|
||||||
</InfoWithDelta>
|
</InfoWithDelta>
|
||||||
@@ -266,12 +266,12 @@ export function Characteristics() {
|
|||||||
unit="hp / min"
|
unit="hp / min"
|
||||||
>
|
>
|
||||||
{gun.reload.at(-1)! < gun.reload.at(-2)!
|
{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 -
|
(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.slice(0, -1).length
|
||||||
: (shell.damage.armor / (gun.reload[0] + gun.interClip)) *
|
: (shell.damage.armor / (gun.reload[0] + gun.intraClip)) *
|
||||||
(60 - (gun.reload.slice(1).length - 1) * gun.interClip) +
|
(60 - (gun.reload.slice(1).length - 1) * gun.intraClip) +
|
||||||
shell.damage.armor * gun.reload.slice(1).length}
|
shell.damage.armor * gun.reload.slice(1).length}
|
||||||
</InfoWithDelta>
|
</InfoWithDelta>
|
||||||
<Info
|
<Info
|
||||||
@@ -285,14 +285,15 @@ export function Characteristics() {
|
|||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Info indent name="Optimal shell index">
|
|
||||||
{gun.reload.at(-1)! < gun.reload.at(-2)! ? gun.reload.length : 1}
|
|
||||||
</Info>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{gun.type === 'autoReloader' ? (
|
{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) => (
|
{gun.reload.map((reload, index) => (
|
||||||
<InfoWithDelta
|
<InfoWithDelta
|
||||||
key={index}
|
key={index}
|
||||||
@@ -301,7 +302,7 @@ export function Characteristics() {
|
|||||||
decimals={2}
|
decimals={2}
|
||||||
deltaType="lowerIsBetter"
|
deltaType="lowerIsBetter"
|
||||||
>
|
>
|
||||||
{reload}
|
{reload * reloadCoefficient}
|
||||||
</InfoWithDelta>
|
</InfoWithDelta>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
@@ -315,17 +316,18 @@ export function Characteristics() {
|
|||||||
{gun.reload * reloadCoefficient}
|
{gun.reload * reloadCoefficient}
|
||||||
</InfoWithDelta>
|
</InfoWithDelta>
|
||||||
)}
|
)}
|
||||||
{gun.type === 'autoLoader' && (
|
{gun.type === 'autoLoader' ||
|
||||||
<InfoWithDelta
|
(gun.type === 'autoReloader' && (
|
||||||
indent
|
<InfoWithDelta
|
||||||
decimals={2}
|
indent
|
||||||
name="Intra-clip"
|
decimals={2}
|
||||||
unit="s"
|
name="Intra-clip"
|
||||||
deltaType="lowerIsBetter"
|
unit="s"
|
||||||
>
|
deltaType="lowerIsBetter"
|
||||||
{gun.interClip * interClipCoefficient}
|
>
|
||||||
</InfoWithDelta>
|
{gun.intraClip * intraClipCoefficient}
|
||||||
)}
|
</InfoWithDelta>
|
||||||
|
))}
|
||||||
<InfoWithDelta name="Caliber" decimals={0} unit="mm">
|
<InfoWithDelta name="Caliber" decimals={0} unit="mm">
|
||||||
{shell.caliber}
|
{shell.caliber}
|
||||||
</InfoWithDelta>
|
</InfoWithDelta>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export function resolveDpm(
|
|||||||
shell: ShellDefinition,
|
shell: ShellDefinition,
|
||||||
damageCoefficient = 1,
|
damageCoefficient = 1,
|
||||||
reloadCoefficient = 1,
|
reloadCoefficient = 1,
|
||||||
interClipCoefficient = 1,
|
intraClipCoefficient = 1,
|
||||||
) {
|
) {
|
||||||
const alpha = shell.damage.armor * damageCoefficient;
|
const alpha = shell.damage.armor * damageCoefficient;
|
||||||
|
|
||||||
@@ -14,14 +14,14 @@ export function resolveDpm(
|
|||||||
} else if (gun.type === 'autoLoader') {
|
} else if (gun.type === 'autoLoader') {
|
||||||
return (
|
return (
|
||||||
((alpha * gun.count) /
|
((alpha * gun.count) /
|
||||||
(gun.reload + (gun.count - 1) * gun.interClip * interClipCoefficient)) *
|
(gun.reload + (gun.count - 1) * gun.intraClip * intraClipCoefficient)) *
|
||||||
60
|
60
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
((alpha * gun.count) /
|
((alpha * gun.count) /
|
||||||
(gun.reload.reduce((a, b) => a + b, 0) +
|
(gun.reload.reduce((a, b) => a + b, 0) +
|
||||||
(gun.count - 1) * gun.interClip)) *
|
(gun.count - 1) * gun.intraClip)) *
|
||||||
60
|
60
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ export function resolveReload(gun: GunDefinition) {
|
|||||||
if (gun.type === 'regular') {
|
if (gun.type === 'regular') {
|
||||||
return gun.reload;
|
return gun.reload;
|
||||||
} else if (gun.type === 'autoLoader') {
|
} else if (gun.type === 'autoLoader') {
|
||||||
return gun.reload + (gun.count - 1) * gun.interClip;
|
return gun.reload + (gun.count - 1) * gun.intraClip;
|
||||||
} else {
|
} else {
|
||||||
return (
|
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 {
|
interface GunDefinitionAutoLoader extends GunDefinitionBase {
|
||||||
type: 'autoLoader';
|
type: 'autoLoader';
|
||||||
reload: number;
|
reload: number;
|
||||||
interClip: number;
|
intraClip: number;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
interface GunDefinitionAutoReloader extends GunDefinitionBase {
|
interface GunDefinitionAutoReloader extends GunDefinitionBase {
|
||||||
type: 'autoReloader';
|
type: 'autoReloader';
|
||||||
reload: number[];
|
reload: number[];
|
||||||
interClip: number;
|
intraClip: number;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
export type ShellDefinition = {
|
export type ShellDefinition = {
|
||||||
|
|||||||
Reference in new issue
Block a user