mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: module damage isn't affected by reactive armor, dynamic armor, and spall liner
This commit is contained in:
1 parent
602f332ec5
commit
c51065e512
1 file changed
+9
-8
@@ -150,13 +150,14 @@ export function tankCharacteristics(
|
|||||||
commanderMastery *
|
commanderMastery *
|
||||||
(tank.crew.some(({ type }) => type === CrewType.DRIVER) ? 1.1 : 1.05);
|
(tank.crew.some(({ type }) => type === CrewType.DRIVER) ? 1.1 : 1.05);
|
||||||
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
const intraClipCoefficient = coefficient([hasShellReloadBoost, -0.3]);
|
||||||
const damageCoefficient =
|
const armorDamageCoefficient =
|
||||||
coefficient([hasTungsten, 0.15]) *
|
coefficient([hasTungsten, 0.15]) *
|
||||||
coefficient(
|
coefficient(
|
||||||
[applyReactiveArmor && shell.type !== ShellType.HE, -0.27],
|
[applyReactiveArmor && shell.type !== ShellType.HE, -0.27],
|
||||||
[applyDynamicArmor, -0.1],
|
[applyDynamicArmor, -0.1],
|
||||||
[applySpallLiner && shell.type === ShellType.HE, -0.2],
|
[applySpallLiner && shell.type === ShellType.HE, -0.2],
|
||||||
);
|
);
|
||||||
|
const moduleDamageCoefficient = coefficient([hasTungsten, 0.15]);
|
||||||
const reloadCoefficient =
|
const reloadCoefficient =
|
||||||
(coefficient([hasGunRammer, -0.05]) *
|
(coefficient([hasGunRammer, -0.05]) *
|
||||||
coefficient([true, degressiveStat(loaderMastery)])) /
|
coefficient([true, degressiveStat(loaderMastery)])) /
|
||||||
@@ -328,7 +329,7 @@ export function tankCharacteristics(
|
|||||||
const dpm = resolveDpm(
|
const dpm = resolveDpm(
|
||||||
gun,
|
gun,
|
||||||
shell,
|
shell,
|
||||||
damageCoefficient,
|
armorDamageCoefficient,
|
||||||
reloadCoefficient,
|
reloadCoefficient,
|
||||||
intraClipCoefficient,
|
intraClipCoefficient,
|
||||||
);
|
);
|
||||||
@@ -351,13 +352,13 @@ export function tankCharacteristics(
|
|||||||
return current;
|
return current;
|
||||||
}, null)!.index
|
}, null)!.index
|
||||||
: undefined;
|
: undefined;
|
||||||
const damage = shell.armor_damage * damageCoefficient;
|
const damage = shell.armor_damage * armorDamageCoefficient;
|
||||||
const dpmEffective =
|
const dpmEffective =
|
||||||
gun.gun_type!.$case === 'auto_reloader'
|
gun.gun_type!.$case === 'auto_reloader'
|
||||||
? gun.gun_type!.value.extension.shell_reloads[0] >
|
? gun.gun_type!.value.extension.shell_reloads[0] >
|
||||||
gun.gun_type!.value.extension.shell_reloads[1] +
|
gun.gun_type!.value.extension.shell_reloads[1] +
|
||||||
gun.gun_type!.value.extension.intra_clip
|
gun.gun_type!.value.extension.intra_clip
|
||||||
? ((damageCoefficient * shell.armor_damage) /
|
? ((armorDamageCoefficient * shell.armor_damage) /
|
||||||
(gun.gun_type!.value.extension.shell_reloads.at(-1)! *
|
(gun.gun_type!.value.extension.shell_reloads.at(-1)! *
|
||||||
reloadCoefficient +
|
reloadCoefficient +
|
||||||
gun.gun_type!.value.extension.intra_clip *
|
gun.gun_type!.value.extension.intra_clip *
|
||||||
@@ -367,10 +368,10 @@ export function tankCharacteristics(
|
|||||||
1) *
|
1) *
|
||||||
gun.gun_type!.value.extension.intra_clip *
|
gun.gun_type!.value.extension.intra_clip *
|
||||||
intraClipCoefficient) +
|
intraClipCoefficient) +
|
||||||
damageCoefficient *
|
armorDamageCoefficient *
|
||||||
shell.armor_damage *
|
shell.armor_damage *
|
||||||
gun.gun_type!.value.extension.shell_reloads.slice(0, -1).length
|
gun.gun_type!.value.extension.shell_reloads.slice(0, -1).length
|
||||||
: ((damageCoefficient * shell.armor_damage) /
|
: ((armorDamageCoefficient * shell.armor_damage) /
|
||||||
(gun.gun_type!.value.extension.shell_reloads[0] *
|
(gun.gun_type!.value.extension.shell_reloads[0] *
|
||||||
reloadCoefficient +
|
reloadCoefficient +
|
||||||
gun.gun_type!.value.extension.intra_clip *
|
gun.gun_type!.value.extension.intra_clip *
|
||||||
@@ -380,7 +381,7 @@ export function tankCharacteristics(
|
|||||||
1) *
|
1) *
|
||||||
gun.gun_type!.value.extension.intra_clip *
|
gun.gun_type!.value.extension.intra_clip *
|
||||||
intraClipCoefficient) +
|
intraClipCoefficient) +
|
||||||
damageCoefficient *
|
armorDamageCoefficient *
|
||||||
shell.armor_damage *
|
shell.armor_damage *
|
||||||
gun.gun_type!.value.extension.shell_reloads.slice(1).length
|
gun.gun_type!.value.extension.shell_reloads.slice(1).length
|
||||||
: undefined;
|
: undefined;
|
||||||
@@ -406,7 +407,7 @@ export function tankCharacteristics(
|
|||||||
gun.gun_type!.$case === 'regular'
|
gun.gun_type!.$case === 'regular'
|
||||||
? undefined
|
? undefined
|
||||||
: gun.gun_type!.value.extension.shell_count * damage;
|
: gun.gun_type!.value.extension.shell_count * damage;
|
||||||
const moduleDamage = shell.module_damage * damageCoefficient;
|
const moduleDamage = shell.module_damage * moduleDamageCoefficient;
|
||||||
const explosionRadius = shell.explosion_radius;
|
const explosionRadius = shell.explosion_radius;
|
||||||
const shellVelocity = shell.velocity * shellVelocityCoefficient;
|
const shellVelocity = shell.velocity * shellVelocityCoefficient;
|
||||||
const aimTime = gun.gun_type!.value.base.aim_time * aimTimeCoefficient;
|
const aimTime = gun.gun_type!.value.base.aim_time * aimTimeCoefficient;
|
||||||
|
|||||||
Reference in new issue
Block a user