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
@@ -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