fix: reveals a few hidden values

This commit is contained in:
TrèsAbhi committed 2024-03-12 17:09:21 -05:00
1 parent 46f9d605f7
commit 6d1ed1e56e
5 files changed
+34 -32

No files matched your search

+3 -3
View File
@@ -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
);
}
+2 -2
View File
@@ -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
);
}
}
+2 -2
View File
@@ -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 = {