mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: penetration testing
This commit is contained in:
1 parent
1a008a4852
commit
b176ec6c96
7 files changed
+53
-23
No files matched your search
@@ -1,16 +1,21 @@
|
||||
import { ShellType } from "../protos";
|
||||
import { Equalizer, ShellType } from "../protos";
|
||||
|
||||
export function resolvePenetrationCoefficient(
|
||||
calibratedShells: boolean,
|
||||
equalize: boolean,
|
||||
type: ShellType,
|
||||
equalizerObj?: Equalizer,
|
||||
) {
|
||||
if (!calibratedShells) return 1;
|
||||
const calibrated = calibratedShells
|
||||
? type === ShellType.SHELL_TYPE_AP
|
||||
? 1.08
|
||||
: type === ShellType.SHELL_TYPE_APCR
|
||||
? 1.05
|
||||
: type === ShellType.SHELL_TYPE_HEAT
|
||||
? 1.13
|
||||
: 1.08
|
||||
: 1;
|
||||
const equalizer = (equalize ? equalizerObj?.penetration : undefined) ?? 1;
|
||||
|
||||
return type === ShellType.SHELL_TYPE_AP
|
||||
? 1.08
|
||||
: type === ShellType.SHELL_TYPE_APCR
|
||||
? 1.05
|
||||
: type === ShellType.SHELL_TYPE_HEAT
|
||||
? 1.13
|
||||
: 1.08;
|
||||
return calibrated * equalizer;
|
||||
}
|
||||
Reference in new issue
Block a user